@farming-labs/svelte 0.1.47 → 0.1.49

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.
Files changed (2) hide show
  1. package/dist/server.js +5 -4
  2. package/package.json +2 -2
package/dist/server.js CHANGED
@@ -30,7 +30,7 @@
30
30
  import fs from "node:fs";
31
31
  import path from "node:path";
32
32
  import matter from "gray-matter";
33
- import { buildDocsAgentDiscoverySpec, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsSkillRequest, normalizeDocsRelated, performDocsSearch, renderDocsMarkdownDocument, renderDocsSkillDocument, resolveDocsAgentMdxContent, resolveSearchRequestConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolveReadingTimeFromContent, resolveReadingTimeOptions, resolveDocsSkillFormat, } from "@farming-labs/docs";
33
+ import { buildDocsAgentDiscoverySpec, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsSkillRequest, normalizeDocsRelated, performDocsSearch, renderDocsMarkdownDocument, renderDocsSkillDocument, resolveDocsAgentMdxContent, resolveSearchRequestConfig, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolvePageReadingTime, resolveReadingTimeOptions, resolveDocsSkillFormat, } from "@farming-labs/docs";
34
34
  import { createDocsMcpHttpHandler, resolveDocsMcpConfig } from "@farming-labs/docs/server";
35
35
  import { loadDocsNavTree, loadDocsContent, flattenNavTree } from "./content.js";
36
36
  import { renderMarkdown } from "./markdown.js";
@@ -479,9 +479,10 @@ export function createDocsServer(config = {}) {
479
479
  }
480
480
  const { data, content } = matter(raw);
481
481
  const humanRawContent = resolveDocsAgentMdxContent(content, "human");
482
- const readingTime = readingTimeOptions.enabled
483
- ? resolveReadingTimeFromContent(data, humanRawContent, readingTimeOptions.wordsPerMinute)
484
- : null;
482
+ const readingTime = resolvePageReadingTime(data, humanRawContent, {
483
+ enabledByDefault: readingTimeOptions.enabled,
484
+ wordsPerMinute: readingTimeOptions.wordsPerMinute,
485
+ });
485
486
  const html = await renderMarkdown(humanRawContent, { theme: config.theme });
486
487
  const currentUrl = isIndex ? `/${entry}` : `/${entry}/${slug}`;
487
488
  const currentIndex = flatPages.findIndex((p) => p.url === currentUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/svelte",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "SvelteKit adapter for @farming-labs/docs — content loading and navigation utilities",
5
5
  "keywords": [
6
6
  "docs",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@types/node": "^22.10.0",
58
58
  "typescript": "^5.9.3",
59
- "@farming-labs/docs": "0.1.47"
59
+ "@farming-labs/docs": "0.1.49"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@farming-labs/docs": "*"