From 293fc1e3a734b5110c240049288b4038185025bb Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 27 Mar 2024 21:32:56 +0100 Subject: [PATCH] chore: finalize doc without details --- docs/.vitepress/config.js | 14 -------- docs/api.md | 5 --- docs/guide.md | 4 +-- docs/guide/examples/callbacks.md | 15 ++++++++ docs/guide/examples/data.md | 4 +++ docs/guide/examples/input.md | 2 ++ docs/guide/examples/options.md | 61 ++++++++++++++++++++++++++++++-- docs/guide/getting-started.md | 1 - docs/index.md | 6 ++-- 9 files changed, 84 insertions(+), 28 deletions(-) delete mode 100644 docs/api.md diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 048aaad..1b97452 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -10,7 +10,6 @@ export default defineConfig({ nav: [ { text: 'Home', link: '/' }, { text: 'Guide', link: '/guide' }, - { text: 'API', link: '/api' }, { text: 'Demo', link: '/demo' }, ], @@ -45,19 +44,6 @@ export default defineConfig({ ] }, ], - '/api': { - text: 'kompletr', - collapsed: false, - items: [ - { text: 'kompletr', link: '/api/signature' }, - { text: 'input', link: '/api/input' }, - { text: 'data', link: '/api/data' }, - { text: 'options', link: '/api/options' }, - { text: 'onKeyup', link: '/api/onkeyup' }, - { text: 'onSelect', link: '/api/onselect' }, - { text: 'onError', link: '/api/onerror' }, - ] - }, }, socialLinks: [ diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index a27ac3a..0000000 --- a/docs/api.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -outline: deep ---- - -# API documentation \ No newline at end of file diff --git a/docs/guide.md b/docs/guide.md index 38ed842..1268573 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -2,6 +2,4 @@ Here is the Kømpletr guide. You'll find some examples of integration regarding main use cases. -All the examples are using the way of the simplicity, and use only the options required for the demonstration. - -For technical details, see [API](./api.md) section. \ No newline at end of file +All the examples are using the way of the simplicity, and use only the options required for the demonstration. \ No newline at end of file diff --git a/docs/guide/examples/callbacks.md b/docs/guide/examples/callbacks.md index b434b7f..f49a349 100644 --- a/docs/guide/examples/callbacks.md +++ b/docs/guide/examples/callbacks.md @@ -1,7 +1,14 @@ # Callbacks +Three callbacks are exposed to give you more flexibility: + ## onKeyup +Fired after *onkeyup* event, with parameters: + +- *value*: current input value +- *done*: callback function to call with refreshed data in parameter + ```html ``` -:link: See [API section](./api.md) for more informations about available options. diff --git a/docs/index.md b/docs/index.md index 23ccabd..7554f36 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,11 +8,11 @@ hero: tagline: 10kb of vanilla lightweight to add highly featured autocompletion on your pages. actions: - theme: brand + text: Demo + link: /demo + - theme: alt text: Getting started link: /guide - - theme: alt - text: API Documentation - link: /api features: - icon: ✨