From 8a2072bbd6516ddd0fdd275a17f6ed91f3a463ec Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sun, 21 Sep 2025 00:40:18 -0400 Subject: [PATCH 01/12] prove not switching to typeddict is better? it doesnt seem to be proving.. --- tests/test_assumptions.py | 1047 +++++++++++++++++++++++++++++++++++++ 1 file changed, 1047 insertions(+) diff --git a/tests/test_assumptions.py b/tests/test_assumptions.py index 0543b54..85a6585 100644 --- a/tests/test_assumptions.py +++ b/tests/test_assumptions.py @@ -257,3 +257,1050 @@ def __init__( # If this test passes, then a huge attr list of if (not x is or x is) # is faster. The library uses this assumption. assert test2_delta > test1_delta + + +def test_args_perf(): + """ + This test compares a big arg list vs kwargs + We do a lot of if not (x is None or x is False) checks + The test confirms that a big arg list is faster than unpacking a kwargs + dict + + The other reason we don't use a kwargs is because we would have to translate + class_ to class, etc. which would add extra overhead + """ + + def process_attr(name, value): + pass + + # emulate our class_ problem + special_list = {"ik_": "ik", "in_": "in", "is_": "is", "as_": "as"} + + def fn2(**kwargs): + nonlocal special_list + for k, v in kwargs.items(): + process_attr(special_list.get(k, k), v) + + def fn1( + aa=None, + ab=None, + ac=None, + ad=None, + ae=None, + af=None, + ag=None, + ah=None, + ai=None, + aj=None, + ak=None, + al=None, + am=None, + an=None, + ao=None, + ap=None, + aq=None, + ar=None, + at=None, + au=None, + av=None, + aw=None, + ax=None, + ay=None, + az=None, + ba=None, + bb=None, + bc=None, + bd=None, + be=None, + bf=None, + bg=None, + bh=None, + bi=None, + bj=None, + bk=None, + bl=None, + bm=None, + bn=None, + bo=None, + bp=None, + bq=None, + br=None, + bs=None, + bt=None, + bu=None, + bv=None, + bw=None, + bx=None, + by=None, + bz=None, + ca=None, + cb=None, + cc=None, + cd=None, + ce=None, + cf=None, + cg=None, + ch=None, + ci=None, + cj=None, + ck=None, + cl=None, + cm=None, + cn=None, + co=None, + cp=None, + cq=None, + cr=None, + cs=None, + ct=None, + cu=None, + cv=None, + cw=None, + cx=None, + cy=None, + cz=None, + da=None, + db=None, + dc=None, + dd=None, + de=None, + df=None, + dg=None, + dh=None, + di=None, + dj=None, + dk=None, + dl=None, + dm=None, + dn=None, + do=None, + dp=None, + dq=None, + dr=None, + ds=None, + dt=None, + du=None, + dv=None, + dw=None, + dx=None, + dy=None, + dz=None, + ea=None, + eb=None, + ec=None, + ed=None, + ee=None, + ef=None, + eg=None, + eh=None, + ei=None, + ej=None, + ek=None, + el=None, + em=None, + en=None, + eo=None, + ep=None, + eq=None, + er=None, + es=None, + et=None, + eu=None, + ev=None, + ew=None, + ex=None, + ey=None, + ez=None, + fa=None, + fb=None, + fc=None, + fd=None, + fe=None, + ff=None, + fg=None, + fh=None, + fi=None, + fj=None, + fk=None, + fl=None, + fm=None, + fn=None, + fo=None, + fp=None, + fq=None, + fr=None, + fs=None, + ft=None, + fu=None, + fv=None, + fw=None, + fx=None, + fy=None, + fz=None, + ga=None, + gb=None, + gc=None, + gd=None, + ge=None, + gf=None, + gg=None, + gh=None, + gi=None, + gj=None, + gk=None, + gl=None, + gm=None, + gn=None, + go=None, + gp=None, + gq=None, + gr=None, + gs=None, + gt=None, + gu=None, + gv=None, + gw=None, + gx=None, + gy=None, + gz=None, + ha=None, + hb=None, + hc=None, + hd=None, + he=None, + hf=None, + hg=None, + hh=None, + hi=None, + hj=None, + hk=None, + hl=None, + hm=None, + hn=None, + ho=None, + hp=None, + hq=None, + hr=None, + hs=None, + ht=None, + hu=None, + hv=None, + hw=None, + hx=None, + hy=None, + hz=None, + ia=None, + ib=None, + ic=None, + id=None, + ie=None, + if_=None, + ig=None, + ih=None, + ii=None, + ij=None, + ik=None, + il=None, + im=None, + in_=None, + io=None, + ): + if not (aa is None or aa is False): + process_attr("aa", aa) + if not (ab is None or ab is False): + process_attr("ab", ab) + if not (ac is None or ac is False): + process_attr("ac", ac) + if not (ad is None or ad is False): + process_attr("ad", ad) + if not (ae is None or ae is False): + process_attr("ae", ae) + if not (af is None or af is False): + process_attr("af", af) + if not (ag is None or ag is False): + process_attr("ag", ag) + if not (ah is None or ah is False): + process_attr("ah", ah) + if not (ai is None or ai is False): + process_attr("ai", ai) + if not (aj is None or aj is False): + process_attr("aj", aj) + if not (ak is None or ak is False): + process_attr("ak", ak) + if not (al is None or al is False): + process_attr("al", al) + if not (am is None or am is False): + process_attr("am", am) + if not (an is None or an is False): + process_attr("an", an) + if not (ao is None or ao is False): + process_attr("ao", ao) + if not (ap is None or ap is False): + process_attr("ap", ap) + if not (aq is None or aq is False): + process_attr("aq", aq) + if not (ar is None or ar is False): + process_attr("ar", ar) + if not (at is None or at is False): + process_attr("at", at) + if not (au is None or au is False): + process_attr("au", au) + if not (av is None or av is False): + process_attr("av", av) + if not (aw is None or aw is False): + process_attr("aw", aw) + if not (ax is None or ax is False): + process_attr("ax", ax) + if not (ay is None or ay is False): + process_attr("ay", ay) + if not (az is None or az is False): + process_attr("az", az) + if not (ba is None or ba is False): + process_attr("ba", ba) + if not (bb is None or bb is False): + process_attr("bb", bb) + if not (bc is None or bc is False): + process_attr("bc", bc) + if not (bd is None or bd is False): + process_attr("bd", bd) + if not (be is None or be is False): + process_attr("be", be) + if not (bf is None or bf is False): + process_attr("bf", bf) + if not (bg is None or bg is False): + process_attr("bg", bg) + if not (bh is None or bh is False): + process_attr("bh", bh) + if not (bi is None or bi is False): + process_attr("bi", bi) + if not (bj is None or bj is False): + process_attr("bj", bj) + if not (bk is None or bk is False): + process_attr("bk", bk) + if not (bl is None or bl is False): + process_attr("bl", bl) + if not (bm is None or bm is False): + process_attr("bm", bm) + if not (bn is None or bn is False): + process_attr("bn", bn) + if not (bo is None or bo is False): + process_attr("bo", bo) + if not (bp is None or bp is False): + process_attr("bp", bp) + if not (bq is None or bq is False): + process_attr("bq", bq) + if not (br is None or br is False): + process_attr("br", br) + if not (bs is None or bs is False): + process_attr("bs", bs) + if not (bt is None or bt is False): + process_attr("bt", bt) + if not (bu is None or bu is False): + process_attr("bu", bu) + if not (bv is None or bv is False): + process_attr("bv", bv) + if not (bw is None or bw is False): + process_attr("bw", bw) + if not (bx is None or bx is False): + process_attr("bx", bx) + if not (by is None or by is False): + process_attr("by", by) + if not (bz is None or bz is False): + process_attr("bz", bz) + if not (ca is None or ca is False): + process_attr("ca", ca) + if not (cb is None or cb is False): + process_attr("cb", cb) + if not (cc is None or cc is False): + process_attr("cc", cc) + if not (cd is None or cd is False): + process_attr("cd", cd) + if not (ce is None or ce is False): + process_attr("ce", ce) + if not (cf is None or cf is False): + process_attr("cf", cf) + if not (cg is None or cg is False): + process_attr("cg", cg) + if not (ch is None or ch is False): + process_attr("ch", ch) + if not (ci is None or ci is False): + process_attr("ci", ci) + if not (cj is None or cj is False): + process_attr("cj", cj) + if not (ck is None or ck is False): + process_attr("ck", ck) + if not (cl is None or cl is False): + process_attr("cl", cl) + if not (cm is None or cm is False): + process_attr("cm", cm) + if not (cn is None or cn is False): + process_attr("cn", cn) + if not (co is None or co is False): + process_attr("co", co) + if not (cp is None or cp is False): + process_attr("cp", cp) + if not (cq is None or cq is False): + process_attr("cq", cq) + if not (cr is None or cr is False): + process_attr("cr", cr) + if not (cs is None or cs is False): + process_attr("cs", cs) + if not (ct is None or ct is False): + process_attr("ct", ct) + if not (cu is None or cu is False): + process_attr("cu", cu) + if not (cv is None or cv is False): + process_attr("cv", cv) + if not (cw is None or cw is False): + process_attr("cw", cw) + if not (cx is None or cx is False): + process_attr("cx", cx) + if not (cy is None or cy is False): + process_attr("cy", cy) + if not (cz is None or cz is False): + process_attr("cz", cz) + if not (da is None or da is False): + process_attr("da", da) + if not (db is None or db is False): + process_attr("db", db) + if not (dc is None or dc is False): + process_attr("dc", dc) + if not (dd is None or dd is False): + process_attr("dd", dd) + if not (de is None or de is False): + process_attr("de", de) + if not (df is None or df is False): + process_attr("df", df) + if not (dg is None or dg is False): + process_attr("dg", dg) + if not (dh is None or dh is False): + process_attr("dh", dh) + if not (di is None or di is False): + process_attr("di", di) + if not (dj is None or dj is False): + process_attr("dj", dj) + if not (dk is None or dk is False): + process_attr("dk", dk) + if not (dl is None or dl is False): + process_attr("dl", dl) + if not (dm is None or dm is False): + process_attr("dm", dm) + if not (dn is None or dn is False): + process_attr("dn", dn) + if not (do is None or do is False): + process_attr("do", do) + if not (dp is None or dp is False): + process_attr("dp", dp) + if not (dq is None or dq is False): + process_attr("dq", dq) + if not (dr is None or dr is False): + process_attr("dr", dr) + if not (ds is None or ds is False): + process_attr("ds", ds) + if not (dt is None or dt is False): + process_attr("dt", dt) + if not (du is None or du is False): + process_attr("du", du) + if not (dv is None or dv is False): + process_attr("dv", dv) + if not (dw is None or dw is False): + process_attr("dw", dw) + if not (dx is None or dx is False): + process_attr("dx", dx) + if not (dy is None or dy is False): + process_attr("dy", dy) + if not (dz is None or dz is False): + process_attr("dz", dz) + if not (ea is None or ea is False): + process_attr("ea", ea) + if not (eb is None or eb is False): + process_attr("eb", eb) + if not (ec is None or ec is False): + process_attr("ec", ec) + if not (ed is None or ed is False): + process_attr("ed", ed) + if not (ee is None or ee is False): + process_attr("ee", ee) + if not (ef is None or ef is False): + process_attr("ef", ef) + if not (eg is None or eg is False): + process_attr("eg", eg) + if not (eh is None or eh is False): + process_attr("eh", eh) + if not (ei is None or ei is False): + process_attr("ei", ei) + if not (ej is None or ej is False): + process_attr("ej", ej) + if not (ek is None or ek is False): + process_attr("ek", ek) + if not (el is None or el is False): + process_attr("el", el) + if not (em is None or em is False): + process_attr("em", em) + if not (en is None or en is False): + process_attr("en", en) + if not (eo is None or eo is False): + process_attr("eo", eo) + if not (ep is None or ep is False): + process_attr("ep", ep) + if not (eq is None or eq is False): + process_attr("eq", eq) + if not (er is None or er is False): + process_attr("er", er) + if not (es is None or es is False): + process_attr("es", es) + if not (et is None or et is False): + process_attr("et", et) + if not (eu is None or eu is False): + process_attr("eu", eu) + if not (ev is None or ev is False): + process_attr("ev", ev) + if not (ew is None or ew is False): + process_attr("ew", ew) + if not (ex is None or ex is False): + process_attr("ex", ex) + if not (ey is None or ey is False): + process_attr("ey", ey) + if not (ez is None or ez is False): + process_attr("ez", ez) + if not (fa is None or fa is False): + process_attr("fa", fa) + if not (fb is None or fb is False): + process_attr("fb", fb) + if not (fc is None or fc is False): + process_attr("fc", fc) + if not (fd is None or fd is False): + process_attr("fd", fd) + if not (fe is None or fe is False): + process_attr("fe", fe) + if not (ff is None or ff is False): + process_attr("ff", ff) + if not (fg is None or fg is False): + process_attr("fg", fg) + if not (fh is None or fh is False): + process_attr("fh", fh) + if not (fi is None or fi is False): + process_attr("fi", fi) + if not (fj is None or fj is False): + process_attr("fj", fj) + if not (fk is None or fk is False): + process_attr("fk", fk) + if not (fl is None or fl is False): + process_attr("fl", fl) + if not (fm is None or fm is False): + process_attr("fm", fm) + if not (fn is None or fn is False): + process_attr("fn", fn) + if not (fo is None or fo is False): + process_attr("fo", fo) + if not (fp is None or fp is False): + process_attr("fp", fp) + if not (fq is None or fq is False): + process_attr("fq", fq) + if not (fr is None or fr is False): + process_attr("fr", fr) + if not (fs is None or fs is False): + process_attr("fs", fs) + if not (ft is None or ft is False): + process_attr("ft", ft) + if not (fu is None or fu is False): + process_attr("fu", fu) + if not (fv is None or fv is False): + process_attr("fv", fv) + if not (fw is None or fw is False): + process_attr("fw", fw) + if not (fx is None or fx is False): + process_attr("fx", fx) + if not (fy is None or fy is False): + process_attr("fy", fy) + if not (fz is None or fz is False): + process_attr("fz", fz) + if not (ga is None or ga is False): + process_attr("ga", ga) + if not (gb is None or gb is False): + process_attr("gb", gb) + if not (gc is None or gc is False): + process_attr("gc", gc) + if not (gd is None or gd is False): + process_attr("gd", gd) + if not (ge is None or ge is False): + process_attr("ge", ge) + if not (gf is None or gf is False): + process_attr("gf", gf) + if not (gg is None or gg is False): + process_attr("gg", gg) + if not (gh is None or gh is False): + process_attr("gh", gh) + if not (gi is None or gi is False): + process_attr("gi", gi) + if not (gj is None or gj is False): + process_attr("gj", gj) + if not (gk is None or gk is False): + process_attr("gk", gk) + if not (gl is None or gl is False): + process_attr("gl", gl) + if not (gm is None or gm is False): + process_attr("gm", gm) + if not (gn is None or gn is False): + process_attr("gn", gn) + if not (go is None or go is False): + process_attr("go", go) + if not (gp is None or gp is False): + process_attr("gp", gp) + if not (gq is None or gq is False): + process_attr("gq", gq) + if not (gr is None or gr is False): + process_attr("gr", gr) + if not (gs is None or gs is False): + process_attr("gs", gs) + if not (gt is None or gt is False): + process_attr("gt", gt) + if not (gu is None or gu is False): + process_attr("gu", gu) + if not (gv is None or gv is False): + process_attr("gv", gv) + if not (gw is None or gw is False): + process_attr("gw", gw) + if not (gx is None or gx is False): + process_attr("gx", gx) + if not (gy is None or gy is False): + process_attr("gy", gy) + if not (gz is None or gz is False): + process_attr("gz", gz) + if not (ha is None or ha is False): + process_attr("ha", ha) + if not (hb is None or hb is False): + process_attr("hb", hb) + if not (hc is None or hc is False): + process_attr("hc", hc) + if not (hd is None or hd is False): + process_attr("hd", hd) + if not (he is None or he is False): + process_attr("he", he) + if not (hf is None or hf is False): + process_attr("hf", hf) + if not (hg is None or hg is False): + process_attr("hg", hg) + if not (hh is None or hh is False): + process_attr("hh", hh) + if not (hi is None or hi is False): + process_attr("hi", hi) + if not (hj is None or hj is False): + process_attr("hj", hj) + if not (hk is None or hk is False): + process_attr("hk", hk) + if not (hl is None or hl is False): + process_attr("hl", hl) + if not (hm is None or hm is False): + process_attr("hm", hm) + if not (hn is None or hn is False): + process_attr("hn", hn) + if not (ho is None or ho is False): + process_attr("ho", ho) + if not (hp is None or hp is False): + process_attr("hp", hp) + if not (hq is None or hq is False): + process_attr("hq", hq) + if not (hr is None or hr is False): + process_attr("hr", hr) + if not (hs is None or hs is False): + process_attr("hs", hs) + if not (ht is None or ht is False): + process_attr("ht", ht) + if not (hu is None or hu is False): + process_attr("hu", hu) + if not (hv is None or hv is False): + process_attr("hv", hv) + if not (hw is None or hw is False): + process_attr("hw", hw) + if not (hx is None or hx is False): + process_attr("hx", hx) + if not (hy is None or hy is False): + process_attr("hy", hy) + if not (hz is None or hz is False): + process_attr("hz", hz) + if not (ia is None or ia is False): + process_attr("ia", ia) + if not (ib is None or ib is False): + process_attr("ib", ib) + if not (ic is None or ic is False): + process_attr("ic", ic) + if not (id is None or id is False): + process_attr("id", id) + if not (ie is None or ie is False): + process_attr("ie", ie) + if not (if_ is None or if_ is False): + process_attr("if_", if_) + if not (ig is None or ig is False): + process_attr("ig", ig) + if not (ih is None or ih is False): + process_attr("ih", ih) + if not (ii is None or ii is False): + process_attr("ii", ii) + if not (ij is None or ij is False): + process_attr("ij", ij) + if not (ik is None or ik is False): + process_attr("ik", ik) + if not (il is None or il is False): + process_attr("il", il) + if not (im is None or im is False): + process_attr("im", im) + if not (in_ is None or in_ is False): + process_attr("in_", in_) + if not (io is None or io is False): + process_attr("io", io) + + def control_func( + aa=None, + ab=None, + ac=None, + ad=None, + ae=None, + af=None, + ag=None, + ah=None, + ai=None, + aj=None, + ak=None, + al=None, + am=None, + an=None, + ao=None, + ap=None, + aq=None, + ar=None, + at=None, + au=None, + av=None, + aw=None, + ax=None, + ay=None, + az=None, + ba=None, + bb=None, + bc=None, + bd=None, + be=None, + bf=None, + bg=None, + bh=None, + bi=None, + bj=None, + bk=None, + bl=None, + bm=None, + bn=None, + bo=None, + bp=None, + bq=None, + br=None, + bs=None, + bt=None, + bu=None, + bv=None, + bw=None, + bx=None, + by=None, + bz=None, + ca=None, + cb=None, + cc=None, + cd=None, + ce=None, + cf=None, + cg=None, + ch=None, + ci=None, + cj=None, + ck=None, + cl=None, + cm=None, + cn=None, + co=None, + cp=None, + cq=None, + cr=None, + cs=None, + ct=None, + cu=None, + cv=None, + cw=None, + cx=None, + cy=None, + cz=None, + da=None, + db=None, + dc=None, + dd=None, + de=None, + df=None, + dg=None, + dh=None, + di=None, + dj=None, + dk=None, + dl=None, + dm=None, + dn=None, + do=None, + dp=None, + dq=None, + dr=None, + ds=None, + dt=None, + du=None, + dv=None, + dw=None, + dx=None, + dy=None, + dz=None, + ea=None, + eb=None, + ec=None, + ed=None, + ee=None, + ef=None, + eg=None, + eh=None, + ei=None, + ej=None, + ek=None, + el=None, + em=None, + en=None, + eo=None, + ep=None, + eq=None, + er=None, + es=None, + et=None, + eu=None, + ev=None, + ew=None, + ex=None, + ey=None, + ez=None, + fa=None, + fb=None, + fc=None, + fd=None, + fe=None, + ff=None, + fg=None, + fh=None, + fi=None, + fj=None, + fk=None, + fl=None, + fm=None, + fn=None, + fo=None, + fp=None, + fq=None, + fr=None, + fs=None, + ft=None, + fu=None, + fv=None, + fw=None, + fx=None, + fy=None, + fz=None, + ga=None, + gb=None, + gc=None, + gd=None, + ge=None, + gf=None, + gg=None, + gh=None, + gi=None, + gj=None, + gk=None, + gl=None, + gm=None, + gn=None, + go=None, + gp=None, + gq=None, + gr=None, + gs=None, + gt=None, + gu=None, + gv=None, + gw=None, + gx=None, + gy=None, + gz=None, + ha=None, + hb=None, + hc=None, + hd=None, + he=None, + hf=None, + hg=None, + hh=None, + hi=None, + hj=None, + hk=None, + hl=None, + hm=None, + hn=None, + ho=None, + hp=None, + hq=None, + hr=None, + hs=None, + ht=None, + hu=None, + hv=None, + hw=None, + hx=None, + hy=None, + hz=None, + ia=None, + ib=None, + ic=None, + id=None, + ie=None, + if_=None, + ig=None, + ih=None, + ii=None, + ij=None, + ik=None, + il=None, + im=None, + in_=None, + io=None, + ): + pass + + dstart = perf_counter() + for i in range(100000): + fn1( + aa="https://example.com", + ab="https://example.com", + ac="https://example.com", + ad="https://example.com", + ae="https://example.com", + af="https://example.com", + ag="https://example.com", + ah="https://example.com", + ai="https://example.com", + aj="https://example.com", + ak="https://example.com", + al="https://example.com", + am="https://example.com", + an="https://example.com", + ao="https://example.com", + ap="https://example.com", + aq="https://example.com", + ar="https://example.com", + at="https://example.com", + au="https://example.com", + av="https://example.com", + aw="https://example.com", + ax="https://example.com", + ay="https://example.com", + az="https://example.com", + ba="https://example.com", + bb="https://example.com", + bc="https://example.com", + bd="https://example.com", + be="https://example.com", + bf="https://example.com", + ) + dend = perf_counter() + + d2start = perf_counter() + for i in range(100000): + fn2( + aa="https://example.com", + ab="https://example.com", + ac="https://example.com", + ad="https://example.com", + ae="https://example.com", + af="https://example.com", + ag="https://example.com", + ah="https://example.com", + ai="https://example.com", + aj="https://example.com", + ak="https://example.com", + al="https://example.com", + am="https://example.com", + an="https://example.com", + ao="https://example.com", + ap="https://example.com", + aq="https://example.com", + ar="https://example.com", + at="https://example.com", + au="https://example.com", + av="https://example.com", + aw="https://example.com", + ax="https://example.com", + ay="https://example.com", + az="https://example.com", + ba="https://example.com", + bb="https://example.com", + bc="https://example.com", + bd="https://example.com", + be="https://example.com", + bf="https://example.com", + ) + + d2end = perf_counter() + + d3start = perf_counter() + for i in range(100000): + control_func( + aa="https://example.com", + ab="https://example.com", + ac="https://example.com", + ad="https://example.com", + ae="https://example.com", + af="https://example.com", + ag="https://example.com", + ah="https://example.com", + ai="https://example.com", + aj="https://example.com", + ak="https://example.com", + al="https://example.com", + am="https://example.com", + an="https://example.com", + ao="https://example.com", + ap="https://example.com", + aq="https://example.com", + ar="https://example.com", + at="https://example.com", + au="https://example.com", + av="https://example.com", + aw="https://example.com", + ax="https://example.com", + ay="https://example.com", + az="https://example.com", + ba="https://example.com", + bb="https://example.com", + bc="https://example.com", + bd="https://example.com", + be="https://example.com", + bf="https://example.com", + ) + + d3end = perf_counter() + test1_delta = dend - dstart + test2_delta = d2end - d2start + test3_delta = d3end - d3start + print(f"Test 1: {test1_delta} seconds") + print(f"Test 2: {test2_delta} seconds") + print(f"Test 3: {test3_delta} seconds") + + # If this test passes, then a huge attr list of if (not x is or x is) + # is faster. The library uses this assumption. + + # dis.dis(fn1) + + # Ensure that test 1 isn't more than 10% worse than test 2 + assert test1_delta <= test2_delta * 1.10, ( + "Test 1 should not be more than 10% slower than Test 2" + ) From 693899f881a8c799d10b8de561556ecd849eda84 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sun, 21 Sep 2025 00:40:30 -0400 Subject: [PATCH 02/12] Try enabling on events --- tools/generate_elements.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/generate_elements.py b/tools/generate_elements.py index 1d0836e..9c5af77 100644 --- a/tools/generate_elements.py +++ b/tools/generate_elements.py @@ -274,18 +274,14 @@ def add_param(p): spec_attrs = _spec["attributes"] if spec_attrs: processed = generate_attrs(attr_class, spec_attrs) - shifted = [ - x for x in processed if not x.name.startswith("on") - ] + shifted = [x for x in processed] for p in shifted: add_param(p) extra_attrs = "\n".join(attr_list) attr_assignment = "\n".join(assign_list) global_shifted = [ - x - for x in global_processed - if not x.name.startswith("on") and x.name not in ("id", "class") + x for x in global_processed if x.name not in ("id", "class") ] for p in global_shifted: add_param(p) From c0d2e3a43f8666de8616585ea3ee118833de7dbf Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sun, 21 Sep 2025 01:35:02 -0400 Subject: [PATCH 03/12] Test now reflects beyond the worst possible case in light of on* events being added --- tests/test_assumptions.py | 162 ++++++-------------------------------- 1 file changed, 22 insertions(+), 140 deletions(-) diff --git a/tests/test_assumptions.py b/tests/test_assumptions.py index 85a6585..e6c1a06 100644 --- a/tests/test_assumptions.py +++ b/tests/test_assumptions.py @@ -134,140 +134,19 @@ def gen(): assert list(gen_2) == arr -def test_disassembly(): - """ - Test work actually done in python for a big argument list - """ - - def demo(**kwargs): - pass - - class DemoDict: - """ - Theory: Dictionary is optimized and building one with a generator - May be faster than stacking - """ - - def _process_attr(self, attr_name, attr_value): - pass - - def __init__( - self, - id=None, - class_=None, - download=None, - href=None, - hreflang=None, - ping=None, - referrerpolicy=None, - rel=None, - target=None, - type=None, - attrs=None, - children=None, - ) -> None: - demo( - type="a", - void_element=False, - id=id, - class_=class_, - attrs=attrs, - children=children, - ) - attrs = { - k: v - for k, v in { - "download": download, - "href": href, - "hreflang": hreflang, - "ping": ping, - "referrerpolicy": referrerpolicy, - "rel": rel, - "target": target, - "type": type, - }.items() - if v is not None and v is not False - } - - class Demo: - def _process_attr(self, attr_name, attr_value): - pass - - def __init__( - self, - id=None, - class_=None, - download=None, - href=None, - hreflang=None, - ping=None, - referrerpolicy=None, - rel=None, - target=None, - type=None, - attrs=None, - children=None, - ) -> None: - demo( - type="a", - void_element=False, - id=id, - class_=class_, - attrs=attrs, - children=children, - ) - if not (download is None or download is False): - self._process_attr("download", download) - if not (href is None or href is False): - self._process_attr("href", href) - if not (hreflang is None or hreflang is False): - self._process_attr("hreflang", hreflang) - if not (ping is None or ping is False): - self._process_attr("ping", ping) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (target is None or target is False): - self._process_attr("target", target) - if not (type is None or type is False): - self._process_attr("type", type) - - # Uncomment to view disassembly - # import dis - - # dis.dis(Demo.__init__) - # dis.dis(DemoDict.__init__) - # raise Exception("Disassemble and analyze disassembly output") - - d2start = perf_counter() - for i in range(100000): - DemoDict(href="https://example.com") - d2end = perf_counter() - - dstart = perf_counter() - for i in range(100000): - Demo(href="https://example.com") - dend = perf_counter() - - test1_delta = dend - dstart - test2_delta = d2end - d2start - print(f"Test 1: {test1_delta} seconds") - print(f"Test 2: {test2_delta} seconds") - # If this test passes, then a huge attr list of if (not x is or x is) - # is faster. The library uses this assumption. - assert test2_delta > test1_delta - - -def test_args_perf(): +def test_compare_argument_style_performance(): """ This test compares a big arg list vs kwargs We do a lot of if not (x is None or x is False) checks - The test confirms that a big arg list is faster than unpacking a kwargs + The test confirms that a big arg list is comparable to unpacking a kwargs dict - The other reason we don't use a kwargs is because we would have to translate - class_ to class, etc. which would add extra overhead + It would be way better to use a kwargs dict, but our branch to use + Unpack[TypedDict] for named kwargs is not supported in python <3.12 + + I tried using typing_extensions but the language server Pylance wasn't happy + + So we have to use a big arg list for now """ def process_attr(name, value): @@ -1176,8 +1055,9 @@ def control_func( ): pass + RUN_NUM = 70000 dstart = perf_counter() - for i in range(100000): + for i in range(RUN_NUM): fn1( aa="https://example.com", ab="https://example.com", @@ -1214,7 +1094,7 @@ def control_func( dend = perf_counter() d2start = perf_counter() - for i in range(100000): + for i in range(RUN_NUM): fn2( aa="https://example.com", ab="https://example.com", @@ -1252,7 +1132,7 @@ def control_func( d2end = perf_counter() d3start = perf_counter() - for i in range(100000): + for i in range(RUN_NUM): control_func( aa="https://example.com", ab="https://example.com", @@ -1295,12 +1175,14 @@ def control_func( print(f"Test 2: {test2_delta} seconds") print(f"Test 3: {test3_delta} seconds") - # If this test passes, then a huge attr list of if (not x is or x is) - # is faster. The library uses this assumption. - - # dis.dis(fn1) - - # Ensure that test 1 isn't more than 10% worse than test 2 - assert test1_delta <= test2_delta * 1.10, ( - "Test 1 should not be more than 10% slower than Test 2" + # Ensure that test 1 (arg unpacking isn't + # more than 50% slower than test 2 (kwargs unpacking) + assert test1_delta <= test2_delta * 1.50, ( + "Test 1 should not be more than 50% slower than Test 2" + ) + # Verify that the control function is at least 50% faster than test 1 + # If this varies, just increase the factor but we're trying to use this + # to confirm we understand the percentage of time we're measuring + assert test3_delta < test1_delta * 0.5, ( + "Control function should be at least 50% faster than Test 1" ) From 79db1de591b669b5646fcfd7e50d1d4e066aa2e5 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 22:21:35 -0400 Subject: [PATCH 04/12] Typing improvements: Iterable, mapping, StrLike, Resolvable Iterable and mapping are list/dict interfaces StrLike basically something wtih a clear str method, Update tests around type checker --- src/html_compose/attributes/a_attrs.py | 7 +- src/html_compose/attributes/abbr_attrs.py | 3 +- src/html_compose/attributes/area_attrs.py | 9 +- src/html_compose/attributes/button_attrs.py | 5 +- src/html_compose/attributes/data_attrs.py | 3 +- src/html_compose/attributes/details_attrs.py | 3 +- src/html_compose/attributes/dfn_attrs.py | 3 +- src/html_compose/attributes/fieldset_attrs.py | 3 +- src/html_compose/attributes/form_attrs.py | 3 +- src/html_compose/attributes/global_attrs.py | 23 +- src/html_compose/attributes/iframe_attrs.py | 3 +- src/html_compose/attributes/img_attrs.py | 3 +- src/html_compose/attributes/input_attrs.py | 11 +- src/html_compose/attributes/link_attrs.py | 9 +- src/html_compose/attributes/map_attrs.py | 3 +- src/html_compose/attributes/meta_attrs.py | 5 +- src/html_compose/attributes/optgroup_attrs.py | 3 +- src/html_compose/attributes/option_attrs.py | 5 +- src/html_compose/attributes/output_attrs.py | 5 +- src/html_compose/attributes/script_attrs.py | 5 +- src/html_compose/attributes/select_attrs.py | 3 +- src/html_compose/attributes/slot_attrs.py | 3 +- src/html_compose/attributes/style_attrs.py | 5 +- src/html_compose/attributes/td_attrs.py | 3 +- src/html_compose/attributes/textarea_attrs.py | 7 +- src/html_compose/attributes/th_attrs.py | 5 +- src/html_compose/attributes/track_attrs.py | 3 +- src/html_compose/base_attribute.py | 15 +- src/html_compose/base_element.py | 13 +- src/html_compose/base_types.py | 13 +- src/html_compose/elements/a_element.py | 638 +++++++++++++-- src/html_compose/elements/abbr_element.py | 622 +++++++++++++-- src/html_compose/elements/address_element.py | 622 +++++++++++++-- src/html_compose/elements/area_element.py | 644 +++++++++++++-- src/html_compose/elements/article_element.py | 622 +++++++++++++-- src/html_compose/elements/aside_element.py | 622 +++++++++++++-- src/html_compose/elements/audio_element.py | 642 +++++++++++++-- src/html_compose/elements/b_element.py | 622 +++++++++++++-- src/html_compose/elements/base_element.py | 626 +++++++++++++-- src/html_compose/elements/bdi_element.py | 622 +++++++++++++-- src/html_compose/elements/bdo_element.py | 622 +++++++++++++-- .../elements/blockquote_element.py | 624 +++++++++++++-- src/html_compose/elements/body_element.py | 748 ++++++++++++++++-- src/html_compose/elements/br_element.py | 622 +++++++++++++-- src/html_compose/elements/button_element.py | 667 +++++++++++++--- src/html_compose/elements/canvas_element.py | 626 +++++++++++++-- src/html_compose/elements/caption_element.py | 622 +++++++++++++-- src/html_compose/elements/cite_element.py | 622 +++++++++++++-- src/html_compose/elements/code_element.py | 622 +++++++++++++-- src/html_compose/elements/col_element.py | 624 +++++++++++++-- src/html_compose/elements/colgroup_element.py | 624 +++++++++++++-- src/html_compose/elements/data_element.py | 624 +++++++++++++-- src/html_compose/elements/datalist_element.py | 622 +++++++++++++-- src/html_compose/elements/dd_element.py | 622 +++++++++++++-- src/html_compose/elements/del__element.py | 626 +++++++++++++-- src/html_compose/elements/details_element.py | 626 +++++++++++++-- src/html_compose/elements/dfn_element.py | 622 +++++++++++++-- src/html_compose/elements/dialog_element.py | 624 +++++++++++++-- src/html_compose/elements/div_element.py | 622 +++++++++++++-- src/html_compose/elements/dl_element.py | 622 +++++++++++++-- src/html_compose/elements/dt_element.py | 622 +++++++++++++-- src/html_compose/elements/em_element.py | 622 +++++++++++++-- src/html_compose/elements/embed_element.py | 630 +++++++++++++-- src/html_compose/elements/fieldset_element.py | 628 +++++++++++++-- .../elements/figcaption_element.py | 622 +++++++++++++-- src/html_compose/elements/figure_element.py | 622 +++++++++++++-- src/html_compose/elements/footer_element.py | 622 +++++++++++++-- src/html_compose/elements/form_element.py | 653 +++++++++++++-- src/html_compose/elements/h1_element.py | 622 +++++++++++++-- src/html_compose/elements/h2_element.py | 622 +++++++++++++-- src/html_compose/elements/h3_element.py | 622 +++++++++++++-- src/html_compose/elements/h4_element.py | 622 +++++++++++++-- src/html_compose/elements/h5_element.py | 622 +++++++++++++-- src/html_compose/elements/h6_element.py | 622 +++++++++++++-- src/html_compose/elements/head_element.py | 622 +++++++++++++-- src/html_compose/elements/header_element.py | 622 +++++++++++++-- src/html_compose/elements/hgroup_element.py | 622 +++++++++++++-- src/html_compose/elements/hr_element.py | 622 +++++++++++++-- src/html_compose/elements/html_element.py | 622 +++++++++++++-- src/html_compose/elements/i_element.py | 622 +++++++++++++-- src/html_compose/elements/iframe_element.py | 642 +++++++++++++-- src/html_compose/elements/img_element.py | 654 +++++++++++++-- src/html_compose/elements/input_element.py | 715 ++++++++++++++--- src/html_compose/elements/ins_element.py | 626 +++++++++++++-- src/html_compose/elements/kbd_element.py | 622 +++++++++++++-- src/html_compose/elements/label_element.py | 624 +++++++++++++-- src/html_compose/elements/legend_element.py | 622 +++++++++++++-- src/html_compose/elements/li_element.py | 624 +++++++++++++-- src/html_compose/elements/link_element.py | 660 ++++++++++++++-- src/html_compose/elements/main_element.py | 622 +++++++++++++-- src/html_compose/elements/map_element.py | 624 +++++++++++++-- src/html_compose/elements/mark_element.py | 622 +++++++++++++-- src/html_compose/elements/menu_element.py | 622 +++++++++++++-- src/html_compose/elements/meta_element.py | 651 +++++++++++++-- src/html_compose/elements/meter_element.py | 634 +++++++++++++-- src/html_compose/elements/nav_element.py | 622 +++++++++++++-- src/html_compose/elements/noscript_element.py | 622 +++++++++++++-- src/html_compose/elements/object_element.py | 634 +++++++++++++-- src/html_compose/elements/ol_element.py | 628 +++++++++++++-- src/html_compose/elements/optgroup_element.py | 626 +++++++++++++-- src/html_compose/elements/option_element.py | 630 +++++++++++++-- src/html_compose/elements/output_element.py | 628 +++++++++++++-- src/html_compose/elements/p_element.py | 622 +++++++++++++-- src/html_compose/elements/picture_element.py | 622 +++++++++++++-- src/html_compose/elements/pre_element.py | 622 +++++++++++++-- src/html_compose/elements/progress_element.py | 626 +++++++++++++-- src/html_compose/elements/q_element.py | 624 +++++++++++++-- src/html_compose/elements/rp_element.py | 622 +++++++++++++-- src/html_compose/elements/rt_element.py | 622 +++++++++++++-- src/html_compose/elements/ruby_element.py | 622 +++++++++++++-- src/html_compose/elements/s_element.py | 622 +++++++++++++-- src/html_compose/elements/samp_element.py | 622 +++++++++++++-- src/html_compose/elements/script_element.py | 648 +++++++++++++-- src/html_compose/elements/search_element.py | 622 +++++++++++++-- src/html_compose/elements/section_element.py | 622 +++++++++++++-- src/html_compose/elements/select_element.py | 636 +++++++++++++-- src/html_compose/elements/slot_element.py | 624 +++++++++++++-- src/html_compose/elements/small_element.py | 622 +++++++++++++-- src/html_compose/elements/source_element.py | 636 +++++++++++++-- src/html_compose/elements/span_element.py | 622 +++++++++++++-- src/html_compose/elements/strong_element.py | 622 +++++++++++++-- src/html_compose/elements/style_element.py | 626 +++++++++++++-- src/html_compose/elements/sub_element.py | 622 +++++++++++++-- src/html_compose/elements/summary_element.py | 622 +++++++++++++-- src/html_compose/elements/sup_element.py | 622 +++++++++++++-- src/html_compose/elements/svg_element.py | 622 +++++++++++++-- src/html_compose/elements/table_element.py | 622 +++++++++++++-- src/html_compose/elements/tbody_element.py | 622 +++++++++++++-- src/html_compose/elements/td_element.py | 628 +++++++++++++-- src/html_compose/elements/template_element.py | 630 +++++++++++++-- src/html_compose/elements/textarea_element.py | 648 +++++++++++++-- src/html_compose/elements/tfoot_element.py | 622 +++++++++++++-- src/html_compose/elements/th_element.py | 636 +++++++++++++-- src/html_compose/elements/thead_element.py | 622 +++++++++++++-- src/html_compose/elements/time_element.py | 624 +++++++++++++-- src/html_compose/elements/title_element.py | 622 +++++++++++++-- src/html_compose/elements/tr_element.py | 622 +++++++++++++-- src/html_compose/elements/track_element.py | 647 +++++++++++++-- src/html_compose/elements/u_element.py | 622 +++++++++++++-- src/html_compose/elements/ul_element.py | 622 +++++++++++++-- src/html_compose/elements/var_element.py | 622 +++++++++++++-- src/html_compose/elements/video_element.py | 650 +++++++++++++-- src/html_compose/elements/wbr_element.py | 622 +++++++++++++-- src/html_compose/py.typed | 0 tests/test_element.py | 27 +- tools/generate_attributes.py | 4 +- tools/generate_elements.py | 19 +- tools/generated/a_attrs.py | 7 +- tools/generated/abbr_attrs.py | 3 +- tools/generated/area_attrs.py | 9 +- tools/generated/audio_attrs.py | 1 + tools/generated/base_attrs.py | 1 + tools/generated/bdo_attrs.py | 1 + tools/generated/blockquote_attrs.py | 1 + tools/generated/body_attrs.py | 1 + tools/generated/button_attrs.py | 5 +- tools/generated/canvas_attrs.py | 1 + tools/generated/col_attrs.py | 1 + tools/generated/colgroup_attrs.py | 1 + tools/generated/data_attrs.py | 3 +- tools/generated/del_attrs.py | 1 + tools/generated/details_attrs.py | 3 +- tools/generated/dfn_attrs.py | 3 +- tools/generated/dialog_attrs.py | 1 + tools/generated/elements/a_element.py | 569 ++++++++++++- tools/generated/elements/abbr_element.py | 553 ++++++++++++- tools/generated/elements/address_element.py | 553 ++++++++++++- tools/generated/elements/area_element.py | 571 ++++++++++++- tools/generated/elements/article_element.py | 553 ++++++++++++- tools/generated/elements/aside_element.py | 553 ++++++++++++- tools/generated/elements/audio_element.py | 567 ++++++++++++- tools/generated/elements/b_element.py | 553 ++++++++++++- tools/generated/elements/base_element.py | 557 ++++++++++++- tools/generated/elements/bdi_element.py | 553 ++++++++++++- tools/generated/elements/bdo_element.py | 553 ++++++++++++- .../generated/elements/blockquote_element.py | 555 ++++++++++++- tools/generated/elements/body_element.py | 679 +++++++++++++++- tools/generated/elements/br_element.py | 553 ++++++++++++- tools/generated/elements/button_element.py | 577 +++++++++++++- tools/generated/elements/canvas_element.py | 557 ++++++++++++- tools/generated/elements/caption_element.py | 553 ++++++++++++- tools/generated/elements/cite_element.py | 553 ++++++++++++- tools/generated/elements/code_element.py | 553 ++++++++++++- tools/generated/elements/col_element.py | 555 ++++++++++++- tools/generated/elements/colgroup_element.py | 555 ++++++++++++- tools/generated/elements/data_element.py | 555 ++++++++++++- tools/generated/elements/datalist_element.py | 553 ++++++++++++- tools/generated/elements/dd_element.py | 553 ++++++++++++- tools/generated/elements/del__element.py | 557 ++++++++++++- tools/generated/elements/details_element.py | 557 ++++++++++++- tools/generated/elements/dfn_element.py | 553 ++++++++++++- tools/generated/elements/dialog_element.py | 555 ++++++++++++- tools/generated/elements/div_element.py | 553 ++++++++++++- tools/generated/elements/dl_element.py | 553 ++++++++++++- tools/generated/elements/dt_element.py | 553 ++++++++++++- tools/generated/elements/em_element.py | 553 ++++++++++++- tools/generated/elements/embed_element.py | 561 ++++++++++++- tools/generated/elements/fieldset_element.py | 559 ++++++++++++- .../generated/elements/figcaption_element.py | 553 ++++++++++++- tools/generated/elements/figure_element.py | 553 ++++++++++++- tools/generated/elements/footer_element.py | 553 ++++++++++++- tools/generated/elements/form_element.py | 569 ++++++++++++- tools/generated/elements/h1_element.py | 553 ++++++++++++- tools/generated/elements/h2_element.py | 553 ++++++++++++- tools/generated/elements/h3_element.py | 553 ++++++++++++- tools/generated/elements/h4_element.py | 553 ++++++++++++- tools/generated/elements/h5_element.py | 553 ++++++++++++- tools/generated/elements/h6_element.py | 553 ++++++++++++- tools/generated/elements/head_element.py | 553 ++++++++++++- tools/generated/elements/header_element.py | 553 ++++++++++++- tools/generated/elements/hgroup_element.py | 553 ++++++++++++- tools/generated/elements/hr_element.py | 553 ++++++++++++- tools/generated/elements/html_element.py | 553 ++++++++++++- tools/generated/elements/i_element.py | 553 ++++++++++++- tools/generated/elements/iframe_element.py | 573 +++++++++++++- tools/generated/elements/img_element.py | 579 ++++++++++++-- tools/generated/elements/input_element.py | 621 +++++++++++++-- tools/generated/elements/ins_element.py | 557 ++++++++++++- tools/generated/elements/kbd_element.py | 553 ++++++++++++- tools/generated/elements/label_element.py | 555 ++++++++++++- tools/generated/elements/legend_element.py | 553 ++++++++++++- tools/generated/elements/li_element.py | 555 ++++++++++++- tools/generated/elements/link_element.py | 585 ++++++++++++-- tools/generated/elements/main_element.py | 553 ++++++++++++- tools/generated/elements/map_element.py | 555 ++++++++++++- tools/generated/elements/mark_element.py | 553 ++++++++++++- tools/generated/elements/menu_element.py | 553 ++++++++++++- tools/generated/elements/meta_element.py | 563 ++++++++++++- tools/generated/elements/meter_element.py | 565 ++++++++++++- tools/generated/elements/nav_element.py | 553 ++++++++++++- tools/generated/elements/noscript_element.py | 553 ++++++++++++- tools/generated/elements/object_element.py | 565 ++++++++++++- tools/generated/elements/ol_element.py | 559 ++++++++++++- tools/generated/elements/optgroup_element.py | 557 ++++++++++++- tools/generated/elements/option_element.py | 561 ++++++++++++- tools/generated/elements/output_element.py | 559 ++++++++++++- tools/generated/elements/p_element.py | 553 ++++++++++++- tools/generated/elements/picture_element.py | 553 ++++++++++++- tools/generated/elements/pre_element.py | 553 ++++++++++++- tools/generated/elements/progress_element.py | 557 ++++++++++++- tools/generated/elements/q_element.py | 555 ++++++++++++- tools/generated/elements/rp_element.py | 553 ++++++++++++- tools/generated/elements/rt_element.py | 553 ++++++++++++- tools/generated/elements/ruby_element.py | 553 ++++++++++++- tools/generated/elements/s_element.py | 553 ++++++++++++- tools/generated/elements/samp_element.py | 553 ++++++++++++- tools/generated/elements/script_element.py | 573 +++++++++++++- tools/generated/elements/search_element.py | 553 ++++++++++++- tools/generated/elements/section_element.py | 553 ++++++++++++- tools/generated/elements/select_element.py | 567 ++++++++++++- tools/generated/elements/slot_element.py | 555 ++++++++++++- tools/generated/elements/small_element.py | 553 ++++++++++++- tools/generated/elements/source_element.py | 567 ++++++++++++- tools/generated/elements/span_element.py | 553 ++++++++++++- tools/generated/elements/strong_element.py | 553 ++++++++++++- tools/generated/elements/style_element.py | 557 ++++++++++++- tools/generated/elements/sub_element.py | 553 ++++++++++++- tools/generated/elements/summary_element.py | 553 ++++++++++++- tools/generated/elements/sup_element.py | 553 ++++++++++++- tools/generated/elements/svg_element.py | 553 ++++++++++++- tools/generated/elements/table_element.py | 553 ++++++++++++- tools/generated/elements/tbody_element.py | 553 ++++++++++++- tools/generated/elements/td_element.py | 559 ++++++++++++- tools/generated/elements/template_element.py | 561 ++++++++++++- tools/generated/elements/textarea_element.py | 579 ++++++++++++-- tools/generated/elements/tfoot_element.py | 553 ++++++++++++- tools/generated/elements/th_element.py | 563 ++++++++++++- tools/generated/elements/thead_element.py | 553 ++++++++++++- tools/generated/elements/time_element.py | 555 ++++++++++++- tools/generated/elements/title_element.py | 553 ++++++++++++- tools/generated/elements/tr_element.py | 553 ++++++++++++- tools/generated/elements/track_element.py | 563 ++++++++++++- tools/generated/elements/u_element.py | 553 ++++++++++++- tools/generated/elements/ul_element.py | 553 ++++++++++++- tools/generated/elements/var_element.py | 553 ++++++++++++- tools/generated/elements/video_element.py | 575 +++++++++++++- tools/generated/elements/wbr_element.py | 553 ++++++++++++- tools/generated/embed_attrs.py | 1 + tools/generated/fieldset_attrs.py | 3 +- tools/generated/form_attrs.py | 3 +- tools/generated/global_attrs.py | 21 +- tools/generated/iframe_attrs.py | 3 +- tools/generated/img_attrs.py | 3 +- tools/generated/input_attrs.py | 11 +- tools/generated/ins_attrs.py | 1 + tools/generated/label_attrs.py | 1 + tools/generated/li_attrs.py | 1 + tools/generated/link_attrs.py | 9 +- tools/generated/map_attrs.py | 3 +- tools/generated/meta_attrs.py | 5 +- tools/generated/meter_attrs.py | 1 + tools/generated/object_attrs.py | 1 + tools/generated/ol_attrs.py | 1 + tools/generated/optgroup_attrs.py | 3 +- tools/generated/option_attrs.py | 5 +- tools/generated/output_attrs.py | 5 +- tools/generated/progress_attrs.py | 1 + tools/generated/q_attrs.py | 1 + tools/generated/script_attrs.py | 5 +- tools/generated/select_attrs.py | 3 +- tools/generated/slot_attrs.py | 3 +- tools/generated/source_attrs.py | 1 + tools/generated/style_attrs.py | 5 +- tools/generated/td_attrs.py | 3 +- tools/generated/template_attrs.py | 1 + tools/generated/textarea_attrs.py | 7 +- tools/generated/th_attrs.py | 5 +- tools/generated/time_attrs.py | 1 + tools/generated/track_attrs.py | 3 +- tools/generated/video_attrs.py | 1 + tools/generator_common.py | 4 +- 311 files changed, 122743 insertions(+), 11791 deletions(-) create mode 100644 src/html_compose/py.typed diff --git a/src/html_compose/attributes/a_attrs.py b/src/html_compose/attributes/a_attrs.py index 04a7a7b..fdc45a1 100644 --- a/src/html_compose/attributes/a_attrs.py +++ b/src/html_compose/attributes/a_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import Resolvable, StrLike class AnchorAttrs: @@ -8,7 +9,7 @@ class AnchorAttrs: """ @staticmethod - def download(value: str) -> BaseAttribute: + def download(value: StrLike) -> BaseAttribute: """ "a" attribute: download Whether to download the resource instead of navigating to it, and its filename if so @@ -44,7 +45,7 @@ def hreflang(value) -> BaseAttribute: return BaseAttribute("hreflang", value) @staticmethod - def ping(value: list) -> BaseAttribute: + def ping(value: Resolvable) -> BaseAttribute: """ "a" attribute: ping URLs to ping @@ -68,7 +69,7 @@ def referrerpolicy(value) -> BaseAttribute: return BaseAttribute("referrerpolicy", value) @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "a" attribute: rel Relationship between the location in the document containing the hyperlink and the destination resource diff --git a/src/html_compose/attributes/abbr_attrs.py b/src/html_compose/attributes/abbr_attrs.py index d76950e..d9bee52 100644 --- a/src/html_compose/attributes/abbr_attrs.py +++ b/src/html_compose/attributes/abbr_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class AbbrAttrs: @@ -8,7 +9,7 @@ class AbbrAttrs: """ @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "abbr" attribute: title Full term or expansion of abbreviation diff --git a/src/html_compose/attributes/area_attrs.py b/src/html_compose/attributes/area_attrs.py index 8d89a87..854a5b2 100644 --- a/src/html_compose/attributes/area_attrs.py +++ b/src/html_compose/attributes/area_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import Resolvable, StrLike class AreaAttrs: @@ -9,7 +10,7 @@ class AreaAttrs: """ @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "area" attribute: alt Replacement text for use when images are not available @@ -33,7 +34,7 @@ def coords(value) -> BaseAttribute: return BaseAttribute("coords", value) @staticmethod - def download(value: str) -> BaseAttribute: + def download(value: StrLike) -> BaseAttribute: """ "area" attribute: download Whether to download the resource instead of navigating to it, and its filename if so @@ -57,7 +58,7 @@ def href(value) -> BaseAttribute: return BaseAttribute("href", value) @staticmethod - def ping(value: list) -> BaseAttribute: + def ping(value: Resolvable) -> BaseAttribute: """ "area" attribute: ping URLs to ping @@ -81,7 +82,7 @@ def referrerpolicy(value) -> BaseAttribute: return BaseAttribute("referrerpolicy", value) @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "area" attribute: rel Relationship between the location in the document containing the hyperlink and the destination resource diff --git a/src/html_compose/attributes/button_attrs.py b/src/html_compose/attributes/button_attrs.py index 33a324c..7f2bf9b 100644 --- a/src/html_compose/attributes/button_attrs.py +++ b/src/html_compose/attributes/button_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class ButtonAttrs: @@ -99,7 +100,7 @@ def formtarget(value) -> BaseAttribute: return BaseAttribute("formtarget", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "button" attribute: name Name of the element to use for form submission and in the form.elements API @@ -149,7 +150,7 @@ def type(value: Literal["submit", "reset", "button"]) -> BaseAttribute: return BaseAttribute("type", value) @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "button" attribute: value Value to be used for form submission diff --git a/src/html_compose/attributes/data_attrs.py b/src/html_compose/attributes/data_attrs.py index 5130a7a..3e0ce47 100644 --- a/src/html_compose/attributes/data_attrs.py +++ b/src/html_compose/attributes/data_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class DataAttrs: @@ -8,7 +9,7 @@ class DataAttrs: """ @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "data" attribute: value Machine-readable value diff --git a/src/html_compose/attributes/details_attrs.py b/src/html_compose/attributes/details_attrs.py index 5828add..7f2a903 100644 --- a/src/html_compose/attributes/details_attrs.py +++ b/src/html_compose/attributes/details_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class DetailsAttrs: @@ -8,7 +9,7 @@ class DetailsAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "details" attribute: name Name of group of mutually-exclusive details elements diff --git a/src/html_compose/attributes/dfn_attrs.py b/src/html_compose/attributes/dfn_attrs.py index 7e94ea9..cb1ef7e 100644 --- a/src/html_compose/attributes/dfn_attrs.py +++ b/src/html_compose/attributes/dfn_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class DfnAttrs: @@ -8,7 +9,7 @@ class DfnAttrs: """ @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "dfn" attribute: title Full term or expansion of abbreviation diff --git a/src/html_compose/attributes/fieldset_attrs.py b/src/html_compose/attributes/fieldset_attrs.py index 2ff1afa..9fcab69 100644 --- a/src/html_compose/attributes/fieldset_attrs.py +++ b/src/html_compose/attributes/fieldset_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class FieldsetAttrs: @@ -32,7 +33,7 @@ def form(value) -> BaseAttribute: return BaseAttribute("form", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "fieldset" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/src/html_compose/attributes/form_attrs.py b/src/html_compose/attributes/form_attrs.py index 507fb99..5cdee14 100644 --- a/src/html_compose/attributes/form_attrs.py +++ b/src/html_compose/attributes/form_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class FormAttrs: @@ -75,7 +76,7 @@ def method(value: Literal["GET", "POST", "dialog"]) -> BaseAttribute: return BaseAttribute("method", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "form" attribute: name Name of form to use in the document.forms API diff --git a/src/html_compose/attributes/global_attrs.py b/src/html_compose/attributes/global_attrs.py index 5e3d2ca..8fb572e 100644 --- a/src/html_compose/attributes/global_attrs.py +++ b/src/html_compose/attributes/global_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute -from typing import Literal, Union +from typing import Literal +from ..base_types import Resolvable, StrLike class GlobalAttrs: @@ -9,7 +10,7 @@ class GlobalAttrs: """ @staticmethod - def accesskey(value: list) -> BaseAttribute: + def accesskey(value: Resolvable) -> BaseAttribute: """ "global" attribute: accesskey Keyboard shortcut to activate or focus element @@ -59,7 +60,7 @@ def autofocus(value: bool) -> BaseAttribute: return BaseAttribute("autofocus", value) @staticmethod - def class_(value: Union[str, list, dict]) -> BaseAttribute: + def class_(value: Resolvable) -> BaseAttribute: """ "global" attribute: class Classes to which the element belongs @@ -137,7 +138,7 @@ def hidden(value: Literal["until-found", "hidden", ""]) -> BaseAttribute: return BaseAttribute("hidden", value) @staticmethod - def id(value: str) -> BaseAttribute: + def id(value: StrLike) -> BaseAttribute: """ "global" attribute: id The element's ID @@ -208,7 +209,7 @@ def itemid(value) -> BaseAttribute: return BaseAttribute("itemid", value) @staticmethod - def itemprop(value: list) -> BaseAttribute: + def itemprop(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemprop Property names of a microdata item @@ -220,7 +221,7 @@ def itemprop(value: list) -> BaseAttribute: return BaseAttribute("itemprop", value) @staticmethod - def itemref(value: list) -> BaseAttribute: + def itemref(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemref Referenced elements @@ -244,7 +245,7 @@ def itemscope(value: bool) -> BaseAttribute: return BaseAttribute("itemscope", value) @staticmethod - def itemtype(value: list) -> BaseAttribute: + def itemtype(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemtype Item types of a microdata item @@ -268,7 +269,7 @@ def lang(value) -> BaseAttribute: return BaseAttribute("lang", value) @staticmethod - def nonce(value: str) -> BaseAttribute: + def nonce(value: StrLike) -> BaseAttribute: """ "global" attribute: nonce Cryptographic nonce used in Content Security Policy checks [CSP] @@ -292,7 +293,7 @@ def popover(value: Literal["auto", "manual"]) -> BaseAttribute: return BaseAttribute("popover", value) @staticmethod - def slot(value: str) -> BaseAttribute: + def slot(value: StrLike) -> BaseAttribute: """ "global" attribute: slot The element's desired slot @@ -316,7 +317,7 @@ def spellcheck(value: Literal["true", "false", ""]) -> BaseAttribute: return BaseAttribute("spellcheck", value) @staticmethod - def style(value: Union[str, list, dict]) -> BaseAttribute: + def style(value: Resolvable) -> BaseAttribute: """ "global" attribute: style Presentational and formatting instructions @@ -340,7 +341,7 @@ def tabindex(value: int) -> BaseAttribute: return BaseAttribute("tabindex", value) @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "global" attribute: title Advisory information for the element diff --git a/src/html_compose/attributes/iframe_attrs.py b/src/html_compose/attributes/iframe_attrs.py index 1a15e29..6e96554 100644 --- a/src/html_compose/attributes/iframe_attrs.py +++ b/src/html_compose/attributes/iframe_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import Resolvable class IframeAttrs: @@ -81,7 +82,7 @@ def referrerpolicy(value) -> BaseAttribute: return BaseAttribute("referrerpolicy", value) @staticmethod - def sandbox(value: list) -> BaseAttribute: + def sandbox(value: Resolvable) -> BaseAttribute: """ "iframe" attribute: sandbox Security rules for nested content diff --git a/src/html_compose/attributes/img_attrs.py b/src/html_compose/attributes/img_attrs.py index bd27663..884d0eb 100644 --- a/src/html_compose/attributes/img_attrs.py +++ b/src/html_compose/attributes/img_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class ImgAttrs: @@ -9,7 +10,7 @@ class ImgAttrs: """ @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "img" attribute: alt Replacement text for use when images are not available diff --git a/src/html_compose/attributes/input_attrs.py b/src/html_compose/attributes/input_attrs.py index afe3e9d..ce9e1fb 100644 --- a/src/html_compose/attributes/input_attrs.py +++ b/src/html_compose/attributes/input_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class InputAttrs: @@ -33,7 +34,7 @@ def alpha(value: bool) -> BaseAttribute: return BaseAttribute("alpha", value) @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "input" attribute: alt Replacement text for use when images are not available @@ -83,7 +84,7 @@ def colorspace( return BaseAttribute("colorspace", value) @staticmethod - def dirname(value: str) -> BaseAttribute: + def dirname(value: StrLike) -> BaseAttribute: """ "input" attribute: dirname Name of form control to use for sending the element's directionality in form submission @@ -269,7 +270,7 @@ def multiple(value: bool) -> BaseAttribute: return BaseAttribute("multiple", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "input" attribute: name Name of the element to use for form submission and in the form.elements API @@ -293,7 +294,7 @@ def pattern(value) -> BaseAttribute: return BaseAttribute("pattern", value) @staticmethod - def placeholder(value: str) -> BaseAttribute: + def placeholder(value: StrLike) -> BaseAttribute: """ "input" attribute: placeholder User-visible label to be placed within the form control @@ -391,7 +392,7 @@ def step(value: float) -> BaseAttribute: return BaseAttribute("step", value) @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "input" attribute: title Description of pattern (when used with pattern attribute) diff --git a/src/html_compose/attributes/link_attrs.py b/src/html_compose/attributes/link_attrs.py index 61fc0ad..7503a14 100644 --- a/src/html_compose/attributes/link_attrs.py +++ b/src/html_compose/attributes/link_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import Resolvable, StrLike class LinkAttrs: @@ -21,7 +22,7 @@ def as_(value) -> BaseAttribute: return BaseAttribute("as", value) @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "link" attribute: blocking Whether the element is potentially render-blocking @@ -131,7 +132,7 @@ def imagesrcset(value) -> BaseAttribute: return BaseAttribute("imagesrcset", value) @staticmethod - def integrity(value: str) -> BaseAttribute: + def integrity(value: StrLike) -> BaseAttribute: """ "link" attribute: integrity Integrity metadata used in Subresource Integrity checks [SRI] @@ -167,7 +168,7 @@ def referrerpolicy(value) -> BaseAttribute: return BaseAttribute("referrerpolicy", value) @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "link" attribute: rel Relationship between the document containing the hyperlink and the destination resource @@ -179,7 +180,7 @@ def rel(value: list) -> BaseAttribute: return BaseAttribute("rel", value) @staticmethod - def sizes(value: list) -> BaseAttribute: + def sizes(value: Resolvable) -> BaseAttribute: """ "link" attribute: sizes Sizes of the icons (for rel="icon") diff --git a/src/html_compose/attributes/map_attrs.py b/src/html_compose/attributes/map_attrs.py index f2c7287..f736d42 100644 --- a/src/html_compose/attributes/map_attrs.py +++ b/src/html_compose/attributes/map_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class MapAttrs: @@ -8,7 +9,7 @@ class MapAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "map" attribute: name Name of image map to reference from the usemap attribute diff --git a/src/html_compose/attributes/meta_attrs.py b/src/html_compose/attributes/meta_attrs.py index 53a78f9..5b05903 100644 --- a/src/html_compose/attributes/meta_attrs.py +++ b/src/html_compose/attributes/meta_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class MetaAttrs: @@ -21,7 +22,7 @@ def charset(value: Literal["utf-8"]) -> BaseAttribute: return BaseAttribute("charset", value) @staticmethod - def content(value: str) -> BaseAttribute: + def content(value: StrLike) -> BaseAttribute: """ "meta" attribute: content Value of the element @@ -65,7 +66,7 @@ def media(value) -> BaseAttribute: return BaseAttribute("media", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "meta" attribute: name Metadata name diff --git a/src/html_compose/attributes/optgroup_attrs.py b/src/html_compose/attributes/optgroup_attrs.py index a330659..af8359f 100644 --- a/src/html_compose/attributes/optgroup_attrs.py +++ b/src/html_compose/attributes/optgroup_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class OptgroupAttrs: @@ -20,7 +21,7 @@ def disabled(value: bool) -> BaseAttribute: return BaseAttribute("disabled", value) @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "optgroup" attribute: label User-visible label diff --git a/src/html_compose/attributes/option_attrs.py b/src/html_compose/attributes/option_attrs.py index 22338cc..57f09d8 100644 --- a/src/html_compose/attributes/option_attrs.py +++ b/src/html_compose/attributes/option_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class OptionAttrs: @@ -20,7 +21,7 @@ def disabled(value: bool) -> BaseAttribute: return BaseAttribute("disabled", value) @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "option" attribute: label User-visible label @@ -44,7 +45,7 @@ def selected(value: bool) -> BaseAttribute: return BaseAttribute("selected", value) @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "option" attribute: value Value to be used for form submission diff --git a/src/html_compose/attributes/output_attrs.py b/src/html_compose/attributes/output_attrs.py index 8b1679f..943889c 100644 --- a/src/html_compose/attributes/output_attrs.py +++ b/src/html_compose/attributes/output_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import Resolvable, StrLike class OutputAttrs: @@ -8,7 +9,7 @@ class OutputAttrs: """ @staticmethod - def for_(value: list) -> BaseAttribute: + def for_(value: Resolvable) -> BaseAttribute: """ "output" attribute: for Specifies controls from which the output was calculated @@ -32,7 +33,7 @@ def form(value) -> BaseAttribute: return BaseAttribute("form", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "output" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/src/html_compose/attributes/script_attrs.py b/src/html_compose/attributes/script_attrs.py index c268d83..4d8e14c 100644 --- a/src/html_compose/attributes/script_attrs.py +++ b/src/html_compose/attributes/script_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import Resolvable, StrLike class ScriptAttrs: @@ -21,7 +22,7 @@ def async_(value: bool) -> BaseAttribute: return BaseAttribute("async", value) @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "script" attribute: blocking Whether the element is potentially render-blocking @@ -71,7 +72,7 @@ def fetchpriority(value: Literal["auto", "high", "low"]) -> BaseAttribute: return BaseAttribute("fetchpriority", value) @staticmethod - def integrity(value: str) -> BaseAttribute: + def integrity(value: StrLike) -> BaseAttribute: """ "script" attribute: integrity Integrity metadata used in Subresource Integrity checks [SRI] diff --git a/src/html_compose/attributes/select_attrs.py b/src/html_compose/attributes/select_attrs.py index bebf644..2137609 100644 --- a/src/html_compose/attributes/select_attrs.py +++ b/src/html_compose/attributes/select_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class SelectAttrs: @@ -56,7 +57,7 @@ def multiple(value: bool) -> BaseAttribute: return BaseAttribute("multiple", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "select" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/src/html_compose/attributes/slot_attrs.py b/src/html_compose/attributes/slot_attrs.py index 41a611a..92a929c 100644 --- a/src/html_compose/attributes/slot_attrs.py +++ b/src/html_compose/attributes/slot_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import StrLike class SlotAttrs: @@ -8,7 +9,7 @@ class SlotAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "slot" attribute: name Name of shadow tree slot diff --git a/src/html_compose/attributes/style_attrs.py b/src/html_compose/attributes/style_attrs.py index c66c930..40d17af 100644 --- a/src/html_compose/attributes/style_attrs.py +++ b/src/html_compose/attributes/style_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import Resolvable, StrLike class StyleAttrs: @@ -8,7 +9,7 @@ class StyleAttrs: """ @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "style" attribute: blocking Whether the element is potentially render-blocking @@ -32,7 +33,7 @@ def media(value) -> BaseAttribute: return BaseAttribute("media", value) @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "style" attribute: title CSS style sheet set name diff --git a/src/html_compose/attributes/td_attrs.py b/src/html_compose/attributes/td_attrs.py index 587ea23..9fa44c1 100644 --- a/src/html_compose/attributes/td_attrs.py +++ b/src/html_compose/attributes/td_attrs.py @@ -1,4 +1,5 @@ from . import BaseAttribute +from ..base_types import Resolvable class TdAttrs: @@ -20,7 +21,7 @@ def colspan(value) -> BaseAttribute: return BaseAttribute("colspan", value) @staticmethod - def headers(value: list) -> BaseAttribute: + def headers(value: Resolvable) -> BaseAttribute: """ "td" attribute: headers The header cells for this cell diff --git a/src/html_compose/attributes/textarea_attrs.py b/src/html_compose/attributes/textarea_attrs.py index 80b2874..ef099e7 100644 --- a/src/html_compose/attributes/textarea_attrs.py +++ b/src/html_compose/attributes/textarea_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class TextareaAttrs: @@ -33,7 +34,7 @@ def cols(value) -> BaseAttribute: return BaseAttribute("cols", value) @staticmethod - def dirname(value: str) -> BaseAttribute: + def dirname(value: StrLike) -> BaseAttribute: """ "textarea" attribute: dirname Name of form control to use for sending the element's directionality in form submission @@ -93,7 +94,7 @@ def minlength(value: int) -> BaseAttribute: return BaseAttribute("minlength", value) @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "textarea" attribute: name Name of the element to use for form submission and in the form.elements API @@ -105,7 +106,7 @@ def name(value: str) -> BaseAttribute: return BaseAttribute("name", value) @staticmethod - def placeholder(value: str) -> BaseAttribute: + def placeholder(value: StrLike) -> BaseAttribute: """ "textarea" attribute: placeholder User-visible label to be placed within the form control diff --git a/src/html_compose/attributes/th_attrs.py b/src/html_compose/attributes/th_attrs.py index 7d74c54..f4c9e85 100644 --- a/src/html_compose/attributes/th_attrs.py +++ b/src/html_compose/attributes/th_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import Resolvable, StrLike class ThAttrs: @@ -9,7 +10,7 @@ class ThAttrs: """ @staticmethod - def abbr(value: str) -> BaseAttribute: + def abbr(value: StrLike) -> BaseAttribute: """ "th" attribute: abbr Alternative label to use for the header cell when referencing the cell in other contexts @@ -33,7 +34,7 @@ def colspan(value) -> BaseAttribute: return BaseAttribute("colspan", value) @staticmethod - def headers(value: list) -> BaseAttribute: + def headers(value: Resolvable) -> BaseAttribute: """ "th" attribute: headers The header cells for this cell diff --git a/src/html_compose/attributes/track_attrs.py b/src/html_compose/attributes/track_attrs.py index 8f8ee23..5f85c75 100644 --- a/src/html_compose/attributes/track_attrs.py +++ b/src/html_compose/attributes/track_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal +from ..base_types import StrLike class TrackAttrs: @@ -37,7 +38,7 @@ def kind( return BaseAttribute("kind", value) @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "track" attribute: label User-visible label diff --git a/src/html_compose/base_attribute.py b/src/html_compose/base_attribute.py index 7683814..4b1f404 100644 --- a/src/html_compose/base_attribute.py +++ b/src/html_compose/base_attribute.py @@ -1,17 +1,14 @@ -from typing import Iterable, Tuple, TypeAlias, Union +from typing import Iterable, Tuple, Union from markupsafe import Markup +from .base_types import Resolvable + def unsafe_text(value) -> str: return Markup(str(value)) -Resolveable: TypeAlias = Union[ - None, str, list[str], dict[str, str], float, int, bool -] - - class BaseAttribute: """ Base class for all HTML element attributes. It resolves to a string. @@ -22,7 +19,7 @@ class BaseAttribute: __slots__ = ("name", "data", "delimeter") def __init__( - self, name: str, data: Resolveable = None, delimeter: str = " " + self, name: str, data: Resolvable = None, delimeter: str = " " ): self.name = name self.data = data @@ -33,7 +30,9 @@ def resolve_join(self, input_data: Iterable): Join a list of strings Split out for implementors to override """ - return self.delimeter.join(input_data) + return self.delimeter.join( + x if isinstance(x, str) else str(x) for x in input_data + ) def list_string_generator(self, data): """ diff --git a/src/html_compose/base_element.py b/src/html_compose/base_element.py index efc4c12..2af0c8a 100644 --- a/src/html_compose/base_element.py +++ b/src/html_compose/base_element.py @@ -1,8 +1,8 @@ -from typing import Callable, Generator, Optional, Union +from typing import Callable, Generator, Iterable, Mapping, Optional, Union from . import escape_text, unsafe_text, util_funcs from .attributes import BaseAttribute, GlobalAttrs -from .base_types import ElementBase, Node, _HasHtml +from .base_types import ElementBase, Node, Resolvable, _HasHtml SPECIAL_ATTRS = {"class": GlobalAttrs.class_, "style": GlobalAttrs.style} @@ -52,9 +52,12 @@ def __init__( self, tag: str, void_element: bool = False, - attrs: Union[ - dict[str, Union[str, list, dict]], list[BaseAttribute], None - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, children: Optional[list] = None, ) -> None: """ diff --git a/src/html_compose/base_types.py b/src/html_compose/base_types.py index 83973d2..9477f0f 100644 --- a/src/html_compose/base_types.py +++ b/src/html_compose/base_types.py @@ -1,6 +1,6 @@ import typing from functools import lru_cache -from typing import Callable, Iterable +from typing import Callable, Iterable, Mapping from . import util_funcs @@ -77,4 +77,15 @@ def __html__(self) -> str: | _HasHtml # Returns HTML that does not need escaping | Iterable["Node"] | Callable[[], "Node"] + | Callable[[ElementBase], "Node"] + | Callable[[ElementBase, ElementBase], "Node"] +) + +# These types are used for attribute values +StrLike = str | float | int | bool +Resolvable = ( + None + | StrLike + | Iterable[StrLike] + | Mapping[StrLike, bool] # key-value pairs which resolve if .value is True ) diff --git a/src/html_compose/elements/a_element.py b/src/html_compose/elements/a_element.py index 25723e8..b2fe933 100644 --- a/src/html_compose/elements/a_element.py +++ b/src/html_compose/elements/a_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,80 +35,142 @@ class hint(GlobalAttrs, AnchorAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - download: Optional[str] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - target: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + download: StrLike | None = None, + href: StrLike | None = None, + hreflang: StrLike | None = None, + ping: Resolvable | StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + target: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -214,6 +277,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -301,6 +644,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/abbr_element.py b/src/html_compose/elements/abbr_element.py index 5a2bc40..c186961 100644 --- a/src/html_compose/elements/abbr_element.py +++ b/src/html_compose/elements/abbr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/address_element.py b/src/html_compose/elements/address_element.py index 72fec2d..7269f57 100644 --- a/src/html_compose/elements/address_element.py +++ b/src/html_compose/elements/address_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/area_element.py b/src/html_compose/elements/area_element.py index e30d409..95b7a41 100644 --- a/src/html_compose/elements/area_element.py +++ b/src/html_compose/elements/area_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AreaAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,83 +35,145 @@ class hint(GlobalAttrs, AreaAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - alt: Optional[str] = None, - coords: Optional[str] = None, - download: Optional[str] = None, - href: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - shape: Optional[ - Union[str, Literal["circle", "default", "poly", "rect"]] - ] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + alt: StrLike | None = None, + coords: StrLike | None = None, + download: StrLike | None = None, + href: StrLike | None = None, + ping: Resolvable | StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + shape: Literal["circle", "default", "poly", "rect"] + | StrLike + | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -219,6 +282,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -308,6 +651,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/article_element.py b/src/html_compose/elements/article_element.py index 15c359f..195234d 100644 --- a/src/html_compose/elements/article_element.py +++ b/src/html_compose/elements/article_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/aside_element.py b/src/html_compose/elements/aside_element.py index 31d34f9..64d520a 100644 --- a/src/html_compose/elements/aside_element.py +++ b/src/html_compose/elements/aside_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/audio_element.py b/src/html_compose/elements/audio_element.py index f62e26b..fcb3135 100644 --- a/src/html_compose/elements/audio_element.py +++ b/src/html_compose/elements/audio_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AudioAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,83 +35,143 @@ class hint(GlobalAttrs, AudioAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - preload: Optional[ - Union[str, Literal["none", "metadata", "auto"]] - ] = None, - src: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autoplay: bool | StrLike | None = None, + controls: bool | StrLike | None = None, + crossorigin: Literal["anonymous", "use-credentials"] + | StrLike + | None = None, + loop: bool | StrLike | None = None, + muted: bool | StrLike | None = None, + preload: Literal["none", "metadata", "auto"] | StrLike | None = None, + src: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -210,6 +271,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -295,6 +636,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/b_element.py b/src/html_compose/elements/b_element.py index 2f5a9fd..8931eba 100644 --- a/src/html_compose/elements/b_element.py +++ b/src/html_compose/elements/b_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/base_element.py b/src/html_compose/elements/base_element.py index 6eeecea..d1650dd 100644 --- a/src/html_compose/elements/base_element.py +++ b/src/html_compose/elements/base_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, BaseAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, BaseAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - href: Optional[str] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + href: StrLike | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -187,6 +250,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -262,6 +605,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/bdi_element.py b/src/html_compose/elements/bdi_element.py index 5ab140c..a50dba9 100644 --- a/src/html_compose/elements/bdi_element.py +++ b/src/html_compose/elements/bdi_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/bdo_element.py b/src/html_compose/elements/bdo_element.py index c03ed0b..6459096 100644 --- a/src/html_compose/elements/bdo_element.py +++ b/src/html_compose/elements/bdo_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/blockquote_element.py b/src/html_compose/elements/blockquote_element.py index 15dc6ed..18ddbbe 100644 --- a/src/html_compose/elements/blockquote_element.py +++ b/src/html_compose/elements/blockquote_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, BlockquoteAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, BlockquoteAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/body_element.py b/src/html_compose/elements/body_element.py index acda349..adcd1cf 100644 --- a/src/html_compose/elements/body_element.py +++ b/src/html_compose/elements/body_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, BodyAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,152 @@ class hint(GlobalAttrs, BodyAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + onafterprint: StrLike | None = None, + onbeforeprint: StrLike | None = None, + onbeforeunload: StrLike | None = None, + onhashchange: StrLike | None = None, + onlanguagechange: StrLike | None = None, + onmessage: StrLike | None = None, + onmessageerror: StrLike | None = None, + onoffline: StrLike | None = None, + ononline: StrLike | None = None, + onpagehide: StrLike | None = None, + onpagereveal: StrLike | None = None, + onpageshow: StrLike | None = None, + onpageswap: StrLike | None = None, + onpopstate: StrLike | None = None, + onrejectionhandled: StrLike | None = None, + onstorage: StrLike | None = None, + onunhandledrejection: StrLike | None = None, + onunload: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -117,6 +198,78 @@ def __init__( `class_` : Classes to which the element belongs + `onafterprint` : + afterprint event handler for Window object + Event handler content attribute + + `onbeforeprint` : + beforeprint event handler for Window object + Event handler content attribute + + `onbeforeunload` : + beforeunload event handler for Window object + Event handler content attribute + + `onhashchange` : + hashchange event handler for Window object + Event handler content attribute + + `onlanguagechange` : + languagechange event handler for Window object + Event handler content attribute + + `onmessage` : + message event handler for Window object + Event handler content attribute + + `onmessageerror` : + messageerror event handler for Window object + Event handler content attribute + + `onoffline` : + offline event handler for Window object + Event handler content attribute + + `ononline` : + online event handler for Window object + Event handler content attribute + + `onpagehide` : + pagehide event handler for Window object + Event handler content attribute + + `onpagereveal` : + pagereveal event handler for Window object + Event handler content attribute + + `onpageshow` : + pageshow event handler for Window object + Event handler content attribute + + `onpageswap` : + pageswap event handler for Window object + Event handler content attribute + + `onpopstate` : + popstate event handler for Window object + Event handler content attribute + + `onrejectionhandled` : + rejectionhandled event handler for Window object + Event handler content attribute + + `onstorage` : + storage event handler for Window object + Event handler content attribute + + `onunhandledrejection` : + unhandledrejection event handler for Window object + Event handler content attribute + + `onunload` : + unload event handler for Window object + Event handler content attribute + `accesskey` : Keyboard shortcut to activate or focus element @@ -177,6 +330,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -210,6 +643,42 @@ def __init__( self._process_attr("id", id) if not (class_ is None or class_ is False): self._process_attr("class", class_) + if not (onafterprint is None or onafterprint is False): + self._process_attr("onafterprint", onafterprint) + if not (onbeforeprint is None or onbeforeprint is False): + self._process_attr("onbeforeprint", onbeforeprint) + if not (onbeforeunload is None or onbeforeunload is False): + self._process_attr("onbeforeunload", onbeforeunload) + if not (onhashchange is None or onhashchange is False): + self._process_attr("onhashchange", onhashchange) + if not (onlanguagechange is None or onlanguagechange is False): + self._process_attr("onlanguagechange", onlanguagechange) + if not (onmessage is None or onmessage is False): + self._process_attr("onmessage", onmessage) + if not (onmessageerror is None or onmessageerror is False): + self._process_attr("onmessageerror", onmessageerror) + if not (onoffline is None or onoffline is False): + self._process_attr("onoffline", onoffline) + if not (ononline is None or ononline is False): + self._process_attr("ononline", ononline) + if not (onpagehide is None or onpagehide is False): + self._process_attr("onpagehide", onpagehide) + if not (onpagereveal is None or onpagereveal is False): + self._process_attr("onpagereveal", onpagereveal) + if not (onpageshow is None or onpageshow is False): + self._process_attr("onpageshow", onpageshow) + if not (onpageswap is None or onpageswap is False): + self._process_attr("onpageswap", onpageswap) + if not (onpopstate is None or onpopstate is False): + self._process_attr("onpopstate", onpopstate) + if not (onrejectionhandled is None or onrejectionhandled is False): + self._process_attr("onrejectionhandled", onrejectionhandled) + if not (onstorage is None or onstorage is False): + self._process_attr("onstorage", onstorage) + if not (onunhandledrejection is None or onunhandledrejection is False): + self._process_attr("onunhandledrejection", onunhandledrejection) + if not (onunload is None or onunload is False): + self._process_attr("onunload", onunload) if not (accesskey is None or accesskey is False): self._process_attr("accesskey", accesskey) if not (autocapitalize is None or autocapitalize is False): @@ -248,6 +717,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/br_element.py b/src/html_compose/elements/br_element.py index 8034fac..5e120d1 100644 --- a/src/html_compose/elements/br_element.py +++ b/src/html_compose/elements/br_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/button_element.py b/src/html_compose/elements/button_element.py index a61b18c..c2c69ae 100644 --- a/src/html_compose/elements/button_element.py +++ b/src/html_compose/elements/button_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ButtonAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -43,97 +44,154 @@ class hint(GlobalAttrs, ButtonAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - formmethod: Optional[ - Union[str, Literal["GET", "POST", "dialog"]] - ] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - name: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[ - Union[str, Literal["toggle", "show", "hide"]] - ] = None, - type: Optional[Union[str, Literal["submit", "reset", "button"]]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + formaction: StrLike | None = None, + formenctype: Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ] + | StrLike + | None = None, + formmethod: Literal["GET", "POST", "dialog"] | StrLike | None = None, + formnovalidate: bool | StrLike | None = None, + formtarget: StrLike | None = None, + name: StrLike | None = None, + popovertarget: StrLike | None = None, + popovertargetaction: Literal["toggle", "show", "hide"] + | StrLike + | None = None, + type: Literal["submit", "reset", "button"] | StrLike | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -251,6 +309,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -346,6 +684,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/canvas_element.py b/src/html_compose/elements/canvas_element.py index 1fa95af..1e1f6cd 100644 --- a/src/html_compose/elements/canvas_element.py +++ b/src/html_compose/elements/canvas_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, CanvasAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, CanvasAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -185,6 +248,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -260,6 +603,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/caption_element.py b/src/html_compose/elements/caption_element.py index cb334c7..c828ea7 100644 --- a/src/html_compose/elements/caption_element.py +++ b/src/html_compose/elements/caption_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/cite_element.py b/src/html_compose/elements/cite_element.py index 3589a81..0bafbdd 100644 --- a/src/html_compose/elements/cite_element.py +++ b/src/html_compose/elements/cite_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/code_element.py b/src/html_compose/elements/code_element.py index b9857b8..65b1046 100644 --- a/src/html_compose/elements/code_element.py +++ b/src/html_compose/elements/code_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/col_element.py b/src/html_compose/elements/col_element.py index 7cde7ad..d487a57 100644 --- a/src/html_compose/elements/col_element.py +++ b/src/html_compose/elements/col_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ColAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, ColAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + span: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/colgroup_element.py b/src/html_compose/elements/colgroup_element.py index 03f1d8b..918e13d 100644 --- a/src/html_compose/elements/colgroup_element.py +++ b/src/html_compose/elements/colgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ColgroupAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, ColgroupAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + span: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/data_element.py b/src/html_compose/elements/data_element.py index d134cd1..0d68026 100644 --- a/src/html_compose/elements/data_element.py +++ b/src/html_compose/elements/data_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, DataAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, DataAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -181,6 +244,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +597,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/datalist_element.py b/src/html_compose/elements/datalist_element.py index c7f428d..ba5b3fb 100644 --- a/src/html_compose/elements/datalist_element.py +++ b/src/html_compose/elements/datalist_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/dd_element.py b/src/html_compose/elements/dd_element.py index e1ddda1..6ce0572 100644 --- a/src/html_compose/elements/dd_element.py +++ b/src/html_compose/elements/dd_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/del__element.py b/src/html_compose/elements/del__element.py index 33d66be..3f55729 100644 --- a/src/html_compose/elements/del__element.py +++ b/src/html_compose/elements/del__element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, DelAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, DelAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -187,6 +250,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -262,6 +605,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/details_element.py b/src/html_compose/elements/details_element.py index dfbf29f..6462ff0 100644 --- a/src/html_compose/elements/details_element.py +++ b/src/html_compose/elements/details_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, DetailsAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, DetailsAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + open: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -185,6 +248,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -260,6 +603,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/dfn_element.py b/src/html_compose/elements/dfn_element.py index ef3abab..292df1b 100644 --- a/src/html_compose/elements/dfn_element.py +++ b/src/html_compose/elements/dfn_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/dialog_element.py b/src/html_compose/elements/dialog_element.py index cbc63a8..f7b2edd 100644 --- a/src/html_compose/elements/dialog_element.py +++ b/src/html_compose/elements/dialog_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, DialogAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, DialogAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + open: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -181,6 +244,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +597,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/div_element.py b/src/html_compose/elements/div_element.py index 157749b..063d2b7 100644 --- a/src/html_compose/elements/div_element.py +++ b/src/html_compose/elements/div_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/dl_element.py b/src/html_compose/elements/dl_element.py index 96de8fa..67efceb 100644 --- a/src/html_compose/elements/dl_element.py +++ b/src/html_compose/elements/dl_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/dt_element.py b/src/html_compose/elements/dt_element.py index b6b01ff..5c3da62 100644 --- a/src/html_compose/elements/dt_element.py +++ b/src/html_compose/elements/dt_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/em_element.py b/src/html_compose/elements/em_element.py index 0e6203a..d2a4714 100644 --- a/src/html_compose/elements/em_element.py +++ b/src/html_compose/elements/em_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/embed_element.py b/src/html_compose/elements/embed_element.py index c5d2218..c2132cb 100644 --- a/src/html_compose/elements/embed_element.py +++ b/src/html_compose/elements/embed_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, EmbedAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,76 +35,138 @@ class hint(GlobalAttrs, EmbedAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - src: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + src: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -195,6 +258,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -274,6 +617,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/fieldset_element.py b/src/html_compose/elements/fieldset_element.py index 1ccc9a2..3c45001 100644 --- a/src/html_compose/elements/fieldset_element.py +++ b/src/html_compose/elements/fieldset_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, FieldsetAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,75 +35,137 @@ class hint(GlobalAttrs, FieldsetAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -190,6 +253,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -267,6 +610,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/figcaption_element.py b/src/html_compose/elements/figcaption_element.py index d87d0bd..1d3c081 100644 --- a/src/html_compose/elements/figcaption_element.py +++ b/src/html_compose/elements/figcaption_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/figure_element.py b/src/html_compose/elements/figure_element.py index 6db8d66..3ef0f56 100644 --- a/src/html_compose/elements/figure_element.py +++ b/src/html_compose/elements/figure_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/footer_element.py b/src/html_compose/elements/footer_element.py index be00317..033fca7 100644 --- a/src/html_compose/elements/footer_element.py +++ b/src/html_compose/elements/footer_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/form_element.py b/src/html_compose/elements/form_element.py index dcc5443..c209018 100644 --- a/src/html_compose/elements/form_element.py +++ b/src/html_compose/elements/form_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, FormAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,89 +35,148 @@ class hint(GlobalAttrs, FormAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accept_charset: Optional[str] = None, - action: Optional[str] = None, - autocomplete: Optional[Union[str, Literal["on", "off"]]] = None, - enctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - method: Optional[Union[str, Literal["GET", "POST", "dialog"]]] = None, - name: Optional[str] = None, - novalidate: Optional[Union[str, bool]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accept_charset: StrLike | None = None, + action: StrLike | None = None, + autocomplete: Literal["on", "off"] | StrLike | None = None, + enctype: Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ] + | StrLike + | None = None, + method: Literal["GET", "POST", "dialog"] | StrLike | None = None, + name: StrLike | None = None, + novalidate: bool | StrLike | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -221,6 +281,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -308,6 +648,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h1_element.py b/src/html_compose/elements/h1_element.py index 3121531..5a80dfb 100644 --- a/src/html_compose/elements/h1_element.py +++ b/src/html_compose/elements/h1_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h2_element.py b/src/html_compose/elements/h2_element.py index 6ee63bc..3fb8ab8 100644 --- a/src/html_compose/elements/h2_element.py +++ b/src/html_compose/elements/h2_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h3_element.py b/src/html_compose/elements/h3_element.py index f13539b..a9552b1 100644 --- a/src/html_compose/elements/h3_element.py +++ b/src/html_compose/elements/h3_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h4_element.py b/src/html_compose/elements/h4_element.py index 251a6d9..427a108 100644 --- a/src/html_compose/elements/h4_element.py +++ b/src/html_compose/elements/h4_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h5_element.py b/src/html_compose/elements/h5_element.py index de307ba..00914a6 100644 --- a/src/html_compose/elements/h5_element.py +++ b/src/html_compose/elements/h5_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/h6_element.py b/src/html_compose/elements/h6_element.py index 6d62cb7..012dcae 100644 --- a/src/html_compose/elements/h6_element.py +++ b/src/html_compose/elements/h6_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/head_element.py b/src/html_compose/elements/head_element.py index ca30a96..4562843 100644 --- a/src/html_compose/elements/head_element.py +++ b/src/html_compose/elements/head_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/header_element.py b/src/html_compose/elements/header_element.py index 8ad2c51..693a638 100644 --- a/src/html_compose/elements/header_element.py +++ b/src/html_compose/elements/header_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/hgroup_element.py b/src/html_compose/elements/hgroup_element.py index 24641fe..6c08798 100644 --- a/src/html_compose/elements/hgroup_element.py +++ b/src/html_compose/elements/hgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/hr_element.py b/src/html_compose/elements/hr_element.py index fbb42a3..ca3d21d 100644 --- a/src/html_compose/elements/hr_element.py +++ b/src/html_compose/elements/hr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/html_element.py b/src/html_compose/elements/html_element.py index adbda5f..c4a42f6 100644 --- a/src/html_compose/elements/html_element.py +++ b/src/html_compose/elements/html_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/i_element.py b/src/html_compose/elements/i_element.py index 14e4b78..ac2f298 100644 --- a/src/html_compose/elements/i_element.py +++ b/src/html_compose/elements/i_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/iframe_element.py b/src/html_compose/elements/iframe_element.py index 77d383c..4dc6882 100644 --- a/src/html_compose/elements/iframe_element.py +++ b/src/html_compose/elements/iframe_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, IframeAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,82 +35,144 @@ class hint(GlobalAttrs, IframeAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - allow: Optional[str] = None, - allowfullscreen: Optional[Union[str, bool]] = None, - height: Optional[Union[str, int]] = None, - loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, - name: Optional[str] = None, - referrerpolicy: Optional[str] = None, - sandbox: Optional[Union[str, list]] = None, - src: Optional[str] = None, - srcdoc: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + allow: StrLike | None = None, + allowfullscreen: bool | StrLike | None = None, + height: int | StrLike | None = None, + loading: Literal["lazy", "eager"] | StrLike | None = None, + name: StrLike | None = None, + referrerpolicy: StrLike | None = None, + sandbox: Resolvable | StrLike | None = None, + src: StrLike | None = None, + srcdoc: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -222,6 +285,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -313,6 +656,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/img_element.py b/src/html_compose/elements/img_element.py index f3268d9..ad08bf2 100644 --- a/src/html_compose/elements/img_element.py +++ b/src/html_compose/elements/img_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ImgAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -41,89 +42,149 @@ class hint(GlobalAttrs, ImgAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - alt: Optional[str] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - decoding: Optional[Union[str, Literal["sync", "async", "auto"]]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - height: Optional[Union[str, int]] = None, - ismap: Optional[Union[str, bool]] = None, - loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, - referrerpolicy: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - usemap: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + alt: StrLike | None = None, + crossorigin: Literal["anonymous", "use-credentials"] + | StrLike + | None = None, + decoding: Literal["sync", "async", "auto"] | StrLike | None = None, + fetchpriority: Literal["auto", "high", "low"] | StrLike | None = None, + height: int | StrLike | None = None, + ismap: bool | StrLike | None = None, + loading: Literal["lazy", "eager"] | StrLike | None = None, + referrerpolicy: StrLike | None = None, + sizes: StrLike | None = None, + src: StrLike | None = None, + srcset: StrLike | None = None, + usemap: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -245,6 +306,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -342,6 +683,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/input_element.py b/src/html_compose/elements/input_element.py index ad79677..d966946 100644 --- a/src/html_compose/elements/input_element.py +++ b/src/html_compose/elements/input_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, InputAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -44,121 +45,178 @@ class hint(GlobalAttrs, InputAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accept: Optional[str] = None, - alpha: Optional[Union[str, bool]] = None, - alt: Optional[str] = None, - autocomplete: Optional[str] = None, - checked: Optional[Union[str, bool]] = None, - colorspace: Optional[ - Union[str, Literal["limited-srgb", "display-p3"]] - ] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - formmethod: Optional[ - Union[str, Literal["GET", "POST", "dialog"]] - ] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - height: Optional[Union[str, int]] = None, - list: Optional[str] = None, - max: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - min: Optional[str] = None, - minlength: Optional[Union[str, int]] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - pattern: Optional[str] = None, - placeholder: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[ - Union[str, Literal["toggle", "show", "hide"]] - ] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - src: Optional[str] = None, - step: Optional[Union[str, float]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - value: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accept: StrLike | None = None, + alpha: bool | StrLike | None = None, + alt: StrLike | None = None, + autocomplete: StrLike | None = None, + checked: bool | StrLike | None = None, + colorspace: Literal["limited-srgb", "display-p3"] + | StrLike + | None = None, + dirname: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + formaction: StrLike | None = None, + formenctype: Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ] + | StrLike + | None = None, + formmethod: Literal["GET", "POST", "dialog"] | StrLike | None = None, + formnovalidate: bool | StrLike | None = None, + formtarget: StrLike | None = None, + height: int | StrLike | None = None, + list: StrLike | None = None, + max: StrLike | None = None, + maxlength: int | StrLike | None = None, + min: StrLike | None = None, + minlength: int | StrLike | None = None, + multiple: bool | StrLike | None = None, + name: StrLike | None = None, + pattern: StrLike | None = None, + placeholder: StrLike | None = None, + popovertarget: StrLike | None = None, + popovertargetaction: Literal["toggle", "show", "hide"] + | StrLike + | None = None, + readonly: bool | StrLike | None = None, + required: bool | StrLike | None = None, + size: StrLike | None = None, + src: StrLike | None = None, + step: float | StrLike | None = None, + title: StrLike | None = None, + type: StrLike | None = None, + value: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -355,6 +413,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -493,6 +831,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/ins_element.py b/src/html_compose/elements/ins_element.py index ecc9e64..6917694 100644 --- a/src/html_compose/elements/ins_element.py +++ b/src/html_compose/elements/ins_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, InsAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, InsAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -187,6 +250,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -262,6 +605,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/kbd_element.py b/src/html_compose/elements/kbd_element.py index 1b3ecbd..332f6c9 100644 --- a/src/html_compose/elements/kbd_element.py +++ b/src/html_compose/elements/kbd_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/label_element.py b/src/html_compose/elements/label_element.py index 2d78aee..1a310da 100644 --- a/src/html_compose/elements/label_element.py +++ b/src/html_compose/elements/label_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, LabelAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, LabelAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - for_: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + for_: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/legend_element.py b/src/html_compose/elements/legend_element.py index a389571..e59baf9 100644 --- a/src/html_compose/elements/legend_element.py +++ b/src/html_compose/elements/legend_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/li_element.py b/src/html_compose/elements/li_element.py index d4bbeab..868d7ef 100644 --- a/src/html_compose/elements/li_element.py +++ b/src/html_compose/elements/li_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, LiAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, LiAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - value: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + value: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -181,6 +244,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +597,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/link_element.py b/src/html_compose/elements/link_element.py index 9b1f116..f376b39 100644 --- a/src/html_compose/elements/link_element.py +++ b/src/html_compose/elements/link_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, LinkAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,92 +35,152 @@ class hint(GlobalAttrs, LinkAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - as_: Optional[str] = None, - blocking: Optional[Union[str, list]] = None, - color: Optional[str] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - disabled: Optional[Union[str, bool]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - imagesizes: Optional[str] = None, - imagesrcset: Optional[str] = None, - integrity: Optional[str] = None, - media: Optional[str] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - sizes: Optional[Union[str, list]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + as_: StrLike | None = None, + blocking: Resolvable | StrLike | None = None, + color: StrLike | None = None, + crossorigin: Literal["anonymous", "use-credentials"] + | StrLike + | None = None, + disabled: bool | StrLike | None = None, + fetchpriority: Literal["auto", "high", "low"] | StrLike | None = None, + href: StrLike | None = None, + hreflang: StrLike | None = None, + imagesizes: StrLike | None = None, + imagesrcset: StrLike | None = None, + integrity: StrLike | None = None, + media: StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + sizes: Resolvable | StrLike | None = None, + title: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -259,6 +320,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -361,6 +702,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/main_element.py b/src/html_compose/elements/main_element.py index e8888c2..56dd535 100644 --- a/src/html_compose/elements/main_element.py +++ b/src/html_compose/elements/main_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/map_element.py b/src/html_compose/elements/map_element.py index fe46cdf..d4acbff 100644 --- a/src/html_compose/elements/map_element.py +++ b/src/html_compose/elements/map_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, MapAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, MapAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -181,6 +244,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +597,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/mark_element.py b/src/html_compose/elements/mark_element.py index 4bf5b98..ce78cb4 100644 --- a/src/html_compose/elements/mark_element.py +++ b/src/html_compose/elements/mark_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/menu_element.py b/src/html_compose/elements/menu_element.py index 0da1041..24d1bee 100644 --- a/src/html_compose/elements/menu_element.py +++ b/src/html_compose/elements/menu_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/meta_element.py b/src/html_compose/elements/meta_element.py index 8700bd9..62afd57 100644 --- a/src/html_compose/elements/meta_element.py +++ b/src/html_compose/elements/meta_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, MetaAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,88 +35,147 @@ class hint(GlobalAttrs, MetaAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - charset: Optional[Union[str, Literal["utf-8"]]] = None, - content: Optional[str] = None, - http_equiv: Optional[ - Union[ - str, - Literal[ - "content-type", - "default-style", - "refresh", - "x-ua-compatible", - "content-security-policy", - ], - ] - ] = None, - media: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + charset: Literal["utf-8"] | StrLike | None = None, + content: StrLike | None = None, + http_equiv: Literal[ + "content-type", + "default-style", + "refresh", + "x-ua-compatible", + "content-security-policy", + ] + | StrLike + | None = None, + media: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -209,6 +269,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -290,6 +630,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/meter_element.py b/src/html_compose/elements/meter_element.py index facf664..0d52358 100644 --- a/src/html_compose/elements/meter_element.py +++ b/src/html_compose/elements/meter_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, MeterAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,78 +35,140 @@ class hint(GlobalAttrs, MeterAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - high: Optional[Union[str, float]] = None, - low: Optional[Union[str, float]] = None, - max: Optional[Union[str, float]] = None, - min: Optional[Union[str, float]] = None, - optimum: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + high: float | StrLike | None = None, + low: float | StrLike | None = None, + max: float | StrLike | None = None, + min: float | StrLike | None = None, + optimum: float | StrLike | None = None, + value: float | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -201,6 +264,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -284,6 +627,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/nav_element.py b/src/html_compose/elements/nav_element.py index 0bfe22a..023ca4d 100644 --- a/src/html_compose/elements/nav_element.py +++ b/src/html_compose/elements/nav_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/noscript_element.py b/src/html_compose/elements/noscript_element.py index 1302a29..4ae63e2 100644 --- a/src/html_compose/elements/noscript_element.py +++ b/src/html_compose/elements/noscript_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/object_element.py b/src/html_compose/elements/object_element.py index a98d87b..275f729 100644 --- a/src/html_compose/elements/object_element.py +++ b/src/html_compose/elements/object_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ObjectAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -42,78 +43,140 @@ class hint(GlobalAttrs, ObjectAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - data: Optional[str] = None, - form: Optional[str] = None, - height: Optional[Union[str, int]] = None, - name: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + data: StrLike | None = None, + form: StrLike | None = None, + height: int | StrLike | None = None, + name: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -213,6 +276,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -296,6 +639,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/ol_element.py b/src/html_compose/elements/ol_element.py index f80b640..221ee18 100644 --- a/src/html_compose/elements/ol_element.py +++ b/src/html_compose/elements/ol_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, OlAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,75 +35,137 @@ class hint(GlobalAttrs, OlAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - reversed: Optional[Union[str, bool]] = None, - start: Optional[Union[str, int]] = None, - type: Optional[Union[str, Literal["1", "a", "A", "i", "I"]]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + reversed: bool | StrLike | None = None, + start: int | StrLike | None = None, + type: Literal["1", "a", "A", "i", "I"] | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -189,6 +252,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -266,6 +609,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/optgroup_element.py b/src/html_compose/elements/optgroup_element.py index a5aadd3..e1bcc4d 100644 --- a/src/html_compose/elements/optgroup_element.py +++ b/src/html_compose/elements/optgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, OptgroupAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, OptgroupAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + label: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -185,6 +248,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -260,6 +603,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/option_element.py b/src/html_compose/elements/option_element.py index 19c2d84..a2dbf77 100644 --- a/src/html_compose/elements/option_element.py +++ b/src/html_compose/elements/option_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, OptionAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,76 +35,138 @@ class hint(GlobalAttrs, OptionAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - selected: Optional[Union[str, bool]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + label: StrLike | None = None, + selected: bool | StrLike | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -193,6 +256,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -272,6 +615,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/output_element.py b/src/html_compose/elements/output_element.py index e5418c7..b7850ab 100644 --- a/src/html_compose/elements/output_element.py +++ b/src/html_compose/elements/output_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, OutputAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -42,75 +43,137 @@ class hint(GlobalAttrs, OutputAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - for_: Optional[Union[str, list]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + for_: Resolvable | StrLike | None = None, + form: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -198,6 +261,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -275,6 +618,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/p_element.py b/src/html_compose/elements/p_element.py index 6e36233..2bd1514 100644 --- a/src/html_compose/elements/p_element.py +++ b/src/html_compose/elements/p_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/picture_element.py b/src/html_compose/elements/picture_element.py index f28dfeb..ad11661 100644 --- a/src/html_compose/elements/picture_element.py +++ b/src/html_compose/elements/picture_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/pre_element.py b/src/html_compose/elements/pre_element.py index 40cf3c7..1cf03b6 100644 --- a/src/html_compose/elements/pre_element.py +++ b/src/html_compose/elements/pre_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/progress_element.py b/src/html_compose/elements/progress_element.py index ff449a9..65449f8 100644 --- a/src/html_compose/elements/progress_element.py +++ b/src/html_compose/elements/progress_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ProgressAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, ProgressAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - max: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + max: float | StrLike | None = None, + value: float | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -185,6 +248,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -260,6 +603,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/q_element.py b/src/html_compose/elements/q_element.py index 5ffbc60..34a7ee4 100644 --- a/src/html_compose/elements/q_element.py +++ b/src/html_compose/elements/q_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, QAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, QAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/rp_element.py b/src/html_compose/elements/rp_element.py index c812fab..3302789 100644 --- a/src/html_compose/elements/rp_element.py +++ b/src/html_compose/elements/rp_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/rt_element.py b/src/html_compose/elements/rt_element.py index c9bd51a..e1d8cd4 100644 --- a/src/html_compose/elements/rt_element.py +++ b/src/html_compose/elements/rt_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/ruby_element.py b/src/html_compose/elements/ruby_element.py index 4556ccc..a4b191c 100644 --- a/src/html_compose/elements/ruby_element.py +++ b/src/html_compose/elements/ruby_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/s_element.py b/src/html_compose/elements/s_element.py index 1d3de48..e908224 100644 --- a/src/html_compose/elements/s_element.py +++ b/src/html_compose/elements/s_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/samp_element.py b/src/html_compose/elements/samp_element.py index 6f5680f..1abc7b5 100644 --- a/src/html_compose/elements/samp_element.py +++ b/src/html_compose/elements/samp_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/script_element.py b/src/html_compose/elements/script_element.py index 60ea350..33b131d 100644 --- a/src/html_compose/elements/script_element.py +++ b/src/html_compose/elements/script_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ScriptAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,86 +35,146 @@ class hint(GlobalAttrs, ScriptAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - async_: Optional[Union[str, bool]] = None, - blocking: Optional[Union[str, list]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - defer: Optional[Union[str, bool]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - integrity: Optional[str] = None, - nomodule: Optional[Union[str, bool]] = None, - referrerpolicy: Optional[str] = None, - src: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + async_: bool | StrLike | None = None, + blocking: Resolvable | StrLike | None = None, + crossorigin: Literal["anonymous", "use-credentials"] + | StrLike + | None = None, + defer: bool | StrLike | None = None, + fetchpriority: Literal["auto", "high", "low"] | StrLike | None = None, + integrity: StrLike | None = None, + nomodule: bool | StrLike | None = None, + referrerpolicy: StrLike | None = None, + src: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -224,6 +285,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -315,6 +656,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/search_element.py b/src/html_compose/elements/search_element.py index 418ba28..35ae973 100644 --- a/src/html_compose/elements/search_element.py +++ b/src/html_compose/elements/search_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/section_element.py b/src/html_compose/elements/section_element.py index 3c23e6e..cea48a4 100644 --- a/src/html_compose/elements/section_element.py +++ b/src/html_compose/elements/section_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/select_element.py b/src/html_compose/elements/select_element.py index 2dc2496..36b0956 100644 --- a/src/html_compose/elements/select_element.py +++ b/src/html_compose/elements/select_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, SelectAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -44,79 +45,141 @@ class hint(GlobalAttrs, SelectAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autocomplete: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autocomplete: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + multiple: bool | StrLike | None = None, + name: StrLike | None = None, + required: bool | StrLike | None = None, + size: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -218,6 +281,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -303,6 +646,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/slot_element.py b/src/html_compose/elements/slot_element.py index 8cc8262..b08d98d 100644 --- a/src/html_compose/elements/slot_element.py +++ b/src/html_compose/elements/slot_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, SlotAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, SlotAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -181,6 +244,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +597,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/small_element.py b/src/html_compose/elements/small_element.py index 225909c..b8c5eaf 100644 --- a/src/html_compose/elements/small_element.py +++ b/src/html_compose/elements/small_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/source_element.py b/src/html_compose/elements/source_element.py index 135b416..1d297d7 100644 --- a/src/html_compose/elements/source_element.py +++ b/src/html_compose/elements/source_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, SourceAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,79 +35,141 @@ class hint(GlobalAttrs, SourceAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - media: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + media: StrLike | None = None, + sizes: StrLike | None = None, + src: StrLike | None = None, + srcset: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -210,6 +273,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -295,6 +638,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/span_element.py b/src/html_compose/elements/span_element.py index 6224eb1..82a3740 100644 --- a/src/html_compose/elements/span_element.py +++ b/src/html_compose/elements/span_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/strong_element.py b/src/html_compose/elements/strong_element.py index c5785c2..dc81872 100644 --- a/src/html_compose/elements/strong_element.py +++ b/src/html_compose/elements/strong_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/style_element.py b/src/html_compose/elements/style_element.py index 9cbef9f..6ec32e4 100644 --- a/src/html_compose/elements/style_element.py +++ b/src/html_compose/elements/style_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, StyleAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,74 +35,136 @@ class hint(GlobalAttrs, StyleAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - blocking: Optional[Union[str, list]] = None, - media: Optional[str] = None, - title: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + blocking: Resolvable | StrLike | None = None, + media: StrLike | None = None, + title: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -189,6 +252,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -263,6 +606,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/sub_element.py b/src/html_compose/elements/sub_element.py index 3f24e74..c15b511 100644 --- a/src/html_compose/elements/sub_element.py +++ b/src/html_compose/elements/sub_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/summary_element.py b/src/html_compose/elements/summary_element.py index c249e98..568b496 100644 --- a/src/html_compose/elements/summary_element.py +++ b/src/html_compose/elements/summary_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/sup_element.py b/src/html_compose/elements/sup_element.py index 76671a1..044c55f 100644 --- a/src/html_compose/elements/sup_element.py +++ b/src/html_compose/elements/sup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/svg_element.py b/src/html_compose/elements/svg_element.py index ded73de..c20e3d2 100644 --- a/src/html_compose/elements/svg_element.py +++ b/src/html_compose/elements/svg_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/table_element.py b/src/html_compose/elements/table_element.py index f3db171..b9e30c4 100644 --- a/src/html_compose/elements/table_element.py +++ b/src/html_compose/elements/table_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/tbody_element.py b/src/html_compose/elements/tbody_element.py index 12594b3..fc58c4c 100644 --- a/src/html_compose/elements/tbody_element.py +++ b/src/html_compose/elements/tbody_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/td_element.py b/src/html_compose/elements/td_element.py index cd7876d..de1cc67 100644 --- a/src/html_compose/elements/td_element.py +++ b/src/html_compose/elements/td_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, TdAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,75 +35,137 @@ class hint(GlobalAttrs, TdAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + colspan: StrLike | None = None, + headers: Resolvable | StrLike | None = None, + rowspan: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -190,6 +253,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -267,6 +610,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/template_element.py b/src/html_compose/elements/template_element.py index bc48b1b..15c8ad9 100644 --- a/src/html_compose/elements/template_element.py +++ b/src/html_compose/elements/template_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, TemplateAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,76 +35,138 @@ class hint(GlobalAttrs, TemplateAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - shadowrootclonable: Optional[Union[str, bool]] = None, - shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, - shadowrootmode: Optional[Union[str, Literal["open", "closed"]]] = None, - shadowrootserializable: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + shadowrootclonable: bool | StrLike | None = None, + shadowrootdelegatesfocus: bool | StrLike | None = None, + shadowrootmode: Literal["open", "closed"] | StrLike | None = None, + shadowrootserializable: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -193,6 +256,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -279,6 +622,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/textarea_element.py b/src/html_compose/elements/textarea_element.py index 6739b33..155453a 100644 --- a/src/html_compose/elements/textarea_element.py +++ b/src/html_compose/elements/textarea_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, TextareaAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -44,85 +45,147 @@ class hint(GlobalAttrs, TextareaAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autocomplete: Optional[str] = None, - cols: Optional[str] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - minlength: Optional[Union[str, int]] = None, - name: Optional[str] = None, - placeholder: Optional[str] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - rows: Optional[str] = None, - wrap: Optional[Union[str, Literal["soft", "hard"]]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autocomplete: StrLike | None = None, + cols: StrLike | None = None, + dirname: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + maxlength: int | StrLike | None = None, + minlength: int | StrLike | None = None, + name: StrLike | None = None, + placeholder: StrLike | None = None, + readonly: bool | StrLike | None = None, + required: bool | StrLike | None = None, + rows: StrLike | None = None, + wrap: Literal["soft", "hard"] | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -243,6 +306,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -340,6 +683,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/tfoot_element.py b/src/html_compose/elements/tfoot_element.py index 431aaef..64310dc 100644 --- a/src/html_compose/elements/tfoot_element.py +++ b/src/html_compose/elements/tfoot_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/th_element.py b/src/html_compose/elements/th_element.py index b3a5e6f..fe3dcb9 100644 --- a/src/html_compose/elements/th_element.py +++ b/src/html_compose/elements/th_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, ThAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,79 +35,141 @@ class hint(GlobalAttrs, ThAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - abbr: Optional[str] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - scope: Optional[ - Union[str, Literal["row", "col", "rowgroup", "colgroup"]] - ] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + abbr: StrLike | None = None, + colspan: StrLike | None = None, + headers: Resolvable | StrLike | None = None, + rowspan: int | StrLike | None = None, + scope: Literal["row", "col", "rowgroup", "colgroup"] + | StrLike + | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -200,6 +263,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -281,6 +624,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/thead_element.py b/src/html_compose/elements/thead_element.py index 3c8a558..51bc132 100644 --- a/src/html_compose/elements/thead_element.py +++ b/src/html_compose/elements/thead_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/time_element.py b/src/html_compose/elements/time_element.py index 8996a63..8fb65c4 100644 --- a/src/html_compose/elements/time_element.py +++ b/src/html_compose/elements/time_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, TimeAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,73 +35,135 @@ class hint(GlobalAttrs, TimeAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -182,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -255,6 +598,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/title_element.py b/src/html_compose/elements/title_element.py index 33307d6..60fabb2 100644 --- a/src/html_compose/elements/title_element.py +++ b/src/html_compose/elements/title_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/tr_element.py b/src/html_compose/elements/tr_element.py index 7652495..d326df4 100644 --- a/src/html_compose/elements/tr_element.py +++ b/src/html_compose/elements/tr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/track_element.py b/src/html_compose/elements/track_element.py index e545898..54bf8e9 100644 --- a/src/html_compose/elements/track_element.py +++ b/src/html_compose/elements/track_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, TrackAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,88 +35,143 @@ class hint(GlobalAttrs, TrackAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - default: Optional[Union[str, bool]] = None, - kind: Optional[ - Union[ - str, - Literal[ - "subtitles", - "captions", - "descriptions", - "chapters", - "metadata", - ], - ] - ] = None, - label: Optional[str] = None, - src: Optional[str] = None, - srclang: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + default: bool | StrLike | None = None, + kind: Literal[ + "subtitles", "captions", "descriptions", "chapters", "metadata" + ] + | StrLike + | None = None, + label: StrLike | None = None, + src: StrLike | None = None, + srclang: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -210,6 +266,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -291,6 +627,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/u_element.py b/src/html_compose/elements/u_element.py index 7b471aa..f52eae7 100644 --- a/src/html_compose/elements/u_element.py +++ b/src/html_compose/elements/u_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/ul_element.py b/src/html_compose/elements/ul_element.py index 9710c36..7cf57ee 100644 --- a/src/html_compose/elements/ul_element.py +++ b/src/html_compose/elements/ul_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/var_element.py b/src/html_compose/elements/var_element.py index 6218b6d..e3a97e6 100644 --- a/src/html_compose/elements/var_element.py +++ b/src/html_compose/elements/var_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/video_element.py b/src/html_compose/elements/video_element.py index 13df8d6..d33a249 100644 --- a/src/html_compose/elements/video_element.py +++ b/src/html_compose/elements/video_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,87 +35,147 @@ class hint(GlobalAttrs, VideoAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - height: Optional[Union[str, int]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - playsinline: Optional[Union[str, bool]] = None, - poster: Optional[str] = None, - preload: Optional[ - Union[str, Literal["none", "metadata", "auto"]] - ] = None, - src: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autoplay: bool | StrLike | None = None, + controls: bool | StrLike | None = None, + crossorigin: Literal["anonymous", "use-credentials"] + | StrLike + | None = None, + height: int | StrLike | None = None, + loop: bool | StrLike | None = None, + muted: bool | StrLike | None = None, + playsinline: bool | StrLike | None = None, + poster: StrLike | None = None, + preload: Literal["none", "metadata", "auto"] | StrLike | None = None, + src: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -227,6 +288,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -320,6 +661,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/elements/wbr_element.py b/src/html_compose/elements/wbr_element.py index 103bafd..0abb43c 100644 --- a/src/html_compose/elements/wbr_element.py +++ b/src/html_compose/elements/wbr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -34,72 +35,134 @@ class hint(GlobalAttrs): def __init__( self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, + attrs: Iterable[BaseAttribute] + | Mapping[str, Resolvable] + | Iterable[ + BaseAttribute | Iterable[BaseAttribute] | Mapping[str, Resolvable] + ] + | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal[ + "on", "off", "none", "sentences", "words", "characters" + ] + | StrLike + | None = None, + autocorrect: Literal["on", "off"] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal["true", "plaintext-only", "false"] + | StrLike + | None = None, + dir: Literal["ltr", "rtl", "auto"] | StrLike | None = None, + draggable: Literal["true", "false"] | StrLike | None = None, + enterkeyhint: Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ] + | StrLike + | None = None, + hidden: Literal["until-found", "hidden", ""] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ] + | StrLike + | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal["auto", "manual"] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal["true", "false", ""] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal["yes", "no"] | StrLike | None = None, + writingsuggestions: Literal["true", "false", ""] + | StrLike + | None = None, children: Optional[list] = None, ) -> None: """ @@ -177,6 +240,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -248,6 +591,151 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not ( + onsecuritypolicyviolation is None + or onsecuritypolicyviolation is False + ): + self._process_attr( + "onsecuritypolicyviolation", onsecuritypolicyviolation + ) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/src/html_compose/py.typed b/src/html_compose/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_element.py b/tests/test_element.py index 7f8e029..731fb00 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -59,7 +59,7 @@ def test_nested_callables(): Test that nesting callables works correctly. """ a = div() - a.append("text", lambda x: div()[x.tag, lambda y: y.tag]) + a.append("text", lambda x: div()[x.tag, lambda y: y.tag]) # type: ignore assert a.render() == "
text
divdiv
" @@ -91,7 +91,7 @@ def test_id(): def test_href(): literal = 'Search Engine' - a1 = a(href=a._.href("https://google.com"))["Search Engine"].render() + a1 = a([a._.href("https://google.com")])["Search Engine"].render() a2 = a(href="https://google.com")["Search Engine"].render() assert a1 == literal assert a2 == literal @@ -145,7 +145,7 @@ def test_class_getitem(): A syntax alteration was added __class_getitem__ which this test verifies. """ - el = div["demo"] + el = div()["demo"] assert el.render() == "
demo
" @@ -177,19 +177,23 @@ def test_document(): assert doc == expected +def test_noconstructor(): + assert h.h1["Demo"].render() == "

Demo

" # type: ignore + + def test_float_precision(): """Test float precision and setting per-element settings""" num = 1 / 3 - a = h.p[num].render() + a = h.p()[num].render() assert a == "

0.333

" - h.p.FLOAT_PRECISION = 0 - b = h.p[num].render() + h.p.FLOAT_PRECISION = 0 # type: ignore + b = h.p()[num].render() assert b == "

0

" - c = h.h1[num].render() + c = h.h1()[num].render() assert c == "

0.333

" # Now set globally - h.BaseElement.FLOAT_PRECISION = 0 - d = h.h1[num].render() + h.BaseElement.FLOAT_PRECISION = 0 # type: ignore + d = h.h1()[num].render() assert d == "

0

" @@ -211,10 +215,13 @@ def test_rel_array(): el = a(rel=["noopener", "noreferrer"]) assert el.render() == '' + el = a(rel={"noopener": 0, "noreferrer": 1}) + assert el.render() == '' + def test_custom_element(): from html_compose import CustomElement custom = CustomElement.create("custom") el = custom["Hello world"] - assert el.render() == "Hello world" + assert el.render() == "Hello world" # type: ignore diff --git a/tools/generate_attributes.py b/tools/generate_attributes.py index 45d6bd6..dc2f120 100644 --- a/tools/generate_attributes.py +++ b/tools/generate_attributes.py @@ -14,7 +14,7 @@ def generate_class_template( element_name = "global" if attr_name in ("class", "style"): - type_data = ": Union[str, list, dict]" + type_data = ": Resolvable" template = f''' @staticmethod @@ -56,6 +56,7 @@ def global_attrs(): doc_lines = [ "from . import BaseAttribute", "from typing import Literal, Union, Callable", + "from ..base_types import Resolvable, StrLike", "", "class GlobalAttrs:", ' """ ', @@ -116,6 +117,7 @@ def other_attrs(): doc_lines = [ "from . import BaseAttribute", "from typing import Literal, Union", + "from ..base_types import Resolvable, StrLike", "", f"class {attr_class_name}:", ' """ ', diff --git a/tools/generate_elements.py b/tools/generate_elements.py index 9c5af77..07504b7 100644 --- a/tools/generate_elements.py +++ b/tools/generate_elements.py @@ -162,7 +162,7 @@ def generate_attrs(attr_class, attr_list) -> list[processed_attr]: # -> list: docstrings = attrdefs[attr_name]["docstring"] dupes = attrdefs[attr_name].get("dupes", []) - param_types = ["str"] + param_types = [] param_type = value_hint_to_python_type(attrdef.value_desc) if param_type and param_type not in param_types: param_types.append(param_type) @@ -176,15 +176,19 @@ def generate_attrs(attr_class, attr_list) -> list[processed_attr]: # -> list: param_type = value_hint_to_python_type(attrdef.value_desc) if param_type and param_type not in param_types: param_types.append(param_type) + # Even if we're specific, we should generate + # StrLike as a fallback + if "StrLike" not in param_types: + param_types.append("StrLike") # Hardcode override for class and style, which uniquely are intended # for multiple types if attrdef.name in ("class", "style"): - param_types = ["str", "list", "dict"] + param_types = ["Resolvable"] - p_type = f"Union[{', '.join(param_types)}]" + p_type = f"{' | '.join(param_types)}" if len(param_types) == 1: p_type = param_types[0] - param = f" {attrdef.safe_name}: Optional[{p_type}] = None," + param = f" {attrdef.safe_name}: {p_type} | None = None," processed.append( processed_attr( name=attr_name, @@ -319,7 +323,9 @@ def add_param(p): " _ = hint", " def __init__(", " self,", - " attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None,", + " attrs: Iterable[BaseAttribute] | " + "Mapping[str, Resolvable] | " + "Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None,", extra_attrs, " children: Optional[list] = None", " ) -> None:", @@ -341,11 +347,12 @@ def add_param(p): ] result.append((fixed_name, "\n".join(template))) - header = f"""from typing import Union, Literal, Optional + header = f"""from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, {", ".join(attr_imports)} from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py """ diff --git a/tools/generated/a_attrs.py b/tools/generated/a_attrs.py index ba76e6c..e5809c9 100644 --- a/tools/generated/a_attrs.py +++ b/tools/generated/a_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class AnchorAttrs: """ @@ -8,7 +9,7 @@ class AnchorAttrs: """ @staticmethod - def download(value: str) -> BaseAttribute: + def download(value: StrLike) -> BaseAttribute: """ "a" attribute: download Whether to download the resource instead of navigating to it, and its filename if so @@ -50,7 +51,7 @@ def hreflang(value) -> BaseAttribute: @staticmethod - def ping(value: list) -> BaseAttribute: + def ping(value: Resolvable) -> BaseAttribute: """ "a" attribute: ping URLs to ping @@ -78,7 +79,7 @@ def referrerpolicy(value) -> BaseAttribute: @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "a" attribute: rel Relationship between the location in the document containing the hyperlink and the destination resource diff --git a/tools/generated/abbr_attrs.py b/tools/generated/abbr_attrs.py index 4e18924..83e635f 100644 --- a/tools/generated/abbr_attrs.py +++ b/tools/generated/abbr_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class AbbrAttrs: """ @@ -8,7 +9,7 @@ class AbbrAttrs: """ @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "abbr" attribute: title Full term or expansion of abbreviation diff --git a/tools/generated/area_attrs.py b/tools/generated/area_attrs.py index 1d1105a..7e6782f 100644 --- a/tools/generated/area_attrs.py +++ b/tools/generated/area_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class AreaAttrs: """ @@ -8,7 +9,7 @@ class AreaAttrs: """ @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "area" attribute: alt Replacement text for use when images are not available @@ -36,7 +37,7 @@ def coords(value) -> BaseAttribute: @staticmethod - def download(value: str) -> BaseAttribute: + def download(value: StrLike) -> BaseAttribute: """ "area" attribute: download Whether to download the resource instead of navigating to it, and its filename if so @@ -64,7 +65,7 @@ def href(value) -> BaseAttribute: @staticmethod - def ping(value: list) -> BaseAttribute: + def ping(value: Resolvable) -> BaseAttribute: """ "area" attribute: ping URLs to ping @@ -92,7 +93,7 @@ def referrerpolicy(value) -> BaseAttribute: @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "area" attribute: rel Relationship between the location in the document containing the hyperlink and the destination resource diff --git a/tools/generated/audio_attrs.py b/tools/generated/audio_attrs.py index 37b1718..8db2d8c 100644 --- a/tools/generated/audio_attrs.py +++ b/tools/generated/audio_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class AudioAttrs: """ diff --git a/tools/generated/base_attrs.py b/tools/generated/base_attrs.py index 98d25c8..4080edf 100644 --- a/tools/generated/base_attrs.py +++ b/tools/generated/base_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class BaseAttrs: """ diff --git a/tools/generated/bdo_attrs.py b/tools/generated/bdo_attrs.py index d7e9daa..34b0d3b 100644 --- a/tools/generated/bdo_attrs.py +++ b/tools/generated/bdo_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class BdoAttrs: """ diff --git a/tools/generated/blockquote_attrs.py b/tools/generated/blockquote_attrs.py index 5deb44e..d731fcf 100644 --- a/tools/generated/blockquote_attrs.py +++ b/tools/generated/blockquote_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class BlockquoteAttrs: """ diff --git a/tools/generated/body_attrs.py b/tools/generated/body_attrs.py index 228eeef..140638f 100644 --- a/tools/generated/body_attrs.py +++ b/tools/generated/body_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class BodyAttrs: """ diff --git a/tools/generated/button_attrs.py b/tools/generated/button_attrs.py index a41fca9..84b42cc 100644 --- a/tools/generated/button_attrs.py +++ b/tools/generated/button_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ButtonAttrs: """ @@ -106,7 +107,7 @@ def formtarget(value) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "button" attribute: name Name of the element to use for form submission and in the form.elements API @@ -162,7 +163,7 @@ def type(value: Literal['submit', 'reset', 'button']) -> BaseAttribute: @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "button" attribute: value Value to be used for form submission diff --git a/tools/generated/canvas_attrs.py b/tools/generated/canvas_attrs.py index 761930b..96d4942 100644 --- a/tools/generated/canvas_attrs.py +++ b/tools/generated/canvas_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class CanvasAttrs: """ diff --git a/tools/generated/col_attrs.py b/tools/generated/col_attrs.py index 70dcc71..f9a3f1f 100644 --- a/tools/generated/col_attrs.py +++ b/tools/generated/col_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ColAttrs: """ diff --git a/tools/generated/colgroup_attrs.py b/tools/generated/colgroup_attrs.py index 7a1ae3e..fb1e549 100644 --- a/tools/generated/colgroup_attrs.py +++ b/tools/generated/colgroup_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ColgroupAttrs: """ diff --git a/tools/generated/data_attrs.py b/tools/generated/data_attrs.py index 59ec3c7..6e4636a 100644 --- a/tools/generated/data_attrs.py +++ b/tools/generated/data_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class DataAttrs: """ @@ -8,7 +9,7 @@ class DataAttrs: """ @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "data" attribute: value Machine-readable value diff --git a/tools/generated/del_attrs.py b/tools/generated/del_attrs.py index d61a75b..8c1b720 100644 --- a/tools/generated/del_attrs.py +++ b/tools/generated/del_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class DelAttrs: """ diff --git a/tools/generated/details_attrs.py b/tools/generated/details_attrs.py index 30991e6..2e65c89 100644 --- a/tools/generated/details_attrs.py +++ b/tools/generated/details_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class DetailsAttrs: """ @@ -8,7 +9,7 @@ class DetailsAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "details" attribute: name Name of group of mutually-exclusive details elements diff --git a/tools/generated/dfn_attrs.py b/tools/generated/dfn_attrs.py index ac874ea..1940040 100644 --- a/tools/generated/dfn_attrs.py +++ b/tools/generated/dfn_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class DfnAttrs: """ @@ -8,7 +9,7 @@ class DfnAttrs: """ @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "dfn" attribute: title Full term or expansion of abbreviation diff --git a/tools/generated/dialog_attrs.py b/tools/generated/dialog_attrs.py index 14f49ec..928612e 100644 --- a/tools/generated/dialog_attrs.py +++ b/tools/generated/dialog_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class DialogAttrs: """ diff --git a/tools/generated/elements/a_element.py b/tools/generated/elements/a_element.py index 18446ab..3411463 100644 --- a/tools/generated/elements/a_element.py +++ b/tools/generated/elements/a_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,44 +31,114 @@ class hint(GlobalAttrs, AnchorAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - download: Optional[str] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - target: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + download: StrLike | None = None, + href: StrLike | None = None, + hreflang: StrLike | None = None, + ping: Resolvable | StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + target: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -174,6 +245,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -264,6 +615,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/abbr_element.py b/tools/generated/elements/abbr_element.py index d0ecf0a..df9827c 100644 --- a/tools/generated/elements/abbr_element.py +++ b/tools/generated/elements/abbr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/address_element.py b/tools/generated/elements/address_element.py index 4c48488..101a724 100644 --- a/tools/generated/elements/address_element.py +++ b/tools/generated/elements/address_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/area_element.py b/tools/generated/elements/area_element.py index 0dbf27b..bb675fe 100644 --- a/tools/generated/elements/area_element.py +++ b/tools/generated/elements/area_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,45 +31,115 @@ class hint(GlobalAttrs, AreaAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - alt: Optional[str] = None, - coords: Optional[str] = None, - download: Optional[str] = None, - href: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - shape: Optional[Union[str, Literal['circle', 'default', 'poly', 'rect']]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + alt: StrLike | None = None, + coords: StrLike | None = None, + download: StrLike | None = None, + href: StrLike | None = None, + ping: Resolvable | StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + shape: Literal['circle', 'default', 'poly', 'rect'] | StrLike | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -177,6 +248,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -269,6 +620,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/article_element.py b/tools/generated/elements/article_element.py index 86c2ba8..fc69c07 100644 --- a/tools/generated/elements/article_element.py +++ b/tools/generated/elements/article_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/aside_element.py b/tools/generated/elements/aside_element.py index e57f2ae..d51f5f6 100644 --- a/tools/generated/elements/aside_element.py +++ b/tools/generated/elements/aside_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/audio_element.py b/tools/generated/elements/audio_element.py index 2330f45..798570c 100644 --- a/tools/generated/elements/audio_element.py +++ b/tools/generated/elements/audio_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,43 +31,113 @@ class hint(GlobalAttrs, AudioAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, - src: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autoplay: bool | StrLike | None = None, + controls: bool | StrLike | None = None, + crossorigin: Literal['anonymous', 'use-credentials'] | StrLike | None = None, + loop: bool | StrLike | None = None, + muted: bool | StrLike | None = None, + preload: Literal['none', 'metadata', 'auto'] | StrLike | None = None, + src: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -166,6 +237,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -254,6 +605,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/b_element.py b/tools/generated/elements/b_element.py index 25854ee..db09b21 100644 --- a/tools/generated/elements/b_element.py +++ b/tools/generated/elements/b_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/base_element.py b/tools/generated/elements/base_element.py index e9b4302..4144794 100644 --- a/tools/generated/elements/base_element.py +++ b/tools/generated/elements/base_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, BaseAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - href: Optional[str] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + href: StrLike | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -147,6 +218,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -225,6 +576,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/bdi_element.py b/tools/generated/elements/bdi_element.py index 0af09ee..f654e44 100644 --- a/tools/generated/elements/bdi_element.py +++ b/tools/generated/elements/bdi_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/bdo_element.py b/tools/generated/elements/bdo_element.py index 801571e..d464285 100644 --- a/tools/generated/elements/bdo_element.py +++ b/tools/generated/elements/bdo_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/blockquote_element.py b/tools/generated/elements/blockquote_element.py index f8dc6c5..0aa53ad 100644 --- a/tools/generated/elements/blockquote_element.py +++ b/tools/generated/elements/blockquote_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, BlockquoteAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/body_element.py b/tools/generated/elements/body_element.py index 705bfe5..abeb535 100644 --- a/tools/generated/elements/body_element.py +++ b/tools/generated/elements/body_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,124 @@ class hint(GlobalAttrs, BodyAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + onafterprint: StrLike | None = None, + onbeforeprint: StrLike | None = None, + onbeforeunload: StrLike | None = None, + onhashchange: StrLike | None = None, + onlanguagechange: StrLike | None = None, + onmessage: StrLike | None = None, + onmessageerror: StrLike | None = None, + onoffline: StrLike | None = None, + ononline: StrLike | None = None, + onpagehide: StrLike | None = None, + onpagereveal: StrLike | None = None, + onpageshow: StrLike | None = None, + onpageswap: StrLike | None = None, + onpopstate: StrLike | None = None, + onrejectionhandled: StrLike | None = None, + onstorage: StrLike | None = None, + onunhandledrejection: StrLike | None = None, + onunload: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -77,6 +166,78 @@ def __init__( `class_` : Classes to which the element belongs + `onafterprint` : + afterprint event handler for Window object + Event handler content attribute + + `onbeforeprint` : + beforeprint event handler for Window object + Event handler content attribute + + `onbeforeunload` : + beforeunload event handler for Window object + Event handler content attribute + + `onhashchange` : + hashchange event handler for Window object + Event handler content attribute + + `onlanguagechange` : + languagechange event handler for Window object + Event handler content attribute + + `onmessage` : + message event handler for Window object + Event handler content attribute + + `onmessageerror` : + messageerror event handler for Window object + Event handler content attribute + + `onoffline` : + offline event handler for Window object + Event handler content attribute + + `ononline` : + online event handler for Window object + Event handler content attribute + + `onpagehide` : + pagehide event handler for Window object + Event handler content attribute + + `onpagereveal` : + pagereveal event handler for Window object + Event handler content attribute + + `onpageshow` : + pageshow event handler for Window object + Event handler content attribute + + `onpageswap` : + pageswap event handler for Window object + Event handler content attribute + + `onpopstate` : + popstate event handler for Window object + Event handler content attribute + + `onrejectionhandled` : + rejectionhandled event handler for Window object + Event handler content attribute + + `onstorage` : + storage event handler for Window object + Event handler content attribute + + `onunhandledrejection` : + unhandledrejection event handler for Window object + Event handler content attribute + + `onunload` : + unload event handler for Window object + Event handler content attribute + `accesskey` : Keyboard shortcut to activate or focus element @@ -137,6 +298,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -173,6 +614,42 @@ def __init__( self._process_attr("id", id) if not (class_ is None or class_ is False): self._process_attr("class", class_) + if not (onafterprint is None or onafterprint is False): + self._process_attr("onafterprint", onafterprint) + if not (onbeforeprint is None or onbeforeprint is False): + self._process_attr("onbeforeprint", onbeforeprint) + if not (onbeforeunload is None or onbeforeunload is False): + self._process_attr("onbeforeunload", onbeforeunload) + if not (onhashchange is None or onhashchange is False): + self._process_attr("onhashchange", onhashchange) + if not (onlanguagechange is None or onlanguagechange is False): + self._process_attr("onlanguagechange", onlanguagechange) + if not (onmessage is None or onmessage is False): + self._process_attr("onmessage", onmessage) + if not (onmessageerror is None or onmessageerror is False): + self._process_attr("onmessageerror", onmessageerror) + if not (onoffline is None or onoffline is False): + self._process_attr("onoffline", onoffline) + if not (ononline is None or ononline is False): + self._process_attr("ononline", ononline) + if not (onpagehide is None or onpagehide is False): + self._process_attr("onpagehide", onpagehide) + if not (onpagereveal is None or onpagereveal is False): + self._process_attr("onpagereveal", onpagereveal) + if not (onpageshow is None or onpageshow is False): + self._process_attr("onpageshow", onpageshow) + if not (onpageswap is None or onpageswap is False): + self._process_attr("onpageswap", onpageswap) + if not (onpopstate is None or onpopstate is False): + self._process_attr("onpopstate", onpopstate) + if not (onrejectionhandled is None or onrejectionhandled is False): + self._process_attr("onrejectionhandled", onrejectionhandled) + if not (onstorage is None or onstorage is False): + self._process_attr("onstorage", onstorage) + if not (onunhandledrejection is None or onunhandledrejection is False): + self._process_attr("onunhandledrejection", onunhandledrejection) + if not (onunload is None or onunload is False): + self._process_attr("onunload", onunload) if not (accesskey is None or accesskey is False): self._process_attr("accesskey", accesskey) if not (autocapitalize is None or autocapitalize is False): @@ -211,6 +688,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/br_element.py b/tools/generated/elements/br_element.py index 93f3894..10f2e27 100644 --- a/tools/generated/elements/br_element.py +++ b/tools/generated/elements/br_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/button_element.py b/tools/generated/elements/button_element.py index 6d70c66..051a2ed 100644 --- a/tools/generated/elements/button_element.py +++ b/tools/generated/elements/button_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,48 +31,118 @@ class hint(GlobalAttrs, ButtonAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - name: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, - type: Optional[Union[str, Literal['submit', 'reset', 'button']]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + formaction: StrLike | None = None, + formenctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | StrLike | None = None, + formmethod: Literal['GET', 'POST', 'dialog'] | StrLike | None = None, + formnovalidate: bool | StrLike | None = None, + formtarget: StrLike | None = None, + name: StrLike | None = None, + popovertarget: StrLike | None = None, + popovertargetaction: Literal['toggle', 'show', 'hide'] | StrLike | None = None, + type: Literal['submit', 'reset', 'button'] | StrLike | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -189,6 +260,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -287,6 +638,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/canvas_element.py b/tools/generated/elements/canvas_element.py index b7c4068..c38faed 100644 --- a/tools/generated/elements/canvas_element.py +++ b/tools/generated/elements/canvas_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, CanvasAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -145,6 +216,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -223,6 +574,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/caption_element.py b/tools/generated/elements/caption_element.py index 02265ac..a702a91 100644 --- a/tools/generated/elements/caption_element.py +++ b/tools/generated/elements/caption_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/cite_element.py b/tools/generated/elements/cite_element.py index 9ee5e16..d45e31f 100644 --- a/tools/generated/elements/cite_element.py +++ b/tools/generated/elements/cite_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/code_element.py b/tools/generated/elements/code_element.py index a45063f..d61cfdb 100644 --- a/tools/generated/elements/code_element.py +++ b/tools/generated/elements/code_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/col_element.py b/tools/generated/elements/col_element.py index 8e27802..cfec80e 100644 --- a/tools/generated/elements/col_element.py +++ b/tools/generated/elements/col_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, ColAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + span: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/colgroup_element.py b/tools/generated/elements/colgroup_element.py index 8de318b..8d5306e 100644 --- a/tools/generated/elements/colgroup_element.py +++ b/tools/generated/elements/colgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, ColgroupAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + span: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/data_element.py b/tools/generated/elements/data_element.py index 76cab24..c767a4c 100644 --- a/tools/generated/elements/data_element.py +++ b/tools/generated/elements/data_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, DataAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -141,6 +212,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -217,6 +568,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/datalist_element.py b/tools/generated/elements/datalist_element.py index 792febe..2fc8dd6 100644 --- a/tools/generated/elements/datalist_element.py +++ b/tools/generated/elements/datalist_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/dd_element.py b/tools/generated/elements/dd_element.py index 535f191..d0fa673 100644 --- a/tools/generated/elements/dd_element.py +++ b/tools/generated/elements/dd_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/del__element.py b/tools/generated/elements/del__element.py index d56380d..2e20494 100644 --- a/tools/generated/elements/del__element.py +++ b/tools/generated/elements/del__element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, DelAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -147,6 +218,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -225,6 +576,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/details_element.py b/tools/generated/elements/details_element.py index da63b2c..538fc78 100644 --- a/tools/generated/elements/details_element.py +++ b/tools/generated/elements/details_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, DetailsAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + open: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -145,6 +216,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -223,6 +574,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/dfn_element.py b/tools/generated/elements/dfn_element.py index 6a1dac6..08d3bcf 100644 --- a/tools/generated/elements/dfn_element.py +++ b/tools/generated/elements/dfn_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/dialog_element.py b/tools/generated/elements/dialog_element.py index 9acf807..0ebafa7 100644 --- a/tools/generated/elements/dialog_element.py +++ b/tools/generated/elements/dialog_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, DialogAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + open: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -141,6 +212,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -217,6 +568,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/div_element.py b/tools/generated/elements/div_element.py index a131dc9..cf93d43 100644 --- a/tools/generated/elements/div_element.py +++ b/tools/generated/elements/div_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/dl_element.py b/tools/generated/elements/dl_element.py index c6096b4..f422da1 100644 --- a/tools/generated/elements/dl_element.py +++ b/tools/generated/elements/dl_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/dt_element.py b/tools/generated/elements/dt_element.py index c99dac9..dff99bc 100644 --- a/tools/generated/elements/dt_element.py +++ b/tools/generated/elements/dt_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/em_element.py b/tools/generated/elements/em_element.py index 5964488..051e5af 100644 --- a/tools/generated/elements/em_element.py +++ b/tools/generated/elements/em_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/embed_element.py b/tools/generated/elements/embed_element.py index 6a389a7..82909eb 100644 --- a/tools/generated/elements/embed_element.py +++ b/tools/generated/elements/embed_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,40 +31,110 @@ class hint(GlobalAttrs, EmbedAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - src: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + src: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -155,6 +226,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -237,6 +588,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/fieldset_element.py b/tools/generated/elements/fieldset_element.py index 4e9bb5b..849e288 100644 --- a/tools/generated/elements/fieldset_element.py +++ b/tools/generated/elements/fieldset_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,39 +31,109 @@ class hint(GlobalAttrs, FieldsetAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -150,6 +221,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -230,6 +581,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/figcaption_element.py b/tools/generated/elements/figcaption_element.py index 9813cc3..caef61e 100644 --- a/tools/generated/elements/figcaption_element.py +++ b/tools/generated/elements/figcaption_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/figure_element.py b/tools/generated/elements/figure_element.py index c151411..3de5197 100644 --- a/tools/generated/elements/figure_element.py +++ b/tools/generated/elements/figure_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/footer_element.py b/tools/generated/elements/footer_element.py index f61b687..945efc1 100644 --- a/tools/generated/elements/footer_element.py +++ b/tools/generated/elements/footer_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/form_element.py b/tools/generated/elements/form_element.py index 0d17739..283f515 100644 --- a/tools/generated/elements/form_element.py +++ b/tools/generated/elements/form_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,44 +31,114 @@ class hint(GlobalAttrs, FormAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accept_charset: Optional[str] = None, - action: Optional[str] = None, - autocomplete: Optional[Union[str, Literal['on', 'off']]] = None, - enctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - method: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - name: Optional[str] = None, - novalidate: Optional[Union[str, bool]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accept_charset: StrLike | None = None, + action: StrLike | None = None, + autocomplete: Literal['on', 'off'] | StrLike | None = None, + enctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | StrLike | None = None, + method: Literal['GET', 'POST', 'dialog'] | StrLike | None = None, + name: StrLike | None = None, + novalidate: bool | StrLike | None = None, + target: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -172,6 +243,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -262,6 +613,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h1_element.py b/tools/generated/elements/h1_element.py index 619fb3b..d737ec3 100644 --- a/tools/generated/elements/h1_element.py +++ b/tools/generated/elements/h1_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h2_element.py b/tools/generated/elements/h2_element.py index f4b9a52..c6ca304 100644 --- a/tools/generated/elements/h2_element.py +++ b/tools/generated/elements/h2_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h3_element.py b/tools/generated/elements/h3_element.py index 97030ca..27ffccd 100644 --- a/tools/generated/elements/h3_element.py +++ b/tools/generated/elements/h3_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h4_element.py b/tools/generated/elements/h4_element.py index 76e2310..a2aa672 100644 --- a/tools/generated/elements/h4_element.py +++ b/tools/generated/elements/h4_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h5_element.py b/tools/generated/elements/h5_element.py index 46fb09f..f246ecf 100644 --- a/tools/generated/elements/h5_element.py +++ b/tools/generated/elements/h5_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/h6_element.py b/tools/generated/elements/h6_element.py index 8c75b5b..8916396 100644 --- a/tools/generated/elements/h6_element.py +++ b/tools/generated/elements/h6_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/head_element.py b/tools/generated/elements/head_element.py index ed2d9e3..f46a566 100644 --- a/tools/generated/elements/head_element.py +++ b/tools/generated/elements/head_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/header_element.py b/tools/generated/elements/header_element.py index c294933..8d7e6bc 100644 --- a/tools/generated/elements/header_element.py +++ b/tools/generated/elements/header_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/hgroup_element.py b/tools/generated/elements/hgroup_element.py index 5bef01c..4bbbdee 100644 --- a/tools/generated/elements/hgroup_element.py +++ b/tools/generated/elements/hgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/hr_element.py b/tools/generated/elements/hr_element.py index 4790dbd..1f8706e 100644 --- a/tools/generated/elements/hr_element.py +++ b/tools/generated/elements/hr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/html_element.py b/tools/generated/elements/html_element.py index 68db430..96a649b 100644 --- a/tools/generated/elements/html_element.py +++ b/tools/generated/elements/html_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/i_element.py b/tools/generated/elements/i_element.py index 3cdaf9b..6c2e960 100644 --- a/tools/generated/elements/i_element.py +++ b/tools/generated/elements/i_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/iframe_element.py b/tools/generated/elements/iframe_element.py index 3bd537a..130bf62 100644 --- a/tools/generated/elements/iframe_element.py +++ b/tools/generated/elements/iframe_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,46 +31,116 @@ class hint(GlobalAttrs, IframeAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - allow: Optional[str] = None, - allowfullscreen: Optional[Union[str, bool]] = None, - height: Optional[Union[str, int]] = None, - loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, - name: Optional[str] = None, - referrerpolicy: Optional[str] = None, - sandbox: Optional[Union[str, list]] = None, - src: Optional[str] = None, - srcdoc: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + allow: StrLike | None = None, + allowfullscreen: bool | StrLike | None = None, + height: int | StrLike | None = None, + loading: Literal['lazy', 'eager'] | StrLike | None = None, + name: StrLike | None = None, + referrerpolicy: StrLike | None = None, + sandbox: Resolvable | StrLike | None = None, + src: StrLike | None = None, + srcdoc: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -182,6 +253,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -276,6 +627,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/img_element.py b/tools/generated/elements/img_element.py index c5b936f..d711bc1 100644 --- a/tools/generated/elements/img_element.py +++ b/tools/generated/elements/img_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,49 +31,119 @@ class hint(GlobalAttrs, ImgAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - alt: Optional[str] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - decoding: Optional[Union[str, Literal['sync', 'async', 'auto']]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - height: Optional[Union[str, int]] = None, - ismap: Optional[Union[str, bool]] = None, - loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, - referrerpolicy: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - usemap: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + alt: StrLike | None = None, + crossorigin: Literal['anonymous', 'use-credentials'] | StrLike | None = None, + decoding: Literal['sync', 'async', 'auto'] | StrLike | None = None, + fetchpriority: Literal['auto', 'high', 'low'] | StrLike | None = None, + height: int | StrLike | None = None, + ismap: bool | StrLike | None = None, + loading: Literal['lazy', 'eager'] | StrLike | None = None, + referrerpolicy: StrLike | None = None, + sizes: StrLike | None = None, + src: StrLike | None = None, + srcset: StrLike | None = None, + usemap: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -194,6 +265,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -294,6 +645,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/input_element.py b/tools/generated/elements/input_element.py index 73a1884..fcad3f8 100644 --- a/tools/generated/elements/input_element.py +++ b/tools/generated/elements/input_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,70 +31,140 @@ class hint(GlobalAttrs, InputAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accept: Optional[str] = None, - alpha: Optional[Union[str, bool]] = None, - alt: Optional[str] = None, - autocomplete: Optional[str] = None, - checked: Optional[Union[str, bool]] = None, - colorspace: Optional[Union[str, Literal['limited-srgb', 'display-p3']]] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - height: Optional[Union[str, int]] = None, - list: Optional[str] = None, - max: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - min: Optional[str] = None, - minlength: Optional[Union[str, int]] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - pattern: Optional[str] = None, - placeholder: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - src: Optional[str] = None, - step: Optional[Union[str, float]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - value: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accept: StrLike | None = None, + alpha: bool | StrLike | None = None, + alt: StrLike | None = None, + autocomplete: StrLike | None = None, + checked: bool | StrLike | None = None, + colorspace: Literal['limited-srgb', 'display-p3'] | StrLike | None = None, + dirname: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + formaction: StrLike | None = None, + formenctype: Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'] | StrLike | None = None, + formmethod: Literal['GET', 'POST', 'dialog'] | StrLike | None = None, + formnovalidate: bool | StrLike | None = None, + formtarget: StrLike | None = None, + height: int | StrLike | None = None, + list: StrLike | None = None, + max: StrLike | None = None, + maxlength: int | StrLike | None = None, + min: StrLike | None = None, + minlength: int | StrLike | None = None, + multiple: bool | StrLike | None = None, + name: StrLike | None = None, + pattern: StrLike | None = None, + placeholder: StrLike | None = None, + popovertarget: StrLike | None = None, + popovertargetaction: Literal['toggle', 'show', 'hide'] | StrLike | None = None, + readonly: bool | StrLike | None = None, + required: bool | StrLike | None = None, + size: StrLike | None = None, + src: StrLike | None = None, + step: float | StrLike | None = None, + title: StrLike | None = None, + type: StrLike | None = None, + value: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -290,6 +361,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -431,6 +782,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/ins_element.py b/tools/generated/elements/ins_element.py index 0253ea9..d8091a4 100644 --- a/tools/generated/elements/ins_element.py +++ b/tools/generated/elements/ins_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, InsAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -147,6 +218,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -225,6 +576,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/kbd_element.py b/tools/generated/elements/kbd_element.py index 730f54c..cb94fc2 100644 --- a/tools/generated/elements/kbd_element.py +++ b/tools/generated/elements/kbd_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/label_element.py b/tools/generated/elements/label_element.py index 1e42e87..13d3763 100644 --- a/tools/generated/elements/label_element.py +++ b/tools/generated/elements/label_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, LabelAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - for_: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + for_: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/legend_element.py b/tools/generated/elements/legend_element.py index 706f18d..6d1de18 100644 --- a/tools/generated/elements/legend_element.py +++ b/tools/generated/elements/legend_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/li_element.py b/tools/generated/elements/li_element.py index 6d2f451..330f9b5 100644 --- a/tools/generated/elements/li_element.py +++ b/tools/generated/elements/li_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, LiAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - value: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + value: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -141,6 +212,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -217,6 +568,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/link_element.py b/tools/generated/elements/link_element.py index 99b19bf..4dab143 100644 --- a/tools/generated/elements/link_element.py +++ b/tools/generated/elements/link_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,52 +31,122 @@ class hint(GlobalAttrs, LinkAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - as_: Optional[str] = None, - blocking: Optional[Union[str, list]] = None, - color: Optional[str] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - disabled: Optional[Union[str, bool]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - imagesizes: Optional[str] = None, - imagesrcset: Optional[str] = None, - integrity: Optional[str] = None, - media: Optional[str] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - sizes: Optional[Union[str, list]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + as_: StrLike | None = None, + blocking: Resolvable | StrLike | None = None, + color: StrLike | None = None, + crossorigin: Literal['anonymous', 'use-credentials'] | StrLike | None = None, + disabled: bool | StrLike | None = None, + fetchpriority: Literal['auto', 'high', 'low'] | StrLike | None = None, + href: StrLike | None = None, + hreflang: StrLike | None = None, + imagesizes: StrLike | None = None, + imagesrcset: StrLike | None = None, + integrity: StrLike | None = None, + media: StrLike | None = None, + referrerpolicy: StrLike | None = None, + rel: Resolvable | StrLike | None = None, + sizes: Resolvable | StrLike | None = None, + title: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -215,6 +286,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -320,6 +671,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/main_element.py b/tools/generated/elements/main_element.py index b56b8ed..ab6780a 100644 --- a/tools/generated/elements/main_element.py +++ b/tools/generated/elements/main_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/map_element.py b/tools/generated/elements/map_element.py index a0caae9..d1f8088 100644 --- a/tools/generated/elements/map_element.py +++ b/tools/generated/elements/map_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, MapAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -141,6 +212,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -217,6 +568,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/mark_element.py b/tools/generated/elements/mark_element.py index 8300109..03f4103 100644 --- a/tools/generated/elements/mark_element.py +++ b/tools/generated/elements/mark_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/menu_element.py b/tools/generated/elements/menu_element.py index 3213ef1..0ffd47c 100644 --- a/tools/generated/elements/menu_element.py +++ b/tools/generated/elements/menu_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/meta_element.py b/tools/generated/elements/meta_element.py index 611208e..af497f0 100644 --- a/tools/generated/elements/meta_element.py +++ b/tools/generated/elements/meta_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,41 +31,111 @@ class hint(GlobalAttrs, MetaAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - charset: Optional[Union[str, Literal['utf-8']]] = None, - content: Optional[str] = None, - http_equiv: Optional[Union[str, Literal['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']]] = None, - media: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + charset: Literal['utf-8'] | StrLike | None = None, + content: StrLike | None = None, + http_equiv: Literal['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy'] | StrLike | None = None, + media: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -158,6 +229,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -242,6 +593,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/meter_element.py b/tools/generated/elements/meter_element.py index f13ce7a..3357a48 100644 --- a/tools/generated/elements/meter_element.py +++ b/tools/generated/elements/meter_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,42 +31,112 @@ class hint(GlobalAttrs, MeterAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - high: Optional[Union[str, float]] = None, - low: Optional[Union[str, float]] = None, - max: Optional[Union[str, float]] = None, - min: Optional[Union[str, float]] = None, - optimum: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + high: float | StrLike | None = None, + low: float | StrLike | None = None, + max: float | StrLike | None = None, + min: float | StrLike | None = None, + optimum: float | StrLike | None = None, + value: float | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -161,6 +232,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -247,6 +598,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/nav_element.py b/tools/generated/elements/nav_element.py index d793724..606e82b 100644 --- a/tools/generated/elements/nav_element.py +++ b/tools/generated/elements/nav_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/noscript_element.py b/tools/generated/elements/noscript_element.py index 571922a..3ee4d6f 100644 --- a/tools/generated/elements/noscript_element.py +++ b/tools/generated/elements/noscript_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/object_element.py b/tools/generated/elements/object_element.py index 4632384..d1cf17a 100644 --- a/tools/generated/elements/object_element.py +++ b/tools/generated/elements/object_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,42 +31,112 @@ class hint(GlobalAttrs, ObjectAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - data: Optional[str] = None, - form: Optional[str] = None, - height: Optional[Union[str, int]] = None, - name: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + data: StrLike | None = None, + form: StrLike | None = None, + height: int | StrLike | None = None, + name: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -165,6 +236,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -251,6 +602,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/ol_element.py b/tools/generated/elements/ol_element.py index 4afcb44..0868423 100644 --- a/tools/generated/elements/ol_element.py +++ b/tools/generated/elements/ol_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,39 +31,109 @@ class hint(GlobalAttrs, OlAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - reversed: Optional[Union[str, bool]] = None, - start: Optional[Union[str, int]] = None, - type: Optional[Union[str, Literal['1', 'a', 'A', 'i', 'I']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + reversed: bool | StrLike | None = None, + start: int | StrLike | None = None, + type: Literal['1', 'a', 'A', 'i', 'I'] | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -149,6 +220,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -229,6 +580,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/optgroup_element.py b/tools/generated/elements/optgroup_element.py index 9c33c76..a026a76 100644 --- a/tools/generated/elements/optgroup_element.py +++ b/tools/generated/elements/optgroup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, OptgroupAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + label: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -145,6 +216,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -223,6 +574,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/option_element.py b/tools/generated/elements/option_element.py index d3a2159..beaefc6 100644 --- a/tools/generated/elements/option_element.py +++ b/tools/generated/elements/option_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,40 +31,110 @@ class hint(GlobalAttrs, OptionAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - selected: Optional[Union[str, bool]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + disabled: bool | StrLike | None = None, + label: StrLike | None = None, + selected: bool | StrLike | None = None, + value: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -153,6 +224,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -235,6 +586,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/output_element.py b/tools/generated/elements/output_element.py index 9014f16..e114195 100644 --- a/tools/generated/elements/output_element.py +++ b/tools/generated/elements/output_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,39 +31,109 @@ class hint(GlobalAttrs, OutputAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - for_: Optional[Union[str, list]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + for_: Resolvable | StrLike | None = None, + form: StrLike | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -150,6 +221,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -230,6 +581,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/p_element.py b/tools/generated/elements/p_element.py index 23c4109..47fd510 100644 --- a/tools/generated/elements/p_element.py +++ b/tools/generated/elements/p_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/picture_element.py b/tools/generated/elements/picture_element.py index 91be43f..44db833 100644 --- a/tools/generated/elements/picture_element.py +++ b/tools/generated/elements/picture_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/pre_element.py b/tools/generated/elements/pre_element.py index f9f1e81..c76c2b2 100644 --- a/tools/generated/elements/pre_element.py +++ b/tools/generated/elements/pre_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/progress_element.py b/tools/generated/elements/progress_element.py index 4f23e61..8d8b995 100644 --- a/tools/generated/elements/progress_element.py +++ b/tools/generated/elements/progress_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, ProgressAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - max: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + max: float | StrLike | None = None, + value: float | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -145,6 +216,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -223,6 +574,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/q_element.py b/tools/generated/elements/q_element.py index b9f78d7..a5467ad 100644 --- a/tools/generated/elements/q_element.py +++ b/tools/generated/elements/q_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, QAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + cite: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/rp_element.py b/tools/generated/elements/rp_element.py index 814d550..407e2f2 100644 --- a/tools/generated/elements/rp_element.py +++ b/tools/generated/elements/rp_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/rt_element.py b/tools/generated/elements/rt_element.py index 5bd61bd..896fff7 100644 --- a/tools/generated/elements/rt_element.py +++ b/tools/generated/elements/rt_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/ruby_element.py b/tools/generated/elements/ruby_element.py index d448b37..a91aff2 100644 --- a/tools/generated/elements/ruby_element.py +++ b/tools/generated/elements/ruby_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/s_element.py b/tools/generated/elements/s_element.py index 10275ac..36172d0 100644 --- a/tools/generated/elements/s_element.py +++ b/tools/generated/elements/s_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/samp_element.py b/tools/generated/elements/samp_element.py index ceea75c..5e0c0b3 100644 --- a/tools/generated/elements/samp_element.py +++ b/tools/generated/elements/samp_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/script_element.py b/tools/generated/elements/script_element.py index 1f74edf..230ab0f 100644 --- a/tools/generated/elements/script_element.py +++ b/tools/generated/elements/script_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,46 +31,116 @@ class hint(GlobalAttrs, ScriptAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - async_: Optional[Union[str, bool]] = None, - blocking: Optional[Union[str, list]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - defer: Optional[Union[str, bool]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - integrity: Optional[str] = None, - nomodule: Optional[Union[str, bool]] = None, - referrerpolicy: Optional[str] = None, - src: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + async_: bool | StrLike | None = None, + blocking: Resolvable | StrLike | None = None, + crossorigin: Literal['anonymous', 'use-credentials'] | StrLike | None = None, + defer: bool | StrLike | None = None, + fetchpriority: Literal['auto', 'high', 'low'] | StrLike | None = None, + integrity: StrLike | None = None, + nomodule: bool | StrLike | None = None, + referrerpolicy: StrLike | None = None, + src: StrLike | None = None, + type: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -180,6 +251,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -274,6 +625,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/search_element.py b/tools/generated/elements/search_element.py index 04bbe33..c74f91c 100644 --- a/tools/generated/elements/search_element.py +++ b/tools/generated/elements/search_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/section_element.py b/tools/generated/elements/section_element.py index ec9861f..c633c44 100644 --- a/tools/generated/elements/section_element.py +++ b/tools/generated/elements/section_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/select_element.py b/tools/generated/elements/select_element.py index 45ab0a7..cdd9b32 100644 --- a/tools/generated/elements/select_element.py +++ b/tools/generated/elements/select_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,43 +31,113 @@ class hint(GlobalAttrs, SelectAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autocomplete: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autocomplete: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + multiple: bool | StrLike | None = None, + name: StrLike | None = None, + required: bool | StrLike | None = None, + size: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -168,6 +239,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -256,6 +607,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/slot_element.py b/tools/generated/elements/slot_element.py index 55c2c4d..717541a 100644 --- a/tools/generated/elements/slot_element.py +++ b/tools/generated/elements/slot_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, SlotAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + name: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -141,6 +212,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -217,6 +568,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/small_element.py b/tools/generated/elements/small_element.py index 60344f3..f9f8312 100644 --- a/tools/generated/elements/small_element.py +++ b/tools/generated/elements/small_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/source_element.py b/tools/generated/elements/source_element.py index f854c26..bb80e2c 100644 --- a/tools/generated/elements/source_element.py +++ b/tools/generated/elements/source_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,43 +31,113 @@ class hint(GlobalAttrs, SourceAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - height: Optional[Union[str, int]] = None, - media: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + height: int | StrLike | None = None, + media: StrLike | None = None, + sizes: StrLike | None = None, + src: StrLike | None = None, + srcset: StrLike | None = None, + type: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -170,6 +241,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -258,6 +609,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/span_element.py b/tools/generated/elements/span_element.py index 9db445c..3ae27d0 100644 --- a/tools/generated/elements/span_element.py +++ b/tools/generated/elements/span_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/strong_element.py b/tools/generated/elements/strong_element.py index e025e11..85cc981 100644 --- a/tools/generated/elements/strong_element.py +++ b/tools/generated/elements/strong_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/style_element.py b/tools/generated/elements/style_element.py index c9a304f..1942c05 100644 --- a/tools/generated/elements/style_element.py +++ b/tools/generated/elements/style_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,38 +31,108 @@ class hint(GlobalAttrs, StyleAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - blocking: Optional[Union[str, list]] = None, - media: Optional[str] = None, - title: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + blocking: Resolvable | StrLike | None = None, + media: StrLike | None = None, + title: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -149,6 +220,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -226,6 +577,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/sub_element.py b/tools/generated/elements/sub_element.py index a7fc95e..4198390 100644 --- a/tools/generated/elements/sub_element.py +++ b/tools/generated/elements/sub_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/summary_element.py b/tools/generated/elements/summary_element.py index 5a18f0c..e51ec7c 100644 --- a/tools/generated/elements/summary_element.py +++ b/tools/generated/elements/summary_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/sup_element.py b/tools/generated/elements/sup_element.py index f940b81..8a2ad87 100644 --- a/tools/generated/elements/sup_element.py +++ b/tools/generated/elements/sup_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/svg_element.py b/tools/generated/elements/svg_element.py index c2203e7..3891ab5 100644 --- a/tools/generated/elements/svg_element.py +++ b/tools/generated/elements/svg_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/table_element.py b/tools/generated/elements/table_element.py index f6e7476..56028b4 100644 --- a/tools/generated/elements/table_element.py +++ b/tools/generated/elements/table_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/tbody_element.py b/tools/generated/elements/tbody_element.py index 9d7380b..3895939 100644 --- a/tools/generated/elements/tbody_element.py +++ b/tools/generated/elements/tbody_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/td_element.py b/tools/generated/elements/td_element.py index b636e11..9af5e9c 100644 --- a/tools/generated/elements/td_element.py +++ b/tools/generated/elements/td_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,39 +31,109 @@ class hint(GlobalAttrs, TdAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + colspan: StrLike | None = None, + headers: Resolvable | StrLike | None = None, + rowspan: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -150,6 +221,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -230,6 +581,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/template_element.py b/tools/generated/elements/template_element.py index 12881c2..5758285 100644 --- a/tools/generated/elements/template_element.py +++ b/tools/generated/elements/template_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,40 +31,110 @@ class hint(GlobalAttrs, TemplateAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - shadowrootclonable: Optional[Union[str, bool]] = None, - shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, - shadowrootmode: Optional[Union[str, Literal['open', 'closed']]] = None, - shadowrootserializable: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + shadowrootclonable: bool | StrLike | None = None, + shadowrootdelegatesfocus: bool | StrLike | None = None, + shadowrootmode: Literal['open', 'closed'] | StrLike | None = None, + shadowrootserializable: bool | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -153,6 +224,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -235,6 +586,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/textarea_element.py b/tools/generated/elements/textarea_element.py index 5ebcf0c..c457e03 100644 --- a/tools/generated/elements/textarea_element.py +++ b/tools/generated/elements/textarea_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,49 +31,119 @@ class hint(GlobalAttrs, TextareaAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autocomplete: Optional[str] = None, - cols: Optional[str] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - minlength: Optional[Union[str, int]] = None, - name: Optional[str] = None, - placeholder: Optional[str] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - rows: Optional[str] = None, - wrap: Optional[Union[str, Literal['soft', 'hard']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autocomplete: StrLike | None = None, + cols: StrLike | None = None, + dirname: StrLike | None = None, + disabled: bool | StrLike | None = None, + form: StrLike | None = None, + maxlength: int | StrLike | None = None, + minlength: int | StrLike | None = None, + name: StrLike | None = None, + placeholder: StrLike | None = None, + readonly: bool | StrLike | None = None, + required: bool | StrLike | None = None, + rows: StrLike | None = None, + wrap: Literal['soft', 'hard'] | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -193,6 +264,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -293,6 +644,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/tfoot_element.py b/tools/generated/elements/tfoot_element.py index 9f50522..b2abd1d 100644 --- a/tools/generated/elements/tfoot_element.py +++ b/tools/generated/elements/tfoot_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/th_element.py b/tools/generated/elements/th_element.py index 942e8a0..cfb22de 100644 --- a/tools/generated/elements/th_element.py +++ b/tools/generated/elements/th_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,41 +31,111 @@ class hint(GlobalAttrs, ThAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - abbr: Optional[str] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - scope: Optional[Union[str, Literal['row', 'col', 'rowgroup', 'colgroup']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + abbr: StrLike | None = None, + colspan: StrLike | None = None, + headers: Resolvable | StrLike | None = None, + rowspan: int | StrLike | None = None, + scope: Literal['row', 'col', 'rowgroup', 'colgroup'] | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -158,6 +229,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -242,6 +593,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/thead_element.py b/tools/generated/elements/thead_element.py index 0f8cb1d..57072ae 100644 --- a/tools/generated/elements/thead_element.py +++ b/tools/generated/elements/thead_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/time_element.py b/tools/generated/elements/time_element.py index 5d93c12..ef82fe8 100644 --- a/tools/generated/elements/time_element.py +++ b/tools/generated/elements/time_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,37 +31,107 @@ class hint(GlobalAttrs, TimeAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + datetime: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -142,6 +213,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -218,6 +569,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/title_element.py b/tools/generated/elements/title_element.py index 20d3619..674347f 100644 --- a/tools/generated/elements/title_element.py +++ b/tools/generated/elements/title_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/tr_element.py b/tools/generated/elements/tr_element.py index f5ae28f..91ca8c8 100644 --- a/tools/generated/elements/tr_element.py +++ b/tools/generated/elements/tr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/track_element.py b/tools/generated/elements/track_element.py index 3536e38..8062e6a 100644 --- a/tools/generated/elements/track_element.py +++ b/tools/generated/elements/track_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,41 +31,111 @@ class hint(GlobalAttrs, TrackAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - default: Optional[Union[str, bool]] = None, - kind: Optional[Union[str, Literal['subtitles', 'captions', 'descriptions', 'chapters', 'metadata']]] = None, - label: Optional[str] = None, - src: Optional[str] = None, - srclang: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + default: bool | StrLike | None = None, + kind: Literal['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'] | StrLike | None = None, + label: StrLike | None = None, + src: StrLike | None = None, + srclang: StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -159,6 +230,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -243,6 +594,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/u_element.py b/tools/generated/elements/u_element.py index 312f220..9b2be11 100644 --- a/tools/generated/elements/u_element.py +++ b/tools/generated/elements/u_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/ul_element.py b/tools/generated/elements/ul_element.py index 8e48e9f..ca9ec0c 100644 --- a/tools/generated/elements/ul_element.py +++ b/tools/generated/elements/ul_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/var_element.py b/tools/generated/elements/var_element.py index 47d955d..a3c1e50 100644 --- a/tools/generated/elements/var_element.py +++ b/tools/generated/elements/var_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/video_element.py b/tools/generated/elements/video_element.py index b4050c5..aabe149 100644 --- a/tools/generated/elements/video_element.py +++ b/tools/generated/elements/video_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,47 +31,117 @@ class hint(GlobalAttrs, VideoAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - height: Optional[Union[str, int]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - playsinline: Optional[Union[str, bool]] = None, - poster: Optional[str] = None, - preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, - src: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + autoplay: bool | StrLike | None = None, + controls: bool | StrLike | None = None, + crossorigin: Literal['anonymous', 'use-credentials'] | StrLike | None = None, + height: int | StrLike | None = None, + loop: bool | StrLike | None = None, + muted: bool | StrLike | None = None, + playsinline: bool | StrLike | None = None, + poster: StrLike | None = None, + preload: Literal['none', 'metadata', 'auto'] | StrLike | None = None, + src: StrLike | None = None, + width: int | StrLike | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -183,6 +254,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -279,6 +630,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/elements/wbr_element.py b/tools/generated/elements/wbr_element.py index ca69d29..02301c6 100644 --- a/tools/generated/elements/wbr_element.py +++ b/tools/generated/elements/wbr_element.py @@ -1,8 +1,9 @@ -from typing import Union, Literal, Optional +from typing import Union, Literal, Optional, Iterable, Mapping from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs from ..base_attribute import BaseAttribute from ..base_element import BaseElement +from ..base_types import Resolvable, StrLike # This file is generated by tools/generate_elements.py @@ -30,36 +31,106 @@ class hint(GlobalAttrs): _ = hint def __init__( self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list, dict]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[Union[str, list, dict]] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + attrs: Iterable[BaseAttribute] | Mapping[str, Resolvable] | Iterable[BaseAttribute | Iterable[BaseAttribute] | Mapping[str,Resolvable]] | None = None, + id: StrLike | None = None, + class_: Resolvable | None = None, + accesskey: Resolvable | StrLike | None = None, + autocapitalize: Literal['on', 'off', 'none', 'sentences', 'words', 'characters'] | StrLike | None = None, + autocorrect: Literal['on', 'off'] | StrLike | None = None, + autofocus: bool | StrLike | None = None, + contenteditable: Literal['true', 'plaintext-only', 'false'] | StrLike | None = None, + dir: Literal['ltr', 'rtl', 'auto'] | StrLike | None = None, + draggable: Literal['true', 'false'] | StrLike | None = None, + enterkeyhint: Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send'] | StrLike | None = None, + hidden: Literal['until-found', 'hidden', ''] | StrLike | None = None, + inert: bool | StrLike | None = None, + inputmode: Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search'] | StrLike | None = None, + is_: StrLike | None = None, + itemid: StrLike | None = None, + itemprop: Resolvable | StrLike | None = None, + itemref: Resolvable | StrLike | None = None, + itemscope: bool | StrLike | None = None, + itemtype: Resolvable | StrLike | None = None, + lang: StrLike | None = None, + nonce: StrLike | None = None, + onauxclick: StrLike | None = None, + onbeforeinput: StrLike | None = None, + onbeforematch: StrLike | None = None, + onbeforetoggle: StrLike | None = None, + onblur: StrLike | None = None, + oncancel: StrLike | None = None, + oncanplay: StrLike | None = None, + oncanplaythrough: StrLike | None = None, + onchange: StrLike | None = None, + onclick: StrLike | None = None, + onclose: StrLike | None = None, + oncontextlost: StrLike | None = None, + oncontextmenu: StrLike | None = None, + oncontextrestored: StrLike | None = None, + oncopy: StrLike | None = None, + oncuechange: StrLike | None = None, + oncut: StrLike | None = None, + ondblclick: StrLike | None = None, + ondrag: StrLike | None = None, + ondragend: StrLike | None = None, + ondragenter: StrLike | None = None, + ondragleave: StrLike | None = None, + ondragover: StrLike | None = None, + ondragstart: StrLike | None = None, + ondrop: StrLike | None = None, + ondurationchange: StrLike | None = None, + onemptied: StrLike | None = None, + onended: StrLike | None = None, + onerror: StrLike | None = None, + onfocus: StrLike | None = None, + onformdata: StrLike | None = None, + oninput: StrLike | None = None, + oninvalid: StrLike | None = None, + onkeydown: StrLike | None = None, + onkeypress: StrLike | None = None, + onkeyup: StrLike | None = None, + onload: StrLike | None = None, + onloadeddata: StrLike | None = None, + onloadedmetadata: StrLike | None = None, + onloadstart: StrLike | None = None, + onmousedown: StrLike | None = None, + onmouseenter: StrLike | None = None, + onmouseleave: StrLike | None = None, + onmousemove: StrLike | None = None, + onmouseout: StrLike | None = None, + onmouseover: StrLike | None = None, + onmouseup: StrLike | None = None, + onpaste: StrLike | None = None, + onpause: StrLike | None = None, + onplay: StrLike | None = None, + onplaying: StrLike | None = None, + onprogress: StrLike | None = None, + onratechange: StrLike | None = None, + onreset: StrLike | None = None, + onresize: StrLike | None = None, + onscroll: StrLike | None = None, + onscrollend: StrLike | None = None, + onsecuritypolicyviolation: StrLike | None = None, + onseeked: StrLike | None = None, + onseeking: StrLike | None = None, + onselect: StrLike | None = None, + onslotchange: StrLike | None = None, + onstalled: StrLike | None = None, + onsubmit: StrLike | None = None, + onsuspend: StrLike | None = None, + ontimeupdate: StrLike | None = None, + ontoggle: StrLike | None = None, + onvolumechange: StrLike | None = None, + onwaiting: StrLike | None = None, + onwheel: StrLike | None = None, + popover: Literal['auto', 'manual'] | StrLike | None = None, + slot: StrLike | None = None, + spellcheck: Literal['true', 'false', ''] | StrLike | None = None, + style: Resolvable | None = None, + tabindex: int | StrLike | None = None, + title: StrLike | None = None, + translate: Literal['yes', 'no'] | StrLike | None = None, + writingsuggestions: Literal['true', 'false', ''] | StrLike | None = None, children: Optional[list] = None ) -> None: """ @@ -137,6 +208,286 @@ def __init__( `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `onauxclick` : + auxclick event handler + Event handler content attribute + + `onbeforeinput` : + beforeinput event handler + Event handler content attribute + + `onbeforematch` : + beforematch event handler + Event handler content attribute + + `onbeforetoggle` : + beforetoggle event handler + Event handler content attribute + + `onblur` : + blur event handler + Event handler content attribute + + `oncancel` : + cancel event handler + Event handler content attribute + + `oncanplay` : + canplay event handler + Event handler content attribute + + `oncanplaythrough` : + canplaythrough event handler + Event handler content attribute + + `onchange` : + change event handler + Event handler content attribute + + `onclick` : + click event handler + Event handler content attribute + + `onclose` : + close event handler + Event handler content attribute + + `oncontextlost` : + contextlost event handler + Event handler content attribute + + `oncontextmenu` : + contextmenu event handler + Event handler content attribute + + `oncontextrestored` : + contextrestored event handler + Event handler content attribute + + `oncopy` : + copy event handler + Event handler content attribute + + `oncuechange` : + cuechange event handler + Event handler content attribute + + `oncut` : + cut event handler + Event handler content attribute + + `ondblclick` : + dblclick event handler + Event handler content attribute + + `ondrag` : + drag event handler + Event handler content attribute + + `ondragend` : + dragend event handler + Event handler content attribute + + `ondragenter` : + dragenter event handler + Event handler content attribute + + `ondragleave` : + dragleave event handler + Event handler content attribute + + `ondragover` : + dragover event handler + Event handler content attribute + + `ondragstart` : + dragstart event handler + Event handler content attribute + + `ondrop` : + drop event handler + Event handler content attribute + + `ondurationchange` : + durationchange event handler + Event handler content attribute + + `onemptied` : + emptied event handler + Event handler content attribute + + `onended` : + ended event handler + Event handler content attribute + + `onerror` : + error event handler + Event handler content attribute + + `onfocus` : + focus event handler + Event handler content attribute + + `onformdata` : + formdata event handler + Event handler content attribute + + `oninput` : + input event handler + Event handler content attribute + + `oninvalid` : + invalid event handler + Event handler content attribute + + `onkeydown` : + keydown event handler + Event handler content attribute + + `onkeypress` : + keypress event handler + Event handler content attribute + + `onkeyup` : + keyup event handler + Event handler content attribute + + `onload` : + load event handler + Event handler content attribute + + `onloadeddata` : + loadeddata event handler + Event handler content attribute + + `onloadedmetadata` : + loadedmetadata event handler + Event handler content attribute + + `onloadstart` : + loadstart event handler + Event handler content attribute + + `onmousedown` : + mousedown event handler + Event handler content attribute + + `onmouseenter` : + mouseenter event handler + Event handler content attribute + + `onmouseleave` : + mouseleave event handler + Event handler content attribute + + `onmousemove` : + mousemove event handler + Event handler content attribute + + `onmouseout` : + mouseout event handler + Event handler content attribute + + `onmouseover` : + mouseover event handler + Event handler content attribute + + `onmouseup` : + mouseup event handler + Event handler content attribute + + `onpaste` : + paste event handler + Event handler content attribute + + `onpause` : + pause event handler + Event handler content attribute + + `onplay` : + play event handler + Event handler content attribute + + `onplaying` : + playing event handler + Event handler content attribute + + `onprogress` : + progress event handler + Event handler content attribute + + `onratechange` : + ratechange event handler + Event handler content attribute + + `onreset` : + reset event handler + Event handler content attribute + + `onresize` : + resize event handler + Event handler content attribute + + `onscroll` : + scroll event handler + Event handler content attribute + + `onscrollend` : + scrollend event handler + Event handler content attribute + + `onsecuritypolicyviolation` : + securitypolicyviolation event handler + Event handler content attribute + + `onseeked` : + seeked event handler + Event handler content attribute + + `onseeking` : + seeking event handler + Event handler content attribute + + `onselect` : + select event handler + Event handler content attribute + + `onslotchange` : + slotchange event handler + Event handler content attribute + + `onstalled` : + stalled event handler + Event handler content attribute + + `onsubmit` : + submit event handler + Event handler content attribute + + `onsuspend` : + suspend event handler + Event handler content attribute + + `ontimeupdate` : + timeupdate event handler + Event handler content attribute + + `ontoggle` : + toggle event handler + Event handler content attribute + + `onvolumechange` : + volumechange event handler + Event handler content attribute + + `onwaiting` : + waiting event handler + Event handler content attribute + + `onwheel` : + wheel event handler + Event handler content attribute + `popover` : Makes the element a popover element @@ -211,6 +562,146 @@ def __init__( self._process_attr("lang", lang) if not (nonce is None or nonce is False): self._process_attr("nonce", nonce) + if not (onauxclick is None or onauxclick is False): + self._process_attr("onauxclick", onauxclick) + if not (onbeforeinput is None or onbeforeinput is False): + self._process_attr("onbeforeinput", onbeforeinput) + if not (onbeforematch is None or onbeforematch is False): + self._process_attr("onbeforematch", onbeforematch) + if not (onbeforetoggle is None or onbeforetoggle is False): + self._process_attr("onbeforetoggle", onbeforetoggle) + if not (onblur is None or onblur is False): + self._process_attr("onblur", onblur) + if not (oncancel is None or oncancel is False): + self._process_attr("oncancel", oncancel) + if not (oncanplay is None or oncanplay is False): + self._process_attr("oncanplay", oncanplay) + if not (oncanplaythrough is None or oncanplaythrough is False): + self._process_attr("oncanplaythrough", oncanplaythrough) + if not (onchange is None or onchange is False): + self._process_attr("onchange", onchange) + if not (onclick is None or onclick is False): + self._process_attr("onclick", onclick) + if not (onclose is None or onclose is False): + self._process_attr("onclose", onclose) + if not (oncontextlost is None or oncontextlost is False): + self._process_attr("oncontextlost", oncontextlost) + if not (oncontextmenu is None or oncontextmenu is False): + self._process_attr("oncontextmenu", oncontextmenu) + if not (oncontextrestored is None or oncontextrestored is False): + self._process_attr("oncontextrestored", oncontextrestored) + if not (oncopy is None or oncopy is False): + self._process_attr("oncopy", oncopy) + if not (oncuechange is None or oncuechange is False): + self._process_attr("oncuechange", oncuechange) + if not (oncut is None or oncut is False): + self._process_attr("oncut", oncut) + if not (ondblclick is None or ondblclick is False): + self._process_attr("ondblclick", ondblclick) + if not (ondrag is None or ondrag is False): + self._process_attr("ondrag", ondrag) + if not (ondragend is None or ondragend is False): + self._process_attr("ondragend", ondragend) + if not (ondragenter is None or ondragenter is False): + self._process_attr("ondragenter", ondragenter) + if not (ondragleave is None or ondragleave is False): + self._process_attr("ondragleave", ondragleave) + if not (ondragover is None or ondragover is False): + self._process_attr("ondragover", ondragover) + if not (ondragstart is None or ondragstart is False): + self._process_attr("ondragstart", ondragstart) + if not (ondrop is None or ondrop is False): + self._process_attr("ondrop", ondrop) + if not (ondurationchange is None or ondurationchange is False): + self._process_attr("ondurationchange", ondurationchange) + if not (onemptied is None or onemptied is False): + self._process_attr("onemptied", onemptied) + if not (onended is None or onended is False): + self._process_attr("onended", onended) + if not (onerror is None or onerror is False): + self._process_attr("onerror", onerror) + if not (onfocus is None or onfocus is False): + self._process_attr("onfocus", onfocus) + if not (onformdata is None or onformdata is False): + self._process_attr("onformdata", onformdata) + if not (oninput is None or oninput is False): + self._process_attr("oninput", oninput) + if not (oninvalid is None or oninvalid is False): + self._process_attr("oninvalid", oninvalid) + if not (onkeydown is None or onkeydown is False): + self._process_attr("onkeydown", onkeydown) + if not (onkeypress is None or onkeypress is False): + self._process_attr("onkeypress", onkeypress) + if not (onkeyup is None or onkeyup is False): + self._process_attr("onkeyup", onkeyup) + if not (onload is None or onload is False): + self._process_attr("onload", onload) + if not (onloadeddata is None or onloadeddata is False): + self._process_attr("onloadeddata", onloadeddata) + if not (onloadedmetadata is None or onloadedmetadata is False): + self._process_attr("onloadedmetadata", onloadedmetadata) + if not (onloadstart is None or onloadstart is False): + self._process_attr("onloadstart", onloadstart) + if not (onmousedown is None or onmousedown is False): + self._process_attr("onmousedown", onmousedown) + if not (onmouseenter is None or onmouseenter is False): + self._process_attr("onmouseenter", onmouseenter) + if not (onmouseleave is None or onmouseleave is False): + self._process_attr("onmouseleave", onmouseleave) + if not (onmousemove is None or onmousemove is False): + self._process_attr("onmousemove", onmousemove) + if not (onmouseout is None or onmouseout is False): + self._process_attr("onmouseout", onmouseout) + if not (onmouseover is None or onmouseover is False): + self._process_attr("onmouseover", onmouseover) + if not (onmouseup is None or onmouseup is False): + self._process_attr("onmouseup", onmouseup) + if not (onpaste is None or onpaste is False): + self._process_attr("onpaste", onpaste) + if not (onpause is None or onpause is False): + self._process_attr("onpause", onpause) + if not (onplay is None or onplay is False): + self._process_attr("onplay", onplay) + if not (onplaying is None or onplaying is False): + self._process_attr("onplaying", onplaying) + if not (onprogress is None or onprogress is False): + self._process_attr("onprogress", onprogress) + if not (onratechange is None or onratechange is False): + self._process_attr("onratechange", onratechange) + if not (onreset is None or onreset is False): + self._process_attr("onreset", onreset) + if not (onresize is None or onresize is False): + self._process_attr("onresize", onresize) + if not (onscroll is None or onscroll is False): + self._process_attr("onscroll", onscroll) + if not (onscrollend is None or onscrollend is False): + self._process_attr("onscrollend", onscrollend) + if not (onsecuritypolicyviolation is None or onsecuritypolicyviolation is False): + self._process_attr("onsecuritypolicyviolation", onsecuritypolicyviolation) + if not (onseeked is None or onseeked is False): + self._process_attr("onseeked", onseeked) + if not (onseeking is None or onseeking is False): + self._process_attr("onseeking", onseeking) + if not (onselect is None or onselect is False): + self._process_attr("onselect", onselect) + if not (onslotchange is None or onslotchange is False): + self._process_attr("onslotchange", onslotchange) + if not (onstalled is None or onstalled is False): + self._process_attr("onstalled", onstalled) + if not (onsubmit is None or onsubmit is False): + self._process_attr("onsubmit", onsubmit) + if not (onsuspend is None or onsuspend is False): + self._process_attr("onsuspend", onsuspend) + if not (ontimeupdate is None or ontimeupdate is False): + self._process_attr("ontimeupdate", ontimeupdate) + if not (ontoggle is None or ontoggle is False): + self._process_attr("ontoggle", ontoggle) + if not (onvolumechange is None or onvolumechange is False): + self._process_attr("onvolumechange", onvolumechange) + if not (onwaiting is None or onwaiting is False): + self._process_attr("onwaiting", onwaiting) + if not (onwheel is None or onwheel is False): + self._process_attr("onwheel", onwheel) if not (popover is None or popover is False): self._process_attr("popover", popover) if not (slot is None or slot is False): diff --git a/tools/generated/embed_attrs.py b/tools/generated/embed_attrs.py index 6465b0b..e84d610 100644 --- a/tools/generated/embed_attrs.py +++ b/tools/generated/embed_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class EmbedAttrs: """ diff --git a/tools/generated/fieldset_attrs.py b/tools/generated/fieldset_attrs.py index 326281e..89d80f4 100644 --- a/tools/generated/fieldset_attrs.py +++ b/tools/generated/fieldset_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class FieldsetAttrs: """ @@ -36,7 +37,7 @@ def form(value) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "fieldset" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/tools/generated/form_attrs.py b/tools/generated/form_attrs.py index ee2c721..3fba54a 100644 --- a/tools/generated/form_attrs.py +++ b/tools/generated/form_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class FormAttrs: """ @@ -78,7 +79,7 @@ def method(value: Literal['GET', 'POST', 'dialog']) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "form" attribute: name Name of form to use in the document.forms API diff --git a/tools/generated/global_attrs.py b/tools/generated/global_attrs.py index 0490b64..fd45890 100644 --- a/tools/generated/global_attrs.py +++ b/tools/generated/global_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union, Callable +from ..base_types import Resolvable, StrLike class GlobalAttrs: """ @@ -8,7 +9,7 @@ class GlobalAttrs: """ @staticmethod - def accesskey(value: list) -> BaseAttribute: + def accesskey(value: Resolvable) -> BaseAttribute: """ "global" attribute: accesskey Keyboard shortcut to activate or focus element @@ -64,7 +65,7 @@ def autofocus(value: bool) -> BaseAttribute: @staticmethod - def class_(value: Union[str, list, dict]) -> BaseAttribute: + def class_(value: Resolvable) -> BaseAttribute: """ "global" attribute: class Classes to which the element belongs @@ -148,7 +149,7 @@ def hidden(value: Literal['until-found', 'hidden', '']) -> BaseAttribute: @staticmethod - def id(value: str) -> BaseAttribute: + def id(value: StrLike) -> BaseAttribute: """ "global" attribute: id The element's ID @@ -218,7 +219,7 @@ def itemid(value) -> BaseAttribute: @staticmethod - def itemprop(value: list) -> BaseAttribute: + def itemprop(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemprop Property names of a microdata item @@ -232,7 +233,7 @@ def itemprop(value: list) -> BaseAttribute: @staticmethod - def itemref(value: list) -> BaseAttribute: + def itemref(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemref Referenced elements @@ -260,7 +261,7 @@ def itemscope(value: bool) -> BaseAttribute: @staticmethod - def itemtype(value: list) -> BaseAttribute: + def itemtype(value: Resolvable) -> BaseAttribute: """ "global" attribute: itemtype Item types of a microdata item @@ -288,7 +289,7 @@ def lang(value) -> BaseAttribute: @staticmethod - def nonce(value: str) -> BaseAttribute: + def nonce(value: StrLike) -> BaseAttribute: """ "global" attribute: nonce Cryptographic nonce used in Content Security Policy checks [CSP] @@ -316,7 +317,7 @@ def popover(value: Literal['auto', 'manual']) -> BaseAttribute: @staticmethod - def slot(value: str) -> BaseAttribute: + def slot(value: StrLike) -> BaseAttribute: """ "global" attribute: slot The element's desired slot @@ -344,7 +345,7 @@ def spellcheck(value: Literal['true', 'false', '']) -> BaseAttribute: @staticmethod - def style(value: Union[str, list, dict]) -> BaseAttribute: + def style(value: Resolvable) -> BaseAttribute: """ "global" attribute: style Presentational and formatting instructions @@ -372,7 +373,7 @@ def tabindex(value: int) -> BaseAttribute: @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "global" attribute: title Advisory information for the element diff --git a/tools/generated/iframe_attrs.py b/tools/generated/iframe_attrs.py index d095d71..cba8486 100644 --- a/tools/generated/iframe_attrs.py +++ b/tools/generated/iframe_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class IframeAttrs: """ @@ -92,7 +93,7 @@ def referrerpolicy(value) -> BaseAttribute: @staticmethod - def sandbox(value: list) -> BaseAttribute: + def sandbox(value: Resolvable) -> BaseAttribute: """ "iframe" attribute: sandbox Security rules for nested content diff --git a/tools/generated/img_attrs.py b/tools/generated/img_attrs.py index 814f834..1f5d8ad 100644 --- a/tools/generated/img_attrs.py +++ b/tools/generated/img_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ImgAttrs: """ @@ -8,7 +9,7 @@ class ImgAttrs: """ @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "img" attribute: alt Replacement text for use when images are not available diff --git a/tools/generated/input_attrs.py b/tools/generated/input_attrs.py index dc3d079..fa70be9 100644 --- a/tools/generated/input_attrs.py +++ b/tools/generated/input_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class InputAttrs: """ @@ -36,7 +37,7 @@ def alpha(value: bool) -> BaseAttribute: @staticmethod - def alt(value: str) -> BaseAttribute: + def alt(value: StrLike) -> BaseAttribute: """ "input" attribute: alt Replacement text for use when images are not available @@ -92,7 +93,7 @@ def colorspace(value: Literal['limited-srgb', 'display-p3']) -> BaseAttribute: @staticmethod - def dirname(value: str) -> BaseAttribute: + def dirname(value: StrLike) -> BaseAttribute: """ "input" attribute: dirname Name of form control to use for sending the element's directionality in form submission @@ -302,7 +303,7 @@ def multiple(value: bool) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "input" attribute: name Name of the element to use for form submission and in the form.elements API @@ -330,7 +331,7 @@ def pattern(value) -> BaseAttribute: @staticmethod - def placeholder(value: str) -> BaseAttribute: + def placeholder(value: StrLike) -> BaseAttribute: """ "input" attribute: placeholder User-visible label to be placed within the form control @@ -442,7 +443,7 @@ def step(value: float) -> BaseAttribute: @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "input" attribute: title Description of pattern (when used with pattern attribute) diff --git a/tools/generated/ins_attrs.py b/tools/generated/ins_attrs.py index 5eb5043..76504dc 100644 --- a/tools/generated/ins_attrs.py +++ b/tools/generated/ins_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class InsAttrs: """ diff --git a/tools/generated/label_attrs.py b/tools/generated/label_attrs.py index 888bfdf..36243aa 100644 --- a/tools/generated/label_attrs.py +++ b/tools/generated/label_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class LabelAttrs: """ diff --git a/tools/generated/li_attrs.py b/tools/generated/li_attrs.py index d051e4f..fd2e68b 100644 --- a/tools/generated/li_attrs.py +++ b/tools/generated/li_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class LiAttrs: """ diff --git a/tools/generated/link_attrs.py b/tools/generated/link_attrs.py index 0080de8..52bcac4 100644 --- a/tools/generated/link_attrs.py +++ b/tools/generated/link_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class LinkAttrs: """ @@ -22,7 +23,7 @@ def as_(value) -> BaseAttribute: @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "link" attribute: blocking Whether the element is potentially render-blocking @@ -148,7 +149,7 @@ def imagesrcset(value) -> BaseAttribute: @staticmethod - def integrity(value: str) -> BaseAttribute: + def integrity(value: StrLike) -> BaseAttribute: """ "link" attribute: integrity Integrity metadata used in Subresource Integrity checks [SRI] @@ -190,7 +191,7 @@ def referrerpolicy(value) -> BaseAttribute: @staticmethod - def rel(value: list) -> BaseAttribute: + def rel(value: Resolvable) -> BaseAttribute: """ "link" attribute: rel Relationship between the document containing the hyperlink and the destination resource @@ -204,7 +205,7 @@ def rel(value: list) -> BaseAttribute: @staticmethod - def sizes(value: list) -> BaseAttribute: + def sizes(value: Resolvable) -> BaseAttribute: """ "link" attribute: sizes Sizes of the icons (for rel="icon") diff --git a/tools/generated/map_attrs.py b/tools/generated/map_attrs.py index 5cbcff0..6fbf5ca 100644 --- a/tools/generated/map_attrs.py +++ b/tools/generated/map_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class MapAttrs: """ @@ -8,7 +9,7 @@ class MapAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "map" attribute: name Name of image map to reference from the usemap attribute diff --git a/tools/generated/meta_attrs.py b/tools/generated/meta_attrs.py index 7f9f82e..bac89fa 100644 --- a/tools/generated/meta_attrs.py +++ b/tools/generated/meta_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class MetaAttrs: """ @@ -22,7 +23,7 @@ def charset(value: Literal['utf-8']) -> BaseAttribute: @staticmethod - def content(value: str) -> BaseAttribute: + def content(value: StrLike) -> BaseAttribute: """ "meta" attribute: content Value of the element @@ -64,7 +65,7 @@ def media(value) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "meta" attribute: name Metadata name diff --git a/tools/generated/meter_attrs.py b/tools/generated/meter_attrs.py index ed15672..58c084a 100644 --- a/tools/generated/meter_attrs.py +++ b/tools/generated/meter_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class MeterAttrs: """ diff --git a/tools/generated/object_attrs.py b/tools/generated/object_attrs.py index f2c9991..179aec2 100644 --- a/tools/generated/object_attrs.py +++ b/tools/generated/object_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ObjectAttrs: """ diff --git a/tools/generated/ol_attrs.py b/tools/generated/ol_attrs.py index 562f8e0..9770bb3 100644 --- a/tools/generated/ol_attrs.py +++ b/tools/generated/ol_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class OlAttrs: """ diff --git a/tools/generated/optgroup_attrs.py b/tools/generated/optgroup_attrs.py index 352dd86..6f07a25 100644 --- a/tools/generated/optgroup_attrs.py +++ b/tools/generated/optgroup_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class OptgroupAttrs: """ @@ -22,7 +23,7 @@ def disabled(value: bool) -> BaseAttribute: @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "optgroup" attribute: label User-visible label diff --git a/tools/generated/option_attrs.py b/tools/generated/option_attrs.py index 73739bc..e717dd8 100644 --- a/tools/generated/option_attrs.py +++ b/tools/generated/option_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class OptionAttrs: """ @@ -22,7 +23,7 @@ def disabled(value: bool) -> BaseAttribute: @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "option" attribute: label User-visible label @@ -50,7 +51,7 @@ def selected(value: bool) -> BaseAttribute: @staticmethod - def value(value: str) -> BaseAttribute: + def value(value: StrLike) -> BaseAttribute: """ "option" attribute: value Value to be used for form submission diff --git a/tools/generated/output_attrs.py b/tools/generated/output_attrs.py index 4f96c48..3587b0b 100644 --- a/tools/generated/output_attrs.py +++ b/tools/generated/output_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class OutputAttrs: """ @@ -8,7 +9,7 @@ class OutputAttrs: """ @staticmethod - def for_(value: list) -> BaseAttribute: + def for_(value: Resolvable) -> BaseAttribute: """ "output" attribute: for Specifies controls from which the output was calculated @@ -36,7 +37,7 @@ def form(value) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "output" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/tools/generated/progress_attrs.py b/tools/generated/progress_attrs.py index 233b7ac..96d0ab2 100644 --- a/tools/generated/progress_attrs.py +++ b/tools/generated/progress_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ProgressAttrs: """ diff --git a/tools/generated/q_attrs.py b/tools/generated/q_attrs.py index b767050..9688104 100644 --- a/tools/generated/q_attrs.py +++ b/tools/generated/q_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class QAttrs: """ diff --git a/tools/generated/script_attrs.py b/tools/generated/script_attrs.py index 650240e..357ed9c 100644 --- a/tools/generated/script_attrs.py +++ b/tools/generated/script_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ScriptAttrs: """ @@ -22,7 +23,7 @@ def async_(value: bool) -> BaseAttribute: @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "script" attribute: blocking Whether the element is potentially render-blocking @@ -78,7 +79,7 @@ def fetchpriority(value: Literal['auto', 'high', 'low']) -> BaseAttribute: @staticmethod - def integrity(value: str) -> BaseAttribute: + def integrity(value: StrLike) -> BaseAttribute: """ "script" attribute: integrity Integrity metadata used in Subresource Integrity checks [SRI] diff --git a/tools/generated/select_attrs.py b/tools/generated/select_attrs.py index d29fdbd..1af596d 100644 --- a/tools/generated/select_attrs.py +++ b/tools/generated/select_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class SelectAttrs: """ @@ -64,7 +65,7 @@ def multiple(value: bool) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "select" attribute: name Name of the element to use for form submission and in the form.elements API diff --git a/tools/generated/slot_attrs.py b/tools/generated/slot_attrs.py index 250ae11..b29d016 100644 --- a/tools/generated/slot_attrs.py +++ b/tools/generated/slot_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class SlotAttrs: """ @@ -8,7 +9,7 @@ class SlotAttrs: """ @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "slot" attribute: name Name of shadow tree slot diff --git a/tools/generated/source_attrs.py b/tools/generated/source_attrs.py index cc7acc2..75539f4 100644 --- a/tools/generated/source_attrs.py +++ b/tools/generated/source_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class SourceAttrs: """ diff --git a/tools/generated/style_attrs.py b/tools/generated/style_attrs.py index 31efedd..0f59837 100644 --- a/tools/generated/style_attrs.py +++ b/tools/generated/style_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class StyleAttrs: """ @@ -8,7 +9,7 @@ class StyleAttrs: """ @staticmethod - def blocking(value: list) -> BaseAttribute: + def blocking(value: Resolvable) -> BaseAttribute: """ "style" attribute: blocking Whether the element is potentially render-blocking @@ -36,7 +37,7 @@ def media(value) -> BaseAttribute: @staticmethod - def title(value: str) -> BaseAttribute: + def title(value: StrLike) -> BaseAttribute: """ "style" attribute: title CSS style sheet set name diff --git a/tools/generated/td_attrs.py b/tools/generated/td_attrs.py index 5fdacfb..45ba8b7 100644 --- a/tools/generated/td_attrs.py +++ b/tools/generated/td_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class TdAttrs: """ @@ -22,7 +23,7 @@ def colspan(value) -> BaseAttribute: @staticmethod - def headers(value: list) -> BaseAttribute: + def headers(value: Resolvable) -> BaseAttribute: """ "td" attribute: headers The header cells for this cell diff --git a/tools/generated/template_attrs.py b/tools/generated/template_attrs.py index 8306372..b840137 100644 --- a/tools/generated/template_attrs.py +++ b/tools/generated/template_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class TemplateAttrs: """ diff --git a/tools/generated/textarea_attrs.py b/tools/generated/textarea_attrs.py index 2719a68..345f349 100644 --- a/tools/generated/textarea_attrs.py +++ b/tools/generated/textarea_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class TextareaAttrs: """ @@ -36,7 +37,7 @@ def cols(value) -> BaseAttribute: @staticmethod - def dirname(value: str) -> BaseAttribute: + def dirname(value: StrLike) -> BaseAttribute: """ "textarea" attribute: dirname Name of form control to use for sending the element's directionality in form submission @@ -106,7 +107,7 @@ def minlength(value: int) -> BaseAttribute: @staticmethod - def name(value: str) -> BaseAttribute: + def name(value: StrLike) -> BaseAttribute: """ "textarea" attribute: name Name of the element to use for form submission and in the form.elements API @@ -120,7 +121,7 @@ def name(value: str) -> BaseAttribute: @staticmethod - def placeholder(value: str) -> BaseAttribute: + def placeholder(value: StrLike) -> BaseAttribute: """ "textarea" attribute: placeholder User-visible label to be placed within the form control diff --git a/tools/generated/th_attrs.py b/tools/generated/th_attrs.py index 69c5a6c..7337459 100644 --- a/tools/generated/th_attrs.py +++ b/tools/generated/th_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class ThAttrs: """ @@ -8,7 +9,7 @@ class ThAttrs: """ @staticmethod - def abbr(value: str) -> BaseAttribute: + def abbr(value: StrLike) -> BaseAttribute: """ "th" attribute: abbr Alternative label to use for the header cell when referencing the cell in other contexts @@ -36,7 +37,7 @@ def colspan(value) -> BaseAttribute: @staticmethod - def headers(value: list) -> BaseAttribute: + def headers(value: Resolvable) -> BaseAttribute: """ "th" attribute: headers The header cells for this cell diff --git a/tools/generated/time_attrs.py b/tools/generated/time_attrs.py index 0db82d8..ff26417 100644 --- a/tools/generated/time_attrs.py +++ b/tools/generated/time_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class TimeAttrs: """ diff --git a/tools/generated/track_attrs.py b/tools/generated/track_attrs.py index 88f2351..277ea5a 100644 --- a/tools/generated/track_attrs.py +++ b/tools/generated/track_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class TrackAttrs: """ @@ -36,7 +37,7 @@ def kind(value: Literal['subtitles', 'captions', 'descriptions', 'chapters', 'me @staticmethod - def label(value: str) -> BaseAttribute: + def label(value: StrLike) -> BaseAttribute: """ "track" attribute: label User-visible label diff --git a/tools/generated/video_attrs.py b/tools/generated/video_attrs.py index 093d6fe..228b498 100644 --- a/tools/generated/video_attrs.py +++ b/tools/generated/video_attrs.py @@ -1,5 +1,6 @@ from . import BaseAttribute from typing import Literal, Union +from ..base_types import Resolvable, StrLike class VideoAttrs: """ diff --git a/tools/generator_common.py b/tools/generator_common.py index 8213ca5..5188a79 100644 --- a/tools/generator_common.py +++ b/tools/generator_common.py @@ -29,7 +29,7 @@ def value_hint_to_python_type(value): # this works return f"Literal{value}" if value in ("Text", "Text*"): - return "str" + return "StrLike" if value == "Boolean attribute": return "bool" if value in ("Valid non-negative integer", "Valid integer"): @@ -37,7 +37,7 @@ def value_hint_to_python_type(value): if value.startswith("Valid floating-point number"): return "float" if "space-separated tokens" in value: - return "list" + return "Resolvable" return None From 70230924ba3d194c1bd621eb9b5b335d1b5331d4 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 22:24:56 -0400 Subject: [PATCH 05/12] Skip performance test --- tests/test_assumptions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_assumptions.py b/tests/test_assumptions.py index e6c1a06..d1dbe9f 100644 --- a/tests/test_assumptions.py +++ b/tests/test_assumptions.py @@ -7,6 +7,8 @@ from time import perf_counter +import pytest + def test_args(): """ @@ -134,6 +136,7 @@ def gen(): assert list(gen_2) == arr +@pytest.mark.skip(reason="Performance test") def test_compare_argument_style_performance(): """ This test compares a big arg list vs kwargs From db5ef8ca20ccde0dc158e4364cd06bf8fd239c2f Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 22:45:55 -0400 Subject: [PATCH 06/12] Test we are preventing antipattern where key and value are both specified --- tests/test_element.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_element.py b/tests/test_element.py index 731fb00..f58c997 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -1,3 +1,4 @@ +import pytest from bs4 import BeautifulSoup import html_compose as h @@ -54,6 +55,14 @@ def test_attr_syntax_variations(): assert c == b +def test_attr_syntax_antipattern(): + """ + Ensure our code prevents unsafe behavior like this: + """ + with pytest.raises(Exception): + div(id=1, attrs=["asdf=1"]) # type: ignore + + def test_nested_callables(): """ Test that nesting callables works correctly. From 930653d362786b4a4611bd6b6350c7d2a30361e8 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:14:43 -0400 Subject: [PATCH 07/12] attrs doc improvements --- doc/ideas/04_attrs.md | 117 +++++++++++++++++++++++++++++++++--------- 1 file changed, 93 insertions(+), 24 deletions(-) diff --git a/doc/ideas/04_attrs.md b/doc/ideas/04_attrs.md index a022f34..9a0387d 100644 --- a/doc/ideas/04_attrs.md +++ b/doc/ideas/04_attrs.md @@ -1,24 +1,31 @@ # Attributes -There are multiple ways to define attributes for an html element i.e. +The goal of the library is to enable the user to make design choices +about how they generate their HTML. + +Therefore, the library proposes several ways to define attributes for an +HTML element. + +The theory is that creating the least resistance to a successful pattern makes way +for its adoption. ```python from html_compose import div is_error = False # keyword arg syntax (preferred) -# note that attrs that conflict with Python keywords +# note that attributes that conflict with Python keywords # have an underscore_ appended. This was chosen so autocomplete still works. div(class_="flex") div(class_=["flex", "items-center"]) div(class_={ "flex": True, - "error": is_error == True + "error": is_error }) -div(class_=div.hint.class_("flex")) +div([div.hint.class_("flex")]) -div(class_=div._.class_("flex")) -# div._ is a syntax shorthand for div.attrhint +div([div._.class_("flex")]) +# div._ is a syntax shorthand for div.hint # attrs dict syntax div(attrs={"class": "flex"}) @@ -39,18 +46,19 @@ div(attrs=[div.hint.class_({ "error": is_error == True })]) - +# Combining the two: +div(attrs=[div.hint.class_("flex")], tabindex=1) ``` ## BaseAttribute -All attributes inherit BaseAttribute which defines a key and a value and resolves at render time. +All attributes inherit from `BaseAttribute`, which defines a key and a value and resolves at render time. -The class attribute and style attribute have rules to split by their correct delimeter. +The `class` and `style` attributes have special rules to join values with their correct delimiter. ```python from html_compose import div is_red = False -# dict of dicts str:bool +# dict of str:bool - if the value is true, the key is rendered as part of the class list # truthy = rendered # falsey = ignored @@ -69,20 +77,26 @@ div._.class_("red") # "red" ``` -## attrs= parameter syntax +## `attrs=` parameter syntax -In the constructor for any element you can specify the attrs paramter. +In the constructor for any element, you can specify the `attrs` parameter. It can be either a list or a dictionary. -### Positional argument caveat +### Implicit/positional `attrs` argument Although the documentation is explicit in using the `attrs` kwarg, `attrs` is -actually the first argument of the constructor and can be excluded i.e. +actually the first argument of the constructor and its name can be omitted. ```python div({"class": "flex"}) ``` +Instead of +```python +div(attrs={"class": "flex"}) +``` ### list +It supports a list of BaseAttributes but also you can mix a dictionary in as well. + ```python from html_compose.elements import a, div @@ -92,8 +106,15 @@ a(attrs=[ a.hint.href("https://google.com"), a.hint.tabindex(1), a.hint.class_(["flex", "flex-col"]) -] -) +]) + + +a(attrs=[ + {"@custom": "value"}, + a.hint.href("https://google.com"), + a.hint.tabindex(1), + a.hint.class_(["flex", "flex-col"]) +]) # string / list of string is explicitly NOT supported # it requires disabling sanitization and is therefore quietly prone to XSS @@ -104,8 +125,8 @@ div(attrs=['class="red"']) # ❌ ```python a(attrs={ - "href": a.hint.href("https://google.com") - "tabindex': 1 + "href": "https://google.com"), + "tabindex": 1 }) div(attrs={ @@ -120,11 +141,11 @@ div(attrs={ ``` ## Keyword argument extension -An extention of the attr syntax was generated for all built-in HTML elements. It would be time-consuming to do this for custom element types, but code generation leans well into this case. +An extension of the `attrs` syntax was generated for all built-in HTML elements. It would be time-consuming to do this for custom element types, but code generation lends itself well to this case. Traditionally, kwargs would be too non-descript to provide helpful editor hints. -To aid with fluent document writing, each element was generated with its attributes and a paired docstring +To aid with fluent document writing, each element was generated with its attributes as parameters and a paired docstring. i.e. `:param href: Address of the hyperlink` @@ -132,12 +153,19 @@ i.e. a(href="https://google.com", tabindex=1) ``` -Under the hood, it's all translated to the BaseAttribute class and the value is +Under the hood, it's all translated to the `BaseAttribute` class, and the value is escaped before rendering. # Breakdown -There's a number of options for declaring an attribute value defined below. These are to aid in very common operations such as building a `class` string. +There are a number of options for declaring an attribute value, which are shown above. +The basic idea is + + +`attrs`, the first parameter, is a key,value attribute set, or a list +containing one or more of + * a `dict` that translates `key="{safe_text(value)}"`, as if attrs were a dict + * `BaseAttribute` which may be from a hint class for an element or library ## Attribute definitions Care was put into generating attribute definitions for each class. @@ -146,8 +174,49 @@ Anything found in the HTML specification document is available in an element's c i.e. the `img` class has a cousin class `ImgAttrs`. -We can access the definition of an attribute for that element via `ImgAttrs.$attr` i.e. `ImgAttrs.alt(value="demo")`. Each element, like `img`, has a child class which is an inheritor of its sibling attrs class - `img.hint` inherits `ImgAttrs` so you can access the same definition via `img.hint.alt("...")`. +We can access the definition of an attribute for that element via `ImgAttrs.$attr` i.e. `ImgAttrs.alt(value="demo")`. Each element, like `img`, has a child class `hint` which inherits from its sibling attrs class (`ImgAttrs`), so you can access the same definition via `img.hint.alt("...")`. Additionally, there's a `_` shorthand for `img.hint`. `img._` is just a reference to `img.hint`. -The purpose of this system is to provide full type hints. \ No newline at end of file +The purpose of this system is to provide full type hints. + +It also serves as an example for extensions to add attribute sets under their +own namespaces/classes. + +## Extensions + +Quality extensions are recommended to work with your chosen tech stack. +The idea is to give you guardrails and documentation directly in your IDE. + +```python +from html_compose.base_attribute import BaseAttribute +from html_compose import button +class htmx: + ''' + Attributes for the HTMX framework. + ''' + + @staticmethod + def hx_get(value: str) -> BaseAttribute: + ''' + htmx attribute: hx-get + The hx-get attribute will cause an element to issue a + GET to the specified URL and swap the HTML into the DOM + using a swap strategy + + :param value: URI to GET when the element is activated + :return: An hx-get attribute to be added to your element + ''' + + return BaseAttribute("hx-get", value) + +``` + +Where we can write + +```python +button( + [htmx.hx_get("/api/data")], + class_="btn primary" +)["Click me!"] +``` From efd80d5378b51300a99ca394ef3e6a641fc89137 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:20:14 -0400 Subject: [PATCH 08/12] Bump to 0.10 --- changelog.txt | 6 ++++-- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 4a8910a..bf3a845 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,7 @@ -# 0.9.1 -* Class and style params now correctly type hint str | list | dict. +# 0.10.0 +* onclick/action attrs are now generated as kwargs. +* Improve typing: class and style params now correctly type hint, along with other type hint + improvements. # 0.9.0 This is primarly a documentation/automation patch. diff --git a/pyproject.toml b/pyproject.toml index 025d026..be4abb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "html-compose" -version = "0.9.1" +version = "0.10.0" description = "Composable HTML generation in python" authors = [ { name = "jealouscloud", email = "github@noaha.org" } From 8c95163bdd3fec51318306f1ec808465d90bf4d9 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:25:40 -0400 Subject: [PATCH 09/12] Mention livereload CDN so nobody's surprised - I found the jsdelivr in the code myself and I was like hey are we telling people because we should --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fd806d3..639640a 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ a([tab] * ⚡ Live Reload server for rapid development Run your Python webserver (i.e. Flask, FastAPI, anything!) with live-reload superpowers powered by [livereload-js](https://www.npmjs.com/package/livereload-js). See browser updates in real-time! - Note: This feature requires optional dependencies. `pip install html-compose[live-reload]` or `pip install html-compose[full]` + Note: This feature requires optional dependencies. `pip install html-compose[live-reload]` or `pip install html-compose[full]`. The feature also fetches livereload-js from a CDN. `livereload.py` ```python From 1a18a764964f66a116cb2716437347d81952693d Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:26:28 -0400 Subject: [PATCH 10/12] "onaction" --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index bf3a845..84d9474 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,5 @@ # 0.10.0 -* onclick/action attrs are now generated as kwargs. +* onclick/onaction attrs are now generated as kwargs. * Improve typing: class and style params now correctly type hint, along with other type hint improvements. From 7948b82e3892b3f172f62f4c164c6f9b4e0142ad Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:26:56 -0400 Subject: [PATCH 11/12] More --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 84d9474..743a555 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,5 @@ # 0.10.0 -* onclick/onaction attrs are now generated as kwargs. +* onclick/onaction attrs are now generated as kwargs for elements. * Improve typing: class and style params now correctly type hint, along with other type hint improvements. From 7ad4517fd7d513904f043defbbd5c4c9cf402391 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Tue, 23 Sep 2025 23:27:33 -0400 Subject: [PATCH 12/12] clarity --- changelog.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 743a555..f388607 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,7 @@ # 0.10.0 * onclick/onaction attrs are now generated as kwargs for elements. -* Improve typing: class and style params now correctly type hint, along with other type hint - improvements. +* Improve typing: class and style params now correctly type hint, as do other + attributes. # 0.9.0 This is primarly a documentation/automation patch.