@windrun-huaiin/lib 26.0.0 → 28.0.0
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/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -1
- package/package.json +1 -1
- package/src/index.ts +0 -3
- package/dist/seo-metadata.d.ts +0 -42
- package/dist/seo-metadata.d.ts.map +0 -1
- package/dist/seo-metadata.js +0 -34
- package/dist/seo-metadata.mjs +0 -32
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var utils = require('./utils.js');
|
|
4
|
-
var llmUtils = require('./llm-utils.js');
|
|
5
4
|
var commonAppConfig = require('./common-app-config.js');
|
|
6
5
|
|
|
7
6
|
|
|
@@ -11,7 +10,6 @@ exports.formatTimestamp = utils.formatTimestamp;
|
|
|
11
10
|
exports.getAsNeededLocalizedUrl = utils.getAsNeededLocalizedUrl;
|
|
12
11
|
exports.handlePastePlainText = utils.handlePastePlainText;
|
|
13
12
|
exports.viewLocalTime = utils.viewLocalTime;
|
|
14
|
-
exports.getLLMText = llmUtils.getLLMText;
|
|
15
13
|
exports.LOCALE_PRESETS = commonAppConfig.LOCALE_PRESETS;
|
|
16
14
|
exports.createCommonAppConfig = commonAppConfig.createCommonAppConfig;
|
|
17
15
|
exports.createI18nHelpers = commonAppConfig.createI18nHelpers;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/dist/seo-metadata.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export interface CreateLocalizedSiteMetadataOptions {
|
|
2
|
-
locale: string;
|
|
3
|
-
baseUrl: string;
|
|
4
|
-
locales: readonly string[];
|
|
5
|
-
defaultLocale: string;
|
|
6
|
-
localePrefixAsNeeded: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function createLocalizedSiteMetadata(options: CreateLocalizedSiteMetadataOptions): Promise<{
|
|
9
|
-
title: any;
|
|
10
|
-
description: any;
|
|
11
|
-
keywords: any;
|
|
12
|
-
alternates: {
|
|
13
|
-
canonical: string;
|
|
14
|
-
languages: {
|
|
15
|
-
[k: string]: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
icons: readonly [{
|
|
19
|
-
readonly rel: "icon";
|
|
20
|
-
readonly type: "image/png";
|
|
21
|
-
readonly sizes: "16x16";
|
|
22
|
-
readonly url: "/favicon-16x16.png";
|
|
23
|
-
}, {
|
|
24
|
-
readonly rel: "icon";
|
|
25
|
-
readonly type: "image/png";
|
|
26
|
-
readonly sizes: "32x32";
|
|
27
|
-
readonly url: "/favicon-32x32.png";
|
|
28
|
-
}, {
|
|
29
|
-
readonly rel: "icon";
|
|
30
|
-
readonly type: "image/ico";
|
|
31
|
-
readonly url: "/favicon.ico";
|
|
32
|
-
}, {
|
|
33
|
-
readonly rel: "apple-touch-icon";
|
|
34
|
-
readonly sizes: "180x180";
|
|
35
|
-
readonly url: "/favicon-180x180.png";
|
|
36
|
-
}, {
|
|
37
|
-
readonly rel: "android-chrome";
|
|
38
|
-
readonly sizes: "512x512";
|
|
39
|
-
readonly url: "/favicon-512x512.png";
|
|
40
|
-
}];
|
|
41
|
-
}>;
|
|
42
|
-
//# sourceMappingURL=seo-metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seo-metadata.d.ts","sourceRoot":"","sources":["../src/seo-metadata.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAUD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoB5C"}
|
package/dist/seo-metadata.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib = require('tslib');
|
|
4
|
-
var server = require('next-intl/server');
|
|
5
|
-
var utils = require('./utils.js');
|
|
6
|
-
|
|
7
|
-
const DEFAULT_SITE_ICONS = [
|
|
8
|
-
{ rel: 'icon', type: 'image/png', sizes: '16x16', url: '/favicon-16x16.png' },
|
|
9
|
-
{ rel: 'icon', type: 'image/png', sizes: '32x32', url: '/favicon-32x32.png' },
|
|
10
|
-
{ rel: 'icon', type: 'image/ico', url: '/favicon.ico' },
|
|
11
|
-
{ rel: 'apple-touch-icon', sizes: '180x180', url: '/favicon-180x180.png' },
|
|
12
|
-
{ rel: 'android-chrome', sizes: '512x512', url: '/favicon-512x512.png' },
|
|
13
|
-
];
|
|
14
|
-
function createLocalizedSiteMetadata(options) {
|
|
15
|
-
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const { baseUrl, defaultLocale, locale, localePrefixAsNeeded, locales } = options;
|
|
17
|
-
const t = yield server.getTranslations({ locale, namespace: 'home' });
|
|
18
|
-
return {
|
|
19
|
-
title: t('webTitle'),
|
|
20
|
-
description: t('webDescription'),
|
|
21
|
-
keywords: t('keywords'),
|
|
22
|
-
alternates: {
|
|
23
|
-
canonical: `${baseUrl}${utils.getAsNeededLocalizedUrl(locale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
24
|
-
languages: Object.fromEntries(locales.map((siteLocale) => [
|
|
25
|
-
siteLocale,
|
|
26
|
-
`${baseUrl}${utils.getAsNeededLocalizedUrl(siteLocale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
27
|
-
])),
|
|
28
|
-
},
|
|
29
|
-
icons: DEFAULT_SITE_ICONS,
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
exports.createLocalizedSiteMetadata = createLocalizedSiteMetadata;
|
package/dist/seo-metadata.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from 'tslib';
|
|
2
|
-
import { getTranslations } from 'next-intl/server';
|
|
3
|
-
import { getAsNeededLocalizedUrl } from './utils.mjs';
|
|
4
|
-
|
|
5
|
-
const DEFAULT_SITE_ICONS = [
|
|
6
|
-
{ rel: 'icon', type: 'image/png', sizes: '16x16', url: '/favicon-16x16.png' },
|
|
7
|
-
{ rel: 'icon', type: 'image/png', sizes: '32x32', url: '/favicon-32x32.png' },
|
|
8
|
-
{ rel: 'icon', type: 'image/ico', url: '/favicon.ico' },
|
|
9
|
-
{ rel: 'apple-touch-icon', sizes: '180x180', url: '/favicon-180x180.png' },
|
|
10
|
-
{ rel: 'android-chrome', sizes: '512x512', url: '/favicon-512x512.png' },
|
|
11
|
-
];
|
|
12
|
-
function createLocalizedSiteMetadata(options) {
|
|
13
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
-
const { baseUrl, defaultLocale, locale, localePrefixAsNeeded, locales } = options;
|
|
15
|
-
const t = yield getTranslations({ locale, namespace: 'home' });
|
|
16
|
-
return {
|
|
17
|
-
title: t('webTitle'),
|
|
18
|
-
description: t('webDescription'),
|
|
19
|
-
keywords: t('keywords'),
|
|
20
|
-
alternates: {
|
|
21
|
-
canonical: `${baseUrl}${getAsNeededLocalizedUrl(locale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
22
|
-
languages: Object.fromEntries(locales.map((siteLocale) => [
|
|
23
|
-
siteLocale,
|
|
24
|
-
`${baseUrl}${getAsNeededLocalizedUrl(siteLocale, '/', localePrefixAsNeeded, defaultLocale)}`,
|
|
25
|
-
])),
|
|
26
|
-
},
|
|
27
|
-
icons: DEFAULT_SITE_ICONS,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { createLocalizedSiteMetadata };
|