@storyblok/nuxt 5.5.1 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +3 -0
- package/.eslintrc +7 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/issue.bug.yml +68 -0
- package/.github/ISSUE_TEMPLATE/issue.fr.yml +40 -0
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/dependabot-automerge.yml +28 -0
- package/.github/workflows/release.yml +30 -0
- package/.husky/commit-msg +6 -0
- package/.husky/pre-commit +4 -0
- package/.nuxtrc +1 -0
- package/.prettierignore +1 -0
- package/README.md +35 -17
- package/cypress/.eslintrc +3 -0
- package/cypress/e2e/index.cy.ts +34 -0
- package/cypress/fixtures/stories.json +7 -0
- package/cypress/support/commands.ts +25 -0
- package/cypress/support/e2e.ts +20 -0
- package/cypress.config.ts +11 -0
- package/package.json +74 -30
- package/playground/README.md +63 -0
- package/playground/app.vue +3 -0
- package/playground/error.vue +22 -0
- package/playground/nuxt.config.ts +18 -0
- package/playground/package-lock.json +11660 -0
- package/playground/package.json +17 -0
- package/playground/pages/[...slug].vue +17 -0
- package/playground/pages/index.vue +21 -0
- package/playground/public/favicon.ico +0 -0
- package/playground/server/tsconfig.json +3 -0
- package/playground/storyblok/sub/Feature.vue +16 -0
- package/playground/storyblok/sub/Grid.vue +19 -0
- package/playground/storyblok/sub/Page.vue +19 -0
- package/playground/storyblok/sub/Teaser.vue +19 -0
- package/playground/tsconfig.json +4 -0
- package/playground-e2e/nuxt.config.ts +24 -0
- package/playground-e2e/package.json +15 -0
- package/playground-e2e/pages/[...slug].vue +20 -0
- package/playground-e2e/pages/index.vue +19 -0
- package/playground-e2e/pages/test.vue +7 -0
- package/playground-e2e/pages/vcalong.vue +17 -0
- package/playground-e2e/plugins/storyblok.js +21 -0
- package/playground-e2e/storyblok/sub/Feature.vue +14 -0
- package/playground-e2e/storyblok/sub/Grid.vue +19 -0
- package/playground-e2e/storyblok/sub/Page.vue +19 -0
- package/playground-e2e/storyblok/sub/Teaser.vue +19 -0
- package/playground-e2e/tsconfig.json +11 -0
- package/src/module.ts +90 -0
- package/src/runtime/composables/useAsyncStoryblok.ts +33 -0
- package/{dist/runtime/plugin.mjs → src/runtime/plugin.ts} +1 -0
- package/tsconfig.json +3 -0
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -13
- package/dist/module.json +0 -5
- package/dist/module.mjs +0 -58
- package/dist/runtime/composables/useAsyncStoryblok.d.ts +0 -2
- package/dist/runtime/composables/useAsyncStoryblok.mjs +0 -25
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/types.d.ts +0 -15
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid place-items-center h-screen text-center">
|
|
3
|
+
<div class="flex flex-col gap-y-4">
|
|
4
|
+
<h1 class="font-bold text-4xl">Error {{ error.statusCode }}</h1>
|
|
5
|
+
<p>{{ error.statusMessage }}</p>
|
|
6
|
+
<button
|
|
7
|
+
class="px-4 py-2 bg-green-600 text-white rounded-lg"
|
|
8
|
+
@click="handleError"
|
|
9
|
+
>
|
|
10
|
+
Clear errors
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
defineProps({
|
|
18
|
+
error: Object
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const handleError = () => clearError({ redirect: "/" });
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
2
|
+
export default defineNuxtConfig({
|
|
3
|
+
modules: ['../src/module'],
|
|
4
|
+
storyblok: {
|
|
5
|
+
accessToken: "OurklwV5XsDJTIE1NJaD2wtt",
|
|
6
|
+
apiOptions: {
|
|
7
|
+
region: ""
|
|
8
|
+
},
|
|
9
|
+
devtools: true,
|
|
10
|
+
// enableSudoMode: true /* (or legacy) usePlugin: false */
|
|
11
|
+
},
|
|
12
|
+
app: {
|
|
13
|
+
head: {
|
|
14
|
+
script: [{ src: "https://cdn.tailwindcss.com" }]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
// devtools: { enabled: true },
|
|
18
|
+
})
|