@dargmuesli/nuxt-cookie-control 8.4.2 → 8.4.4

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/dist/module.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "8.4.2",
3
+ "version": "8.4.4",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
- "nuxt": "^3.0.0"
6
+ "nuxt": ">=3.0.0"
7
7
  },
8
8
  "builder": {
9
- "@nuxt/module-builder": "0.7.1",
9
+ "@nuxt/module-builder": "0.8.1",
10
10
  "unbuild": "unknown"
11
11
  }
12
12
  }
package/dist/module.mjs CHANGED
@@ -122,7 +122,7 @@ const DEFAULTS = {
122
122
  };
123
123
 
124
124
  const name = "@dargmuesli/nuxt-cookie-control";
125
- const version = "8.4.2";
125
+ const version = "8.4.4";
126
126
 
127
127
  const resolver = createResolver(import.meta.url);
128
128
  const runtimeDir = resolver.resolve("./runtime");
@@ -131,7 +131,7 @@ const module = defineNuxtModule({
131
131
  name,
132
132
  version,
133
133
  configKey: CONFIG_KEY,
134
- compatibility: { nuxt: "^3.0.0" }
134
+ compatibility: { nuxt: ">=3.0.0" }
135
135
  },
136
136
  defaults: DEFAULTS,
137
137
  hooks: {
@@ -7,8 +7,7 @@ export const getAllCookieIdsString = (moduleOptions) => getCookieIds([
7
7
  export const getCookieIds = (cookies) => cookies.map((cookie) => cookie.id);
8
8
  export const removeCookie = (name) => useCookie(name).value = void 0;
9
9
  export const resolveTranslatable = (translatable, locale = LOCALE_DEFAULT) => {
10
- if (typeof translatable === "string")
11
- return translatable;
10
+ if (typeof translatable === "string") return translatable;
12
11
  if (!locale)
13
12
  throw new Error("No locale given for translatable that is not a string.");
14
13
  const result = translatable[locale];
@@ -1,7 +1,7 @@
1
1
  import type { State } from '#cookie-control/types';
2
- declare const _default: import("nuxt/app").Plugin<{
2
+ declare const _default: import("#app").Plugin<{
3
3
  cookies: State;
4
- }> & import("nuxt/app").ObjectPlugin<{
4
+ }> & import("#app").ObjectPlugin<{
5
5
  cookies: State;
6
6
  }>;
7
7
  export default _default;
@@ -67,3 +67,13 @@ export interface State {
67
67
  locale: Ref<Locale>;
68
68
  moduleOptions: ModuleOptions;
69
69
  }
70
+ declare module '#app' {
71
+ interface NuxtApp {
72
+ $cookies: State;
73
+ }
74
+ }
75
+ declare module 'vue' {
76
+ interface ComponentCustomProperties {
77
+ $cookies: State;
78
+ }
79
+ }
package/dist/types.d.mts CHANGED
@@ -1,205 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
1
2
 
2
- import type { } from './module.js'
3
+ import type { default as Module } from './module.js'
3
4
 
4
- export interface ModuleOptions {
5
- /** @default "bottom-full" */
6
- barPosition: string,
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
7
6
 
8
- /** @default false */
9
- closeModalOnClickOutside: boolean,
10
-
11
- colors: {
12
- /** @default "#000" */
13
- barBackground: string,
14
-
15
- /** @default "#fff" */
16
- barButtonBackground: string,
17
-
18
- /** @default "#000" */
19
- barButtonColor: string,
20
-
21
- /** @default "#333" */
22
- barButtonHoverBackground: string,
23
-
24
- /** @default "#fff" */
25
- barButtonHoverColor: string,
26
-
27
- /** @default "#fff" */
28
- barTextColor: string,
29
-
30
- /** @default "#000" */
31
- checkboxActiveBackground: string,
32
-
33
- /** @default "#fff" */
34
- checkboxActiveCircleBackground: string,
35
-
36
- /** @default "#ddd" */
37
- checkboxDisabledBackground: string,
38
-
39
- /** @default "#fff" */
40
- checkboxDisabledCircleBackground: string,
41
-
42
- /** @default "#000" */
43
- checkboxInactiveBackground: string,
44
-
45
- /** @default "#fff" */
46
- checkboxInactiveCircleBackground: string,
47
-
48
- /** @default "#fff" */
49
- controlButtonBackground: string,
50
-
51
- /** @default "#000" */
52
- controlButtonHoverBackground: string,
53
-
54
- /** @default "#000" */
55
- controlButtonIconColor: string,
56
-
57
- /** @default "#fff" */
58
- controlButtonIconHoverColor: string,
59
-
60
- /** @default "#808080" */
61
- focusRingColor: string,
62
-
63
- /** @default "#fff" */
64
- modalBackground: string,
65
-
66
- /** @default "#000" */
67
- modalButtonBackground: string,
68
-
69
- /** @default "#fff" */
70
- modalButtonColor: string,
71
-
72
- /** @default "#333" */
73
- modalButtonHoverBackground: string,
74
-
75
- /** @default "#fff" */
76
- modalButtonHoverColor: string,
77
-
78
- /** @default "#000" */
79
- modalOverlay: string,
80
-
81
- /** @default 0.8 */
82
- modalOverlayOpacity: number,
83
-
84
- /** @default "#000" */
85
- modalTextColor: string,
86
-
87
- /** @default "#fff" */
88
- modalUnsavedColor: string,
89
- },
90
-
91
- cookies: {
92
- necessary: Array<any>,
93
-
94
- optional: Array<any>,
95
- },
96
-
97
- /** @default 31536000000 */
98
- cookieExpiryOffsetMs: number,
99
-
100
- /** @default "ncc_c" */
101
- cookieNameIsConsentGiven: string,
102
-
103
- /** @default "ncc_e" */
104
- cookieNameCookiesEnabledIds: string,
105
-
106
- cookieOptions: {
107
- /** @default "/" */
108
- path: string,
109
-
110
- /** @default "strict" */
111
- sameSite: string,
112
-
113
- /** @default true */
114
- secure: boolean,
115
- },
116
-
117
- /** @default true */
118
- isAcceptNecessaryButtonEnabled: boolean,
119
-
120
- /** @default true */
121
- isControlButtonEnabled: boolean,
122
-
123
- /** @default false */
124
- isCookieIdVisible: boolean,
125
-
126
- /** @default true */
127
- isCssEnabled: boolean,
128
-
129
- /** @default false */
130
- isCssPonyfillEnabled: boolean,
131
-
132
- /** @default true */
133
- isDashInDescriptionEnabled: boolean,
134
-
135
- /** @default false */
136
- isIframeBlocked: boolean,
137
-
138
- /** @default false */
139
- isModalForced: boolean,
140
-
141
- /** @default ["en"] */
142
- locales: Array<string>,
143
-
144
- localeTexts: {
145
- en: {
146
- /** @default "Accept" */
147
- accept: string,
148
-
149
- /** @default "Accept all" */
150
- acceptAll: string,
151
-
152
- /** @default "We use our own cookies and third-party cookies so that we can display this website correctly and better understand how this website is used, with a view to improving the services we offer. A decision on cookie usage permissions can be changed anytime using the cookie button that will appear after a selection has been made on this banner." */
153
- bannerDescription: string,
154
-
155
- /** @default "Cookies" */
156
- bannerTitle: string,
157
-
158
- /** @default "Close" */
159
- close: string,
160
-
161
- /** @default "Functional cookies" */
162
- cookiesFunctional: string,
163
-
164
- /** @default "Necessary cookies" */
165
- cookiesNecessary: string,
166
-
167
- /** @default "Optional cookies" */
168
- cookiesOptional: string,
169
-
170
- /** @default "Decline" */
171
- decline: string,
172
-
173
- /** @default "Decline all" */
174
- declineAll: string,
175
-
176
- /** @default "here" */
177
- here: string,
178
-
179
- /** @default "To see this, please enable functional cookies" */
180
- iframeBlocked: string,
181
-
182
- /** @default "Learn more and customize" */
183
- manageCookies: string,
184
-
185
- /** @default "Save" */
186
- save: string,
187
-
188
- /** @default "You have unsaved settings" */
189
- settingsUnsaved: string,
190
- },
191
- },
192
- }
193
-
194
- declare module '@nuxt/schema' {
195
- interface NuxtConfig { ['cookieControl']?: Partial<ModuleOptions> }
196
- interface NuxtOptions { ['cookieControl']?: ModuleOptions }
197
- }
198
-
199
- declare module 'nuxt/schema' {
200
- interface NuxtConfig { ['cookieControl']?: Partial<ModuleOptions> }
201
- interface NuxtOptions { ['cookieControl']?: ModuleOptions }
202
- }
203
-
204
-
205
- export type { default } from './module.js'
7
+ export { default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,205 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
1
2
 
2
- import type { } from './module'
3
+ import type { default as Module } from './module'
3
4
 
4
- export interface ModuleOptions {
5
- /** @default "bottom-full" */
6
- barPosition: string,
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
7
6
 
8
- /** @default false */
9
- closeModalOnClickOutside: boolean,
10
-
11
- colors: {
12
- /** @default "#000" */
13
- barBackground: string,
14
-
15
- /** @default "#fff" */
16
- barButtonBackground: string,
17
-
18
- /** @default "#000" */
19
- barButtonColor: string,
20
-
21
- /** @default "#333" */
22
- barButtonHoverBackground: string,
23
-
24
- /** @default "#fff" */
25
- barButtonHoverColor: string,
26
-
27
- /** @default "#fff" */
28
- barTextColor: string,
29
-
30
- /** @default "#000" */
31
- checkboxActiveBackground: string,
32
-
33
- /** @default "#fff" */
34
- checkboxActiveCircleBackground: string,
35
-
36
- /** @default "#ddd" */
37
- checkboxDisabledBackground: string,
38
-
39
- /** @default "#fff" */
40
- checkboxDisabledCircleBackground: string,
41
-
42
- /** @default "#000" */
43
- checkboxInactiveBackground: string,
44
-
45
- /** @default "#fff" */
46
- checkboxInactiveCircleBackground: string,
47
-
48
- /** @default "#fff" */
49
- controlButtonBackground: string,
50
-
51
- /** @default "#000" */
52
- controlButtonHoverBackground: string,
53
-
54
- /** @default "#000" */
55
- controlButtonIconColor: string,
56
-
57
- /** @default "#fff" */
58
- controlButtonIconHoverColor: string,
59
-
60
- /** @default "#808080" */
61
- focusRingColor: string,
62
-
63
- /** @default "#fff" */
64
- modalBackground: string,
65
-
66
- /** @default "#000" */
67
- modalButtonBackground: string,
68
-
69
- /** @default "#fff" */
70
- modalButtonColor: string,
71
-
72
- /** @default "#333" */
73
- modalButtonHoverBackground: string,
74
-
75
- /** @default "#fff" */
76
- modalButtonHoverColor: string,
77
-
78
- /** @default "#000" */
79
- modalOverlay: string,
80
-
81
- /** @default 0.8 */
82
- modalOverlayOpacity: number,
83
-
84
- /** @default "#000" */
85
- modalTextColor: string,
86
-
87
- /** @default "#fff" */
88
- modalUnsavedColor: string,
89
- },
90
-
91
- cookies: {
92
- necessary: Array<any>,
93
-
94
- optional: Array<any>,
95
- },
96
-
97
- /** @default 31536000000 */
98
- cookieExpiryOffsetMs: number,
99
-
100
- /** @default "ncc_c" */
101
- cookieNameIsConsentGiven: string,
102
-
103
- /** @default "ncc_e" */
104
- cookieNameCookiesEnabledIds: string,
105
-
106
- cookieOptions: {
107
- /** @default "/" */
108
- path: string,
109
-
110
- /** @default "strict" */
111
- sameSite: string,
112
-
113
- /** @default true */
114
- secure: boolean,
115
- },
116
-
117
- /** @default true */
118
- isAcceptNecessaryButtonEnabled: boolean,
119
-
120
- /** @default true */
121
- isControlButtonEnabled: boolean,
122
-
123
- /** @default false */
124
- isCookieIdVisible: boolean,
125
-
126
- /** @default true */
127
- isCssEnabled: boolean,
128
-
129
- /** @default false */
130
- isCssPonyfillEnabled: boolean,
131
-
132
- /** @default true */
133
- isDashInDescriptionEnabled: boolean,
134
-
135
- /** @default false */
136
- isIframeBlocked: boolean,
137
-
138
- /** @default false */
139
- isModalForced: boolean,
140
-
141
- /** @default ["en"] */
142
- locales: Array<string>,
143
-
144
- localeTexts: {
145
- en: {
146
- /** @default "Accept" */
147
- accept: string,
148
-
149
- /** @default "Accept all" */
150
- acceptAll: string,
151
-
152
- /** @default "We use our own cookies and third-party cookies so that we can display this website correctly and better understand how this website is used, with a view to improving the services we offer. A decision on cookie usage permissions can be changed anytime using the cookie button that will appear after a selection has been made on this banner." */
153
- bannerDescription: string,
154
-
155
- /** @default "Cookies" */
156
- bannerTitle: string,
157
-
158
- /** @default "Close" */
159
- close: string,
160
-
161
- /** @default "Functional cookies" */
162
- cookiesFunctional: string,
163
-
164
- /** @default "Necessary cookies" */
165
- cookiesNecessary: string,
166
-
167
- /** @default "Optional cookies" */
168
- cookiesOptional: string,
169
-
170
- /** @default "Decline" */
171
- decline: string,
172
-
173
- /** @default "Decline all" */
174
- declineAll: string,
175
-
176
- /** @default "here" */
177
- here: string,
178
-
179
- /** @default "To see this, please enable functional cookies" */
180
- iframeBlocked: string,
181
-
182
- /** @default "Learn more and customize" */
183
- manageCookies: string,
184
-
185
- /** @default "Save" */
186
- save: string,
187
-
188
- /** @default "You have unsaved settings" */
189
- settingsUnsaved: string,
190
- },
191
- },
192
- }
193
-
194
- declare module '@nuxt/schema' {
195
- interface NuxtConfig { ['cookieControl']?: Partial<ModuleOptions> }
196
- interface NuxtOptions { ['cookieControl']?: ModuleOptions }
197
- }
198
-
199
- declare module 'nuxt/schema' {
200
- interface NuxtConfig { ['cookieControl']?: Partial<ModuleOptions> }
201
- interface NuxtOptions { ['cookieControl']?: ModuleOptions }
202
- }
203
-
204
-
205
- export type { default } from './module'
7
+ export { default } from './module'
package/package.json CHANGED
@@ -15,26 +15,26 @@
15
15
  "@commitlint/config-conventional": "19.2.2",
16
16
  "@dargmuesli/nuxt-cookie-control": "link:",
17
17
  "@nuxt/eslint-config": "0.3.13",
18
- "@nuxt/module-builder": "0.7.1",
19
- "@nuxt/schema": "3.12.1",
18
+ "@nuxt/module-builder": "0.8.1",
19
+ "@nuxt/schema": "3.12.2",
20
20
  "@semantic-release/changelog": "6.0.3",
21
21
  "@semantic-release/commit-analyzer": "13.0.0",
22
22
  "@semantic-release/git": "10.0.1",
23
23
  "@semantic-release/github": "10.0.6",
24
24
  "@semantic-release/npm": "12.0.1",
25
- "@semantic-release/release-notes-generator": "14.0.0",
26
- "eslint": "9.4.0",
25
+ "@semantic-release/release-notes-generator": "14.0.1",
26
+ "eslint": "9.6.0",
27
27
  "eslint-config-prettier": "9.1.0",
28
28
  "eslint-plugin-prettier": "5.1.3",
29
29
  "husky": "9.0.11",
30
- "lint-staged": "15.2.6",
31
- "nuxt": "3.12.1",
30
+ "lint-staged": "15.2.7",
31
+ "nuxt": "3.12.2",
32
32
  "prettier": "3.3.2",
33
33
  "semantic-release": "24.0.0",
34
- "vite": "5.2.13",
35
- "vue": "3.4.27",
36
- "vue-tsc": "2.0.21",
37
- "webpack": "5.92.0"
34
+ "vite": "5.3.2",
35
+ "vue": "3.4.31",
36
+ "vue-tsc": "2.0.24",
37
+ "webpack": "5.92.1"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=16"
@@ -69,13 +69,13 @@
69
69
  "Jonas Thelemann"
70
70
  ],
71
71
  "name": "@dargmuesli/nuxt-cookie-control",
72
- "packageManager": "pnpm@9.3.0",
72
+ "packageManager": "pnpm@9.4.0",
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
76
  "repository": "https://github.com/dargmuesli/nuxt-cookie-control",
77
77
  "resolutions": {
78
- "@nuxt/kit": "3.12.1"
78
+ "@nuxt/kit": "3.12.2"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "nuxt-module-build build",
@@ -89,5 +89,5 @@
89
89
  },
90
90
  "type": "module",
91
91
  "types": "./dist/types.d.ts",
92
- "version": "8.4.2"
92
+ "version": "8.4.4"
93
93
  }