@dargmuesli/nuxt-cookie-control 7.0.0-beta.1 → 7.0.0-beta.2

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 (40) hide show
  1. package/README.md +11 -7
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +2 -2
  4. package/dist/runtime/components/CookieControl.vue +8 -2
  5. package/dist/runtime/components/CookieIframe.vue +3 -2
  6. package/dist/runtime/composables.d.ts +1 -1
  7. package/dist/runtime/constants.d.ts +1 -1
  8. package/dist/runtime/locale/ar.d.ts +1 -1
  9. package/dist/runtime/locale/az.d.ts +1 -1
  10. package/dist/runtime/locale/bg.d.ts +1 -1
  11. package/dist/runtime/locale/ca.d.ts +1 -1
  12. package/dist/runtime/locale/cs.d.ts +1 -1
  13. package/dist/runtime/locale/da.d.ts +1 -1
  14. package/dist/runtime/locale/de.d.ts +1 -1
  15. package/dist/runtime/locale/en.d.ts +1 -1
  16. package/dist/runtime/locale/es.d.ts +1 -1
  17. package/dist/runtime/locale/fi.d.ts +1 -1
  18. package/dist/runtime/locale/fr.d.ts +1 -1
  19. package/dist/runtime/locale/hr.d.ts +1 -1
  20. package/dist/runtime/locale/hu.d.ts +1 -1
  21. package/dist/runtime/locale/it.d.ts +1 -1
  22. package/dist/runtime/locale/ja.d.ts +1 -1
  23. package/dist/runtime/locale/ko.d.ts +1 -1
  24. package/dist/runtime/locale/lt.d.ts +1 -1
  25. package/dist/runtime/locale/nl.d.ts +1 -1
  26. package/dist/runtime/locale/no.d.ts +1 -1
  27. package/dist/runtime/locale/oc.d.ts +1 -1
  28. package/dist/runtime/locale/pl.d.ts +1 -1
  29. package/dist/runtime/locale/pt.d.ts +1 -1
  30. package/dist/runtime/locale/ro.d.ts +1 -1
  31. package/dist/runtime/locale/rs.d.ts +1 -1
  32. package/dist/runtime/locale/ru.d.ts +1 -1
  33. package/dist/runtime/locale/sk.d.ts +1 -1
  34. package/dist/runtime/locale/sv.d.ts +1 -1
  35. package/dist/runtime/locale/tr.d.ts +1 -1
  36. package/dist/runtime/locale/uk.d.ts +1 -1
  37. package/dist/runtime/methods.d.ts +1 -1
  38. package/dist/runtime/plugin.d.ts +2 -2
  39. package/dist/runtime/types.d.ts +2 -2
  40. package/package.json +12 -12
package/README.md CHANGED
@@ -237,18 +237,22 @@ Every property that includes a `{ en: ... }` value is a translatable property th
237
237
  #### Modal
238
238
 
239
239
  ```html
240
- <template #modal>
241
- <h2>Modal title</h2>
242
- <p>Modal description</p>
243
- </template>
240
+ <CookieControl>
241
+ <template #modal>
242
+ <h2>Modal title</h2>
243
+ <p>Modal description</p>
244
+ </template>
245
+ </CookieControl>
244
246
  ```
245
247
 
246
248
  #### Cookie
247
249
 
248
250
  ```html
249
- <template #cookie="{config}">
250
- <span v-for="c in config" :key="c.id" v-text="c.cookies" />
251
- </template>
251
+ <CookieControl>
252
+ <template #cookie="{config}">
253
+ <span v-for="c in config" :key="c.id" v-text="c.cookies" />
254
+ </template>
255
+ </CookieControl>
252
256
  ```
253
257
 
254
258
  ### Props
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.2",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0"
package/dist/module.mjs CHANGED
@@ -3,7 +3,7 @@ import { pathToFileURL } from 'node:url';
3
3
  import { createResolver, defineNuxtModule, addPlugin, addImports, addTemplate, extendWebpackConfig, extendViteConfig, resolvePath } from '@nuxt/kit';
4
4
 
5
5
  const name = "@dargmuesli/nuxt-cookie-control";
6
- const version = "7.0.0-beta.1";
6
+ const version = "7.0.0-beta.2";
7
7
 
