@farming-labs/next 0.1.60 → 0.1.63
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/changelog.mjs +25 -10
- package/dist/client-callbacks.mjs +1 -0
- package/dist/config.mjs +2 -0
- package/package.json +3 -3
package/dist/changelog.mjs
CHANGED
|
@@ -27,6 +27,19 @@ function normalizeAuthors(value) {
|
|
|
27
27
|
function normalizeWhitespace(value) {
|
|
28
28
|
return value.replace(/\s+/g, " ").trim();
|
|
29
29
|
}
|
|
30
|
+
function truncatePaginationText(value, maxLength) {
|
|
31
|
+
const normalized = normalizeWhitespace(value);
|
|
32
|
+
if (normalized.length <= maxLength) return normalized;
|
|
33
|
+
const sliced = normalized.slice(0, maxLength + 1).trimEnd();
|
|
34
|
+
const boundary = sliced.lastIndexOf(" ");
|
|
35
|
+
return `${(boundary >= Math.floor(maxLength * .6) ? sliced.slice(0, boundary) : sliced.slice(0, maxLength)).replace(/[.,;:!?-]+$/g, "").trimEnd()}…`;
|
|
36
|
+
}
|
|
37
|
+
function truncatePaginationTitle(value, maxLength = 72) {
|
|
38
|
+
return truncatePaginationText(value, maxLength);
|
|
39
|
+
}
|
|
40
|
+
function truncatePaginationDescription(value, maxLength = 110) {
|
|
41
|
+
return truncatePaginationText(value, maxLength);
|
|
42
|
+
}
|
|
30
43
|
function stripInlineMarkdown(value) {
|
|
31
44
|
return normalizeWhitespace(value.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, "$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/_([^_]+)_/g, "$1").replace(/<[^>]+>/g, ""));
|
|
32
45
|
}
|
|
@@ -197,12 +210,13 @@ function ChangelogEntryPagination(props) {
|
|
|
197
210
|
}),
|
|
198
211
|
/* @__PURE__ */ jsx("span", {
|
|
199
212
|
className: "fd-page-nav-title",
|
|
200
|
-
children: props.previous.title
|
|
213
|
+
children: truncatePaginationTitle(props.previous.title)
|
|
201
214
|
}),
|
|
202
|
-
|
|
203
|
-
className:
|
|
204
|
-
|
|
205
|
-
|
|
215
|
+
/* @__PURE__ */ jsx("span", {
|
|
216
|
+
className: `fd-page-nav-description${props.previous.description ? "" : " fd-page-nav-description-empty"}`,
|
|
217
|
+
"aria-hidden": props.previous.description ? void 0 : true,
|
|
218
|
+
children: props.previous.description ? truncatePaginationDescription(props.previous.description) : "\xA0"
|
|
219
|
+
})
|
|
206
220
|
]
|
|
207
221
|
}) : both ? /* @__PURE__ */ jsx("div", { "aria-hidden": "true" }) : null, props.next ? /* @__PURE__ */ jsxs(Link, {
|
|
208
222
|
href: props.next.url,
|
|
@@ -218,12 +232,13 @@ function ChangelogEntryPagination(props) {
|
|
|
218
232
|
}),
|
|
219
233
|
/* @__PURE__ */ jsx("span", {
|
|
220
234
|
className: "fd-page-nav-title",
|
|
221
|
-
children: props.next.title
|
|
235
|
+
children: truncatePaginationTitle(props.next.title)
|
|
222
236
|
}),
|
|
223
|
-
|
|
224
|
-
className:
|
|
225
|
-
|
|
226
|
-
|
|
237
|
+
/* @__PURE__ */ jsx("span", {
|
|
238
|
+
className: `fd-page-nav-description${props.next.description ? "" : " fd-page-nav-description-empty"}`,
|
|
239
|
+
"aria-hidden": props.next.description ? void 0 : true,
|
|
240
|
+
children: props.next.description ? truncatePaginationDescription(props.next.description) : "\xA0"
|
|
241
|
+
})
|
|
227
242
|
]
|
|
228
243
|
}) : both ? /* @__PURE__ */ jsx("div", { "aria-hidden": "true" }) : null]
|
|
229
244
|
});
|
|
@@ -33,6 +33,7 @@ function DocsClientCallbacks(props) {
|
|
|
33
33
|
}, [props?.apiReferencePrimaryServerUrl]);
|
|
34
34
|
return /* @__PURE__ */ jsx(DocsClientHooks, {
|
|
35
35
|
onCopyClick: docsConfig.onCopyClick,
|
|
36
|
+
analytics: docsConfig.analytics,
|
|
36
37
|
onFeedback: docsConfig.feedback && typeof docsConfig.feedback === "object" ? docsConfig.feedback.onFeedback : void 0
|
|
37
38
|
});
|
|
38
39
|
}
|
package/dist/config.mjs
CHANGED
|
@@ -86,6 +86,7 @@ export const { GET, POST } = createDocsAPI({
|
|
|
86
86
|
feedback: docsConfig.feedback,
|
|
87
87
|
mcp: docsConfig.mcp,
|
|
88
88
|
search: docsConfig.search,
|
|
89
|
+
analytics: docsConfig.analytics,
|
|
89
90
|
ai: docsConfig.ai,
|
|
90
91
|
});
|
|
91
92
|
|
|
@@ -102,6 +103,7 @@ export const { GET, POST, DELETE } = createDocsMCPAPI({
|
|
|
102
103
|
nav: docsConfig.nav,
|
|
103
104
|
ordering: docsConfig.ordering,
|
|
104
105
|
search: docsConfig.search,
|
|
106
|
+
analytics: docsConfig.analytics,
|
|
105
107
|
mcp: docsConfig.mcp,
|
|
106
108
|
});
|
|
107
109
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"tsdown": "^0.20.3",
|
|
96
96
|
"typescript": "^5.9.3",
|
|
97
97
|
"vitest": "^3.2.4",
|
|
98
|
-
"@farming-labs/docs": "0.1.
|
|
99
|
-
"@farming-labs/theme": "0.1.
|
|
98
|
+
"@farming-labs/docs": "0.1.63",
|
|
99
|
+
"@farming-labs/theme": "0.1.63"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@farming-labs/docs": ">=0.0.1",
|