diff --git a/src/Attribute.roc b/src/Attribute.roc index 199c188..05cbe90 100644 --- a/src/Attribute.roc +++ b/src/Attribute.roc @@ -1,140 +1,138 @@ -interface Attribute - exposes [ - Attribute, - attribute, - accept, - acceptCharset, - accesskey, - action, - align, - allow, - alt, - async, - autocapitalize, - autocomplete, - autofocus, - autoplay, - background, - bgcolor, - border, - buffered, - capture, - challenge, - charset, - checked, - cite, - class, - code, - codebase, - color, - cols, - colspan, - content, - contenteditable, - contextmenu, - controls, - coords, - crossorigin, - csp, - data, - datetime, - decoding, - default, - defer, - dir, - dirname, - disabled, - download, - draggable, - enctype, - enterkeyhint, - for, - form, - formaction, - formenctype, - formmethod, - formnovalidate, - formtarget, - headers, - height, - hidden, - high, - href, - hreflang, - httpEquiv, - icon, - id, - importance, - inputmode, - integrity, - intrinsicsize, - ismap, - itemprop, - keytype, - kind, - label, - lang, - language, - list, - loading, - loop, - low, - manifest, - max, - maxlength, - media, - method, - min, - minlength, - multiple, - muted, - name, - novalidate, - open, - optimum, - pattern, - ping, - placeholder, - poster, - preload, - radiogroup, - readonly, - referrerpolicy, - rel, - required, - reversed, - role, - rows, - rowspan, - sandbox, - scope, - scoped, - selected, - shape, - size, - sizes, - slot, - span, - spellcheck, - src, - srcdoc, - srclang, - srcset, - start, - step, - style, - summary, - tabindex, - target, - title, - translate, - type, - usemap, - value, - width, - wrap, - ] - imports [] +module [ + Attribute, + attribute, + accept, + acceptCharset, + accesskey, + action, + align, + allow, + alt, + async, + autocapitalize, + autocomplete, + autofocus, + autoplay, + background, + bgcolor, + border, + buffered, + capture, + challenge, + charset, + checked, + cite, + class, + code, + codebase, + color, + cols, + colspan, + content, + contenteditable, + contextmenu, + controls, + coords, + crossorigin, + csp, + data, + datetime, + decoding, + default, + defer, + dir, + dirname, + disabled, + download, + draggable, + enctype, + enterkeyhint, + for, + form, + formaction, + formenctype, + formmethod, + formnovalidate, + formtarget, + headers, + height, + hidden, + high, + href, + hreflang, + httpEquiv, + icon, + id, + importance, + inputmode, + integrity, + intrinsicsize, + ismap, + itemprop, + keytype, + kind, + label, + lang, + language, + list, + loading, + loop, + low, + manifest, + max, + maxlength, + media, + method, + min, + minlength, + multiple, + muted, + name, + novalidate, + open, + optimum, + pattern, + ping, + placeholder, + poster, + preload, + radiogroup, + readonly, + referrerpolicy, + rel, + required, + reversed, + role, + rows, + rowspan, + sandbox, + scope, + scoped, + selected, + shape, + size, + sizes, + slot, + span, + spellcheck, + src, + srcdoc, + srclang, + srcset, + start, + step, + style, + summary, + tabindex, + target, + title, + translate, + type, + usemap, + value, + width, + wrap, +] Attribute : [Attribute Str Str] diff --git a/src/Html.roc b/src/Html.roc index a2810fc..af7c60b 100644 --- a/src/Html.roc +++ b/src/Html.roc @@ -1,142 +1,143 @@ -interface Html - exposes [ - Node, - text, - element, - voidElement, - render, - renderWithoutDocType, - dangerouslyIncludeUnescapedHtml, - # Content sectioning - address, - article, - aside, - footer, - h1, - h2, - h3, - h4, - h5, - h6, - header, - main, - nav, - section, - # Demarcating edits - del, - ins, - # Document metadata - base, - head, - link, - meta, - style, - title, - # Embedded content - embed, - iframe, - object, - picture, - portal, - source, - # Forms - button, - datalist, - fieldset, - form, - input, - label, - legend, - meter, - optgroup, - option, - output, - progress, - select, - textarea, - # Image and multimedia - area, - audio, - img, - map, - track, - video, - # Inline text semantics - a, - abbr, - b, - bdi, - bdo, - br, - cite, - code, - data, - dfn, - em, - i, - kbd, - mark, - q, - rp, - rt, - ruby, - s, - samp, - small, - span, - strong, - sub, - sup, - time, - u, - var, - wbr, - # Interactive elements - details, - dialog, - summary, - # Main root - html, - # SVG and MathML - math, - svg, - # Scripting - canvas, - noscript, - script, - # Sectioning root - body, - # Table content - caption, - col, - colgroup, - table, - tbody, - td, - tfoot, - th, - thead, - tr, - # Text content - blockquote, - dd, - div, - dl, - dt, - figcaption, - figure, - hr, - li, - menu, - ol, - p, - pre, - ul, - # Web components - slot, - template, - ] - imports [Attribute.{ Attribute, attribute }, SafeStr.{ SafeStr, escape, dangerouslyMarkSafe }] +module [ + Node, + text, + element, + voidElement, + render, + renderWithoutDocType, + dangerouslyIncludeUnescapedHtml, + # Content sectioning + address, + article, + aside, + footer, + h1, + h2, + h3, + h4, + h5, + h6, + header, + main, + nav, + section, + # Demarcating edits + del, + ins, + # Document metadata + base, + head, + link, + meta, + style, + title, + # Embedded content + embed, + iframe, + object, + picture, + portal, + source, + # Forms + button, + datalist, + fieldset, + form, + input, + label, + legend, + meter, + optgroup, + option, + output, + progress, + select, + textarea, + # Image and multimedia + area, + audio, + img, + map, + track, + video, + # Inline text semantics + a, + abbr, + b, + bdi, + bdo, + br, + cite, + code, + data, + dfn, + em, + i, + kbd, + mark, + q, + rp, + rt, + ruby, + s, + samp, + small, + span, + strong, + sub, + sup, + time, + u, + var, + wbr, + # Interactive elements + details, + dialog, + summary, + # Main root + html, + # SVG and MathML + math, + svg, + # Scripting + canvas, + noscript, + script, + # Sectioning root + body, + # Table content + caption, + col, + colgroup, + table, + tbody, + td, + tfoot, + th, + thead, + tr, + # Text content + blockquote, + dd, + div, + dl, + dt, + figcaption, + figure, + hr, + li, + menu, + ol, + p, + pre, + ul, + # Web components + slot, + template, +] + +import Attribute exposing [Attribute, attribute] +import SafeStr exposing [SafeStr, escape, dangerouslyMarkSafe] ## An HTML node, either an HTML element or some text inside an HTML element. Node : [Element Str U64 (List Attribute) (List Node), Text Str, UnescapedHtml Str] diff --git a/src/SafeStr.roc b/src/SafeStr.roc index 9d2b149..069fc1e 100644 --- a/src/SafeStr.roc +++ b/src/SafeStr.roc @@ -1,13 +1,12 @@ -interface SafeStr - exposes [ - toStr, - escape, - dangerouslyMarkSafe, - withCapacity, - concat, - reserve, - ] - imports [] +module [ + SafeStr, + toStr, + escape, + dangerouslyMarkSafe, + withCapacity, + concat, + reserve, +] ## An opaque type used to keep track of the fact that we know a string is HTML-safe. SafeStr := Str diff --git a/src/main.roc b/src/main.roc index bec7e17..f44e093 100644 --- a/src/main.roc +++ b/src/main.roc @@ -1 +1 @@ -package "Html" exposes [Html, Attribute] packages {} +package [Html, Attribute] {}