@hkdigital/lib-core 0.5.96 → 0.5.97

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 (33) hide show
  1. package/README.md +8 -56
  2. package/dist/config/generators/imagetools.d.ts +4 -10
  3. package/dist/config/generators/imagetools.js +43 -25
  4. package/dist/config/imagetools.d.ts +2 -2
  5. package/dist/meta/components/Favicons.svelte +1 -1
  6. package/dist/meta/components/Favicons.svelte.d.ts +9 -5
  7. package/dist/meta/components/PWA.svelte +2 -2
  8. package/dist/meta/components/PWA.svelte.d.ts +9 -5
  9. package/dist/meta/components/SEO.svelte +113 -77
  10. package/dist/meta/components/SEO.svelte.d.ts +28 -28
  11. package/dist/{config/meta.d.ts → meta/config.d.ts} +8 -8
  12. package/dist/{config/meta.js → meta/config.js} +6 -6
  13. package/dist/meta/templates/README.md +3 -3
  14. package/dist/meta/templates/lib/{config/meta.d.ts → meta/config.d.ts} +22 -29
  15. package/dist/meta/templates/lib/{config/meta.js → meta/config.js} +48 -39
  16. package/dist/meta/templates/lib/meta/favicon.png +0 -0
  17. package/dist/meta/templates/lib/meta/preview-landscape.png +0 -0
  18. package/dist/meta/templates/lib/meta/preview-square.png +0 -0
  19. package/dist/meta/templates/routes/(meta)/manifest.json/+server.js +1 -1
  20. package/dist/meta/templates/routes/(meta)/robots.txt/+server.js +1 -1
  21. package/dist/meta/templates/routes/(meta)/sitemap.xml/+server.js +1 -1
  22. package/dist/meta/typedef.d.ts +100 -1
  23. package/dist/meta/typedef.js +45 -5
  24. package/dist/meta.d.ts +1 -1
  25. package/dist/meta.js +1 -1
  26. package/package.json +1 -1
  27. package/dist/meta/config.typedef.d.ts +0 -98
  28. package/dist/meta/config.typedef.js +0 -44
  29. package/dist/meta/templates/lib/meta.d.ts +0 -8
  30. package/dist/meta/templates/lib/meta.js +0 -23
  31. /package/dist/meta/{templates/lib/assets/meta/favicon.png → favicon.png} +0 -0
  32. /package/dist/meta/{templates/lib/assets/meta/preview-landscape.png → preview-landscape.png} +0 -0
  33. /package/dist/meta/{templates/lib/assets/meta/preview-square.png → preview-square.png} +0 -0
