@dargmuesli/nuxt-cookie-control 10.0.0-beta.4 → 10.0.0-beta.5
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.d.mts +2 -67
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -63
- package/dist/runtime/types.d.ts +1 -0
- package/dist/runtime/types.js +1 -0
- package/package.json +13 -23
package/dist/module.d.mts
CHANGED
|
@@ -1,74 +1,9 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type Locale = 'ar' | 'az' | 'be' | 'bg' | 'ca' | 'cs' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'km' | 'ko' | 'lt' | 'nl' | 'no' | 'oc' | 'pt' | 'pl' | 'ro' | 'rs' | 'ru' | 'sk' | 'sv' | 'tr' | 'uk' | 'zh';
|
|
5
|
-
type PartialRecord<K extends string | number | symbol, T> = Partial<Record<K, T>>;
|
|
6
|
-
type Translatable = string | PartialRecord<Locale, string>;
|
|
7
|
-
interface Cookie {
|
|
8
|
-
description?: Translatable;
|
|
9
|
-
id: string;
|
|
10
|
-
isPreselected?: boolean;
|
|
11
|
-
name: Translatable;
|
|
12
|
-
links?: Record<string, string | null>;
|
|
13
|
-
src?: string;
|
|
14
|
-
targetCookieIds?: string[];
|
|
15
|
-
}
|
|
16
|
-
interface LocaleStrings {
|
|
17
|
-
accept: string;
|
|
18
|
-
acceptAll: string;
|
|
19
|
-
bannerDescription: string;
|
|
20
|
-
bannerTitle: string;
|
|
21
|
-
buttonCookies: string;
|
|
22
|
-
close: string;
|
|
23
|
-
cookiesFunctional: string;
|
|
24
|
-
cookiesNecessary: string;
|
|
25
|
-
cookiesOptional: string;
|
|
26
|
-
iframeBlocked: string;
|
|
27
|
-
decline: string;
|
|
28
|
-
declineAll: string;
|
|
29
|
-
here: string;
|
|
30
|
-
manageCookies: string;
|
|
31
|
-
modalTitle: string;
|
|
32
|
-
save: string;
|
|
33
|
-
settingsUnsaved: string;
|
|
34
|
-
}
|
|
35
|
-
interface ModuleOptions {
|
|
36
|
-
_isPrerendered: boolean | undefined;
|
|
37
|
-
barPosition: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
|
|
38
|
-
/**
|
|
39
|
-
* Position of the control button.
|
|
40
|
-
* 'top-left', 'top-right', 'bottom-left', 'bottom-right', or undefined.
|
|
41
|
-
* @default 'bottom-right'
|
|
42
|
-
*/
|
|
43
|
-
controlButtonPosition: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
44
|
-
closeModalOnClickOutside: boolean;
|
|
45
|
-
colors: false | Record<string, unknown>;
|
|
46
|
-
cookieExpiryOffsetMs: number;
|
|
47
|
-
cookieNameCookiesEnabledIds: string;
|
|
48
|
-
cookieNameIsConsentGiven: string;
|
|
49
|
-
cookies: {
|
|
50
|
-
necessary: Cookie[];
|
|
51
|
-
optional: Cookie[];
|
|
52
|
-
};
|
|
53
|
-
cookieOptions: CookieOptions & {
|
|
54
|
-
readonly?: false;
|
|
55
|
-
};
|
|
56
|
-
isAcceptNecessaryButtonEnabled: boolean;
|
|
57
|
-
isControlButtonEnabled: boolean;
|
|
58
|
-
isCookieIdVisible: boolean;
|
|
59
|
-
isCssEnabled: boolean;
|
|
60
|
-
isCssPonyfillEnabled: boolean;
|
|
61
|
-
isDashInDescriptionEnabled: boolean;
|
|
62
|
-
isIframeBlocked: boolean;
|
|
63
|
-
isModalForced: boolean;
|
|
64
|
-
declineAllAcceptsNecessary: boolean;
|
|
65
|
-
locales: Locale[];
|
|
66
|
-
localeTexts: PartialRecord<Locale, Partial<LocaleStrings>>;
|
|
67
|
-
}
|
|
2
|
+
import { ModuleOptions } from '../dist/runtime/types.js';
|
|
68
3
|
|
|
69
4
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
70
5
|
|
|
71
|
-
declare module '
|
|
6
|
+
declare module 'nuxt/schema' {
|
|
72
7
|
interface PublicRuntimeConfig {
|
|
73
8
|
cookieControl: ModuleOptions;
|
|
74
9
|
}
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,9 +2,8 @@ import { resolve } from 'node:path';
|
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
import { createResolver, defineNuxtModule, addPlugin, addImports, addTypeTemplate, updateTemplates, extendWebpackConfig, extendViteConfig, resolvePath } from '@nuxt/kit';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const CONFIG_KEY = "cookieControl";
|
|
5
|
+
import { CONFIG_KEY } from '../dist/runtime/constants.js';
|
|
6
|
+
import { DEFAULTS } from '../dist/runtime/types.js';
|
|
8
7
|
|
|
9
8
|
const execSrcReplacements = (src, replacements) => {
|
|
10
9
|
for (const replacement of replacements) {
|
|
@@ -46,67 +45,8 @@ const replaceCodePlugin = (config) => {
|
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
47
|
|
|
49
|
-
const DEFAULTS = {
|
|
50
|
-
_isPrerendered: void 0,
|
|
51
|
-
barPosition: "bottom-full",
|
|
52
|
-
controlButtonPosition: "bottom-right",
|
|
53
|
-
closeModalOnClickOutside: false,
|
|
54
|
-
colors: {
|
|
55
|
-
barBackground: "#000",
|
|
56
|
-
barButtonBackground: "#fff",
|
|
57
|
-
barButtonColor: "#000",
|
|
58
|
-
barButtonHoverBackground: "#333",
|
|
59
|
-
barButtonHoverColor: "#fff",
|
|
60
|
-
barTextColor: "#fff",
|
|
61
|
-
checkboxActiveBackground: "#000",
|
|
62
|
-
checkboxActiveCircleBackground: "#fff",
|
|
63
|
-
checkboxDisabledBackground: "#ddd",
|
|
64
|
-
checkboxDisabledCircleBackground: "#fff",
|
|
65
|
-
checkboxInactiveBackground: "#000",
|
|
66
|
-
checkboxInactiveCircleBackground: "#fff",
|
|
67
|
-
controlButtonBackground: "#fff",
|
|
68
|
-
controlButtonHoverBackground: "#000",
|
|
69
|
-
controlButtonIconColor: "#000",
|
|
70
|
-
controlButtonIconHoverColor: "#fff",
|
|
71
|
-
focusRingColor: "#808080",
|
|
72
|
-
modalBackground: "#fff",
|
|
73
|
-
modalButtonBackground: "#000",
|
|
74
|
-
modalButtonColor: "#fff",
|
|
75
|
-
modalButtonHoverBackground: "#333",
|
|
76
|
-
modalButtonHoverColor: "#fff",
|
|
77
|
-
modalOverlay: "#000",
|
|
78
|
-
modalOverlayOpacity: 0.8,
|
|
79
|
-
modalTextColor: "#000",
|
|
80
|
-
modalUnsavedColor: "#fff"
|
|
81
|
-
},
|
|
82
|
-
cookies: {
|
|
83
|
-
necessary: [],
|
|
84
|
-
optional: []
|
|
85
|
-
},
|
|
86
|
-
cookieExpiryOffsetMs: 1e3 * 60 * 60 * 24 * 365,
|
|
87
|
-
// one year
|
|
88
|
-
cookieNameIsConsentGiven: "ncc_c",
|
|
89
|
-
cookieNameCookiesEnabledIds: "ncc_e",
|
|
90
|
-
cookieOptions: {
|
|
91
|
-
path: "/",
|
|
92
|
-
sameSite: "strict",
|
|
93
|
-
secure: process.env.NODE_ENV === "development" ? void 0 : true
|
|
94
|
-
},
|
|
95
|
-
isAcceptNecessaryButtonEnabled: true,
|
|
96
|
-
isControlButtonEnabled: true,
|
|
97
|
-
isCookieIdVisible: false,
|
|
98
|
-
isCssEnabled: true,
|
|
99
|
-
isCssPonyfillEnabled: false,
|
|
100
|
-
isDashInDescriptionEnabled: true,
|
|
101
|
-
isIframeBlocked: false,
|
|
102
|
-
isModalForced: false,
|
|
103
|
-
declineAllAcceptsNecessary: false,
|
|
104
|
-
locales: ["en"],
|
|
105
|
-
localeTexts: { en }
|
|
106
|
-
};
|
|
107
|
-
|
|
108
48
|
const name = "@dargmuesli/nuxt-cookie-control";
|
|
109
|
-
const version = "10.0.0-beta.
|
|
49
|
+
const version = "10.0.0-beta.5";
|
|
110
50
|
|
|
111
51
|
const resolver = createResolver(import.meta.url);
|
|
112
52
|
const runtimeDir = resolver.resolve("./runtime");
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface LocaleStrings {
|
|
|
36
36
|
settingsUnsaved: string;
|
|
37
37
|
}
|
|
38
38
|
export interface ModuleOptions {
|
|
39
|
+
_isPrerendered: boolean | undefined;
|
|
39
40
|
barPosition: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
|
|
40
41
|
/**
|
|
41
42
|
* Position of the control button.
|
package/dist/runtime/types.js
CHANGED
package/package.json
CHANGED
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
},
|
|
12
12
|
"description": "Nuxt Cookie Control Module",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@commitlint/cli": "
|
|
15
|
-
"@commitlint/config-conventional": "
|
|
14
|
+
"@commitlint/cli": "21.0.0",
|
|
15
|
+
"@commitlint/config-conventional": "21.0.0",
|
|
16
16
|
"@dargmuesli/nuxt-cookie-control": "link:",
|
|
17
17
|
"@nuxt/eslint-config": "1.15.2",
|
|
18
18
|
"@nuxt/module-builder": "1.0.2",
|
|
19
|
-
"@nuxt/schema": "4.
|
|
20
|
-
"eslint": "10.0
|
|
19
|
+
"@nuxt/schema": "4.4.4",
|
|
20
|
+
"eslint": "10.3.0",
|
|
21
21
|
"eslint-config-prettier": "10.1.8",
|
|
22
22
|
"eslint-plugin-prettier": "5.5.5",
|
|
23
23
|
"husky": "9.1.7",
|
|
24
|
-
"lint-staged": "
|
|
25
|
-
"nuxt": "4.
|
|
26
|
-
"prettier": "3.8.
|
|
27
|
-
"vite": "
|
|
28
|
-
"vue": "3.5.
|
|
29
|
-
"vue-tsc": "3.2.
|
|
30
|
-
"webpack": "5.
|
|
24
|
+
"lint-staged": "17.0.3",
|
|
25
|
+
"nuxt": "4.4.4",
|
|
26
|
+
"prettier": "3.8.3",
|
|
27
|
+
"vite": "8.0.11",
|
|
28
|
+
"vue": "3.5.34",
|
|
29
|
+
"vue-tsc": "3.2.8",
|
|
30
|
+
"webpack": "5.106.2"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=16"
|
|
@@ -56,21 +56,11 @@
|
|
|
56
56
|
"Jonas Thelemann"
|
|
57
57
|
],
|
|
58
58
|
"name": "@dargmuesli/nuxt-cookie-control",
|
|
59
|
-
"packageManager": "pnpm@
|
|
60
|
-
"pnpm": {
|
|
61
|
-
"ignoredBuiltDependencies": [
|
|
62
|
-
"@parcel/watcher",
|
|
63
|
-
"esbuild",
|
|
64
|
-
"unrs-resolver"
|
|
65
|
-
]
|
|
66
|
-
},
|
|
59
|
+
"packageManager": "pnpm@11.0.8",
|
|
67
60
|
"publishConfig": {
|
|
68
61
|
"access": "public"
|
|
69
62
|
},
|
|
70
63
|
"repository": "https://github.com/dargmuesli/nuxt-cookie-control",
|
|
71
|
-
"resolutions": {
|
|
72
|
-
"@nuxt/kit": "^4.0.0"
|
|
73
|
-
},
|
|
74
64
|
"scripts": {
|
|
75
65
|
"build": "nuxt-module-build build",
|
|
76
66
|
"dev": "pnpm --dir playground run dev",
|
|
@@ -89,5 +79,5 @@
|
|
|
89
79
|
]
|
|
90
80
|
}
|
|
91
81
|
},
|
|
92
|
-
"version": "10.0.0-beta.
|
|
82
|
+
"version": "10.0.0-beta.5"
|
|
93
83
|
}
|