Skip to content

Commit 5c91f70

Browse files
committedFeb 5, 2024
atom.ts gen
1 parent b843fa4 commit 5c91f70

File tree

2 files changed

+423
-0
lines changed

2 files changed

+423
-0
lines changed
 

‎atomx/atoms.ts

+392
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,392 @@
1+
// Code generated by gen.go. DO NOT EDIT.
2+
3+
let atoms =
4+
{
5+
"A": "a",
6+
"Abbr": "abbr",
7+
"Accept": "accept",
8+
"AcceptCharset": "accept-charset",
9+
"Accesskey": "accesskey",
10+
"Acronym": "acronym",
11+
"Action": "action",
12+
"Address": "address",
13+
"Align": "align",
14+
"Allowfullscreen": "allowfullscreen",
15+
"Allowpaymentrequest": "allowpaymentrequest",
16+
"Allowusermedia": "allowusermedia",
17+
"Alt": "alt",
18+
"Annotation": "annotation",
19+
"AnnotationXml": "annotation-xml",
20+
"Applet": "applet",
21+
"Area": "area",
22+
"Article": "article",
23+
"As": "as",
24+
"Aside": "aside",
25+
"Async": "async",
26+
"Audio": "audio",
27+
"Autocomplete": "autocomplete",
28+
"Autofocus": "autofocus",
29+
"Autoplay": "autoplay",
30+
"B": "b",
31+
"Base": "base",
32+
"Basefont": "basefont",
33+
"Bdi": "bdi",
34+
"Bdo": "bdo",
35+
"Bgsound": "bgsound",
36+
"Big": "big",
37+
"Blink": "blink",
38+
"Blockquote": "blockquote",
39+
"Body": "body",
40+
"Br": "br",
41+
"Button": "button",
42+
"Canvas": "canvas",
43+
"Caption": "caption",
44+
"Center": "center",
45+
"Challenge": "challenge",
46+
"Charset": "charset",
47+
"Checked": "checked",
48+
"Cite": "cite",
49+
"Class": "class",
50+
"Cmd": "cmd",
51+
"Code": "code",
52+
"Col": "col",
53+
"Colgroup": "colgroup",
54+
"Color": "color",
55+
"Cols": "cols",
56+
"Colspan": "colspan",
57+
"Command": "command",
58+
"Content": "content",
59+
"Contenteditable": "contenteditable",
60+
"Contextmenu": "contextmenu",
61+
"Controls": "controls",
62+
"Coords": "coords",
63+
"Crossorigin": "crossorigin",
64+
"Data": "data",
65+
"Datalist": "datalist",
66+
"Datetime": "datetime",
67+
"Dd": "dd",
68+
"Default": "default",
69+
"Defer": "defer",
70+
"Del": "del",
71+
"Desc": "desc",
72+
"Details": "details",
73+
"Dfn": "dfn",
74+
"Dialog": "dialog",
75+
"Dir": "dir",
76+
"Dirname": "dirname",
77+
"Disabled": "disabled",
78+
"Div": "div",
79+
"Dl": "dl",
80+
"Download": "download",
81+
"Draggable": "draggable",
82+
"Dropzone": "dropzone",
83+
"Dt": "dt",
84+
"Em": "em",
85+
"Embed": "embed",
86+
"Enctype": "enctype",
87+
"Face": "face",
88+
"Fieldset": "fieldset",
89+
"Figcaption": "figcaption",
90+
"Figure": "figure",
91+
"File": "file",
92+
"Filegroup": "filegroup",
93+
"Font": "font",
94+
"Footer": "footer",
95+
"For": "for",
96+
"ForeignObject": "foreignObject",
97+
"Foreignobject": "foreignobject",
98+
"Form": "form",
99+
"Formaction": "formaction",
100+
"Formenctype": "formenctype",
101+
"Formmethod": "formmethod",
102+
"Formnovalidate": "formnovalidate",
103+
"Formtarget": "formtarget",
104+
"Frame": "frame",
105+
"Frameset": "frameset",
106+
"Go": "go",
107+
"H1": "h1",
108+
"H2": "h2",
109+
"H3": "h3",
110+
"H4": "h4",
111+
"H5": "h5",
112+
"H6": "h6",
113+
"HTML": "html",
114+
"HTTPEquiv": "http-equiv",
115+
"Head": "head",
116+
"Header": "header",
117+
"Headers": "headers",
118+
"Headings": [
119+
"h1",
120+
"h2",
121+
"h3",
122+
"h4",
123+
"h5",
124+
"h6"
125+
],
126+
"Height": "height",
127+
"Hgroup": "hgroup",
128+
"Hidden": "hidden",
129+
"High": "high",
130+
"Hr": "hr",
131+
"Href": "href",
132+
"Hreflang": "hreflang",
133+
"I": "i",
134+
"ID": "id",
135+
"Icon": "icon",
136+
"Iframe": "iframe",
137+
"Image": "image",
138+
"Img": "img",
139+
"Include": "include",
140+
"Input": "input",
141+
"Inputmode": "inputmode",
142+
"Ins": "ins",
143+
"Integrity": "integrity",
144+
"Is": "is",
145+
"Isindex": "isindex",
146+
"Ismap": "ismap",
147+
"Itemid": "itemid",
148+
"Itemprop": "itemprop",
149+
"Itemref": "itemref",
150+
"Itemscope": "itemscope",
151+
"Itemtype": "itemtype",
152+
"Kbd": "kbd",
153+
"Keygen": "keygen",
154+
"Keytype": "keytype",
155+
"Kind": "kind",
156+
"Label": "label",
157+
"Lang": "lang",
158+
"Legend": "legend",
159+
"Li": "li",
160+
"Link": "link",
161+
"List": "list",
162+
"Listing": "listing",
163+
"Loop": "loop",
164+
"Low": "low",
165+
"Main": "main",
166+
"Malignmark": "malignmark",
167+
"Manifest": "manifest",
168+
"Map": "map",
169+
"Mark": "mark",
170+
"Marquee": "marquee",
171+
"Math": "math",
172+
"Max": "max",
173+
"Maxlength": "maxlength",
174+
"Media": "media",
175+
"Mediagroup": "mediagroup",
176+
"Menu": "menu",
177+
"Menuitem": "menuitem",
178+
"Meta": "meta",
179+
"Metadata": "metadata",
180+
"Meter": "meter",
181+
"Method": "method",
182+
"Mglyph": "mglyph",
183+
"Mi": "mi",
184+
"Min": "min",
185+
"Minlength": "minlength",
186+
"Mn": "mn",
187+
"Mo": "mo",
188+
"Ms": "ms",
189+
"Mtext": "mtext",
190+
"Multiple": "multiple",
191+
"Muted": "muted",
192+
"Name": "name",
193+
"Nav": "nav",
194+
"Nobr": "nobr",
195+
"Noembed": "noembed",
196+
"Noframes": "noframes",
197+
"Nomodule": "nomodule",
198+
"Nonce": "nonce",
199+
"Noscript": "noscript",
200+
"Novalidate": "novalidate",
201+
"Object": "object",
202+
"Ol": "ol",
203+
"Onabort": "onabort",
204+
"Onafterprint": "onafterprint",
205+
"Onautocomplete": "onautocomplete",
206+
"Onautocompleteerror": "onautocompleteerror",
207+
"Onauxclick": "onauxclick",
208+
"Onbeforeprint": "onbeforeprint",
209+
"Onbeforeunload": "onbeforeunload",
210+
"Onblur": "onblur",
211+
"Oncancel": "oncancel",
212+
"Oncanplay": "oncanplay",
213+
"Oncanplaythrough": "oncanplaythrough",
214+
"Onchange": "onchange",
215+
"Onclick": "onclick",
216+
"Onclose": "onclose",
217+
"Oncontextmenu": "oncontextmenu",
218+
"Oncopy": "oncopy",
219+
"Oncuechange": "oncuechange",
220+
"Oncut": "oncut",
221+
"Ondblclick": "ondblclick",
222+
"Ondrag": "ondrag",
223+
"Ondragend": "ondragend",
224+
"Ondragenter": "ondragenter",
225+
"Ondragexit": "ondragexit",
226+
"Ondragleave": "ondragleave",
227+
"Ondragover": "ondragover",
228+
"Ondragstart": "ondragstart",
229+
"Ondrop": "ondrop",
230+
"Ondurationchange": "ondurationchange",
231+
"Onemptied": "onemptied",
232+
"Onended": "onended",
233+
"Onerror": "onerror",
234+
"Onfocus": "onfocus",
235+
"Onhashchange": "onhashchange",
236+
"Oninput": "oninput",
237+
"Oninvalid": "oninvalid",
238+
"Onkeydown": "onkeydown",
239+
"Onkeypress": "onkeypress",
240+
"Onkeyup": "onkeyup",
241+
"Onlanguagechange": "onlanguagechange",
242+
"Onload": "onload",
243+
"Onloadeddata": "onloadeddata",
244+
"Onloadedmetadata": "onloadedmetadata",
245+
"Onloadend": "onloadend",
246+
"Onloadstart": "onloadstart",
247+
"Onmessage": "onmessage",
248+
"Onmessageerror": "onmessageerror",
249+
"Onmousedown": "onmousedown",
250+
"Onmouseenter": "onmouseenter",
251+
"Onmouseleave": "onmouseleave",
252+
"Onmousemove": "onmousemove",
253+
"Onmouseout": "onmouseout",
254+
"Onmouseover": "onmouseover",
255+
"Onmouseup": "onmouseup",
256+
"Onmousewheel": "onmousewheel",
257+
"Onoffline": "onoffline",
258+
"Ononline": "ononline",
259+
"Onpagehide": "onpagehide",
260+
"Onpageshow": "onpageshow",
261+
"Onpaste": "onpaste",
262+
"Onpause": "onpause",
263+
"Onplay": "onplay",
264+
"Onplaying": "onplaying",
265+
"Onpopstate": "onpopstate",
266+
"Onprogress": "onprogress",
267+
"Onratechange": "onratechange",
268+
"Onrejectionhandled": "onrejectionhandled",
269+
"Onreset": "onreset",
270+
"Onresize": "onresize",
271+
"Onscroll": "onscroll",
272+
"Onsecuritypolicyviolation": "onsecuritypolicyviolation",
273+
"Onseeked": "onseeked",
274+
"Onseeking": "onseeking",
275+
"Onselect": "onselect",
276+
"Onshow": "onshow",
277+
"Onsort": "onsort",
278+
"Onstalled": "onstalled",
279+
"Onstorage": "onstorage",
280+
"Onsubmit": "onsubmit",
281+
"Onsuspend": "onsuspend",
282+
"Ontimeupdate": "ontimeupdate",
283+
"Ontoggle": "ontoggle",
284+
"Onunhandledrejection": "onunhandledrejection",
285+
"Onunload": "onunload",
286+
"Onvolumechange": "onvolumechange",
287+
"Onwaiting": "onwaiting",
288+
"Onwheel": "onwheel",
289+
"Open": "open",
290+
"Optgroup": "optgroup",
291+
"Optimum": "optimum",
292+
"Option": "option",
293+
"Output": "output",
294+
"P": "p",
295+
"Page": "page",
296+
"Param": "param",
297+
"Pattern": "pattern",
298+
"Picture": "picture",
299+
"Ping": "ping",
300+
"Placeholder": "placeholder",
301+
"Plaintext": "plaintext",
302+
"Playsinline": "playsinline",
303+
"Poster": "poster",
304+
"Pre": "pre",
305+
"Preload": "preload",
306+
"Progress": "progress",
307+
"Prompt": "prompt",
308+
"Public": "public",
309+
"Q": "q",
310+
"Radiogroup": "radiogroup",
311+
"Rb": "rb",
312+
"Readonly": "readonly",
313+
"Ref": "ref",
314+
"Referrerpolicy": "referrerpolicy",
315+
"Rel": "rel",
316+
"Required": "required",
317+
"Reversed": "reversed",
318+
"Rows": "rows",
319+
"Rowspan": "rowspan",
320+
"Rp": "rp",
321+
"Rt": "rt",
322+
"Rtc": "rtc",
323+
"Ruby": "ruby",
324+
"S": "s",
325+
"Samp": "samp",
326+
"Sandbox": "sandbox",
327+
"Scope": "scope",
328+
"Scoped": "scoped",
329+
"Script": "script",
330+
"Seamless": "seamless",
331+
"Section": "section",
332+
"Select": "select",
333+
"Selected": "selected",
334+
"Shape": "shape",
335+
"Size": "size",
336+
"Sizes": "sizes",
337+
"Slot": "slot",
338+
"Small": "small",
339+
"Sortable": "sortable",
340+
"Sorted": "sorted",
341+
"Source": "source",
342+
"Spacer": "spacer",
343+
"Span": "span",
344+
"Spellcheck": "spellcheck",
345+
"Src": "src",
346+
"Srcdoc": "srcdoc",
347+
"Srclang": "srclang",
348+
"Srcset": "srcset",
349+
"Start": "start",
350+
"Step": "step",
351+
"Strike": "strike",
352+
"Strong": "strong",
353+
"Style": "style",
354+
"Sub": "sub",
355+
"Summary": "summary",
356+
"Sup": "sup",
357+
"Svg": "svg",
358+
"System": "system",
359+
"Tabindex": "tabindex",
360+
"Table": "table",
361+
"Target": "target",
362+
"Tbody": "tbody",
363+
"Td": "td",
364+
"Template": "template",
365+
"Textarea": "textarea",
366+
"Tfoot": "tfoot",
367+
"Th": "th",
368+
"Thead": "thead",
369+
"Time": "time",
370+
"Title": "title",
371+
"Tr": "tr",
372+
"Track": "track",
373+
"Translate": "translate",
374+
"Tt": "tt",
375+
"Type": "type",
376+
"Typemustmatch": "typemustmatch",
377+
"U": "u",
378+
"Ul": "ul",
379+
"Unknown": "unknown",
380+
"Updateviacache": "updateviacache",
381+
"Usemap": "usemap",
382+
"Value": "value",
383+
"Var": "var",
384+
"Video": "video",
385+
"Wbr": "wbr",
386+
"Width": "width",
387+
"Workertype": "workertype",
388+
"Wrap": "wrap",
389+
"Xmp": "xmp"
390+
}
391+
392+
export {atoms};

