@koehler8/cms-ext-compliance 1.0.0-beta.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.
@@ -0,0 +1,15 @@
1
+ import Cookies from './Cookies.vue';
2
+ import Terms from './Terms.vue';
3
+ import Privacy from './Privacy.vue';
4
+ import Legal from './Legal.vue';
5
+ import CookieConsent from './CookieConsent.vue';
6
+
7
+ export default {
8
+ components: {
9
+ Cookies,
10
+ Terms,
11
+ Privacy,
12
+ Legal,
13
+ CookieConsent,
14
+ },
15
+ };
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "../../manifest.schema.json",
3
+ "slug": "compliance",
4
+ "version": "1.0.0",
5
+ "provider": {
6
+ "name": "Compliance Extension Suite",
7
+ "url": "https://github.com/koehler8",
8
+ "contact": "tucsonconsulting@gmail.com"
9
+ },
10
+ "entry": "./components/index.js",
11
+ "license": "MIT",
12
+ "components": [
13
+ {
14
+ "name": "Cookies",
15
+ "label": "Cookie Policy Content",
16
+ "description": "Rich-text block for cookie policy disclosures.",
17
+ "module": "./components/Cookies.vue",
18
+ "configKey": "cookies",
19
+ "allowedPages": ["cookies"]
20
+ },
21
+ {
22
+ "name": "Terms",
23
+ "label": "Terms of Service Content",
24
+ "description": "Terms of service detail view.",
25
+ "module": "./components/Terms.vue",
26
+ "configKey": "terms",
27
+ "allowedPages": ["terms"]
28
+ },
29
+ {
30
+ "name": "Privacy",
31
+ "label": "Privacy Policy Content",
32
+ "description": "Detailed privacy policy layout with sections and metadata.",
33
+ "module": "./components/Privacy.vue",
34
+ "configKey": "privacy",
35
+ "allowedPages": ["privacy"]
36
+ },
37
+ {
38
+ "name": "Legal",
39
+ "label": "Legal Footer Bar",
40
+ "description": "Copyright notice and links to terms, privacy, and cookie policy pages.",
41
+ "module": "./components/Legal.vue",
42
+ "configKey": "legal"
43
+ },
44
+ {
45
+ "name": "CookieConsent",
46
+ "label": "Cookie Consent Banner",
47
+ "description": "Fixed-position cookie consent banner with accept/decline controls.",
48
+ "module": "./components/CookieConsent.vue",
49
+ "configKey": "cookieConsent"
50
+ }
51
+ ]
52
+ }
package/index.js ADDED
@@ -0,0 +1,33 @@
1
+ import { createApp, h } from 'vue';
2
+ import manifest from './extension.config.json' with { type: 'json' };
3
+ import CookieConsentBanner from './components/CookieConsent.vue';
4
+
5
+ // Explicit dynamic import map — import.meta.glob does not work for
6
+ // packages installed in node_modules, so we list each component path.
7
+ const components = {
8
+ './components/Cookies.vue': () => import('./components/Cookies.vue'),
9
+ './components/Terms.vue': () => import('./components/Terms.vue'),
10
+ './components/Privacy.vue': () => import('./components/Privacy.vue'),
11
+ './components/Legal.vue': () => import('./components/Legal.vue'),
12
+ './components/CookieConsent.vue': () => import('./components/CookieConsent.vue'),
13
+ './components/index.js': () => import('./components/index.js'),
14
+ };
15
+
16
+ /**
17
+ * Mount the cookie-consent banner as a standalone Vue instance appended to
18
+ * the document body. This replaces the previous hard-coded <CookieConsent />
19
+ * that lived in the base CMS App.vue.
20
+ */
21
+ function setup({ app, isClient }) {
22
+ if (!isClient) return;
23
+
24
+ const container = document.createElement('div');
25
+ container.id = 'compliance-cookie-consent';
26
+ document.body.appendChild(container);
27
+
28
+ const banner = createApp({ render: () => h(CookieConsentBanner) });
29
+ banner.mount(container);
30
+ }
31
+
32
+ export default { manifest, components, setup };
33
+ export { manifest };
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@koehler8/cms-ext-compliance",
3
+ "version": "1.0.0-beta.4",
4
+ "description": "Compliance extension for Vertex CMS — Cookie, Terms, and Privacy policy pages",
5
+ "license": "MIT",
6
+ "keywords": ["cms", "extension", "koehler8", "compliance", "privacy", "terms", "cookies"],
7
+ "bugs": {
8
+ "url": "https://github.com/koehler8/cms-ext-compliance/issues"
9
+ },
10
+ "type": "module",
11
+ "author": "Chris Koehler",
12
+ "homepage": "https://github.com/koehler8/cms-ext-compliance",
13
+ "exports": {
14
+ ".": "./index.js",
15
+ "./config": "./extension.config.json"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "extension.config.json",
20
+ "components",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "peerDependencies": {
25
+ "@koehler8/cms": "^1.0.0-beta.1"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/koehler8/cms-ext-compliance.git"
30
+ }
31
+ }