naystack 1.8.15 → 1.8.17
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/auth/index.cjs.js +32 -10
- package/dist/auth/index.esm.js +32 -10
- package/dist/auth/instagram/index.cjs.js +32 -10
- package/dist/auth/instagram/index.esm.js +32 -10
- package/dist/auth/instagram/route.cjs.js +32 -10
- package/dist/auth/instagram/route.esm.js +32 -10
- package/dist/socials/index.cjs.js +48 -18
- package/dist/socials/index.d.mts +1 -1
- package/dist/socials/index.d.ts +1 -1
- package/dist/socials/index.esm.js +48 -18
- package/dist/socials/instagram/setters.cjs.js +42 -15
- package/dist/socials/instagram/setters.esm.js +42 -15
- package/dist/socials/instagram/types.d.mts +3 -1
- package/dist/socials/instagram/types.d.ts +3 -1
- package/dist/socials/meta/container.cjs.js +32 -10
- package/dist/socials/meta/container.d.mts +21 -3
- package/dist/socials/meta/container.d.ts +21 -3
- package/dist/socials/meta/container.esm.js +32 -10
- package/dist/socials/threads/setters.cjs.js +38 -13
- package/dist/socials/threads/setters.esm.js +38 -13
- package/dist/socials/threads/types.d.mts +3 -1
- package/dist/socials/threads/types.d.ts +3 -1
- package/dist/utils/client/index.cjs.js +36 -22
- package/dist/utils/client/index.d.mts +1 -1
- package/dist/utils/client/index.d.ts +1 -1
- package/dist/utils/client/index.esm.js +36 -22
- package/dist/utils/client/seo.cjs.js +36 -22
- package/dist/utils/client/seo.d.mts +15 -3
- package/dist/utils/client/seo.d.ts +15 -3
- package/dist/utils/client/seo.esm.js +36 -22
- package/package.json +1 -1
|
@@ -122,28 +122,42 @@ function getEnv(key, skipCheck) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// src/utils/client/seo.ts
|
|
125
|
-
var setupSEO = (SEO) => (title, description, image) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
125
|
+
var setupSEO = (SEO) => (title, description, image, options) => {
|
|
126
|
+
const isSmallImage = options?.imageSize === "small";
|
|
127
|
+
return {
|
|
128
|
+
title: title ? `${title} \u2022 ${SEO.siteName}` : SEO.title,
|
|
129
|
+
description: description || SEO.description,
|
|
130
|
+
openGraph: {
|
|
131
|
+
type: "website",
|
|
132
|
+
siteName: SEO.siteName,
|
|
133
|
+
// WhatsApp/Slack pick the thumbnail layout off the declared dimensions,
|
|
134
|
+
// so a small image needs them stated explicitly to avoid a full-bleed preview.
|
|
135
|
+
...image ? {
|
|
136
|
+
images: [
|
|
137
|
+
isSmallImage ? {
|
|
138
|
+
url: image,
|
|
139
|
+
width: SMALL_IMAGE_SIZE,
|
|
140
|
+
height: SMALL_IMAGE_SIZE
|
|
141
|
+
} : image
|
|
142
|
+
]
|
|
143
|
+
} : {}
|
|
144
|
+
},
|
|
145
|
+
twitter: {
|
|
146
|
+
card: isSmallImage ? "summary" : "summary_large_image",
|
|
147
|
+
...image ? { images: [image] } : {}
|
|
148
|
+
},
|
|
149
|
+
appleWebApp: {
|
|
150
|
+
title: title ? title : SEO.title,
|
|
151
|
+
capable: true,
|
|
152
|
+
startupImage: `${getEnv("NEXT_PUBLIC_BASE_URL" /* NEXT_PUBLIC_BASE_URL */)}/apple-icon.png`
|
|
153
|
+
},
|
|
154
|
+
applicationName: SEO.siteName,
|
|
155
|
+
creator: SEO.siteName,
|
|
156
|
+
robots: "index, follow",
|
|
157
|
+
publisher: SEO.siteName
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
var SMALL_IMAGE_SIZE = 200;
|
|
147
161
|
// Annotate the CommonJS export names for ESM import in node:
|
|
148
162
|
0 && (module.exports = {
|
|
149
163
|
setupSEO,
|
|
@@ -94,28 +94,42 @@ function getEnv(key, skipCheck) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// src/utils/client/seo.ts
|
|
97
|
-
var setupSEO = (SEO) => (title, description, image) =>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
97
|
+
var setupSEO = (SEO) => (title, description, image, options) => {
|
|
98
|
+
const isSmallImage = options?.imageSize === "small";
|
|
99
|
+
return {
|
|
100
|
+
title: title ? `${title} \u2022 ${SEO.siteName}` : SEO.title,
|
|
101
|
+
description: description || SEO.description,
|
|
102
|
+
openGraph: {
|
|
103
|
+
type: "website",
|
|
104
|
+
siteName: SEO.siteName,
|
|
105
|
+
// WhatsApp/Slack pick the thumbnail layout off the declared dimensions,
|
|
106
|
+
// so a small image needs them stated explicitly to avoid a full-bleed preview.
|
|
107
|
+
...image ? {
|
|
108
|
+
images: [
|
|
109
|
+
isSmallImage ? {
|
|
110
|
+
url: image,
|
|
111
|
+
width: SMALL_IMAGE_SIZE,
|
|
112
|
+
height: SMALL_IMAGE_SIZE
|
|
113
|
+
} : image
|
|
114
|
+
]
|
|
115
|
+
} : {}
|
|
116
|
+
},
|
|
117
|
+
twitter: {
|
|
118
|
+
card: isSmallImage ? "summary" : "summary_large_image",
|
|
119
|
+
...image ? { images: [image] } : {}
|
|
120
|
+
},
|
|
121
|
+
appleWebApp: {
|
|
122
|
+
title: title ? title : SEO.title,
|
|
123
|
+
capable: true,
|
|
124
|
+
startupImage: `${getEnv("NEXT_PUBLIC_BASE_URL" /* NEXT_PUBLIC_BASE_URL */)}/apple-icon.png`
|
|
125
|
+
},
|
|
126
|
+
applicationName: SEO.siteName,
|
|
127
|
+
creator: SEO.siteName,
|
|
128
|
+
robots: "index, follow",
|
|
129
|
+
publisher: SEO.siteName
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
var SMALL_IMAGE_SIZE = 200;
|
|
119
133
|
export {
|
|
120
134
|
setupSEO,
|
|
121
135
|
useBreakpoint,
|
|
@@ -75,28 +75,42 @@ function getEnv(key, skipCheck) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/utils/client/seo.ts
|
|
78
|
-
var setupSEO = (SEO) => (title, description, image) =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
78
|
+
var setupSEO = (SEO) => (title, description, image, options) => {
|
|
79
|
+
const isSmallImage = options?.imageSize === "small";
|
|
80
|
+
return {
|
|
81
|
+
title: title ? `${title} \u2022 ${SEO.siteName}` : SEO.title,
|
|
82
|
+
description: description || SEO.description,
|
|
83
|
+
openGraph: {
|
|
84
|
+
type: "website",
|
|
85
|
+
siteName: SEO.siteName,
|
|
86
|
+
// WhatsApp/Slack pick the thumbnail layout off the declared dimensions,
|
|
87
|
+
// so a small image needs them stated explicitly to avoid a full-bleed preview.
|
|
88
|
+
...image ? {
|
|
89
|
+
images: [
|
|
90
|
+
isSmallImage ? {
|
|
91
|
+
url: image,
|
|
92
|
+
width: SMALL_IMAGE_SIZE,
|
|
93
|
+
height: SMALL_IMAGE_SIZE
|
|
94
|
+
} : image
|
|
95
|
+
]
|
|
96
|
+
} : {}
|
|
97
|
+
},
|
|
98
|
+
twitter: {
|
|
99
|
+
card: isSmallImage ? "summary" : "summary_large_image",
|
|
100
|
+
...image ? { images: [image] } : {}
|
|
101
|
+
},
|
|
102
|
+
appleWebApp: {
|
|
103
|
+
title: title ? title : SEO.title,
|
|
104
|
+
capable: true,
|
|
105
|
+
startupImage: `${getEnv("NEXT_PUBLIC_BASE_URL" /* NEXT_PUBLIC_BASE_URL */)}/apple-icon.png`
|
|
106
|
+
},
|
|
107
|
+
applicationName: SEO.siteName,
|
|
108
|
+
creator: SEO.siteName,
|
|
109
|
+
robots: "index, follow",
|
|
110
|
+
publisher: SEO.siteName
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
var SMALL_IMAGE_SIZE = 200;
|
|
100
114
|
// Annotate the CommonJS export names for ESM import in node:
|
|
101
115
|
0 && (module.exports = {
|
|
102
116
|
setupSEO
|
|
@@ -12,7 +12,7 @@ import { Metadata } from 'next';
|
|
|
12
12
|
* @param SEO.description - Default meta description.
|
|
13
13
|
* @param SEO.siteName - Application/site name (used in openGraph, twitter, and as the separator in titles).
|
|
14
14
|
* @param SEO.themeColor - Theme color for mobile browsers (e.g. `"#000000"`).
|
|
15
|
-
* @returns A function `(title?, description?, image?) => Metadata`. Pass page-specific overrides; they fill in or replace the defaults.
|
|
15
|
+
* @returns A function `(title?, description?, image?, options?) => Metadata`. Pass page-specific overrides; they fill in or replace the defaults.
|
|
16
16
|
*
|
|
17
17
|
* @example Setup in a utility file:
|
|
18
18
|
* ```ts
|
|
@@ -44,6 +44,11 @@ import { Metadata } from 'next';
|
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
+
* @example Thumbnail-sized preview (avatars, icons — anything not a hero image):
|
|
48
|
+
* ```ts
|
|
49
|
+
* return getSEO(post.title, post.body, post.author.photo, { imageSize: "small" });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
47
52
|
* @category Client
|
|
48
53
|
*/
|
|
49
54
|
declare const setupSEO: (SEO: {
|
|
@@ -51,6 +56,13 @@ declare const setupSEO: (SEO: {
|
|
|
51
56
|
description: string;
|
|
52
57
|
siteName: string;
|
|
53
58
|
themeColor: string;
|
|
54
|
-
}) => (title?: string, description?: string, image?: string | null) => Metadata;
|
|
59
|
+
}) => (title?: string, description?: string, image?: string | null, options?: SEOOptions) => Metadata;
|
|
60
|
+
interface SEOOptions {
|
|
61
|
+
/**
|
|
62
|
+
* `"large"` (default) renders a full-width hero preview; `"small"` renders a
|
|
63
|
+
* square thumbnail next to the text — right for avatars and icons.
|
|
64
|
+
*/
|
|
65
|
+
imageSize?: "large" | "small";
|
|
66
|
+
}
|
|
55
67
|
|
|
56
|
-
export { setupSEO };
|
|
68
|
+
export { type SEOOptions, setupSEO };
|
|
@@ -12,7 +12,7 @@ import { Metadata } from 'next';
|
|
|
12
12
|
* @param SEO.description - Default meta description.
|
|
13
13
|
* @param SEO.siteName - Application/site name (used in openGraph, twitter, and as the separator in titles).
|
|
14
14
|
* @param SEO.themeColor - Theme color for mobile browsers (e.g. `"#000000"`).
|
|
15
|
-
* @returns A function `(title?, description?, image?) => Metadata`. Pass page-specific overrides; they fill in or replace the defaults.
|
|
15
|
+
* @returns A function `(title?, description?, image?, options?) => Metadata`. Pass page-specific overrides; they fill in or replace the defaults.
|
|
16
16
|
*
|
|
17
17
|
* @example Setup in a utility file:
|
|
18
18
|
* ```ts
|
|
@@ -44,6 +44,11 @@ import { Metadata } from 'next';
|
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
+
* @example Thumbnail-sized preview (avatars, icons — anything not a hero image):
|
|
48
|
+
* ```ts
|
|
49
|
+
* return getSEO(post.title, post.body, post.author.photo, { imageSize: "small" });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
47
52
|
* @category Client
|
|
48
53
|
*/
|
|
49
54
|
declare const setupSEO: (SEO: {
|
|
@@ -51,6 +56,13 @@ declare const setupSEO: (SEO: {
|
|
|
51
56
|
description: string;
|
|
52
57
|
siteName: string;
|
|
53
58
|
themeColor: string;
|
|
54
|
-
}) => (title?: string, description?: string, image?: string | null) => Metadata;
|
|
59
|
+
}) => (title?: string, description?: string, image?: string | null, options?: SEOOptions) => Metadata;
|
|
60
|
+
interface SEOOptions {
|
|
61
|
+
/**
|
|
62
|
+
* `"large"` (default) renders a full-width hero preview; `"small"` renders a
|
|
63
|
+
* square thumbnail next to the text — right for avatars and icons.
|
|
64
|
+
*/
|
|
65
|
+
imageSize?: "large" | "small";
|
|
66
|
+
}
|
|
55
67
|
|
|
56
|
-
export { setupSEO };
|
|
68
|
+
export { type SEOOptions, setupSEO };
|
|
@@ -49,28 +49,42 @@ function getEnv(key, skipCheck) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// src/utils/client/seo.ts
|
|
52
|
-
var setupSEO = (SEO) => (title, description, image) =>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
52
|
+
var setupSEO = (SEO) => (title, description, image, options) => {
|
|
53
|
+
const isSmallImage = options?.imageSize === "small";
|
|
54
|
+
return {
|
|
55
|
+
title: title ? `${title} \u2022 ${SEO.siteName}` : SEO.title,
|
|
56
|
+
description: description || SEO.description,
|
|
57
|
+
openGraph: {
|
|
58
|
+
type: "website",
|
|
59
|
+
siteName: SEO.siteName,
|
|
60
|
+
// WhatsApp/Slack pick the thumbnail layout off the declared dimensions,
|
|
61
|
+
// so a small image needs them stated explicitly to avoid a full-bleed preview.
|
|
62
|
+
...image ? {
|
|
63
|
+
images: [
|
|
64
|
+
isSmallImage ? {
|
|
65
|
+
url: image,
|
|
66
|
+
width: SMALL_IMAGE_SIZE,
|
|
67
|
+
height: SMALL_IMAGE_SIZE
|
|
68
|
+
} : image
|
|
69
|
+
]
|
|
70
|
+
} : {}
|
|
71
|
+
},
|
|
72
|
+
twitter: {
|
|
73
|
+
card: isSmallImage ? "summary" : "summary_large_image",
|
|
74
|
+
...image ? { images: [image] } : {}
|
|
75
|
+
},
|
|
76
|
+
appleWebApp: {
|
|
77
|
+
title: title ? title : SEO.title,
|
|
78
|
+
capable: true,
|
|
79
|
+
startupImage: `${getEnv("NEXT_PUBLIC_BASE_URL" /* NEXT_PUBLIC_BASE_URL */)}/apple-icon.png`
|
|
80
|
+
},
|
|
81
|
+
applicationName: SEO.siteName,
|
|
82
|
+
creator: SEO.siteName,
|
|
83
|
+
robots: "index, follow",
|
|
84
|
+
publisher: SEO.siteName
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
var SMALL_IMAGE_SIZE = 200;
|
|
74
88
|
export {
|
|
75
89
|
setupSEO
|
|
76
90
|
};
|