‎atomx/gen.go

+31
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package main
1010

1111
import (
1212
"bytes"
13+
"encoding/json"
1314
"fmt"
1415
"go/format"
1516
"log"
@@ -99,6 +100,36 @@ func main() {
99100

100101
f.Write(b)
101102
f.Close()
103+
104+
f, err = os.Create("atoms.ts")
105+
if err != nil {
106+
log.Fatal(err)
107+
}
108+
109+
fmt.Fprintln(f, "// Code generated by gen.go. DO NOT EDIT.")
110+
fmt.Fprintln(f, "\nlet atoms = ")
111+
112+
ats := map[string]any{}
113+
enc := json.NewEncoder(f)
114+
enc.SetIndent("", " ")
115+
for _, k := range uniq {
116+
ats[flect.Pascalize(k)] = k
117+
}
118+
ats["Headings"] = headings
119+
120+
err = enc.Encode(ats)
121+
if err != nil {
122+
log.Fatal(err)
123+
}
124+
125+
fmt.Fprintf(f, "\nexport {atoms};")
126+
127+
// for _, k := range uniq {
128+
// fmt.Fprintf(f, "export const %s: string = %q\n", flect.Pascalize(k), k)
129+
// }
130+
131+
f.Close()
132+
102133
}
103134

104135
var headings = []string{

0 commit comments

Comments
 (0)
Please sign in to comment.