@koehler8/cms 1.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.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +202 -0
  3. package/bin/cms-generate-public-assets.js +27 -0
  4. package/bin/cms-validate-extensions.js +18 -0
  5. package/bin/cms-validate-themes.js +7 -0
  6. package/extensions/manifest.schema.json +125 -0
  7. package/package.json +84 -0
  8. package/public/img/preloaders/preloader-black.svg +1 -0
  9. package/public/img/preloaders/preloader-white.svg +1 -0
  10. package/public/robots.txt +5 -0
  11. package/scripts/check-overflow.mjs +33 -0
  12. package/scripts/generate-public-assets.js +401 -0
  13. package/scripts/patch-lru-cache-tla.js +164 -0
  14. package/scripts/validate-extensions.mjs +392 -0
  15. package/scripts/validate-themes.mjs +64 -0
  16. package/src/App.vue +3 -0
  17. package/src/components/About.vue +481 -0
  18. package/src/components/AboutValue.vue +361 -0
  19. package/src/components/BackToTop.vue +42 -0
  20. package/src/components/ComingSoon.vue +411 -0
  21. package/src/components/ComingSoonModal.vue +230 -0
  22. package/src/components/Contact.vue +518 -0
  23. package/src/components/Footer.vue +65 -0
  24. package/src/components/FooterMinimal.vue +153 -0
  25. package/src/components/Header.vue +583 -0
  26. package/src/components/Hero.vue +327 -0
  27. package/src/components/Home.vue +144 -0
  28. package/src/components/Intro.vue +130 -0
  29. package/src/components/IntroGate.vue +444 -0
  30. package/src/components/Plan.vue +116 -0
  31. package/src/components/Portfolio.vue +459 -0
  32. package/src/components/Preloader.vue +20 -0
  33. package/src/components/Principles.vue +67 -0
  34. package/src/components/Spacer15.vue +9 -0
  35. package/src/components/Spacer30.vue +9 -0
  36. package/src/components/Spacer40.vue +9 -0
  37. package/src/components/Spacer60.vue +9 -0
  38. package/src/components/StickyCTA.vue +263 -0
  39. package/src/components/Team.vue +432 -0
  40. package/src/components/icons/IconLinkedIn.vue +22 -0
  41. package/src/components/icons/IconX.vue +22 -0
  42. package/src/components/ui/SbCard.vue +52 -0
  43. package/src/components/ui/SkeletonPulse.vue +117 -0
  44. package/src/components/ui/UnitChip.vue +69 -0
  45. package/src/composables/useComingSoonConfig.js +120 -0
  46. package/src/composables/useComingSoonInterstitial.js +27 -0
  47. package/src/composables/useComponentResolver.js +196 -0
  48. package/src/composables/useEngagementTracking.js +187 -0
  49. package/src/composables/useIntroGate.js +46 -0
  50. package/src/composables/useLazyImage.js +77 -0
  51. package/src/composables/usePageConfig.js +184 -0
  52. package/src/composables/usePageMeta.js +76 -0
  53. package/src/composables/usePromoBackgroundStyles.js +67 -0
  54. package/src/constants/locales.js +20 -0
  55. package/src/extensions/extensionLoader.js +512 -0
  56. package/src/main.js +175 -0
  57. package/src/router/index.js +112 -0
  58. package/src/styles/base.css +896 -0
  59. package/src/styles/layout.css +342 -0
  60. package/src/styles/theme-base.css +84 -0
  61. package/src/themes/themeLoader.js +124 -0
  62. package/src/themes/themeManager.js +257 -0
  63. package/src/themes/themeValidator.js +380 -0
  64. package/src/utils/analytics.js +100 -0
  65. package/src/utils/appInfo.js +9 -0
  66. package/src/utils/assetResolver.js +162 -0
  67. package/src/utils/componentRegistry.js +46 -0
  68. package/src/utils/contentRequirements.js +67 -0
  69. package/src/utils/cookieConsent.js +281 -0
  70. package/src/utils/ctaCopy.js +58 -0
  71. package/src/utils/formatNumber.js +115 -0
  72. package/src/utils/imageSources.js +179 -0
  73. package/src/utils/inflateFlatConfig.js +30 -0
  74. package/src/utils/loadConfig.js +271 -0
  75. package/src/utils/semver.js +49 -0
  76. package/src/utils/siteStyles.js +40 -0
  77. package/src/utils/themeColors.js +65 -0
  78. package/src/utils/trackingContext.js +142 -0
  79. package/src/utils/unwrapDefault.js +14 -0
  80. package/src/utils/useScrollReveal.js +48 -0
  81. package/templates/index.html +36 -0
  82. package/themes/base/README.md +23 -0
  83. package/themes/base/theme.config.js +214 -0
  84. package/vite-plugin.js +637 -0
