@dargmuesli/nuxt-cookie-control 6.4.1 → 6.4.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.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Nuxt Cookie Control
2
2
 
3
- [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
3
+ [![ci status][ci-image]][ci-url]
4
+ [![npm version][npm-version-src]][npm-version-href]
5
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
4
6
 
5
7
  ![nuxt-cookie-control](https://drive.google.com/a/broj42.com/uc?id=19sFguJo7SKUvmH4xu9DhK9ZXzR6oWLX8)
6
8
 
@@ -258,6 +260,9 @@ Every property that includes a `{ en: ... }` value is a translatable property th
258
260
 
259
261
 
260
262
  <!-- Badges -->
263
+ [ci-image]: https://img.shields.io/github/actions/workflow/status/dargmuesli/nuxt-cookie-control/ci.yml
264
+ [ci-url]: https://github.com/dargmuesli/nuxt-cookie-control/actions/workflows/ci.yml
265
+
261
266
  [npm-version-src]: https://badgen.net/npm/v/@dargmuesli/nuxt-cookie-control/latest
262
267
  [npm-version-href]: https://npmjs.com/package/@dargmuesli/nuxt-cookie-control
263
268
 
@@ -0,0 +1,58 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { CookieOptions } from 'nuxt/app';
3
+
4
+ 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';
5
+ type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
6
+ type Translatable = string | PartialRecord<Locale, string>;
7
+ interface Cookie {
8
+ description?: Translatable;
9
+ id?: string;
10
+ name: Translatable;
11
+ links?: Record<string, string | null>;
12
+ src?: string;
13
+ targetCookieIds?: string[];
14
+ }
15
+ interface LocaleStrings {
16
+ accept: string;
17
+ acceptAll: string;
18
+ bannerDescription: string;
19
+ bannerTitle: string;
20
+ close: string;
21
+ cookiesFunctional: string;
22
+ cookiesNecessary: string;
23
+ cookiesOptional: string;
24
+ iframeBlocked: string;
25
+ decline: string;
26
+ declineAll: string;
27
+ here: string;
28
+ manageCookies: string;
29
+ save: string;
30
+ settingsUnsaved: string;
31
+ }
32
+ interface ModuleOptions {
33
+ barPosition: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
34
+ closeModalOnClickOutside: boolean;
35
+ colors: false | Record<string, any>;
36
+ cookieExpiryOffsetMs: number;
37
+ cookieNameCookiesEnabledIds: string;
38
+ cookieNameIsConsentGiven: string;
39
+ cookies: {
40
+ necessary: Cookie[];
41
+ optional: Cookie[];
42
+ };
43
+ cookieOptions: CookieOptions;
44
+ isAcceptNecessaryButtonEnabled: boolean;
45
+ isControlButtonEnabled: boolean;
46
+ isCookieIdVisible: boolean;
47
+ isCssEnabled: boolean;
48
+ isCssPonyfillEnabled: boolean;
49
+ isDashInDescriptionEnabled: boolean;
50
+ isIframeBlocked: boolean;
51
+ isModalForced: boolean;
52
+ locales: Locale[];
53
+ localeTexts: PartialRecord<Locale, Partial<LocaleStrings>>;
54
+ }
55
+
56
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
57
+
58
+ export { _default as default };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "6.4.1",
3
+ "version": "6.4.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 = "6.4.1";
6
+ const version = "6.4.2";
7
7
 
8
8
  const en = {
9
9
  accept: "Accept",
@@ -186,7 +186,6 @@
186
186
  <script setup lang="ts">
187
187
  import { ref, computed, onBeforeMount, watch } from 'vue'
188
188
 
189
- import { useNuxtApp } from '#app'
190
189
  import { Cookie, CookieType, Locale, Translatable } from '../types'
191
190
  import {
192
191
  getAllCookieIdsString,
@@ -195,8 +194,9 @@ import {
195
194
  removeCookie,
196
195
  resolveTranslatable,
197
196
  } from '../methods'
198
- import setCssVariables from '#cookie-control/set-vars'
199
197
 
198
+ import { useNuxtApp } from '#app'
199
+ import setCssVariables from '#cookie-control/set-vars'
200
200
  import { useCookieControl, useCookie } from '#imports'
201
201
 
202
202
  export interface Props {
@@ -21,8 +21,9 @@
21
21
  <script setup lang="ts">
22
22
  import { computed } from 'vue'
23
23
 
24
- import { useNuxtApp } from '#app'
25
24
  import { Cookie } from '../types'
25
+
26
+ import { useNuxtApp } from '#app'
26
27
  import { useCookieControl } from '#imports'
27
28
 
28
29
  const { cookiesEnabled, isModalActive, moduleOptions } = useCookieControl()
@@ -1,5 +1,5 @@
1
- import { Plugin } from '#app';
2
1
  import { State } from './types';
2
+ import { Plugin } from '#app';
3
3
  declare const plugin: Plugin<{
4
4
  cookies: State;
5
5
  }>;
@@ -0,0 +1,7 @@
1
+
2
+ import { } from './module'
3
+
4
+
5
+
6
+
7
+ export { default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "6.4.1",
3
+ "version": "6.4.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.6.12",
24
+ "packageManager": "pnpm@8.7.1",
25
25
  "exports": {
26
26
  ".": {
27
27
  "import": "./dist/module.mjs",
@@ -44,7 +44,7 @@
44
44
  "prepare": "husky install"
45
45
  },
46
46
  "dependencies": {
47
- "@nuxt/kit": "3.6.5",
47
+ "@nuxt/kit": "3.7.1",
48
48
  "@sindresorhus/slugify": "2.2.1",
49
49
  "css-vars-ponyfill": "2.4.8",
50
50
  "string-replace-loader": "3.1.0"
@@ -52,17 +52,17 @@
52
52
  "devDependencies": {
53
53
  "@commitlint/cli": "17.7.1",
54
54
  "@commitlint/config-conventional": "17.7.0",
55
- "@dargmuesli/nuxt-cookie-control": "link:.",
56
- "@nuxt/module-builder": "0.4.0",
57
- "@nuxtjs/eslint-config-typescript": "12.0.0",
58
- "eslint": "8.47.0",
55
+ "@dargmuesli/nuxt-cookie-control": "link:",
56
+ "@nuxt/module-builder": "0.5.1",
57
+ "@nuxtjs/eslint-config-typescript": "12.1.0",
58
+ "eslint": "8.48.0",
59
59
  "eslint-config-prettier": "9.0.0",
60
60
  "eslint-plugin-prettier": "5.0.0",
61
61
  "husky": "8.0.3",
62
62
  "lint-staged": "14.0.1",
63
- "nuxt": "3.6.5",
64
- "prettier": "3.0.2",
65
- "typescript": "5.1.6",
63
+ "nuxt": "3.7.1",
64
+ "prettier": "3.0.3",
65
+ "typescript": "5.2.2",
66
66
  "vue": "3.3.4",
67
67
  "vue-tsc": "1.8.8",
68
68
  "webpack": "5.88.2"