@hkdigital/lib-core 0.5.96 → 0.5.98

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 (34) 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} +14 -14
  12. package/dist/meta/config.js +115 -0
  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/{config/meta.js → meta/templates/lib/meta/config.js} +10 -10
  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 +3 -4
  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/config/meta.js +0 -112
  30. package/dist/meta/templates/lib/meta.d.ts +0 -8
  31. package/dist/meta/templates/lib/meta.js +0 -23
  32. /package/dist/meta/{templates/lib/assets/meta/favicon.png → favicon.png} +0 -0
  33. /package/dist/meta/{templates/lib/assets/meta/preview-landscape.png → preview-landscape.png} +0 -0
  34. /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
  };
@@ -4,6 +4,12 @@
4
4
  export const name: "HKdigital Lib Core Test";
5
5
  export const shortName: "HKlib Core";
6
6
  export const description: "Base library that powers up Sveltekit projects";
7
+ export const backgroundAndThemeColor: "#082962";
8
+ export const themeColor: "#082962";
9
+ export const backgroundColor: "#082962";
10
+ export const statusBarStyle: "black-translucent";
11
+ export const orientation: "any";
12
+ export const disablePageZoom: true;
7
13
  /**
8
14
  * Language and locale configuration
9
15
  *
@@ -28,29 +34,23 @@ export const defaultLanguage: string;
28
34
  * @type {string}
29
35
  */
30
36
  export const defaultLocale: string;
31
- export const backgroundAndThemeColor: "#082962";
32
- export const themeColor: "#082962";
33
- export const backgroundColor: "#082962";
34
- export const statusBarStyle: "black-translucent";
35
- export const orientation: "any";
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 { default as faviconImages } from "./favicon.png?favicons";
38
+ export { default as appleTouchIcons } from "./favicon.png?apple-touch-icons";
39
+ export { default as previewImageLandscape } from "./preview-landscape.png?seo-landscape";
40
+ export { default as previewImageSquare } from "./preview-square.png?seo-square";
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;
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Meta data configuration
3
+ */
4
+
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';
9
+
10
+ export const backgroundAndThemeColor = '#082962';
11
+
12
+ export const themeColor = backgroundAndThemeColor;
13
+ export const backgroundColor = backgroundAndThemeColor;
14
+
15
+ export const statusBarStyle = 'black-translucent';
16
+
17
+ export const orientation = 'any'; // "landscape"
18
+
19
+ //
20
+ // Only disable zoom if:
21
+ // - You're building a game
22
+ // - Canvas-based app where zoom breaks functionality
23
+ // - You have a very specific (technical) reason...
24
+ //
25
+ export const disablePageZoom = true;
26
+
27
+ /**
28
+ * Language and locale configuration
29
+ *
30
+ * Configure supported languages with their locale mappings.
31
+ * Short codes (e.g., 'en') are defaults, explicit variants optional.
32
+ *
33
+ * @type {Record<string, {lang: string, locale: string}>}
34
+ */
35
+ export const languages = {
36
+ // Short codes (defaults)
37
+ 'en': { lang: 'en-GB', locale: 'en_GB' },
38
+ 'nl': { lang: 'nl-NL', locale: 'nl_NL' },
39
+
40
+ // Explicit variants (add as needed)
41
+ // 'en-us': { lang: 'en-US', locale: 'en_US' },
42
+ // 'es': { lang: 'es-ES', locale: 'es_ES' },
43
+ // 'es-mx': { lang: 'es-MX', locale: 'es_MX' }
44
+ };
45
+
46
+ /**
47
+ * Default language code (fallback)
48
+ *
49
+ * @type {string}
50
+ */
51
+ export const defaultLanguage = 'en';
52
+
53
+ /**
54
+ * Default locale (derived from defaultLanguage)
55
+ *
56
+ * @type {string}
57
+ */
58
+ export const defaultLocale = languages[defaultLanguage].locale;
59
+
60
+ /**
61
+ * Favicon images (processed by Vite imagetools)
62
+ */
63
+ export { default as faviconImages } from './favicon.png?favicons';
64
+ export { default as appleTouchIcons } from './favicon.png?apple-touch-icons';
65
+
66
+ /**
67
+ * SEO social media preview images
68
+ *
69
+ * To enable: Import the image and export it
70
+ * To disable: Comment out the import and export null instead
71
+ *
72
+ * Processed dimensions:
73
+ * - Landscape: 1200×630 (Facebook, LinkedIn, Discord)
74
+ * - Square: 1200×1200 (various platforms)
75
+ */
76
+
77
+ // Preview images
78
+ export { default as previewImageLandscape } from './preview-landscape.png?seo-landscape';
79
+ export { default as previewImageSquare } from './preview-square.png?seo-square';
80
+
81
+ // Or disable
82
+ // export const SeoImageLandscape = null;
83
+ // export const SeoImageSquare = null;
84
+
85
+ /**
86
+ * Site routes for sitemap.xml
87
+ *
88
+ * @type {import('./typedef.js').SitemapRoute[]}
89
+ *
90
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
91
+ */
92
+ export const siteRoutes = [
93
+ '/'
94
+ // Add your routes:
95
+ // '/about',
96
+ // '/contact',
97
+ // { path: '/blog', priority: 0.9, changefreq: 'daily' }
98
+ ];
99
+
100
+ /**
101
+ * Robots.txt configuration
102
+ *
103
+ * @type {import('./typedef.js').RobotsConfig}
104
+ *
105
+ * @see hkdigital/lib-core/meta/README.md for detailed configuration options
106
+ */
107
+ export const robotsConfig = {
108
+ allowedHosts: '*', // '*' allows all hosts
109
+ disallowedPaths: [], // e.g., ['/admin', '/api']
110
+
111
+ // AI bot control (site-wide via robots.txt)
112
+ allowAiTraining: true, // GPTBot, Google-Extended, CCBot, anthropic-ai
113
+ allowAiReading: true // ChatGPT-User, Claude-Web, cohere-ai
114
+ };
115
+
@@ -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;
@@ -69,21 +69,21 @@ export const disablePageZoom = true;
69
69
  */
70
70
 
71
71
  // Import and export processed images
72
- import SeoLandscapeImg from '../assets/meta/preview-landscape.png?seo-landscape';
73
- import SeoSquareImg from '../assets/meta/preview-square.png?seo-square';
72
+ import SeoLandscapeImg from '../../../../assets/meta/preview-landscape.png?seo-landscape';
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)
84
84
  */
85
- import FaviconImgs from '../assets/meta/favicon.png?favicons';
86
- import AppleTouchImgs from '../assets/meta/favicon.png?apple-touch-icons';
85
+ import FaviconImgs from '../../../../assets/meta/favicon.png?favicons';
86
+ import AppleTouchImgs from '../../../../assets/meta/favicon.png?apple-touch-icons';
87
87
 
88
88
  export const faviconImages = FaviconImgs;
89
89
  export const appleTouchIcons = AppleTouchImgs;
@@ -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
  */
@@ -6,10 +6,9 @@ import {
6
6
  shortName,
7
7
  description,
8
8
  backgroundAndThemeColor,
9
- orientation
10
- } from '../../../../../config/meta.js';
11
-
12
- import faviconImages from '../../../../../assets/meta/favicon.png?favicons';
9
+ orientation,
10
+ faviconImages
11
+ } from '../../../../config.js';
13
12
 
14
13
  /* Generate manifest data */
15
14
 
@@ -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);