8
8
  const en = {
9
9
  accept: "Accept",
@@ -152,7 +152,7 @@ const module = defineNuxtModule({
152
152
  addTemplate({
153
153
  filename: "cookie-control-options.ts",
154
154
  write: true,
155
- getContents: () => `import { ModuleOptions } from '#cookie-control/types'
155
+ getContents: () => `import type { ModuleOptions } from '#cookie-control/types'
156
156
 
157
157
  export default ${JSON.stringify(
158
158
  moduleOptions,
@@ -186,7 +186,14 @@
186
186
  <script setup lang="ts">
187
187
  import { ref, computed, onBeforeMount, watch } from 'vue'
188
188
 
189
- import { Cookie, CookieType, Locale, Translatable } from '../types'
189
+ import { useNuxtApp } from '#app'
190
+
191
+ import {
192
+ type Cookie,
193
+ CookieType,
194
+ type Locale,
195
+ type Translatable,
196
+ } from '../types'
190
197
  import {
191
198
  getAllCookieIdsString,
192
199
  getCookieId,
@@ -195,7 +202,6 @@ import {
195
202
  resolveTranslatable,
196
203
  } from '../methods'
197
204
 
198
- import { useNuxtApp } from '#app'
199
205
  import setCssVariables from '#cookie-control/set-vars'
200
206
  import { useCookieControl, useCookie } from '#imports'
201
207
 
@@ -21,9 +21,10 @@
21
21
  <script setup lang="ts">
22
22
  import { computed } from 'vue'
23
23
 
24
- import { Cookie } from '../types'
25
-
26
24
  import { useNuxtApp } from '#app'
25
+
26
+ import type { Cookie } from '../types'
27
+
27
28
  import { useCookieControl } from '#imports'
28
29
 
29
30
  const { cookiesEnabled, isModalActive, moduleOptions } = useCookieControl()
@@ -1,2 +1,2 @@
1
- import { State } from './types';
1
+ import type { State } from './types';
2
2
  export declare const useCookieControl: () => State;
@@ -1,2 +1,2 @@
1
- import { Locale } from './types';
1
+ import type { Locale } from './types';
2
2
  export declare const LOCALE_DEFAULT: Locale;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { LocaleStrings } from '../types';
1
+ import type { LocaleStrings } from '../types';
2
2
  declare const _default: LocaleStrings;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- import { Cookie, ModuleOptions, Translatable } from './types';
1
+ import type { Cookie, ModuleOptions, Translatable } from './types';
2
2
  export declare const getAllCookieIdsString: (moduleOptions: ModuleOptions) => string;
3
3
  export declare const getCookieId: (cookie: Cookie) => string;
4
4
  export declare const getCookieIds: (cookies: Cookie[]) => string[];
@@ -1,5 +1,5 @@
1
- import { State } from './types';
2
- import { Plugin } from '#app';
1
+ import type { Plugin } from '#app';
2
+ import type { State } from './types';
3
3
  declare const plugin: Plugin<{
4
4
  cookies: State;
5
5
  }>;
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
- import { CookieOptions } from 'nuxt/app';
1
+ import type { Ref } from 'vue';
2
+ import type { CookieOptions } from 'nuxt/app';
3
3
  export type Locale = 'ar' | 'az' | 'bg' | 'ca' | 'cs' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'it' | 'ja' | 'ko' | 'lt' | 'nl' | 'no' | 'oc' | 'pt' | 'pl' | 'ro' | 'rs' | 'ru' | 'sk' | 'sv' | 'tr' | 'uk';
4
4
  export type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
5
5
  export type Translatable = string | PartialRecord<Locale, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.2",
4
4
  "description": "Nuxt Cookie Control Module",
5
5
  "author": "Dario Ferderber <dario.ferderber@broj42.com>",
6
6
  "maintainers": [
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=16"
23
23
  },
24
- "packageManager": "pnpm@8.7.6",
24
+ "packageManager": "pnpm@8.9.2",
25
25
  "exports": {
26
26
  ".": {
27
27
  "import": "./dist/module.mjs",
@@ -44,29 +44,29 @@
44
44
  "prepare": "husky install"
45
45
  },
46
46
  "dependencies": {
47
- "@nuxt/kit": "^3.7.3",
47
+ "@nuxt/kit": "^3.8.0",
48
48
  "@sindresorhus/slugify": "^2.2.1",
49
49
  "css-vars-ponyfill": "^2.4.8",
50
50
  "string-replace-loader": "^3.1.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@commitlint/cli": "17.7.1",
54
- "@commitlint/config-conventional": "17.7.0",
53
+ "@commitlint/cli": "17.8.0",
54
+ "@commitlint/config-conventional": "17.8.0",
55
55
  "@dargmuesli/nuxt-cookie-control": "link:",
56
- "@nuxt/module-builder": "0.5.1",
56
+ "@nuxt/module-builder": "0.5.2",
57
57
  "@nuxtjs/eslint-config-typescript": "12.1.0",
58
58
  "conventional-changelog-conventionalcommits": "7.0.2",
59
- "eslint": "8.49.0",
59
+ "eslint": "8.51.0",
60
60
  "eslint-config-prettier": "9.0.0",
61
- "eslint-plugin-prettier": "5.0.0",
61
+ "eslint-plugin-prettier": "5.0.1",
62
62
  "husky": "8.0.3",
63
- "lint-staged": "14.0.1",
64
- "nuxt": "3.7.3",
63
+ "lint-staged": "15.0.2",
64
+ "nuxt": "3.8.0",
65
65
  "prettier": "3.0.3",
66
66
  "typescript": "5.2.2",
67
67
  "vue": "3.3.4",
68
- "vue-tsc": "1.8.11",
69
- "webpack": "5.88.2"
68
+ "vue-tsc": "1.8.19",
69
+ "webpack": "5.89.0"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"