diff --git a/docs/src/content/docs/guides/why.mdx b/docs/src/content/docs/guides/why.mdx index bd79de3..a9fe063 100644 --- a/docs/src/content/docs/guides/why.mdx +++ b/docs/src/content/docs/guides/why.mdx @@ -14,9 +14,8 @@ By taking out bigger concerns that [a metaframework](https://github.com/ayoayco/ It works on current-day browsers without needing compilers, transpilers, or polyfills. + Have questions or suggestions? There are many ways to get in touch: + 1. Open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions) + 1. Submit a ticket via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb) + 1. Email me: [ayo@ayco.io](mailto:ayo@ayco.io) + diff --git a/eslint.config.mjs b/eslint.config.mjs index c571132..083b0dd 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,6 +13,6 @@ export default [ }, }, { - ignores: ['site/*', 'dist/*'], + ignores: ['site/*', '**/dist/*'], }, ] diff --git a/src/html.js b/src/html.js index 141adb1..2f11dcb 100644 --- a/src/html.js +++ b/src/html.js @@ -69,6 +69,12 @@ const htm = return f(), o.length > 2 ? o.slice(1) : o[1] }) +/** + * + * @param type + * @param props + * @param {...any} children + */ function h(type, props, ...children) { return { type, props, children } } diff --git a/src/utils/create-element.mjs b/src/utils/create-element.mjs index 4718169..f72aa4f 100644 --- a/src/utils/create-element.mjs +++ b/src/utils/create-element.mjs @@ -1,4 +1,8 @@ import { serialize } from './serialize.mjs' +/** + * + * @param tree + */ export function createElement(tree) { if (!tree.type) { if (Array.isArray(tree)) { @@ -39,6 +43,11 @@ export function createElement(tree) { } } +/** + * + * @param el + * @param styleObj + */ function applyStyles(el, styleObj) { Object.entries(styleObj).forEach(([rule, value]) => { if (rule in el.style && value) el.style[rule] = value diff --git a/src/utils/deserialize.mjs b/src/utils/deserialize.mjs index cb75a8b..d0b430a 100644 --- a/src/utils/deserialize.mjs +++ b/src/utils/deserialize.mjs @@ -1,3 +1,8 @@ +/** + * + * @param value + * @param type + */ export function deserialize(value, type) { switch (type) { case 'number': diff --git a/src/utils/get-camel-case.mjs b/src/utils/get-camel-case.mjs index 718b401..0bcc684 100644 --- a/src/utils/get-camel-case.mjs +++ b/src/utils/get-camel-case.mjs @@ -1,3 +1,7 @@ +/** + * + * @param kebab + */ export function getCamelCase(kebab) { return kebab.replace(/-./g, (x) => x[1].toUpperCase()) } diff --git a/src/utils/get-kebab-case.mjs b/src/utils/get-kebab-case.mjs index 2a24432..d568732 100644 --- a/src/utils/get-kebab-case.mjs +++ b/src/utils/get-kebab-case.mjs @@ -1,3 +1,7 @@ +/** + * + * @param str + */ export function getKebabCase(str) { return str.replace( /[A-Z]+(?![a-z])|[A-Z]/g, diff --git a/src/utils/serialize.mjs b/src/utils/serialize.mjs index 93f9712..9e5c3c9 100644 --- a/src/utils/serialize.mjs +++ b/src/utils/serialize.mjs @@ -1,3 +1,7 @@ +/** + * + * @param value + */ export function serialize(value) { switch (typeof value) { case 'number':