@@ -0,0 +1,112 @@
1
+ import { createRouter, createMemoryHistory, createWebHistory, RouterView } from 'vue-router';
2
+ import { h } from 'vue';
3
+
4
+ import Home from '../components/Home.vue';
5
+
6
+ import { SUPPORTED_LOCALES } from '../constants/locales.js';
7
+
8
+ const LocaleLayout = {
9
+ name: 'LocaleLayout',
10
+ render() {
11
+ return h(RouterView);
12
+ },
13
+ };
14
+
15
+ export const routes = [
16
+ {
17
+ path: '/',
18
+ name: 'Home',
19
+ component: Home,
20
+ props: { pageId: 'home', pagePath: '/' },
21
+ },
22
+ {
23
+ path: `/:locale(${SUPPORTED_LOCALES.join('|')})`,
24
+ component: LocaleLayout,
25
+ children: [
26
+ {
27
+ path: '',
28
+ name: 'HomeLocale',
29
+ component: Home,
30
+ props: (route) => ({ pageId: 'home', pagePath: '/', locale: route.params.locale }),
31
+ },
32
+ {
33
+ path: ':pathMatch(.*)*',
34
+ name: 'LocaleDynamicPage',
35
+ component: Home,
36
+ props: (route) => {
37
+ const pathMatch = route.params.pathMatch;
38
+ const slugSegments = Array.isArray(pathMatch) ? pathMatch : [pathMatch || ''];
39
+ const rawSlug = `/${slugSegments.filter(Boolean).join('/')}`;
40
+ const normalizedSlug = rawSlug.replace(/\/+/g, '/').replace(/\/$/, '') || '/';
41
+ return { pagePath: normalizedSlug, locale: route.params.locale };
42
+ },
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ path: '/:pathMatch(.*)*',
48
+ name: 'DynamicPage',
49
+ component: Home,
50
+ props: (route) => ({ pagePath: route.path || '/' }),
51
+ },
52
+ ];
53
+
54
+ function normalizeLocale(value = '') {
55
+ return value.toLowerCase().split('-')[0];
56
+ }
57
+
58
+ export function applyRouterGuards(router) {
59
+ router.beforeEach((to) => {
60
+ const rawLocale = (to.params.locale || '').toString().trim();
61
+
62
+ if (rawLocale) {
63
+ const normalized = normalizeLocale(rawLocale);
64
+
65
+ if (!SUPPORTED_LOCALES.includes(normalized)) {
66
+ return { path: '/', replace: true };
67
+ }
68
+
69
+ if (rawLocale !== normalized) {
70
+ const rest = to.fullPath.replace(/^\/[a-zA-Z-]{2,5}/, '');
71
+ return { path: `/${normalized}${rest || ''}`.replace(/\/$/, ''), replace: true };
72
+ }
73
+
74
+ if (!import.meta.env.SSR) {
75
+ try {
76
+ document.documentElement.lang = normalized;
77
+ } catch {}
78
+ try {
79
+ localStorage.setItem('locale', normalized);
80
+ } catch {}
81
+ }
82
+
83
+ return;
84
+ }
85
+
86
+ if (!import.meta.env.SSR) {
87
+ const navLang = (navigator.language || navigator.userLanguage || '').toString();
88
+ const shortLang = normalizeLocale(navLang || '');
89
+
90
+ if (to.path === '/' && SUPPORTED_LOCALES.includes(shortLang)) {
91
+ return { path: `/${shortLang}`, replace: true };
92
+ }
93
+ }
94
+ });
95
+ }
96
+
97
+ export function resolveHistory(base = import.meta.env.BASE_URL) {
98
+ return import.meta.env.SSR ? createMemoryHistory(base) : createWebHistory(base);
99
+ }
100
+
101
+ export function createRouterInstance() {
102
+ const router = createRouter({
103
+ history: resolveHistory(),
104
+ routes,
105
+ });
106
+
107
+ applyRouterGuards(router);
108
+
109
+ return router;
110
+ }
111
+
112
+ export default createRouterInstance;