@opinly/next 0.0.0-alpha-20260707133941
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/config.cjs +134 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +50 -0
- package/dist/config.d.ts +50 -0
- package/dist/config.js +110 -0
- package/dist/config.js.map +1 -0
- package/dist/index.cjs +53 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/json-ld.cjs +61 -0
- package/dist/json-ld.cjs.map +1 -0
- package/dist/json-ld.d.cts +17 -0
- package/dist/json-ld.d.ts +17 -0
- package/dist/json-ld.js +38 -0
- package/dist/json-ld.js.map +1 -0
- package/dist/utils/dates.cjs +33 -0
- package/dist/utils/dates.cjs.map +1 -0
- package/dist/utils/dates.d.cts +3 -0
- package/dist/utils/dates.d.ts +3 -0
- package/dist/utils/dates.js +9 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/generate-metadata.cjs +54 -0
- package/dist/utils/generate-metadata.cjs.map +1 -0
- package/dist/utils/generate-metadata.d.cts +15 -0
- package/dist/utils/generate-metadata.d.ts +15 -0
- package/dist/utils/generate-metadata.js +30 -0
- package/dist/utils/generate-metadata.js.map +1 -0
- package/dist/utils/generate-sitemap-xml.cjs +42 -0
- package/dist/utils/generate-sitemap-xml.cjs.map +1 -0
- package/dist/utils/generate-sitemap-xml.d.cts +7 -0
- package/dist/utils/generate-sitemap-xml.d.ts +7 -0
- package/dist/utils/generate-sitemap-xml.js +18 -0
- package/dist/utils/generate-sitemap-xml.js.map +1 -0
- package/dist/utils/merge.cjs +33 -0
- package/dist/utils/merge.cjs.map +1 -0
- package/dist/utils/merge.d.cts +5 -0
- package/dist/utils/merge.d.ts +5 -0
- package/dist/utils/merge.js +9 -0
- package/dist/utils/merge.js.map +1 -0
- package/dist/utils/sdk-config.cjs +59 -0
- package/dist/utils/sdk-config.cjs.map +1 -0
- package/dist/utils/sdk-config.d.cts +29 -0
- package/dist/utils/sdk-config.d.ts +29 -0
- package/dist/utils/sdk-config.js +34 -0
- package/dist/utils/sdk-config.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var dates_exports = {};
|
|
20
|
+
__export(dates_exports, {
|
|
21
|
+
formatDate: () => formatDate
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(dates_exports);
|
|
24
|
+
const formatDate = (iso) => new Date(iso).toLocaleDateString("en-US", {
|
|
25
|
+
month: "short",
|
|
26
|
+
day: "2-digit",
|
|
27
|
+
year: "numeric"
|
|
28
|
+
});
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
formatDate
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=dates.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/dates.ts"],"sourcesContent":["export const formatDate = (iso: string) =>\n new Date(iso).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"2-digit\",\n year: \"numeric\",\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,aAAa,CAAC,QACzB,IAAI,KAAK,GAAG,EAAE,mBAAmB,SAAS;AAAA,EACxC,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AACR,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/dates.ts"],"sourcesContent":["export const formatDate = (iso: string) =>\n new Date(iso).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"2-digit\",\n year: \"numeric\",\n });\n"],"mappings":"AAAO,MAAM,aAAa,CAAC,QACzB,IAAI,KAAK,GAAG,EAAE,mBAAmB,SAAS;AAAA,EACxC,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AACR,CAAC;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var generate_metadata_exports = {};
|
|
20
|
+
__export(generate_metadata_exports, {
|
|
21
|
+
generateOpinlyMetadata: () => generateOpinlyMetadata
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(generate_metadata_exports);
|
|
24
|
+
var import_shared = require("@opinly/shared");
|
|
25
|
+
var import_sdk_config = require("./sdk-config");
|
|
26
|
+
const generateOpinlyMetadata = async (resolved, parent) => {
|
|
27
|
+
const base = await parent;
|
|
28
|
+
const meta = (0, import_shared.buildMetadata)(resolved, {
|
|
29
|
+
imagesPrefix: import_sdk_config.opinlyConfig.imagesPrefix,
|
|
30
|
+
siteUrl: import_sdk_config.opinlyConfig.siteUrl,
|
|
31
|
+
blogPrefix: import_sdk_config.opinlyConfig.blogPrefix,
|
|
32
|
+
siteName: import_sdk_config.opinlyConfig.siteName,
|
|
33
|
+
categoryPrefix: import_sdk_config.opinlyConfig.categoryPrefix,
|
|
34
|
+
authorPrefix: import_sdk_config.opinlyConfig.authorPrefix,
|
|
35
|
+
tagPrefix: import_sdk_config.opinlyConfig.tagPrefix
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
...base,
|
|
39
|
+
title: meta.title,
|
|
40
|
+
description: meta.description,
|
|
41
|
+
openGraph: {
|
|
42
|
+
title: meta.title,
|
|
43
|
+
description: meta.description,
|
|
44
|
+
type: meta.ogType ?? "website",
|
|
45
|
+
images: meta.ogImage ? [meta.ogImage] : void 0
|
|
46
|
+
},
|
|
47
|
+
...meta.authors ? { authors: meta.authors } : {}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
generateOpinlyMetadata
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=generate-metadata.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/generate-metadata.ts"],"sourcesContent":["import type { Metadata, ResolvingMetadata } from \"next\";\nimport { buildMetadata, type SeoResolved } from \"@opinly/shared\";\nimport { opinlyConfig } from \"./sdk-config\";\n\n/**\n * Build Next.js metadata for a blog route from already-resolved content.\n *\n * The consumer resolves the route once (e.g. `opinly.lookup(slug)` /\n * `opinly.author(slug)`) — for both rendering and metadata — and passes the\n * result here as a `SeoResolved` (`{ type, data }`). Shared extraction lives in\n * @opinly/shared's `buildMetadata`; this only reshapes the neutral `OpinlyMeta`\n * into a Next `Metadata` object. Avoids a second fetch in `generateMetadata`.\n */\nexport const generateOpinlyMetadata = async (\n resolved: SeoResolved,\n parent: ResolvingMetadata,\n): Promise<Metadata> => {\n const base = (await parent) as Metadata;\n const meta = buildMetadata(resolved, {\n imagesPrefix: opinlyConfig.imagesPrefix,\n siteUrl: opinlyConfig.siteUrl,\n blogPrefix: opinlyConfig.blogPrefix,\n siteName: opinlyConfig.siteName,\n categoryPrefix: opinlyConfig.categoryPrefix,\n authorPrefix: opinlyConfig.authorPrefix,\n tagPrefix: opinlyConfig.tagPrefix,\n });\n\n return {\n ...base,\n title: meta.title,\n description: meta.description,\n openGraph: {\n title: meta.title,\n description: meta.description,\n type: meta.ogType ?? \"website\",\n images: meta.ogImage ? [meta.ogImage] : undefined,\n },\n ...(meta.authors ? { authors: meta.authors } : {}),\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAgD;AAChD,wBAA6B;AAWtB,MAAM,yBAAyB,OACpC,UACA,WACsB;AACtB,QAAM,OAAQ,MAAM;AACpB,QAAM,WAAO,6BAAc,UAAU;AAAA,IACnC,cAAc,+BAAa;AAAA,IAC3B,SAAS,+BAAa;AAAA,IACtB,YAAY,+BAAa;AAAA,IACzB,UAAU,+BAAa;AAAA,IACvB,gBAAgB,+BAAa;AAAA,IAC7B,cAAc,+BAAa;AAAA,IAC3B,WAAW,+BAAa;AAAA,EAC1B,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO,KAAK;AAAA,IACZ,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,MACT,OAAO,KAAK;AAAA,MACZ,aAAa,KAAK;AAAA,MAClB,MAAM,KAAK,UAAU;AAAA,MACrB,QAAQ,KAAK,UAAU,CAAC,KAAK,OAAO,IAAI;AAAA,IAC1C;AAAA,IACA,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;AAAA,EAClD;AACF;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ResolvingMetadata, Metadata } from 'next';
|
|
2
|
+
import { SeoResolved } from '@opinly/shared';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Build Next.js metadata for a blog route from already-resolved content.
|
|
6
|
+
*
|
|
7
|
+
* The consumer resolves the route once (e.g. `opinly.lookup(slug)` /
|
|
8
|
+
* `opinly.author(slug)`) — for both rendering and metadata — and passes the
|
|
9
|
+
* result here as a `SeoResolved` (`{ type, data }`). Shared extraction lives in
|
|
10
|
+
* @opinly/shared's `buildMetadata`; this only reshapes the neutral `OpinlyMeta`
|
|
11
|
+
* into a Next `Metadata` object. Avoids a second fetch in `generateMetadata`.
|
|
12
|
+
*/
|
|
13
|
+
declare const generateOpinlyMetadata: (resolved: SeoResolved, parent: ResolvingMetadata) => Promise<Metadata>;
|
|
14
|
+
|
|
15
|
+
export { generateOpinlyMetadata };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ResolvingMetadata, Metadata } from 'next';
|
|
2
|
+
import { SeoResolved } from '@opinly/shared';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Build Next.js metadata for a blog route from already-resolved content.
|
|
6
|
+
*
|
|
7
|
+
* The consumer resolves the route once (e.g. `opinly.lookup(slug)` /
|
|
8
|
+
* `opinly.author(slug)`) — for both rendering and metadata — and passes the
|
|
9
|
+
* result here as a `SeoResolved` (`{ type, data }`). Shared extraction lives in
|
|
10
|
+
* @opinly/shared's `buildMetadata`; this only reshapes the neutral `OpinlyMeta`
|
|
11
|
+
* into a Next `Metadata` object. Avoids a second fetch in `generateMetadata`.
|
|
12
|
+
*/
|
|
13
|
+
declare const generateOpinlyMetadata: (resolved: SeoResolved, parent: ResolvingMetadata) => Promise<Metadata>;
|
|
14
|
+
|
|
15
|
+
export { generateOpinlyMetadata };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { buildMetadata } from "@opinly/shared";
|
|
2
|
+
import { opinlyConfig } from "./sdk-config";
|
|
3
|
+
const generateOpinlyMetadata = async (resolved, parent) => {
|
|
4
|
+
const base = await parent;
|
|
5
|
+
const meta = buildMetadata(resolved, {
|
|
6
|
+
imagesPrefix: opinlyConfig.imagesPrefix,
|
|
7
|
+
siteUrl: opinlyConfig.siteUrl,
|
|
8
|
+
blogPrefix: opinlyConfig.blogPrefix,
|
|
9
|
+
siteName: opinlyConfig.siteName,
|
|
10
|
+
categoryPrefix: opinlyConfig.categoryPrefix,
|
|
11
|
+
authorPrefix: opinlyConfig.authorPrefix,
|
|
12
|
+
tagPrefix: opinlyConfig.tagPrefix
|
|
13
|
+
});
|
|
14
|
+
return {
|
|
15
|
+
...base,
|
|
16
|
+
title: meta.title,
|
|
17
|
+
description: meta.description,
|
|
18
|
+
openGraph: {
|
|
19
|
+
title: meta.title,
|
|
20
|
+
description: meta.description,
|
|
21
|
+
type: meta.ogType ?? "website",
|
|
22
|
+
images: meta.ogImage ? [meta.ogImage] : void 0
|
|
23
|
+
},
|
|
24
|
+
...meta.authors ? { authors: meta.authors } : {}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
generateOpinlyMetadata
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=generate-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/generate-metadata.ts"],"sourcesContent":["import type { Metadata, ResolvingMetadata } from \"next\";\nimport { buildMetadata, type SeoResolved } from \"@opinly/shared\";\nimport { opinlyConfig } from \"./sdk-config\";\n\n/**\n * Build Next.js metadata for a blog route from already-resolved content.\n *\n * The consumer resolves the route once (e.g. `opinly.lookup(slug)` /\n * `opinly.author(slug)`) — for both rendering and metadata — and passes the\n * result here as a `SeoResolved` (`{ type, data }`). Shared extraction lives in\n * @opinly/shared's `buildMetadata`; this only reshapes the neutral `OpinlyMeta`\n * into a Next `Metadata` object. Avoids a second fetch in `generateMetadata`.\n */\nexport const generateOpinlyMetadata = async (\n resolved: SeoResolved,\n parent: ResolvingMetadata,\n): Promise<Metadata> => {\n const base = (await parent) as Metadata;\n const meta = buildMetadata(resolved, {\n imagesPrefix: opinlyConfig.imagesPrefix,\n siteUrl: opinlyConfig.siteUrl,\n blogPrefix: opinlyConfig.blogPrefix,\n siteName: opinlyConfig.siteName,\n categoryPrefix: opinlyConfig.categoryPrefix,\n authorPrefix: opinlyConfig.authorPrefix,\n tagPrefix: opinlyConfig.tagPrefix,\n });\n\n return {\n ...base,\n title: meta.title,\n description: meta.description,\n openGraph: {\n title: meta.title,\n description: meta.description,\n type: meta.ogType ?? \"website\",\n images: meta.ogImage ? [meta.ogImage] : undefined,\n },\n ...(meta.authors ? { authors: meta.authors } : {}),\n };\n};\n"],"mappings":"AACA,SAAS,qBAAuC;AAChD,SAAS,oBAAoB;AAWtB,MAAM,yBAAyB,OACpC,UACA,WACsB;AACtB,QAAM,OAAQ,MAAM;AACpB,QAAM,OAAO,cAAc,UAAU;AAAA,IACnC,cAAc,aAAa;AAAA,IAC3B,SAAS,aAAa;AAAA,IACtB,YAAY,aAAa;AAAA,IACzB,UAAU,aAAa;AAAA,IACvB,gBAAgB,aAAa;AAAA,IAC7B,cAAc,aAAa;AAAA,IAC3B,WAAW,aAAa;AAAA,EAC1B,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO,KAAK;AAAA,IACZ,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,MACT,OAAO,KAAK;AAAA,MACZ,aAAa,KAAK;AAAA,MAClB,MAAM,KAAK,UAAU;AAAA,MACrB,QAAQ,KAAK,UAAU,CAAC,KAAK,OAAO,IAAI;AAAA,IAC1C;AAAA,IACA,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;AAAA,EAClD;AACF;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var generate_sitemap_xml_exports = {};
|
|
20
|
+
__export(generate_sitemap_xml_exports, {
|
|
21
|
+
generateSiteMapXML: () => generateSiteMapXML
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(generate_sitemap_xml_exports);
|
|
24
|
+
function generateSiteMapXML(paths) {
|
|
25
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
26
|
+
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
|
|
27
|
+
${paths.map(({ url, lastModified }) => {
|
|
28
|
+
return `
|
|
29
|
+
<url>
|
|
30
|
+
<loc>${url}</loc>
|
|
31
|
+
<lastmod>${lastModified}</lastmod>
|
|
32
|
+
</url>
|
|
33
|
+
`;
|
|
34
|
+
}).join("")}
|
|
35
|
+
</urlset>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
generateSiteMapXML
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=generate-sitemap-xml.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/generate-sitemap-xml.ts"],"sourcesContent":["/** Build a sitemap.xml string from resolved `{ url, lastModified }` records. */\nexport function generateSiteMapXML(\n paths: { url: string; lastModified: string | Date }[],\n) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <urlset xmlns=\"https://www.sitemaps.org/schemas/sitemap/0.9\">\n ${paths\n .map(({ url, lastModified }) => {\n return `\n <url>\n <loc>${url}</loc>\n <lastmod>${lastModified}</lastmod>\n </url>\n `;\n })\n .join(\"\")}\n </urlset>\n `;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,SAAS,mBACd,OACA;AACA,SAAO;AAAA;AAAA,OAEF,MACC,IAAI,CAAC,EAAE,KAAK,aAAa,MAAM;AAC9B,WAAO;AAAA;AAAA,qBAEK,GAAG;AAAA,yBACC,YAAY;AAAA;AAAA;AAAA,EAG9B,CAAC,EACA,KAAK,EAAE,CAAC;AAAA;AAAA;AAGhB;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function generateSiteMapXML(paths) {
|
|
2
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
3
|
+
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
|
|
4
|
+
${paths.map(({ url, lastModified }) => {
|
|
5
|
+
return `
|
|
6
|
+
<url>
|
|
7
|
+
<loc>${url}</loc>
|
|
8
|
+
<lastmod>${lastModified}</lastmod>
|
|
9
|
+
</url>
|
|
10
|
+
`;
|
|
11
|
+
}).join("")}
|
|
12
|
+
</urlset>
|
|
13
|
+
`;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
generateSiteMapXML
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-sitemap-xml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/generate-sitemap-xml.ts"],"sourcesContent":["/** Build a sitemap.xml string from resolved `{ url, lastModified }` records. */\nexport function generateSiteMapXML(\n paths: { url: string; lastModified: string | Date }[],\n) {\n return `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <urlset xmlns=\"https://www.sitemaps.org/schemas/sitemap/0.9\">\n ${paths\n .map(({ url, lastModified }) => {\n return `\n <url>\n <loc>${url}</loc>\n <lastmod>${lastModified}</lastmod>\n </url>\n `;\n })\n .join(\"\")}\n </urlset>\n `;\n}\n"],"mappings":"AACO,SAAS,mBACd,OACA;AACA,SAAO;AAAA;AAAA,OAEF,MACC,IAAI,CAAC,EAAE,KAAK,aAAa,MAAM;AAC9B,WAAO;AAAA;AAAA,qBAEK,GAAG;AAAA,yBACC,YAAY;AAAA;AAAA;AAAA,EAG9B,CAAC,EACA,KAAK,EAAE,CAAC;AAAA;AAAA;AAGhB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var merge_exports = {};
|
|
20
|
+
__export(merge_exports, {
|
|
21
|
+
cn: () => cn
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(merge_exports);
|
|
24
|
+
var import_clsx = require("clsx");
|
|
25
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
26
|
+
const cn = (...inputs) => {
|
|
27
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
cn
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=merge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/merge.ts"],"sourcesContent":["import { ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,4BAAwB;AAEjB,MAAM,KAAK,IAAI,WAAyB;AAC7C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/merge.ts"],"sourcesContent":["import { ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n"],"mappings":"AAAA,SAAqB,YAAY;AACjC,SAAS,eAAe;AAEjB,MAAM,KAAK,IAAI,WAAyB;AAC7C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var sdk_config_exports = {};
|
|
20
|
+
__export(sdk_config_exports, {
|
|
21
|
+
opinlyConfig: () => opinlyConfig,
|
|
22
|
+
setOpinlyConfig: () => setOpinlyConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(sdk_config_exports);
|
|
25
|
+
const siteUrl = process.env.OPINLY_SITE_URL;
|
|
26
|
+
const opinlyEnvVars = {
|
|
27
|
+
OPINLY_IMAGES_PREFIX: process.env.OPINLY_IMAGES_PREFIX,
|
|
28
|
+
OPINLY_SITE_URL: process.env.OPINLY_SITE_URL,
|
|
29
|
+
OPINLY_BLOG_PREFIX: process.env.OPINLY_BLOG_PREFIX,
|
|
30
|
+
OPINLY_SITE_NAME: process.env.OPINLY_SITE_NAME,
|
|
31
|
+
OPINLY_UNOPTIMIZED_IMAGES: process.env.OPINLY_UNOPTIMIZED_IMAGES,
|
|
32
|
+
OPINLY_PAGES_ROUTER: process.env.OPINLY_PAGES_ROUTER,
|
|
33
|
+
OPINLY_CATEGORY_PREFIX: process.env.OPINLY_CATEGORY_PREFIX,
|
|
34
|
+
OPINLY_AUTHOR_PREFIX: process.env.OPINLY_AUTHOR_PREFIX,
|
|
35
|
+
OPINLY_TAG_PREFIX: process.env.OPINLY_TAG_PREFIX
|
|
36
|
+
};
|
|
37
|
+
let opinlyConfig = {
|
|
38
|
+
cdnUrl: process.env.OPINLY_CDN_URL || "https://cdn.opinly.ai",
|
|
39
|
+
siteUrl: process.env.OPINLY_SITE_URL,
|
|
40
|
+
imagesPrefix: process.env.OPINLY_IMAGES_PREFIX,
|
|
41
|
+
imagesUrl: process.env.OPINLY_IMAGES_PREFIX?.startsWith("/") ? `${process.env.OPINLY_SITE_URL}${process.env.OPINLY_IMAGES_PREFIX}` : process.env.OPINLY_IMAGES_PREFIX,
|
|
42
|
+
blogPrefix: process.env.OPINLY_BLOG_PREFIX,
|
|
43
|
+
blogUrl: `${process.env.OPINLY_SITE_URL}${process.env.OPINLY_BLOG_PREFIX}`,
|
|
44
|
+
siteName: process.env.OPINLY_SITE_NAME,
|
|
45
|
+
unoptimizedImages: process.env.OPINLY_UNOPTIMIZED_IMAGES === "true" ? true : void 0,
|
|
46
|
+
pagesRouter: process.env.OPINLY_PAGES_ROUTER === "true" ? true : false,
|
|
47
|
+
categoryPrefix: process.env.OPINLY_CATEGORY_PREFIX || void 0,
|
|
48
|
+
authorPrefix: process.env.OPINLY_AUTHOR_PREFIX || void 0,
|
|
49
|
+
tagPrefix: process.env.OPINLY_TAG_PREFIX || void 0
|
|
50
|
+
};
|
|
51
|
+
function setOpinlyConfig(newConfig) {
|
|
52
|
+
opinlyConfig = { ...opinlyConfig, ...newConfig };
|
|
53
|
+
}
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
opinlyConfig,
|
|
57
|
+
setOpinlyConfig
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=sdk-config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/sdk-config.ts"],"sourcesContent":["const siteUrl = process.env.OPINLY_SITE_URL;\n\nconst opinlyEnvVars = {\n OPINLY_IMAGES_PREFIX: process.env.OPINLY_IMAGES_PREFIX as string,\n OPINLY_SITE_URL: process.env.OPINLY_SITE_URL as string,\n OPINLY_BLOG_PREFIX: process.env.OPINLY_BLOG_PREFIX as string,\n OPINLY_SITE_NAME: process.env.OPINLY_SITE_NAME as string,\n OPINLY_UNOPTIMIZED_IMAGES: process.env.OPINLY_UNOPTIMIZED_IMAGES as\n | string\n | undefined,\n OPINLY_PAGES_ROUTER: process.env.OPINLY_PAGES_ROUTER,\n OPINLY_CATEGORY_PREFIX: process.env.OPINLY_CATEGORY_PREFIX as\n | string\n | undefined,\n OPINLY_AUTHOR_PREFIX: process.env.OPINLY_AUTHOR_PREFIX as string | undefined,\n OPINLY_TAG_PREFIX: process.env.OPINLY_TAG_PREFIX as string | undefined,\n};\n\nexport type OpinlyEnvVars = typeof opinlyEnvVars;\n\nexport let opinlyConfig: {\n cdnUrl: string;\n imagesPrefix: string;\n imagesUrl: string;\n siteUrl: string;\n blogPrefix: string;\n blogUrl: string;\n siteName: string;\n unoptimizedImages?: boolean;\n pagesRouter: boolean;\n categoryPrefix?: string;\n authorPrefix?: string;\n tagPrefix?: string;\n} = {\n cdnUrl: process.env.OPINLY_CDN_URL || \"https://cdn.opinly.ai\",\n siteUrl: process.env.OPINLY_SITE_URL as string,\n imagesPrefix: process.env.OPINLY_IMAGES_PREFIX as string,\n imagesUrl: process.env.OPINLY_IMAGES_PREFIX?.startsWith(\"/\")\n ? `${process.env.OPINLY_SITE_URL as string}${\n process.env.OPINLY_IMAGES_PREFIX as string\n }`\n : (process.env.OPINLY_IMAGES_PREFIX as string),\n blogPrefix: process.env.OPINLY_BLOG_PREFIX as string,\n blogUrl: `${process.env.OPINLY_SITE_URL as string}${\n process.env.OPINLY_BLOG_PREFIX as string\n }`,\n siteName: process.env.OPINLY_SITE_NAME as string,\n unoptimizedImages:\n process.env.OPINLY_UNOPTIMIZED_IMAGES === \"true\" ? true : undefined,\n pagesRouter: process.env.OPINLY_PAGES_ROUTER === \"true\" ? true : false,\n categoryPrefix: process.env.OPINLY_CATEGORY_PREFIX || undefined,\n authorPrefix: process.env.OPINLY_AUTHOR_PREFIX || undefined,\n tagPrefix: process.env.OPINLY_TAG_PREFIX || undefined,\n};\n\nexport function setOpinlyConfig(newConfig: typeof opinlyConfig) {\n opinlyConfig = { ...opinlyConfig, ...newConfig };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,UAAU,QAAQ,IAAI;AAE5B,MAAM,gBAAgB;AAAA,EACpB,sBAAsB,QAAQ,IAAI;AAAA,EAClC,iBAAiB,QAAQ,IAAI;AAAA,EAC7B,oBAAoB,QAAQ,IAAI;AAAA,EAChC,kBAAkB,QAAQ,IAAI;AAAA,EAC9B,2BAA2B,QAAQ,IAAI;AAAA,EAGvC,qBAAqB,QAAQ,IAAI;AAAA,EACjC,wBAAwB,QAAQ,IAAI;AAAA,EAGpC,sBAAsB,QAAQ,IAAI;AAAA,EAClC,mBAAmB,QAAQ,IAAI;AACjC;AAIO,IAAI,eAaP;AAAA,EACF,QAAQ,QAAQ,IAAI,kBAAkB;AAAA,EACtC,SAAS,QAAQ,IAAI;AAAA,EACrB,cAAc,QAAQ,IAAI;AAAA,EAC1B,WAAW,QAAQ,IAAI,sBAAsB,WAAW,GAAG,IACvD,GAAG,QAAQ,IAAI,eAAyB,GACtC,QAAQ,IAAI,oBACd,KACC,QAAQ,IAAI;AAAA,EACjB,YAAY,QAAQ,IAAI;AAAA,EACxB,SAAS,GAAG,QAAQ,IAAI,eAAyB,GAC/C,QAAQ,IAAI,kBACd;AAAA,EACA,UAAU,QAAQ,IAAI;AAAA,EACtB,mBACE,QAAQ,IAAI,8BAA8B,SAAS,OAAO;AAAA,EAC5D,aAAa,QAAQ,IAAI,wBAAwB,SAAS,OAAO;AAAA,EACjE,gBAAgB,QAAQ,IAAI,0BAA0B;AAAA,EACtD,cAAc,QAAQ,IAAI,wBAAwB;AAAA,EAClD,WAAW,QAAQ,IAAI,qBAAqB;AAC9C;AAEO,SAAS,gBAAgB,WAAgC;AAC9D,iBAAe,EAAE,GAAG,cAAc,GAAG,UAAU;AACjD;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const opinlyEnvVars: {
|
|
2
|
+
OPINLY_IMAGES_PREFIX: string;
|
|
3
|
+
OPINLY_SITE_URL: string;
|
|
4
|
+
OPINLY_BLOG_PREFIX: string;
|
|
5
|
+
OPINLY_SITE_NAME: string;
|
|
6
|
+
OPINLY_UNOPTIMIZED_IMAGES: string | undefined;
|
|
7
|
+
OPINLY_PAGES_ROUTER: string | undefined;
|
|
8
|
+
OPINLY_CATEGORY_PREFIX: string | undefined;
|
|
9
|
+
OPINLY_AUTHOR_PREFIX: string | undefined;
|
|
10
|
+
OPINLY_TAG_PREFIX: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
type OpinlyEnvVars = typeof opinlyEnvVars;
|
|
13
|
+
declare let opinlyConfig: {
|
|
14
|
+
cdnUrl: string;
|
|
15
|
+
imagesPrefix: string;
|
|
16
|
+
imagesUrl: string;
|
|
17
|
+
siteUrl: string;
|
|
18
|
+
blogPrefix: string;
|
|
19
|
+
blogUrl: string;
|
|
20
|
+
siteName: string;
|
|
21
|
+
unoptimizedImages?: boolean;
|
|
22
|
+
pagesRouter: boolean;
|
|
23
|
+
categoryPrefix?: string;
|
|
24
|
+
authorPrefix?: string;
|
|
25
|
+
tagPrefix?: string;
|
|
26
|
+
};
|
|
27
|
+
declare function setOpinlyConfig(newConfig: typeof opinlyConfig): void;
|
|
28
|
+
|
|
29
|
+
export { type OpinlyEnvVars, opinlyConfig, setOpinlyConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const opinlyEnvVars: {
|
|
2
|
+
OPINLY_IMAGES_PREFIX: string;
|
|
3
|
+
OPINLY_SITE_URL: string;
|
|
4
|
+
OPINLY_BLOG_PREFIX: string;
|
|
5
|
+
OPINLY_SITE_NAME: string;
|
|
6
|
+
OPINLY_UNOPTIMIZED_IMAGES: string | undefined;
|
|
7
|
+
OPINLY_PAGES_ROUTER: string | undefined;
|
|
8
|
+
OPINLY_CATEGORY_PREFIX: string | undefined;
|
|
9
|
+
OPINLY_AUTHOR_PREFIX: string | undefined;
|
|
10
|
+
OPINLY_TAG_PREFIX: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
type OpinlyEnvVars = typeof opinlyEnvVars;
|
|
13
|
+
declare let opinlyConfig: {
|
|
14
|
+
cdnUrl: string;
|
|
15
|
+
imagesPrefix: string;
|
|
16
|
+
imagesUrl: string;
|
|
17
|
+
siteUrl: string;
|
|
18
|
+
blogPrefix: string;
|
|
19
|
+
blogUrl: string;
|
|
20
|
+
siteName: string;
|
|
21
|
+
unoptimizedImages?: boolean;
|
|
22
|
+
pagesRouter: boolean;
|
|
23
|
+
categoryPrefix?: string;
|
|
24
|
+
authorPrefix?: string;
|
|
25
|
+
tagPrefix?: string;
|
|
26
|
+
};
|
|
27
|
+
declare function setOpinlyConfig(newConfig: typeof opinlyConfig): void;
|
|
28
|
+
|
|
29
|
+
export { type OpinlyEnvVars, opinlyConfig, setOpinlyConfig };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const siteUrl = process.env.OPINLY_SITE_URL;
|
|
2
|
+
const opinlyEnvVars = {
|
|
3
|
+
OPINLY_IMAGES_PREFIX: process.env.OPINLY_IMAGES_PREFIX,
|
|
4
|
+
OPINLY_SITE_URL: process.env.OPINLY_SITE_URL,
|
|
5
|
+
OPINLY_BLOG_PREFIX: process.env.OPINLY_BLOG_PREFIX,
|
|
6
|
+
OPINLY_SITE_NAME: process.env.OPINLY_SITE_NAME,
|
|
7
|
+
OPINLY_UNOPTIMIZED_IMAGES: process.env.OPINLY_UNOPTIMIZED_IMAGES,
|
|
8
|
+
OPINLY_PAGES_ROUTER: process.env.OPINLY_PAGES_ROUTER,
|
|
9
|
+
OPINLY_CATEGORY_PREFIX: process.env.OPINLY_CATEGORY_PREFIX,
|
|
10
|
+
OPINLY_AUTHOR_PREFIX: process.env.OPINLY_AUTHOR_PREFIX,
|
|
11
|
+
OPINLY_TAG_PREFIX: process.env.OPINLY_TAG_PREFIX
|
|
12
|
+
};
|
|
13
|
+
let opinlyConfig = {
|
|
14
|
+
cdnUrl: process.env.OPINLY_CDN_URL || "https://cdn.opinly.ai",
|
|
15
|
+
siteUrl: process.env.OPINLY_SITE_URL,
|
|
16
|
+
imagesPrefix: process.env.OPINLY_IMAGES_PREFIX,
|
|
17
|
+
imagesUrl: process.env.OPINLY_IMAGES_PREFIX?.startsWith("/") ? `${process.env.OPINLY_SITE_URL}${process.env.OPINLY_IMAGES_PREFIX}` : process.env.OPINLY_IMAGES_PREFIX,
|
|
18
|
+
blogPrefix: process.env.OPINLY_BLOG_PREFIX,
|
|
19
|
+
blogUrl: `${process.env.OPINLY_SITE_URL}${process.env.OPINLY_BLOG_PREFIX}`,
|
|
20
|
+
siteName: process.env.OPINLY_SITE_NAME,
|
|
21
|
+
unoptimizedImages: process.env.OPINLY_UNOPTIMIZED_IMAGES === "true" ? true : void 0,
|
|
22
|
+
pagesRouter: process.env.OPINLY_PAGES_ROUTER === "true" ? true : false,
|
|
23
|
+
categoryPrefix: process.env.OPINLY_CATEGORY_PREFIX || void 0,
|
|
24
|
+
authorPrefix: process.env.OPINLY_AUTHOR_PREFIX || void 0,
|
|
25
|
+
tagPrefix: process.env.OPINLY_TAG_PREFIX || void 0
|
|
26
|
+
};
|
|
27
|
+
function setOpinlyConfig(newConfig) {
|
|
28
|
+
opinlyConfig = { ...opinlyConfig, ...newConfig };
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
opinlyConfig,
|
|
32
|
+
setOpinlyConfig
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=sdk-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/sdk-config.ts"],"sourcesContent":["const siteUrl = process.env.OPINLY_SITE_URL;\n\nconst opinlyEnvVars = {\n OPINLY_IMAGES_PREFIX: process.env.OPINLY_IMAGES_PREFIX as string,\n OPINLY_SITE_URL: process.env.OPINLY_SITE_URL as string,\n OPINLY_BLOG_PREFIX: process.env.OPINLY_BLOG_PREFIX as string,\n OPINLY_SITE_NAME: process.env.OPINLY_SITE_NAME as string,\n OPINLY_UNOPTIMIZED_IMAGES: process.env.OPINLY_UNOPTIMIZED_IMAGES as\n | string\n | undefined,\n OPINLY_PAGES_ROUTER: process.env.OPINLY_PAGES_ROUTER,\n OPINLY_CATEGORY_PREFIX: process.env.OPINLY_CATEGORY_PREFIX as\n | string\n | undefined,\n OPINLY_AUTHOR_PREFIX: process.env.OPINLY_AUTHOR_PREFIX as string | undefined,\n OPINLY_TAG_PREFIX: process.env.OPINLY_TAG_PREFIX as string | undefined,\n};\n\nexport type OpinlyEnvVars = typeof opinlyEnvVars;\n\nexport let opinlyConfig: {\n cdnUrl: string;\n imagesPrefix: string;\n imagesUrl: string;\n siteUrl: string;\n blogPrefix: string;\n blogUrl: string;\n siteName: string;\n unoptimizedImages?: boolean;\n pagesRouter: boolean;\n categoryPrefix?: string;\n authorPrefix?: string;\n tagPrefix?: string;\n} = {\n cdnUrl: process.env.OPINLY_CDN_URL || \"https://cdn.opinly.ai\",\n siteUrl: process.env.OPINLY_SITE_URL as string,\n imagesPrefix: process.env.OPINLY_IMAGES_PREFIX as string,\n imagesUrl: process.env.OPINLY_IMAGES_PREFIX?.startsWith(\"/\")\n ? `${process.env.OPINLY_SITE_URL as string}${\n process.env.OPINLY_IMAGES_PREFIX as string\n }`\n : (process.env.OPINLY_IMAGES_PREFIX as string),\n blogPrefix: process.env.OPINLY_BLOG_PREFIX as string,\n blogUrl: `${process.env.OPINLY_SITE_URL as string}${\n process.env.OPINLY_BLOG_PREFIX as string\n }`,\n siteName: process.env.OPINLY_SITE_NAME as string,\n unoptimizedImages:\n process.env.OPINLY_UNOPTIMIZED_IMAGES === \"true\" ? true : undefined,\n pagesRouter: process.env.OPINLY_PAGES_ROUTER === \"true\" ? true : false,\n categoryPrefix: process.env.OPINLY_CATEGORY_PREFIX || undefined,\n authorPrefix: process.env.OPINLY_AUTHOR_PREFIX || undefined,\n tagPrefix: process.env.OPINLY_TAG_PREFIX || undefined,\n};\n\nexport function setOpinlyConfig(newConfig: typeof opinlyConfig) {\n opinlyConfig = { ...opinlyConfig, ...newConfig };\n}\n"],"mappings":"AAAA,MAAM,UAAU,QAAQ,IAAI;AAE5B,MAAM,gBAAgB;AAAA,EACpB,sBAAsB,QAAQ,IAAI;AAAA,EAClC,iBAAiB,QAAQ,IAAI;AAAA,EAC7B,oBAAoB,QAAQ,IAAI;AAAA,EAChC,kBAAkB,QAAQ,IAAI;AAAA,EAC9B,2BAA2B,QAAQ,IAAI;AAAA,EAGvC,qBAAqB,QAAQ,IAAI;AAAA,EACjC,wBAAwB,QAAQ,IAAI;AAAA,EAGpC,sBAAsB,QAAQ,IAAI;AAAA,EAClC,mBAAmB,QAAQ,IAAI;AACjC;AAIO,IAAI,eAaP;AAAA,EACF,QAAQ,QAAQ,IAAI,kBAAkB;AAAA,EACtC,SAAS,QAAQ,IAAI;AAAA,EACrB,cAAc,QAAQ,IAAI;AAAA,EAC1B,WAAW,QAAQ,IAAI,sBAAsB,WAAW,GAAG,IACvD,GAAG,QAAQ,IAAI,eAAyB,GACtC,QAAQ,IAAI,oBACd,KACC,QAAQ,IAAI;AAAA,EACjB,YAAY,QAAQ,IAAI;AAAA,EACxB,SAAS,GAAG,QAAQ,IAAI,eAAyB,GAC/C,QAAQ,IAAI,kBACd;AAAA,EACA,UAAU,QAAQ,IAAI;AAAA,EACtB,mBACE,QAAQ,IAAI,8BAA8B,SAAS,OAAO;AAAA,EAC5D,aAAa,QAAQ,IAAI,wBAAwB,SAAS,OAAO;AAAA,EACjE,gBAAgB,QAAQ,IAAI,0BAA0B;AAAA,EACtD,cAAc,QAAQ,IAAI,wBAAwB;AAAA,EAClD,WAAW,QAAQ,IAAI,qBAAqB;AAC9C;AAEO,SAAS,gBAAgB,WAAgC;AAC9D,iBAAe,EAAE,GAAG,cAAc,GAAG,UAAU;AACjD;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opinly/next",
|
|
3
|
+
"version": "0.0.0-alpha-20260707133941",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@tsconfig/next": "^2.0.3",
|
|
11
|
+
"@types/node": "^20.0.0",
|
|
12
|
+
"@types/react": "19.2.2",
|
|
13
|
+
"@types/react-dom": "19.2.2",
|
|
14
|
+
"typescript": "^5.3.3"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@tsconfig/next": "^2.0.3",
|
|
18
|
+
"autoprefixer": "^10.0.0",
|
|
19
|
+
"next": "^15.0.0 || ^16.0.0",
|
|
20
|
+
"postcss": "^8.0.0",
|
|
21
|
+
"react": "^19.0.0 || ^18.0.0",
|
|
22
|
+
"react-dom": "^19.0.0 || ^18.0.0",
|
|
23
|
+
"tailwindcss": "^4.0.0 || ^3.0.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"clsx": "^2.1.1",
|
|
27
|
+
"schema-dts": "^1.1.5",
|
|
28
|
+
"tailwind-merge": "^1.14.0",
|
|
29
|
+
"zod": "^3.25.67",
|
|
30
|
+
"@opinly/backend": "0.0.0-alpha-20260707133941",
|
|
31
|
+
"@opinly/shared": "0.0.0-alpha-20260707133941"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/**"
|
|
38
|
+
],
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"exports": {
|
|
44
|
+
".": {
|
|
45
|
+
"import": "./dist/index.js",
|
|
46
|
+
"require": "./dist/index.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./config": {
|
|
49
|
+
"import": "./dist/config.js",
|
|
50
|
+
"require": "./dist/config.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./json-ld": {
|
|
53
|
+
"import": "./dist/json-ld.js",
|
|
54
|
+
"require": "./dist/json-ld.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./utils/*": {
|
|
57
|
+
"import": "./dist/utils/*.js",
|
|
58
|
+
"require": "./dist/utils/*.cjs"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/opinly/opinly-sdk.git",
|
|
64
|
+
"directory": "packages/next"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "tsup",
|
|
68
|
+
"packages-dev": "tsup --config tsup.config.ts --watch",
|
|
69
|
+
"check-types": "tsc --noEmit",
|
|
70
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
71
|
+
}
|
|
72
|
+
}
|