diff --git a/.editorconfig b/.editorconfig
index b6cee69..4a7ea30 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,5 @@
+root = true
+
[*]
indent_style = space
indent_size = 2
@@ -6,3 +8,5 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..9afe5dd
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,47 @@
+module.exports = {
+ root: true,
+ parserOptions: {
+ ecmaVersion: 7,
+ sourceType: 'module',
+ },
+ env: {
+ browser: true,
+ node: true,
+ },
+ parser: 'vue-eslint-parser',
+ extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', 'prettier'],
+ plugins: ['prettier'],
+ rules: {
+ 'comma-dangle': ['error', 'always-multiline'],
+ curly: ['error', 'multi'],
+ 'no-console': 'off',
+ 'no-debugger': 'off',
+ 'vue/require-default-prop': 'off',
+ 'vue/singleline-html-element-content-newline': 0,
+ camelcase: 'off',
+ 'no-case-declarations': 'off',
+ 'no-use-before-define': 'off',
+ 'no-useless-constructor': 'off',
+ '@typescript-eslint/no-useless-constructor': ['error'],
+ 'vue/no-v-html': 'off',
+ 'vue/max-attributes-per-line': [
+ 'error',
+ {
+ singleline: {
+ max: 3,
+ },
+ multiline: {
+ max: 3,
+ },
+ },
+ ],
+ 'vue/multi-word-component-names': 'off',
+ 'sort-imports': [
+ 'error',
+ {
+ ignoreCase: true,
+ ignoreDeclarationSort: true,
+ },
+ ],
+ },
+}
diff --git a/.gitignore b/.gitignore
index 163c9b3..49ef0bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,25 @@
-.idea
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
node_modules
-yarn.lock
dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+!.vscode/settings.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..6f7f377
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+v16
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..254ea51
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,7 @@
+{
+ "semi": false,
+ "singleQuote": true,
+ "trailingComma": "es5",
+ "bracketSpacing": true,
+ "bracketLinebreak": true
+}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..210ec75
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,19 @@
+{
+ "recommendations": [
+ "editorconfig.editorconfig",
+ "donjayamanne.githistory",
+ "eamodio.gitlens",
+ "ms-vscode.vscode-typescript-next",
+ "henrynguyen5-vsc.vsc-nvm",
+ "dbaeumer.vscode-eslint",
+ "bradlc.vscode-tailwindcss",
+ "voorjaar.windicss-intellisense",
+ "Vue.volar",
+ "Vue.vscode-typescript-vue-plugin",
+ "esbenp.prettier-vscode",
+ "bradlc.vscode-tailwindcss",
+ ],
+ "unwantedRecommendations": [
+ "octref.vetur"
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..5c9e193
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,13 @@
+{
+ "editor.formatOnSave": true,
+ "prettier.semi": false,
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": true
+ },
+ "[vue]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "[javascript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+}
diff --git a/package.json b/package.json
index d93a7bd..a3a0d00 100644
--- a/package.json
+++ b/package.json
@@ -42,11 +42,16 @@
"devDependencies": {
"@iconify/vue": "^3.1.0",
"@nuxt/kit": "npm:@nuxt/kit-edge@latest",
+ "@popperjs/core": "^2.11.5",
"@types/node": "^17.0.18",
"@vitejs/plugin-vue": "^2.3.1",
"@vue/compiler-sfc": "^3.2.11",
"@vueuse/core": "^6.9.1",
"esbuild": "0.14.32",
+ "eslint": "^8.18.0",
+ "eslint-config-prettier": "^8.5.0",
+ "eslint-plugin-vue": "^9.1.1",
+ "prettier": "^2.7.1",
"simple-syntax-highlighter": "^2.2.0",
"tsup": "^5.7.0",
"unbuild": "^0.6.9",
diff --git a/packages/nuxt/src/runtime/plugin.ts b/packages/nuxt/src/runtime/plugin.ts
index 77ce908..45b5fe8 100644
--- a/packages/nuxt/src/runtime/plugin.ts
+++ b/packages/nuxt/src/runtime/plugin.ts
@@ -1,12 +1,14 @@
-import { useToast, useModal, TailvueModal, TailvueToast, ModalBase, PushButton } from 'tailvue'
+import { useToast, useModal, useAppTour, TailvueModal, TailvueToast, ModalBase, PushButton, AppTour } from 'tailvue'
// @ts-ignore: resolved with nuxt
import { defineNuxtPlugin } from '#app'
export default defineNuxtPlugin((nuxtApp: any) => {
nuxtApp.provide('toast', useToast())
nuxtApp.provide('modal', useModal())
+ nuxtApp.provide('tour', useAppTour())
nuxtApp.vueApp.component('PushButton', PushButton)
nuxtApp.vueApp.component('ModalBase', ModalBase)
+ nuxtApp.vueApp.component('AppTour', AppTour)
})
// @ts-ignore: resolved with nuxt
@@ -14,5 +16,6 @@ declare module '#app' {
interface NuxtApp {
$toast: TailvueToast
$modal: TailvueModal
+ $tour: AppTour
}
}
diff --git a/playground/index.html b/playground/index.html
index 962bd62..2a73710 100644
--- a/playground/index.html
+++ b/playground/index.html
@@ -1,21 +1,23 @@
-
-
-
-
- tailvue playground
-
-
-
-
-
-
+
+
+
+
+ tailvue playground
+
+
+
+
+
+
diff --git a/playground/src/App.vue b/playground/src/App.vue
index 37747c1..a77ece7 100644
--- a/playground/src/App.vue
+++ b/playground/src/App.vue
@@ -1,15 +1,22 @@