@@ -7,7 +7,7 @@ declare const SEO: import("svelte").Component<{
7
7
  /**
8
8
  * - Configuration object
9
9
  */
10
- config: import("../config.typedef.js").MetaConfig;
10
+ config: import("../typedef.js").MetaConfig;
11
11
  /**
12
12
  * - Page title (defaults to config name)
13
13
  */
@@ -17,39 +17,39 @@ declare const SEO: import("svelte").Component<{
17
17
  */
18
18
  description?: string | undefined;
19
19
  /**
20
- * - Canonical URL for this page
20
+ * Canonical URL for this content to prevent duplicate content penalties
21
21
  */
22
- url?: string | undefined;
22
+ canonicalUrl?: string | undefined;
23
23
  /**
24
- * Social media preview image URL (defaults to landscape SEO image)
24
+ * - Landscape preview image (1200×630)
25
25
  */
26
- image?: string | undefined;
26
+ previewImageLandscape?: import("../../config/typedef.js").ImageSource | undefined;
27
27
  /**
28
- * - Alt text for social media image
28
+ * - Square preview image (1200×1200)
29
29
  */
30
- imageAlt?: string | undefined;
30
+ previewImageSquare?: import("../../config/typedef.js").ImageSource | undefined;
31
+ /**
32
+ * - Alt text for preview images
33
+ */
34
+ previewImageAltText?: string | undefined;
31
35
  /**
32
36
  * - Open Graph type (default: 'website')
33
37
  */
34
38
  type?: string | undefined;
35
39
  /**
36
- * Content locale (auto-detected from URL or defaults to config)
40
+ * - Content locale (defaults to config locale)
37
41
  */
38
42
  locale?: string | undefined;
39
- /**
40
- * Site name for Open Graph (defaults to config name)
41
- */
42
- siteName?: string | undefined;
43
43
  /**
44
44
  * Alternate language URLs for hreflang tags
45
45
  */
46
46
  alternateUrls?: Record<string, string> | undefined;
47
47
  /**
48
- * Robots meta directives (e.g., 'noindex, nofollow')
48
+ * - Robots meta directives
49
49
  */
50
50
  robots?: string | undefined;
51
51
  /**
52
- * Prevent AI training on this page content
52
+ * - Block AI training on this page
53
53
  */
54
54
  noAiTraining?: boolean | undefined;
55
55
  }, {}, "">;
@@ -60,7 +60,7 @@ type SEOProps = {
60
60
  /**
61
61
  * - Configuration object
62
62
  */
63
- config: import("../config.typedef.js").MetaConfig;
63
+ config: import("../typedef.js").MetaConfig;
64
64
  /**
65
65
  * - Page title (defaults to config name)
66
66
  */
@@ -70,39 +70,39 @@ type SEOProps = {
70
70
  */
71
71
  description?: string | undefined;
72
72
  /**
73
- * - Canonical URL for this page
73
+ * Canonical URL for this content to prevent duplicate content penalties
74
74
  */
75
- url?: string | undefined;
75
+ canonicalUrl?: string | undefined;
76
76
  /**
77
- * Social media preview image URL (defaults to landscape SEO image)
77
+ * - Landscape preview image (1200×630)
78
78
  */
79
- image?: string | undefined;
79
+ previewImageLandscape?: import("../../config/typedef.js").ImageSource | undefined;
80
80
  /**
81
- * - Alt text for social media image
81
+ * - Square preview image (1200×1200)
82
82
  */
83
- imageAlt?: string | undefined;
83
+ previewImageSquare?: import("../../config/typedef.js").ImageSource | undefined;
84
+ /**
85
+ * - Alt text for preview images
86
+ */
87
+ previewImageAltText?: string | undefined;
84
88
  /**
85
89
  * - Open Graph type (default: 'website')
86
90
  */
87
91
  type?: string | undefined;
88
92
  /**
89
- * Content locale (auto-detected from URL or defaults to config)
93
+ * - Content locale (defaults to config locale)
90
94
  */
91
95
  locale?: string | undefined;
92
- /**
93
- * Site name for Open Graph (defaults to config name)
94
- */
95
- siteName?: string | undefined;
96
96
  /**
97
97
  * Alternate language URLs for hreflang tags
98
98
  */
99
99
  alternateUrls?: Record<string, string> | undefined;
100
100
  /**
101
- * Robots meta directives (e.g., 'noindex, nofollow')
101
+ * - Robots meta directives
102
102
  */
103
103
  robots?: string | undefined;
104
104
  /**
105
- * Prevent AI training on this page content
105
+ * - Block AI training on this page
106
106
  */
107
107
  noAiTraining?: boolean | undefined;
108
108
  };
@@ -34,23 +34,23 @@ export const backgroundColor: "#082962";
34
34
  export const statusBarStyle: "black-translucent";
35
35
  export const orientation: "any";
36
36
  export const disablePageZoom: true;
37
- export const SeoImageLandscape: string;
38
- export const SeoImageSquare: string;
39
- export const faviconImages: import("./typedef").ImageSource;
40
- export const appleTouchIcons: import("./typedef").ImageSource;
37
+ export const previewImageLandscape: import("../config/typedef").ImageSource;
38
+ export const previewImageSquare: import("../config/typedef").ImageSource;
39
+ export const faviconImages: import("../config/typedef").ImageSource;
40
+ export const appleTouchIcons: import("../config/typedef").ImageSource;
41
41
  /**
42
42
  * Site routes for sitemap.xml
43
43
  *
44
- * @type {import('../meta/typedef.js').SitemapRoute[]}
44
+ * @type {import('./typedef.js').SitemapRoute[]}
45
45
  *
46
46
  * @see hkdigital/lib-core/meta/README.md for detailed configuration options
47
47
  */
48
- export const siteRoutes: import("../meta/typedef.js").SitemapRoute[];
48
+ export const siteRoutes: import("./typedef.js").SitemapRoute[];
49
49
  /**
50
50
  * Robots.txt configuration
51
51
  *
52
- * @type {import('../meta/typedef.js').RobotsConfig}
52
+ * @type {import('./typedef.js').RobotsConfig}
53
53
  *
54
54
  * @see hkdigital/lib-core/meta/README.md for detailed configuration options
55
55
  */
56
- export const robotsConfig: import("../meta/typedef.js").RobotsConfig;
56
+ export const robotsConfig: import("./typedef.js").RobotsConfig;
@@ -72,12 +72,12 @@ export const disablePageZoom = true;
72
72
  import SeoLandscapeImg from '../assets/meta/preview-landscape.png?seo-landscape';
73
73
  import SeoSquareImg from '../assets/meta/preview-square.png?seo-square';
74
74
 
75
- export const SeoImageLandscape = SeoLandscapeImg;
76
- export const SeoImageSquare = SeoSquareImg;
75
+ export const previewImageLandscape = SeoLandscapeImg;
76
+ export const previewImageSquare = SeoSquareImg;
77
77
 
78
78
  // To disable, comment out imports above and uncomment below:
79
- // export const SeoImageLandscape = null;
80
- // export const SeoImageSquare = null;
79
+ // export const previewImageLandscape = null;
80
+ // export const previewImageSquare = null;
81
81
 
82
82
  /**
83
83
  * Favicon images (processed by Vite imagetools)
@@ -91,7 +91,7 @@ export const appleTouchIcons = AppleTouchImgs;
91
91
  /**
92
92
  * Site routes for sitemap.xml
93
93
  *
94
- * @type {import('../meta/typedef.js').SitemapRoute[]}
94
+ * @type {import('./typedef.js').SitemapRoute[]}
95
95
  *
96
96
  * @see hkdigital/lib-core/meta/README.md for detailed configuration options
97
97
  */
@@ -106,7 +106,7 @@ export const siteRoutes = [
106
106
  /**
107
107
  * Robots.txt configuration
108
108
  *
109
- * @type {import('../meta/typedef.js').RobotsConfig}
109
+ * @type {import('./typedef.js').RobotsConfig}
110
110
  *
111
111
  * @see hkdigital/lib-core/meta/README.md for detailed configuration options
112
112
  */
@@ -13,14 +13,14 @@ cp -r node_modules/@hkdigital/lib-core/meta/templates/routes/* src/routes/
13
13
  ```
14
14
 
15
15
  This copies:
16
- - `src/lib/config/meta.js` - Your configuration file
16
+ - `src/lib/meta/config.js` - Your configuration file
17
17
  - `src/lib/assets/meta/*.png` - Placeholder images
18
18
  - `src/lib/meta.js` - Glue file connecting library and config
19
19
  - `src/routes/(meta)/*.json/+server.js` - Route endpoints
20
20
 
21
21
  ### 2. Customize your configuration
22
22
 
23
- Edit `src/lib/config/meta.js` with your app's information:
23
+ Edit `src/lib/meta/config.js` with your app's information:
24
24
 
25
25
  ```javascript
26
26
  export const name = 'Your App Name';
@@ -122,7 +122,7 @@ src/
122
122
  - When you update the library, components get bug fixes automatically
123
123
 
124
124
  **Your code** (you customize):
125
- - `src/lib/config/meta.js` - Your app's configuration
125
+ - `src/lib/meta/config.js` - Your app's configuration
126
126
  - `src/lib/assets/meta/*.png` - Your images
127
127
  - `src/lib/meta.js` - Connects library components with your config
128
128
  - `src/routes/(meta)/` - Route endpoints that use your config
@@ -1,48 +1,41 @@
1
1
  /**
2
- * Meta configuration
3
- *
4
- * Customize this file with your app's information.
5
- * After copying to your project, update all values below.
6
- */
7
- /**
8
- * App identity
2
+ * Meta data configuration
9
3
  */
10
- export const name: "Your App Name";
11
- export const shortName: "YourApp";
12
- export const description: "Your app description for search engines";
4
+ export const name: "HKdigital Lib Core Test";
5
+ export const shortName: "HKlib Core";
6
+ export const description: "Base library that powers up Sveltekit projects";
13
7
  /**
14
8
  * Language and locale configuration
15
9
  *
10
+ * Configure supported languages with their locale mappings.
11
+ * Short codes (e.g., 'en') are defaults, explicit variants optional.
12
+ *
16
13
  * @type {Record<string, {lang: string, locale: string}>}
17
14
  */
18
15
  export const languages: Record<string, {
19
16
  lang: string;
20
17
  locale: string;
21
18
  }>;
22
- export const defaultLanguage: "en";
23
- export const defaultLocale: string;
24
19
  /**
25
- * PWA theme and colors
20
+ * Default language code (fallback)
21
+ *
22
+ * @type {string}
23
+ */
24
+ export const defaultLanguage: string;
25
+ /**
26
+ * Default locale (derived from defaultLanguage)
27
+ *
28
+ * @type {string}
26
29
  */
30
+ export const defaultLocale: string;
27
31
  export const backgroundAndThemeColor: "#082962";
28
32
  export const themeColor: "#082962";
29
33
  export const backgroundColor: "#082962";
30
- /**
31
- * iOS PWA configuration
32
- */
33
34
  export const statusBarStyle: "black-translucent";
34
- /**
35
- * Screen orientation
36
- */
37
35
  export const orientation: "any";
38
- /**
39
- * Disable pinch-to-zoom
40
- *
41
- * Only enable for games or canvas apps where zoom breaks functionality
42
- */
43
- export const disablePageZoom: false;
44
- export const SeoImageLandscape: string;
45
- export const SeoImageSquare: string;
36
+ export const disablePageZoom: true;
37
+ export const previewImageLandscape: import("../../../../config/typedef").ImageSource;
38
+ export const previewImageSquare: import("../../../../config/typedef").ImageSource;
46
39
  export const faviconImages: import("../../../../config/typedef").ImageSource;
47
40
  export const appleTouchIcons: import("../../../../config/typedef").ImageSource;
48
41
  /**
@@ -50,7 +43,7 @@ export const appleTouchIcons: import("../../../../config/typedef").ImageSource;
50
43
  *
51
44
  * @type {import('../../../typedef.js').SitemapRoute[]}
52
45
  *
53
- * @see @hkdigital/lib-core/meta/README.md for configuration options
46
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
54
47
  */
55
48
  export const siteRoutes: import("../../../typedef.js").SitemapRoute[];
56
49
  /**
@@ -58,6 +51,6 @@ export const siteRoutes: import("../../../typedef.js").SitemapRoute[];
58
51
  *
59
52
  * @type {import('../../../typedef.js').RobotsConfig}
60
53
  *
61
- * @see @hkdigital/lib-core/meta/README.md for configuration options
54
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
62
55
  */
63
56
  export const robotsConfig: import("../../../typedef.js").RobotsConfig;
@@ -1,75 +1,83 @@
1
1
  /**
2
- * Meta configuration
3
- *
4
- * Customize this file with your app's information.
5
- * After copying to your project, update all values below.
2
+ * Meta data configuration
6
3
  */
7
4
 
8
- /**
9
- * App identity
10
- */
11
- export const name = 'Your App Name';
12
- export const shortName = 'YourApp'; // max 12 characters
13
- export const description = 'Your app description for search engines';
5
+ export const name = 'HKdigital Lib Core Test';
6
+ export const shortName = 'HKlib Core'; // max 12 characters
7
+
8
+ export const description = 'Base library that powers up Sveltekit projects';
14
9
 
15
10
  /**
16
11
  * Language and locale configuration
17
12
  *
13
+ * Configure supported languages with their locale mappings.
14
+ * Short codes (e.g., 'en') are defaults, explicit variants optional.
15
+ *
18
16
  * @type {Record<string, {lang: string, locale: string}>}
19
17
  */
20
18
  export const languages = {
19
+ // Short codes (defaults)
21
20
  'en': { lang: 'en-GB', locale: 'en_GB' },
22
- 'nl': { lang: 'nl-NL', locale: 'nl_NL' }
21
+ 'nl': { lang: 'nl-NL', locale: 'nl_NL' },
23
22
 
24
- // Add more languages as needed:
23
+ // Explicit variants (add as needed)
24
+ // 'en-us': { lang: 'en-US', locale: 'en_US' },
25
25
  // 'es': { lang: 'es-ES', locale: 'es_ES' },
26
- // 'en-us': { lang: 'en-US', locale: 'en_US' }
26
+ // 'es-mx': { lang: 'es-MX', locale: 'es_MX' }
27
27
  };
28
28
 
29
+ /**
30
+ * Default language code (fallback)
31
+ *
32
+ * @type {string}
33
+ */
29
34
  export const defaultLanguage = 'en';
30
- export const defaultLocale = languages[defaultLanguage].locale;
31
35
 
32
36
  /**
33
- * PWA theme and colors
37
+ * Default locale (derived from defaultLanguage)
38
+ *
39
+ * @type {string}
34
40
  */
41
+ export const defaultLocale = languages[defaultLanguage].locale;
42
+
35
43
  export const backgroundAndThemeColor = '#082962';
44
+
36
45
  export const themeColor = backgroundAndThemeColor;
37
46
  export const backgroundColor = backgroundAndThemeColor;
38
47
 
39
- /**
40
- * iOS PWA configuration
41
- */
42
- export const statusBarStyle = 'black-translucent'; // 'default' | 'black' | 'black-translucent'
48
+ export const statusBarStyle = 'black-translucent';
43
49
 
44
- /**
45
- * Screen orientation
46
- */
47
- export const orientation = 'any'; // 'any' | 'landscape' | 'portrait'
50
+ export const orientation = 'any'; // "landscape"
48
51
 
49
- /**
50
- * Disable pinch-to-zoom
51
- *
52
- * Only enable for games or canvas apps where zoom breaks functionality
53
- */
54
- export const disablePageZoom = false;
52
+ //
53
+ // Only disable zoom if:
54
+ // - You're building a game
55
+ // - Canvas-based app where zoom breaks functionality
56
+ // - You have a very specific (technical) reason...
57
+ //
58
+ export const disablePageZoom = true;
55
59
 
56
60
  /**
57
61
  * SEO social media preview images
58
62
  *
59
- * Replace the image files with your own designs.
60
- * The images are processed by Vite imagetools to correct dimensions.
63
+ * To enable: Import the image and export it
64
+ * To disable: Comment out the import and export null instead
61
65
  *
62
- * To disable: comment out imports and set to null
66
+ * Processed dimensions:
67
+ * - Landscape: 1200×630 (Facebook, LinkedIn, Discord)
68
+ * - Square: 1200×1200 (various platforms)
63
69
  */
70
+
71
+ // Import and export processed images
64
72
  import SeoLandscapeImg from '../../../../assets/meta/preview-landscape.png?seo-landscape';
65
73
  import SeoSquareImg from '../../../../assets/meta/preview-square.png?seo-square';
66
74
 
67
- export const SeoImageLandscape = SeoLandscapeImg; // 1200×630
68
- export const SeoImageSquare = SeoSquareImg; // 1200×1200
75
+ export const previewImageLandscape = SeoLandscapeImg;
76
+ export const previewImageSquare = SeoSquareImg;
69
77
 
70
- // To disable SEO images:
71
- // export const SeoImageLandscape = null;
72
- // export const SeoImageSquare = null;
78
+ // To disable, comment out imports above and uncomment below:
79
+ // export const previewImageLandscape = null;
80
+ // export const previewImageSquare = null;
73
81
 
74
82
  /**
75
83
  * Favicon images (processed by Vite imagetools)
@@ -85,7 +93,7 @@ export const appleTouchIcons = AppleTouchImgs;
85
93
  *
86
94
  * @type {import('../../../typedef.js').SitemapRoute[]}
87
95
  *
88
- * @see @hkdigital/lib-core/meta/README.md for configuration options
96
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
89
97
  */
90
98
  export const siteRoutes = [
91
99
  '/'
@@ -100,7 +108,7 @@ export const siteRoutes = [
100
108
  *
101
109
  * @type {import('../../../typedef.js').RobotsConfig}
102
110
  *
103
- * @see @hkdigital/lib-core/meta/README.md for configuration options
111
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
104
112
  */
105
113
  export const robotsConfig = {
106
114
  allowedHosts: '*', // '*' allows all hosts
@@ -110,3 +118,4 @@ export const robotsConfig = {
110
118
  allowAiTraining: true, // GPTBot, Google-Extended, CCBot, anthropic-ai
111
119
  allowAiReading: true // ChatGPT-User, Claude-Web, cohere-ai
112
120
  };
121
+
@@ -7,7 +7,7 @@ import {
7
7
  description,
8
8
  backgroundAndThemeColor,
9
9
  orientation
10
- } from '../../../../../config/meta.js';
10
+ } from '../../../../config.js';
11
11
 
12
12
  import faviconImages from '../../../../../assets/meta/favicon.png?favicons';
13
13
 
@@ -1,6 +1,6 @@
1
1
  import { text } from '@sveltejs/kit';
2
2
  import { generateRobotsTxt } from '../../../../utils.js';
3
- import { robotsConfig } from '../../../../../config/meta.js';
3
+ import { robotsConfig } from '../../../../config.js';
4
4
 
5
5
  /** @type {import('@sveltejs/kit').RequestHandler} */
6
6
  export const GET = async ({ url }) => {
@@ -1,5 +1,5 @@
1
1
  import { generateSitemap } from '../../../../utils.js';
2
- import { siteRoutes } from '../../../../../config/meta.js';
2
+ import { siteRoutes } from '../../../../config.js';
3
3
 
4
4
  /** @type {import('@sveltejs/kit').RequestHandler} */
5
5
  export const GET = async ({ url }) => {
@@ -1,3 +1,102 @@
1
- export * from "./config.typedef.js";
2
1
  export * from "./utils/robots/typedef.js";
3
2
  export * from "./utils/sitemap/typedef.js";
3
+ /**
4
+ * App identity
5
+ */
6
+ export type MetaConfig = {
7
+ /**
8
+ * - Full app name
9
+ */
10
+ name: string;
11
+ /**
12
+ * - Short app name (max 12 characters)
13
+ */
14
+ shortName: string;
15
+ /**
16
+ * - App description for search engines
17
+ *
18
+ * Language and locale
19
+ */
20
+ description: string;
21
+ /**
22
+ * Language configurations
23
+ */
24
+ languages: Record<string, {
25
+ lang: string;
26
+ locale: string;
27
+ }>;
28
+ /**
29
+ * - Default language code
30
+ */
31
+ defaultLanguage: string;
32
+ /**
33
+ * - Default locale
34
+ *
35
+ * PWA theme and colors
36
+ */
37
+ defaultLocale: string;
38
+ /**
39
+ * - Theme color
40
+ */
41
+ backgroundAndThemeColor: string;
42
+ /**
43
+ * - Theme color for browser UI
44
+ */
45
+ themeColor: string;
46
+ /**
47
+ * - Background color
48
+ */
49
+ backgroundColor: string;
50
+ /**
51
+ * - iOS status bar style
52
+ */
53
+ statusBarStyle: string;
54
+ /**
55
+ * - Screen orientation
56
+ */
57
+ orientation: string;
58
+ /**
59
+ * - Disable pinch-to-zoom
60
+ *
61
+ * SEO images
62
+ */
63
+ disablePageZoom: boolean;
64
+ /**
65
+ * Landscape SEO image URL (1200×630)
66
+ */
67
+ previewImageLandscape?: import("../config/typedef.js").ImageSource | undefined;
68
+ /**
69
+ * Square SEO image URL (1200×1200)
70
+ */
71
+ previewImageSquare?: import("../config/typedef.js").ImageSource | undefined;
72
+ /**
73
+ * - Alt text for social media image
74
+ *
75
+ * Favicon images (processed by imagetools)
76
+ */
77
+ previewImageAltText?: string | undefined;
78
+ /**
79
+ * Processed favicon images
80
+ */
81
+ faviconImages: Array<{
82
+ src: string;
83
+ width: number;
84
+ }>;
85
+ /**
86
+ * Processed apple-touch-icon images
87
+ *
88
+ * Site configuration
89
+ */
90
+ appleTouchIcons: Array<{
91
+ src: string;
92
+ width: number;
93
+ }>;
94
+ /**
95
+ * Routes for sitemap.xml
96
+ */
97
+ siteRoutes: import("./utils/sitemap/typedef.js").SitemapRoute[];
98
+ /**
99
+ * Robots.txt configuration
100
+ */
101
+ robotsConfig: import("./utils/robots/typedef.js").RobotsConfig;
102
+ };
@@ -1,14 +1,54 @@
1
1
  /**
2
2
  * Type definitions for meta utilities
3
- *
4
- * Re-exports all typedefs from utils subfolder for convenient importing
5
3
  */
6
4
 
7
- // Re-export config typedefs
8
- export * from './config.typedef.js';
9
-
10
5
  // Re-export robots typedefs
11
6
  export * from './utils/robots/typedef.js';
12
7
 
13
8
  // Re-export sitemap typedefs
14
9
  export * from './utils/sitemap/typedef.js';
10
+
11
+ /**
12
+ * @typedef {Object} MetaConfig
13
+ *
14
+ * App identity
15
+ * @property {string} name - Full app name
16
+ * @property {string} shortName - Short app name (max 12 characters)
17
+ * @property {string} description - App description for search engines
18
+ *
19
+ * Language and locale
20
+ * @property {Record<string, {lang: string, locale: string}>} languages
21
+ * Language configurations
22
+ * @property {string} defaultLanguage - Default language code
23
+ * @property {string} defaultLocale - Default locale
24
+ *
25
+ * PWA theme and colors
26
+ * @property {string} backgroundAndThemeColor - Theme color
27
+ * @property {string} themeColor - Theme color for browser UI
28
+ * @property {string} backgroundColor - Background color
29
+ * @property {string} statusBarStyle - iOS status bar style
30
+ * @property {string} orientation - Screen orientation
31
+ * @property {boolean} disablePageZoom - Disable pinch-to-zoom
32
+ *
33
+ * SEO images
34
+ * @property {import('../config/typedef.js').ImageSource} [previewImageLandscape]
35
+ * Landscape SEO image URL (1200×630)
36
+ *
37
+ * @property {import('../config/typedef.js').ImageSource} [previewImageSquare]
38
+ * Square SEO image URL (1200×1200)
39
+ *
40
+ * @property {string} [previewImageAltText] - Alt text for social media image
41
+ *
42
+ * Favicon images (processed by imagetools)
43
+ * @property {Array<{src: string, width: number}>} faviconImages
44
+ * Processed favicon images
45
+ * @property {Array<{src: string, width: number}>} appleTouchIcons
46
+ * Processed apple-touch-icon images
47
+ *
48
+ * Site configuration
49
+ * @property {import('./utils/sitemap/typedef.js').SitemapRoute[]} siteRoutes
50
+ * Routes for sitemap.xml
51
+ *
52
+ * @property {import('./utils/robots/typedef.js').RobotsConfig} robotsConfig
53
+ * Robots.txt configuration
54
+ */
package/dist/meta.d.ts CHANGED
@@ -4,5 +4,5 @@ import { SEO } from './meta/components.js';
4
4
  export const getLangFromPath: Function;
5
5
  export const injectLang: Function;
6
6
  export const handleLang: Function;
7
- import * as config from './config/meta.js';
7
+ import * as config from './meta/config.js';
8
8
  export { Favicons, PWA, SEO, config };
package/dist/meta.js CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { Favicons, PWA, SEO } from './meta/components.js';
10
10
  import { createLangUtils } from './meta/utils.js';
11
- import * as config from './config/meta.js';
11
+ import * as config from './meta/config.js';
12
12
 
13
13
  // Create configured language utilities
14
14
  const { getLangFromPath, injectLang, handleLang } = createLangUtils(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-core",
3
- "version": "0.5.96",
3
+ "version": "0.5.97",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"