@dargmuesli/nuxt-cookie-control 10.0.0-beta.2 → 10.0.0-beta.3

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
@@ -162,10 +162,10 @@ cookieNameCookiesEnabledIds: 'ncc_e',
162
162
  cookieOptions: {
163
163
  path: '/',
164
164
  sameSite: 'strict',
165
- }
165
+ },
166
166
 
167
167
  // Switch to toggle the "accept necessary" button.
168
- isAcceptNecessaryButtonEnabled: true
168
+ isAcceptNecessaryButtonEnabled: true,
169
169
 
170
170
  // Switch to toggle the button that opens the configuration modal.
171
171
  isControlButtonEnabled: true,
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "10.0.0-beta.2",
3
+ "version": "10.0.0-beta.3",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
package/dist/module.mjs CHANGED
@@ -106,11 +106,11 @@ const DEFAULTS = {
106
106
  };
107
107
 
108
108
  const name = "@dargmuesli/nuxt-cookie-control";
109
- const version = "10.0.0-beta.2";
109
+ const version = "10.0.0-beta.3";
110
110
 
111
111
  const resolver = createResolver(import.meta.url);
112
112
  const runtimeDir = resolver.resolve("./runtime");
113
- const module = defineNuxtModule({
113
+ const module$1 = defineNuxtModule({
114
114
  meta: {
115
115
  name,
116
116
  version,
@@ -231,4 +231,4 @@ const pushCss = (moduleOptions, nuxt) => {
231
231
  nuxt.options.css.push(resolver.resolve(runtimeDir, "styles.css"));
232
232
  };
233
233
 
234
- export { module as default };
234
+ export { module$1 as default };
@@ -0,0 +1,15 @@
1
+ declare var __VLS_1: {}, __VLS_9: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ default?: (props: typeof __VLS_9) => any;
6
+ };
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -4,8 +4,9 @@ type __VLS_Slots = {} & {
4
4
  } & {
5
5
  default?: (props: typeof __VLS_9) => any;
6
6
  };
7
- declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
10
11
  type __VLS_WithSlots<T, S> = T & {
11
12
  new (): {
@@ -0,0 +1,29 @@
1
+ import type { Locale } from '#cookie-control/types';
2
+ type __VLS_Props = {
3
+ locale?: Locale;
4
+ };
5
+ declare var __VLS_11: {}, __VLS_13: {}, __VLS_20: {}, __VLS_22: {
6
+ cookie: any;
7
+ };
8
+ type __VLS_Slots = {} & {
9
+ bar?: (props: typeof __VLS_11) => any;
10
+ } & {
11
+ controlButton?: (props: typeof __VLS_13) => any;
12
+ } & {
13
+ modal?: (props: typeof __VLS_20) => any;
14
+ } & {
15
+ cookie?: (props: typeof __VLS_22) => any;
16
+ };
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
18
+ accept: () => void;
19
+ acceptPartial: () => void;
20
+ decline: () => void;
21
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -54,154 +54,156 @@
54
54
  </svg>
55
55
  </slot>
56
56
  </button>
57
- <transition name="cookieControl__Modal">
58
- <div
59
- v-if="isModalActive"
60
- class="cookieControl__Modal"
61
- @click.self="onModalClick"
62
- >
63
- <p
64
- v-if="isSaved"
65
- class="cookieControl__ModalUnsaved"
66
- v-text="localeStrings?.settingsUnsaved"
67
- />
68
- <div class="cookieControl__ModalContent">
69
- <div class="cookieControl__ModalContentInner">
70
- <slot name="modal" />
71
- <button
72
- v-if="!moduleOptions.isModalForced"
73
- class="cookieControl__ModalClose"
74
- type="button"
75
- @click="isModalActive = false"
76
- v-text="localeStrings?.close"
77
- />
78
- <template v-for="cookieType in CookieType" :key="cookieType">
79
- <template v-if="moduleOptions.cookies[cookieType].length">
80
- <h2
81
- v-text="
57
+ <dialog ref="dialog" @close="isModalActive = false">
58
+ <transition name="cookieControl__Modal">
59
+ <div
60
+ v-if="isModalActive"
61
+ class="cookieControl__Modal"
62
+ @click.self="onModalClick"
63
+ >
64
+ <p
65
+ v-if="isSaved"
66
+ class="cookieControl__ModalUnsaved"
67
+ v-text="localeStrings?.settingsUnsaved"
68
+ />
69
+ <div class="cookieControl__ModalContent">
70
+ <div class="cookieControl__ModalContentInner">
71
+ <slot name="modal" />
72
+ <button
73
+ v-if="!moduleOptions.isModalForced"
74
+ class="cookieControl__ModalClose"
75
+ type="button"
76
+ @click="isModalActive = false"
77
+ v-text="localeStrings?.close"
78
+ />
79
+ <template v-for="cookieType in CookieType" :key="cookieType">
80
+ <template v-if="moduleOptions.cookies[cookieType].length">
81
+ <h2
82
+ v-text="
82
83
  localeStrings && (cookieType === CookieType.NECESSARY ? localeStrings.cookiesNecessary : localeStrings.cookiesOptional)
83
84
  "
84
- />
85
- <ul>
86
- <li
87
- v-for="cookie in moduleOptions.cookies[cookieType]"
88
- :key="cookie.id"
89
- >
90
- <slot name="cookie" v-bind="{ cookie }">
91
- <div class="cookieControl__ModalInputWrapper">
92
- <input
93
- v-if="
85
+ />
86
+ <ul>
87
+ <li
88
+ v-for="cookie in moduleOptions.cookies[cookieType]"
89
+ :key="cookie.id"
90
+ >
91
+ <slot name="cookie" v-bind="{ cookie }">
92
+ <div class="cookieControl__ModalInputWrapper">
93
+ <input
94
+ v-if="
94
95
  cookieType === CookieType.NECESSARY && cookie.name !== 'functional'
95
96
  "
96
- :id="resolveTranslatable(cookie.name, locale)"
97
- type="checkbox"
98
- disabled
99
- checked
100
- />
101
- <input
102
- v-else
103
- :id="resolveTranslatable(cookie.name, locale)"
104
- type="checkbox"
105
- :checked="
97
+ :id="resolveTranslatable(cookie.name, locale)"
98
+ type="checkbox"
99
+ disabled
100
+ checked
101
+ />
102
+ <input
103
+ v-else
104
+ :id="resolveTranslatable(cookie.name, locale)"
105
+ type="checkbox"
106
+ :checked="
106
107
  getCookieIds(localCookiesEnabled).includes(
107
108
  cookie.id
108
109
  )
109
110
  "
110
- @change="toggleCookie(cookie)"
111
- />
112
- <button type="button" @click="toggleButton($event)">
113
- {{ getName(cookie.name) }}
114
- </button>
115
- <label
116
- class="cookieControl__ModalCookieName"
117
- :for="resolveTranslatable(cookie.name, locale)"
118
- tabindex="0"
119
- @keydown="toggleLabel($event)"
120
- >
121
- {{ getName(cookie.name) }}
122
- <span v-if="cookie.description">
123
- {{ getDescription(cookie.description) }}
124
- </span>
125
- <span
126
- v-if="
127
- moduleOptions.isCookieIdVisible && cookie.targetCookieIds
128
- "
129
- >
130
- <br />
131
- {{
132
- "IDs: " + cookie.targetCookieIds.map((id) => `"${id}"`).join(", ")
133
- }}
134
- </span>
135
- <template
136
- v-if="Object.entries(cookie.links || {}).length"
111
+ @change="toggleCookie(cookie)"
112
+ />
113
+ <button type="button" @click="toggleButton($event)">
114
+ {{ getName(cookie.name) }}
115
+ </button>
116
+ <label
117
+ class="cookieControl__ModalCookieName"
118
+ :for="resolveTranslatable(cookie.name, locale)"
119
+ tabindex="0"
120
+ @keydown="toggleLabel($event)"
137
121
  >
122
+ {{ getName(cookie.name) }}
123
+ <span v-if="cookie.description">
124
+ {{ getDescription(cookie.description) }}
125
+ </span>
138
126
  <span
139
- v-for="entry in Object.entries(
140
- cookie.links || {}
141
- )"
142
- :key="entry[0]"
127
+ v-if="
128
+ moduleOptions.isCookieIdVisible && cookie.targetCookieIds
129
+ "
143
130
  >
144
131
  <br />
145
- <NuxtLink
146
- :to="entry[0]"
147
- @click="
132
+ {{
133
+ "IDs: " + cookie.targetCookieIds.map((id) => `"${id}"`).join(", ")
134
+ }}
135
+ </span>
136
+ <template
137
+ v-if="Object.entries(cookie.links || {}).length"
138
+ >
139
+ <span
140
+ v-for="entry in Object.entries(
141
+ cookie.links || {}
142
+ )"
143
+ :key="entry[0]"
144
+ >
145
+ <br />
146
+ <NuxtLink
147
+ :to="entry[0]"
148
+ @click="
148
149
  !entry[0].toLowerCase().startsWith('http') ? isModalActive = false : null
149
150
  "
150
- >
151
- {{ entry[1] || entry[0] }}
152
- </NuxtLink>
153
- </span>
154
- </template>
155
- </label>
156
- </div>
157
- </slot>
158
- </li>
159
- </ul>
151
+ >
152
+ {{ entry[1] || entry[0] }}
153
+ </NuxtLink>
154
+ </span>
155
+ </template>
156
+ </label>
157
+ </div>
158
+ </slot>
159
+ </li>
160
+ </ul>
161
+ </template>
160
162
  </template>
161
- </template>
162
- <div class="cookieControl__ModalButtons">
163
- <button
164
- type="button"
165
- @click="
163
+ <div class="cookieControl__ModalButtons">
164
+ <button
165
+ type="button"
166
+ @click="
166
167
  () => {
167
168
  acceptPartial();
168
169
  isModalActive = false;
169
170
  }
170
171
  "
171
- v-text="localeStrings?.save"
172
- />
173
- <button
174
- type="button"
175
- @click="
172
+ v-text="localeStrings?.save"
173
+ />
174
+ <button
175
+ type="button"
176
+ @click="
176
177
  () => {
177
178
  acceptAll();
178
179
  isModalActive = false;
179
180
  }
180
181
  "
181
- v-text="localeStrings?.acceptAll"
182
- />
183
- <button
184
- v-if="!moduleOptions.isModalForced"
185
- type="button"
186
- @click="
182
+ v-text="localeStrings?.acceptAll"
183
+ />
184
+ <button
185
+ v-if="!moduleOptions.isModalForced"
186
+ type="button"
187
+ @click="
187
188
  () => {
188
189
  moduleOptions.declineAllAcceptsNecessary ? acceptNecessary() : acceptNone();
189
190
  isModalActive = false;
190
191
  }
191
192
  "
192
- v-text="localeStrings?.declineAll"
193
- />
193
+ v-text="localeStrings?.declineAll"
194
+ />
195
+ </div>
194
196
  </div>
195
197
  </div>
196
198
  </div>
197
- </div>
198
- </transition>
199
+ </transition>
200
+ </dialog>
199
201
  </aside>
200
202
  </ClientOnlyPrerender>
201
203
  </template>
202
204
 
203
205
  <script setup>
204
- import { ref, computed, onBeforeMount, watch } from "vue";
206
+ import { ref, computed, onBeforeMount, watch, useTemplateRef } from "vue";
205
207
  import ClientOnlyPrerender from "#cookie-control/components/ClientOnlyPrerender.vue";
206
208
  import { COOKIE_ID_SEPARATOR } from "#cookie-control/constants";
207
209
  import {
@@ -373,6 +375,16 @@ watch(isConsentGiven, (current, _previous) => {
373
375
  cookieIsConsentGiven.value = current ? allCookieIdsString : "0";
374
376
  }
375
377
  });
378
+ const templateRefDialog = useTemplateRef("dialog");
379
+ watch(isModalActive, (current, previous) => {
380
+ if (!templateRefDialog.value) return;
381
+ if (!previous && current && !templateRefDialog.value.open) {
382
+ templateRefDialog.value.showModal();
383
+ }
384
+ if (previous && !current && templateRefDialog.value.open) {
385
+ templateRefDialog.value.close();
386
+ }
387
+ });
376
388
  watch(
377
389
  () => locale,
378
390
  (locale2) => {
@@ -14,12 +14,13 @@ type __VLS_Slots = {} & {
14
14
  } & {
15
15
  cookie?: (props: typeof __VLS_22) => any;
16
16
  };
17
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
18
18
  accept: () => void;
19
19
  acceptPartial: () => void;
20
20
  decline: () => void;
21
21
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
23
24
  export default _default;
24
25
  type __VLS_WithSlots<T, S> = T & {
25
26
  new (): {
@@ -0,0 +1,13 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ iframe?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -2,8 +2,9 @@ declare var __VLS_6: {};
2
2
  type __VLS_Slots = {} & {
3
3
  iframe?: (props: typeof __VLS_6) => any;
4
4
  };
5
- declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
8
9
  type __VLS_WithSlots<T, S> = T & {
9
10
  new (): {
@@ -1,5 +1,5 @@
1
1
  export default {
2
- accept: "Kabul etmek",
2
+ accept: "Kabul et",
3
3
  acceptAll: "T\xFCm\xFCn\xFC kabul et",
4
4
  bannerDescription: "Bu web sitesini do\u011Fru bir \u015Fekilde g\xF6r\xFCnt\xFCleyebilmek ve teklifimizi geli\u015Ftirmek i\xE7in bu web sitesinin nas\u0131l kullan\u0131ld\u0131\u011F\u0131n\u0131 daha iyi anlayabilmek i\xE7in kendi ve \xFC\xE7\xFCnc\xFC taraf \xE7erezlerimizi kullan\u0131yoruz. \xC7erez kullanma izni ile ilgili karar, bu banner \xFCzerinde bir se\xE7im yap\u0131ld\u0131ktan sonra g\xF6r\xFCnen \xE7erez d\xFC\u011Fmesi arac\u0131l\u0131\u011F\u0131yla herhangi bir zamanda de\u011Fi\u015Ftirilebilir.",
5
5
  bannerTitle: "\xC7erezler",
@@ -7,9 +7,9 @@ export default {
7
7
  cookiesFunctional: "\u0130\u015Flevsel \xE7erezler",
8
8
  cookiesNecessary: "Gerekli \xE7erezler",
9
9
  cookiesOptional: "\u0130ste\u011Fe ba\u011Fl\u0131 \xE7erezler",
10
- decline: "Reddetmek",
10
+ decline: "Reddet",
11
11
  declineAll: "T\xFCm\xFCn\xFC reddet",
12
- here: "here",
12
+ here: "Burada",
13
13
  iframeBlocked: "Bunu g\xF6rmek i\xE7in l\xFCtfen i\u015Flevsel \xE7erezleri etkinle\u015Ftirin",
14
14
  manageCookies: "\xC7erezleri y\xF6net",
15
15
  save: "Kaydet",
package/package.json CHANGED
@@ -11,30 +11,30 @@
11
11
  },
12
12
  "description": "Nuxt Cookie Control Module",
13
13
  "devDependencies": {
14
- "@commitlint/cli": "19.8.1",
15
- "@commitlint/config-conventional": "19.8.1",
14
+ "@commitlint/cli": "20.1.0",
15
+ "@commitlint/config-conventional": "20.0.0",
16
16
  "@dargmuesli/nuxt-cookie-control": "link:",
17
- "@nuxt/eslint-config": "1.9.0",
17
+ "@nuxt/eslint-config": "1.10.0",
18
18
  "@nuxt/module-builder": "1.0.2",
19
- "@nuxt/schema": "4.0.3",
19
+ "@nuxt/schema": "4.2.1",
20
20
  "@semantic-release/changelog": "6.0.3",
21
21
  "@semantic-release/commit-analyzer": "13.0.1",
22
22
  "@semantic-release/git": "10.0.1",
23
- "@semantic-release/github": "11.0.4",
24
- "@semantic-release/npm": "12.0.2",
25
- "@semantic-release/release-notes-generator": "14.0.3",
26
- "eslint": "9.33.0",
23
+ "@semantic-release/github": "12.0.2",
24
+ "@semantic-release/npm": "13.1.1",
25
+ "@semantic-release/release-notes-generator": "14.1.0",
26
+ "eslint": "9.39.1",
27
27
  "eslint-config-prettier": "10.1.8",
28
28
  "eslint-plugin-prettier": "5.5.4",
29
29
  "husky": "9.1.7",
30
- "lint-staged": "16.1.5",
31
- "nuxt": "4.0.3",
30
+ "lint-staged": "16.2.6",
31
+ "nuxt": "4.2.1",
32
32
  "prettier": "3.6.2",
33
- "semantic-release": "24.2.7",
34
- "vite": "7.1.3",
35
- "vue": "3.5.18",
36
- "vue-tsc": "3.0.5",
37
- "webpack": "5.101.3"
33
+ "semantic-release": "25.0.2",
34
+ "vite": "7.2.2",
35
+ "vue": "3.5.24",
36
+ "vue-tsc": "3.1.3",
37
+ "webpack": "5.102.1"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=16"
@@ -63,7 +63,7 @@
63
63
  "Jonas Thelemann"
64
64
  ],
65
65
  "name": "@dargmuesli/nuxt-cookie-control",
66
- "packageManager": "pnpm@10.15.0",
66
+ "packageManager": "pnpm@10.21.0",
67
67
  "pnpm": {
68
68
  "ignoredBuiltDependencies": [
69
69
  "@parcel/watcher",
@@ -71,7 +71,7 @@
71
71
  "unrs-resolver"
72
72
  ],
73
73
  "overrides": {
74
- "@types/eslint": "npm:eslint@9.33.0"
74
+ "@types/eslint": "npm:eslint@9.39.1"
75
75
  }
76
76
  },
77
77
  "publishConfig": {
@@ -99,5 +99,5 @@
99
99
  ]
100
100
  }
101
101
  },
102
- "version": "10.0.0-beta.2"
102
+ "version": "10.0.0-beta.3"
103
103
  }