diff --git a/README.md b/README.md index 8761775..eb7a5fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Vanilla+ -**WARNING: PROOF OF CONCEPT ONLY!** An eventual version 1.0 is expected by 2023. This is a back-burner project for me as of 2022. +**WARNING: CURRENTLY AT THE PROTOTYPE STAGE!** An eventual version 1.0 is expected by 2023. This is a back-burner project for me as of 2022. [![license](https://img.shields.io/github/license/vphantom/vpweb.svg?style=plastic)]() [![GitHub release](https://img.shields.io/github/release/vphantom/vpweb.svg?style=plastic)]() @@ -58,6 +58,10 @@ import 'vpweb/vpweb'; ``` +You may also use individual components, although if you use more than one as stand-alone scripts, there will be some redundancy. + +Note that components triggered by attributes or class names cannot self-activate inside shadow DOMs. If you want to use Vanilla+ components inside those, you'll need to activate them manually (for example, with `fast.preclick(element)`). See each component's documentation below for manual activation usage. + ### [Editeur](docs/editeur.md) ### [Fast Clicks](docs/fast.md) diff --git a/docs/editeur.md b/docs/editeur.md index 4329357..b797eb8 100644 --- a/docs/editeur.md +++ b/docs/editeur.md @@ -27,6 +27,8 @@ Example usage: ``` +This is a custom element and is thus available inside shadow DOMs. + The optional JSON scripts may be inline or referenced with `src`, in which case they will be loaded asynchronously. Without `vp-name` is read-only mode, in which case `
` is not necessary. At least one of `vp-schema` or `vp-data` must be specified in order to display anything. Attributes: * **`vp-schema`** Name of schema definition to apply (optional) diff --git a/docs/fast.md b/docs/fast.md index 9d0c583..bce5d33 100644 --- a/docs/fast.md +++ b/docs/fast.md @@ -21,7 +21,7 @@ import 'vpweb/fast'; ## `function preclick(el)` -Trigger clicks on mousedown events. Click event is fired twice, so be careful when adding this behavior to new elements. +Manually make an element trigger clicks on mousedown events. Click event is fired twice, so be careful when adding this behavior to new elements. **Parameters:** diff --git a/docs/forms.md b/docs/forms.md index 0a75ef2..072d92b 100644 --- a/docs/forms.md +++ b/docs/forms.md @@ -57,7 +57,7 @@ Take over a form for JSON out, HTML in. ## `function expanding(input)` -Auto-expanding inputs. Types `email`, `number`, `password`, `search`, `text`, `url` are supported. +Manually make auto-expanding inputs. Types `email`, `number`, `password`, `search`, `text`, `url` are supported. **Parameters:** @@ -65,7 +65,7 @@ Auto-expanding inputs. Types `email`, `number`, `password`, `search`, `text`, ` ## `function ghost(input, name)` -Include field in form data once it will be modified. +Manually make a field be included form data only once it will be modified. **Parameters:** diff --git a/js/fast.js b/js/fast.js index 1cc758b..ec17ae8 100644 --- a/js/fast.js +++ b/js/fast.js @@ -7,8 +7,8 @@ import * as $ from './browser.js'; // TODO: is there ANY way to cancel the browser's second click? /** - * Trigger clicks on mousedown events. Click event is fired twice, so be - * careful when adding this behavior to new elements. + * Manually make an element trigger clicks on mousedown events. Click event is + * fired twice, so be careful when adding this behavior to new elements. * * @param {HTMLElement} el Element to monitor */ diff --git a/js/forms.js b/js/forms.js index f965fcc..68110e7 100644 --- a/js/forms.js +++ b/js/forms.js @@ -47,8 +47,8 @@ function json(form) { $.forever('form[method="vp-json"]', json); /** - * Auto-expanding inputs. Types `email`, `number`, `password`, `search`, - * `text`, `url` are supported. + * Manually make auto-expanding inputs. Types `email`, `number`, `password`, + * `search`, `text`, `url` are supported. * * @param {HTMLInputElement} input The input to squeeze */ @@ -65,7 +65,7 @@ function expanding(input) { $.forever('input[vp-expanding]', expanding); /** - * Include field in form data once it will be modified. + * Manually make a field be included form data only once it will be modified. * * @param {HTMLInputElement|HTMLSelectElement|HTMLTextAreaElement} input Field * @param {string} [name] Name to use (overrides `vp-name`)