@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.
Files changed (60) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc +7 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +1 -0
  5. package/.github/ISSUE_TEMPLATE/issue.bug.yml +68 -0
  6. package/.github/ISSUE_TEMPLATE/issue.fr.yml +40 -0
  7. package/.github/dependabot.yml +11 -0
  8. package/.github/workflows/dependabot-automerge.yml +28 -0
  9. package/.github/workflows/release.yml +30 -0
  10. package/.husky/commit-msg +6 -0
  11. package/.husky/pre-commit +4 -0
  12. package/.nuxtrc +1 -0
  13. package/.prettierignore +1 -0
  14. package/README.md +35 -17
  15. package/cypress/.eslintrc +3 -0
  16. package/cypress/e2e/index.cy.ts +34 -0
  17. package/cypress/fixtures/stories.json +7 -0
  18. package/cypress/support/commands.ts +25 -0
  19. package/cypress/support/e2e.ts +20 -0
  20. package/cypress.config.ts +11 -0
  21. package/package.json +74 -30
  22. package/playground/README.md +63 -0
  23. package/playground/app.vue +3 -0
  24. package/playground/error.vue +22 -0
  25. package/playground/nuxt.config.ts +18 -0
  26. package/playground/package-lock.json +11660 -0
  27. package/playground/package.json +17 -0
  28. package/playground/pages/[...slug].vue +17 -0
  29. package/playground/pages/index.vue +21 -0
  30. package/playground/public/favicon.ico +0 -0
  31. package/playground/server/tsconfig.json +3 -0
  32. package/playground/storyblok/sub/Feature.vue +16 -0
  33. package/playground/storyblok/sub/Grid.vue +19 -0
  34. package/playground/storyblok/sub/Page.vue +19 -0
  35. package/playground/storyblok/sub/Teaser.vue +19 -0
  36. package/playground/tsconfig.json +4 -0
  37. package/playground-e2e/nuxt.config.ts +24 -0
  38. package/playground-e2e/package.json +15 -0
  39. package/playground-e2e/pages/[...slug].vue +20 -0
  40. package/playground-e2e/pages/index.vue +19 -0
  41. package/playground-e2e/pages/test.vue +7 -0
  42. package/playground-e2e/pages/vcalong.vue +17 -0
  43. package/playground-e2e/plugins/storyblok.js +21 -0
  44. package/playground-e2e/storyblok/sub/Feature.vue +14 -0
  45. package/playground-e2e/storyblok/sub/Grid.vue +19 -0
  46. package/playground-e2e/storyblok/sub/Page.vue +19 -0
  47. package/playground-e2e/storyblok/sub/Teaser.vue +19 -0
  48. package/playground-e2e/tsconfig.json +11 -0
  49. package/src/module.ts +90 -0
  50. package/src/runtime/composables/useAsyncStoryblok.ts +33 -0
  51. package/{dist/runtime/plugin.mjs → src/runtime/plugin.ts} +1 -0
  52. package/tsconfig.json +3 -0
  53. package/dist/module.cjs +0 -5
  54. package/dist/module.d.ts +0 -13
  55. package/dist/module.json +0 -5
  56. package/dist/module.mjs +0 -58
  57. package/dist/runtime/composables/useAsyncStoryblok.d.ts +0 -2
  58. package/dist/runtime/composables/useAsyncStoryblok.mjs +0 -25
  59. package/dist/runtime/plugin.d.ts +0 -2
  60. 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
+ })