@elyndra/next 1.2.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/build/cjs/components/ElyndraBackgroundStyle.d.ts +7 -0
- package/build/cjs/components/ElyndraBackgroundStyle.js +9 -0
- package/build/cjs/components/ElyndraFavicon.d.ts +8 -0
- package/build/cjs/components/ElyndraFavicon.js +9 -0
- package/build/cjs/index.d.ts +5 -0
- package/build/cjs/index.js +8 -0
- package/build/cjs/metadata/createElyndraMetadata.d.ts +33 -0
- package/build/cjs/metadata/createElyndraMetadata.js +32 -0
- package/build/cjs/metadata/createElyndraPageMetadata.d.ts +12 -0
- package/build/cjs/metadata/createElyndraPageMetadata.js +11 -0
- package/build/cjs/metadata/createElyndraViewport.d.ts +9 -0
- package/build/cjs/metadata/createElyndraViewport.js +8 -0
- package/build/cjs/package.json +1 -0
- package/build/esm/components/ElyndraBackgroundStyle.d.ts +7 -0
- package/build/esm/components/ElyndraBackgroundStyle.js +5 -0
- package/build/esm/components/ElyndraFavicon.d.ts +8 -0
- package/build/esm/components/ElyndraFavicon.js +5 -0
- package/build/esm/index.d.ts +5 -0
- package/build/esm/index.js +5 -0
- package/build/esm/metadata/createElyndraMetadata.d.ts +33 -0
- package/build/esm/metadata/createElyndraMetadata.js +29 -0
- package/build/esm/metadata/createElyndraPageMetadata.d.ts +12 -0
- package/build/esm/metadata/createElyndraPageMetadata.js +8 -0
- package/build/esm/metadata/createElyndraViewport.d.ts +9 -0
- package/build/esm/metadata/createElyndraViewport.js +5 -0
- package/build/esm/package.json +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
interface ElyndraBackgroundStyleProps {
|
|
3
|
+
background: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ElyndraBackgroundStyle: ({ background }: ElyndraBackgroundStyleProps) => ReactElement;
|
|
6
|
+
export { ElyndraBackgroundStyle };
|
|
7
|
+
export type { ElyndraBackgroundStyleProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElyndraBackgroundStyle = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const ElyndraBackgroundStyle = ({ background }) => {
|
|
7
|
+
return react_1.default.createElement("style", null, `html,body{background:${background}}`);
|
|
8
|
+
};
|
|
9
|
+
exports.ElyndraBackgroundStyle = ElyndraBackgroundStyle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
interface ElyndraFaviconProps {
|
|
3
|
+
href?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ElyndraFavicon: ({ href, type }: ElyndraFaviconProps) => ReactElement;
|
|
7
|
+
export { ElyndraFavicon };
|
|
8
|
+
export type { ElyndraFaviconProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElyndraFavicon = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const ElyndraFavicon = ({ href = '/icon.svg', type = 'image/svg+xml' }) => {
|
|
7
|
+
return react_1.default.createElement("link", { rel: 'icon', href: href, type: type });
|
|
8
|
+
};
|
|
9
|
+
exports.ElyndraFavicon = ElyndraFavicon;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './metadata/createElyndraMetadata.js';
|
|
2
|
+
export * from './metadata/createElyndraPageMetadata.js';
|
|
3
|
+
export * from './metadata/createElyndraViewport.js';
|
|
4
|
+
export * from './components/ElyndraBackgroundStyle.js';
|
|
5
|
+
export * from './components/ElyndraFavicon.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./metadata/createElyndraMetadata.js"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./metadata/createElyndraPageMetadata.js"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./metadata/createElyndraViewport.js"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./components/ElyndraBackgroundStyle.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./components/ElyndraFavicon.js"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface CreateElyndraMetadataOptions {
|
|
2
|
+
siteUrl: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
imagePath?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
twitterCard?: 'summary' | 'summary_large_image';
|
|
8
|
+
}
|
|
9
|
+
interface ElyndraMetadata {
|
|
10
|
+
metadataBase: URL;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
openGraph: {
|
|
14
|
+
type: 'website';
|
|
15
|
+
url: string;
|
|
16
|
+
title: string;
|
|
17
|
+
siteName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
images: string[];
|
|
20
|
+
};
|
|
21
|
+
twitter: {
|
|
22
|
+
card: 'summary' | 'summary_large_image';
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
images: string[];
|
|
26
|
+
};
|
|
27
|
+
icons: {
|
|
28
|
+
icon: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare const createElyndraMetadata: (options: CreateElyndraMetadataOptions) => ElyndraMetadata;
|
|
32
|
+
export { createElyndraMetadata };
|
|
33
|
+
export type { CreateElyndraMetadataOptions, ElyndraMetadata };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createElyndraMetadata = void 0;
|
|
4
|
+
const createElyndraMetadata = (options) => {
|
|
5
|
+
const { siteUrl, title, description, imagePath = '/elyndra.jpg', icon = '/icon.svg', twitterCard = 'summary_large_image', } = options;
|
|
6
|
+
if (siteUrl === '') {
|
|
7
|
+
throw new Error('[elyndra] createElyndraMetadata: `siteUrl` must not be empty.');
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
metadataBase: new URL(siteUrl),
|
|
11
|
+
title,
|
|
12
|
+
description,
|
|
13
|
+
openGraph: {
|
|
14
|
+
type: 'website',
|
|
15
|
+
url: '/',
|
|
16
|
+
title,
|
|
17
|
+
siteName: title,
|
|
18
|
+
description,
|
|
19
|
+
images: [imagePath],
|
|
20
|
+
},
|
|
21
|
+
twitter: {
|
|
22
|
+
card: twitterCard,
|
|
23
|
+
title,
|
|
24
|
+
description,
|
|
25
|
+
images: [imagePath],
|
|
26
|
+
},
|
|
27
|
+
icons: {
|
|
28
|
+
icon,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.createElyndraMetadata = createElyndraMetadata;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface CreateElyndraPageMetadataOptions {
|
|
2
|
+
title: string;
|
|
3
|
+
siteTitle: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
interface ElyndraPageMetadata {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
declare const createElyndraPageMetadata: (options: CreateElyndraPageMetadataOptions) => ElyndraPageMetadata;
|
|
11
|
+
export { createElyndraPageMetadata };
|
|
12
|
+
export type { CreateElyndraPageMetadataOptions, ElyndraPageMetadata };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createElyndraPageMetadata = void 0;
|
|
4
|
+
const createElyndraPageMetadata = (options) => {
|
|
5
|
+
const { title, siteTitle, description } = options;
|
|
6
|
+
return {
|
|
7
|
+
title: `${title} | ${siteTitle}`,
|
|
8
|
+
description,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
exports.createElyndraPageMetadata = createElyndraPageMetadata;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CreateElyndraViewportOptions {
|
|
2
|
+
themeColor: string;
|
|
3
|
+
}
|
|
4
|
+
interface ElyndraViewport {
|
|
5
|
+
themeColor: string;
|
|
6
|
+
}
|
|
7
|
+
declare const createElyndraViewport: (options: CreateElyndraViewportOptions) => ElyndraViewport;
|
|
8
|
+
export { createElyndraViewport };
|
|
9
|
+
export type { CreateElyndraViewportOptions, ElyndraViewport };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createElyndraViewport = void 0;
|
|
4
|
+
const createElyndraViewport = (options) => {
|
|
5
|
+
const { themeColor } = options;
|
|
6
|
+
return { themeColor };
|
|
7
|
+
};
|
|
8
|
+
exports.createElyndraViewport = createElyndraViewport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
interface ElyndraBackgroundStyleProps {
|
|
3
|
+
background: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ElyndraBackgroundStyle: ({ background }: ElyndraBackgroundStyleProps) => ReactElement;
|
|
6
|
+
export { ElyndraBackgroundStyle };
|
|
7
|
+
export type { ElyndraBackgroundStyleProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
interface ElyndraFaviconProps {
|
|
3
|
+
href?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ElyndraFavicon: ({ href, type }: ElyndraFaviconProps) => ReactElement;
|
|
7
|
+
export { ElyndraFavicon };
|
|
8
|
+
export type { ElyndraFaviconProps };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './metadata/createElyndraMetadata.js';
|
|
2
|
+
export * from './metadata/createElyndraPageMetadata.js';
|
|
3
|
+
export * from './metadata/createElyndraViewport.js';
|
|
4
|
+
export * from './components/ElyndraBackgroundStyle.js';
|
|
5
|
+
export * from './components/ElyndraFavicon.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './metadata/createElyndraMetadata.js';
|
|
2
|
+
export * from './metadata/createElyndraPageMetadata.js';
|
|
3
|
+
export * from './metadata/createElyndraViewport.js';
|
|
4
|
+
export * from './components/ElyndraBackgroundStyle.js';
|
|
5
|
+
export * from './components/ElyndraFavicon.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface CreateElyndraMetadataOptions {
|
|
2
|
+
siteUrl: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
imagePath?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
twitterCard?: 'summary' | 'summary_large_image';
|
|
8
|
+
}
|
|
9
|
+
interface ElyndraMetadata {
|
|
10
|
+
metadataBase: URL;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
openGraph: {
|
|
14
|
+
type: 'website';
|
|
15
|
+
url: string;
|
|
16
|
+
title: string;
|
|
17
|
+
siteName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
images: string[];
|
|
20
|
+
};
|
|
21
|
+
twitter: {
|
|
22
|
+
card: 'summary' | 'summary_large_image';
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
images: string[];
|
|
26
|
+
};
|
|
27
|
+
icons: {
|
|
28
|
+
icon: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare const createElyndraMetadata: (options: CreateElyndraMetadataOptions) => ElyndraMetadata;
|
|
32
|
+
export { createElyndraMetadata };
|
|
33
|
+
export type { CreateElyndraMetadataOptions, ElyndraMetadata };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const createElyndraMetadata = (options) => {
|
|
2
|
+
const { siteUrl, title, description, imagePath = '/elyndra.jpg', icon = '/icon.svg', twitterCard = 'summary_large_image', } = options;
|
|
3
|
+
if (siteUrl === '') {
|
|
4
|
+
throw new Error('[elyndra] createElyndraMetadata: `siteUrl` must not be empty.');
|
|
5
|
+
}
|
|
6
|
+
return {
|
|
7
|
+
metadataBase: new URL(siteUrl),
|
|
8
|
+
title,
|
|
9
|
+
description,
|
|
10
|
+
openGraph: {
|
|
11
|
+
type: 'website',
|
|
12
|
+
url: '/',
|
|
13
|
+
title,
|
|
14
|
+
siteName: title,
|
|
15
|
+
description,
|
|
16
|
+
images: [imagePath],
|
|
17
|
+
},
|
|
18
|
+
twitter: {
|
|
19
|
+
card: twitterCard,
|
|
20
|
+
title,
|
|
21
|
+
description,
|
|
22
|
+
images: [imagePath],
|
|
23
|
+
},
|
|
24
|
+
icons: {
|
|
25
|
+
icon,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export { createElyndraMetadata };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface CreateElyndraPageMetadataOptions {
|
|
2
|
+
title: string;
|
|
3
|
+
siteTitle: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
interface ElyndraPageMetadata {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
declare const createElyndraPageMetadata: (options: CreateElyndraPageMetadataOptions) => ElyndraPageMetadata;
|
|
11
|
+
export { createElyndraPageMetadata };
|
|
12
|
+
export type { CreateElyndraPageMetadataOptions, ElyndraPageMetadata };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CreateElyndraViewportOptions {
|
|
2
|
+
themeColor: string;
|
|
3
|
+
}
|
|
4
|
+
interface ElyndraViewport {
|
|
5
|
+
themeColor: string;
|
|
6
|
+
}
|
|
7
|
+
declare const createElyndraViewport: (options: CreateElyndraViewportOptions) => ElyndraViewport;
|
|
8
|
+
export { createElyndraViewport };
|
|
9
|
+
export type { CreateElyndraViewportOptions, ElyndraViewport };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elyndra/next",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"description": "Elyndra server-only helpers for Next.js",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"elyndra",
|
|
11
|
+
"next",
|
|
12
|
+
"nextjs",
|
|
13
|
+
"metadata",
|
|
14
|
+
"server",
|
|
15
|
+
"front-end",
|
|
16
|
+
"framework"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://elyndra.dev",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/Gabox301/elyndra.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/Gabox301/elyndra/issues"
|
|
25
|
+
},
|
|
26
|
+
"funding": "https://github.com/sponsors/romelperez",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"files": [
|
|
29
|
+
"build"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"import": "./build/esm/index.js",
|
|
34
|
+
"require": "./build/cjs/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./build/": {
|
|
37
|
+
"default": "./build/"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"types": "./build/esm/index.d.ts",
|
|
41
|
+
"module": "./build/esm/index.js",
|
|
42
|
+
"main": "./build/cjs/index.js",
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "19",
|
|
45
|
+
"next": "16"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"tslib": "2.8.1"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "npm run build-esm && npm run build-cjs",
|
|
52
|
+
"build-esm": "node ../../scripts/pkg-build.mjs esm",
|
|
53
|
+
"build-cjs": "node ../../scripts/pkg-build.mjs cjs",
|
|
54
|
+
"dev": "node ../../scripts/pkg-build.mjs esm --watch"
|
|
55
|
+
}
|
|
56
|
+
}
|