@farming-labs/docs 0.1.59 → 0.1.62
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/{agent-CCznWtjf.mjs → agent-COwO6Q6N.mjs} +2 -1
- package/dist/{agent-3gfGIRgr.mjs → agent-LSYzB5MK.mjs} +3 -3
- package/dist/cli/index.mjs +26 -8
- package/dist/dev-VD41gGZC.mjs +1289 -0
- package/dist/{doctor-_pzgvY8k.mjs → doctor-CfGThtMI.mjs} +4 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/init-CcgI3D7-.mjs +1162 -0
- package/dist/{mcp-DSCLcG0O.mjs → mcp-BANLcwQ0.mjs} +1 -1
- package/dist/mcp.d.mts +2 -1
- package/dist/mcp.mjs +120 -10
- package/dist/{prompt-utils-CbtKaiIU.mjs → prompt-utils-8nmFLQVH.mjs} +82 -6
- package/dist/{search-DFCYC33M.mjs → search-DVyHOFlo.mjs} +2 -2
- package/dist/{search-Cu_pxL8o.mjs → search-Ds3jiS2n.mjs} +50 -1
- package/dist/search-HlwTDHCK.d.mts +31 -0
- package/dist/server.d.mts +3 -3
- package/dist/server.mjs +3 -3
- package/dist/{init-C1tsFxXo.mjs → templates-2M1vfnf-.mjs} +5 -1164
- package/dist/{types-bAjvrTGU.d.mts → types-DfiAeeHu.d.mts} +56 -1
- package/dist/{upgrade-a185_G5A.mjs → upgrade-CA_OE7wL.mjs} +1 -1
- package/package.json +1 -1
- package/dist/search-DWkWwsU5.d.mts +0 -21
- /package/dist/{utils-CpTFbAiS.mjs → utils-DSMXVnEu.mjs} +0 -0
|
@@ -630,6 +630,50 @@ interface PageActionsConfig {
|
|
|
630
630
|
*/
|
|
631
631
|
alignment?: "left" | "right";
|
|
632
632
|
}
|
|
633
|
+
type DocsAnalyticsSource = "client" | "server" | "mcp";
|
|
634
|
+
type DocsAnalyticsEventType = "page_view" | "search_open" | "search_close" | "search_query" | "search_result_click" | "search_error" | "ai_open" | "ai_close" | "ai_question" | "ai_response" | "ai_error" | "ai_clear" | "page_action_copy_markdown" | "page_action_open_docs_menu" | "page_action_open_docs" | "code_block_copy" | "feedback_select" | "feedback_submit" | "feedback_error" | "agent_read" | "agent_spec_request" | "agent_feedback_schema" | "agent_feedback_submit" | "agent_feedback_error" | "markdown_request" | "llms_request" | "skill_request" | "api_search" | "api_ai_request" | "api_ai_response" | "api_ai_error" | "mcp_request" | "mcp_tool";
|
|
635
|
+
interface DocsAnalyticsInput {
|
|
636
|
+
query?: string;
|
|
637
|
+
question?: string;
|
|
638
|
+
feedbackComment?: string;
|
|
639
|
+
content?: string;
|
|
640
|
+
}
|
|
641
|
+
interface DocsAnalyticsEvent {
|
|
642
|
+
type: DocsAnalyticsEventType | (string & {});
|
|
643
|
+
timestamp: string;
|
|
644
|
+
source: DocsAnalyticsSource;
|
|
645
|
+
url?: string;
|
|
646
|
+
path?: string;
|
|
647
|
+
referrer?: string;
|
|
648
|
+
locale?: string;
|
|
649
|
+
input?: DocsAnalyticsInput;
|
|
650
|
+
properties?: Record<string, unknown>;
|
|
651
|
+
}
|
|
652
|
+
type DocsAnalyticsEventInput = Omit<DocsAnalyticsEvent, "timestamp" | "source"> & {
|
|
653
|
+
timestamp?: string;
|
|
654
|
+
source?: DocsAnalyticsSource;
|
|
655
|
+
};
|
|
656
|
+
interface DocsAnalyticsConfig {
|
|
657
|
+
/** Enable analytics event emission. Defaults to `true` when this object is provided. */
|
|
658
|
+
enabled?: boolean;
|
|
659
|
+
/**
|
|
660
|
+
* Log analytics events to the console.
|
|
661
|
+
*
|
|
662
|
+
* `analytics: true` logs with `console.info`. When `onEvent` is provided,
|
|
663
|
+
* console logging is disabled unless this is set.
|
|
664
|
+
*/
|
|
665
|
+
console?: boolean | "log" | "info" | "debug";
|
|
666
|
+
/**
|
|
667
|
+
* Include raw search queries, AI questions, feedback comments, and copied
|
|
668
|
+
* content in emitted events.
|
|
669
|
+
*
|
|
670
|
+
* Defaults to `false`; events still include safe metadata such as lengths,
|
|
671
|
+
* counts, routes, status, and duration.
|
|
672
|
+
*/
|
|
673
|
+
includeInputs?: boolean;
|
|
674
|
+
/** Callback fired for every analytics event. */
|
|
675
|
+
onEvent?: (event: DocsAnalyticsEvent) => void | Promise<void>;
|
|
676
|
+
}
|
|
633
677
|
/**
|
|
634
678
|
* Configuration for the "Last updated" date display.
|
|
635
679
|
*
|
|
@@ -1624,6 +1668,17 @@ interface DocsConfig {
|
|
|
1624
1668
|
staticExport?: boolean;
|
|
1625
1669
|
/** Theme configuration - single source of truth for UI */
|
|
1626
1670
|
theme?: DocsTheme;
|
|
1671
|
+
/**
|
|
1672
|
+
* Built-in analytics event stream for docs interactions.
|
|
1673
|
+
*
|
|
1674
|
+
* - `false` or omitted -> analytics disabled (default)
|
|
1675
|
+
* - `true` -> log all framework events to the console
|
|
1676
|
+
* - `{ onEvent(event) { ... } }` -> send events to your analytics sink
|
|
1677
|
+
*
|
|
1678
|
+
* Raw queries, AI questions, feedback comments, and copied content are not
|
|
1679
|
+
* included unless `includeInputs: true` is set.
|
|
1680
|
+
*/
|
|
1681
|
+
analytics?: boolean | DocsAnalyticsConfig;
|
|
1627
1682
|
/**
|
|
1628
1683
|
* GitHub repository URL or config. Enables "Edit on GitHub" links
|
|
1629
1684
|
* on each docs page footer, pointing to the source `.mdx` file.
|
|
@@ -1989,4 +2044,4 @@ interface DocsConfig {
|
|
|
1989
2044
|
og?: OGConfig;
|
|
1990
2045
|
}
|
|
1991
2046
|
//#endregion
|
|
1992
|
-
export {
|
|
2047
|
+
export { PageFrontmatter as $, DocsSearchAdapterContext as A, DocsTheme as B, DocsI18nConfig as C, DocsNav as D, DocsMetadata as E, DocsSearchEmbeddingsConfig as F, LlmsTxtConfig as G, FontStyle as H, DocsSearchQuery as I, OpenDocsConfig as J, McpDocsSearchConfig as K, DocsSearchResult as L, DocsSearchChunkingConfig as M, DocsSearchConfig as N, DocsRelatedItem as O, DocsSearchDocument as P, PageActionsConfig as Q, DocsSearchResultType as R, DocsFeedbackValue as S, DocsMcpToolsConfig as T, GithubConfig as U, FeedbackConfig as V, LastUpdatedConfig as W, OpenGraphImage as X, OpenDocsProvider as Y, OrderingItem as Z, DocsAnalyticsEventType as _, ApiReferenceRenderer as a, SidebarComponentProps as at, DocsConfig as b, ChangelogFrontmatter as c, SidebarFolderNode as ct, CustomDocsSearchConfig as d, SidebarTree as dt, PageOpenGraph as et, DocsAgentFeedbackContext as f, SimpleDocsSearchConfig as ft, DocsAnalyticsEventInput as g, UIConfig as gt, DocsAnalyticsEvent as h, TypographyConfig as ht, ApiReferenceConfig as i, ResolvedDocsRelatedLink as it, DocsSearchAdapterFactory as j, DocsSearchAdapter as k, CodeBlockCopyData as l, SidebarNode as lt, DocsAnalyticsConfig as m, TypesenseDocsSearchConfig as mt, AgentFeedbackConfig as n, PageTwitter as nt, BreadcrumbConfig as o, SidebarConfig as ot, DocsAgentFeedbackData as p, ThemeToggleConfig as pt, OGConfig as q, AlgoliaDocsSearchConfig as r, ReadingTimeConfig as rt, ChangelogConfig as s, SidebarFolderIndexBehavior as st, AIConfig as t, PageSidebarFrontmatter as tt, CopyMarkdownConfig as u, SidebarPageNode as ut, DocsAnalyticsInput as v, DocsMcpConfig as w, DocsFeedbackData as x, DocsAnalyticsSource as y, DocsSearchSourcePage as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as installCommand, i as detectPackageManagerFromLockfile, o as exec, s as fileExists, t as detectFramework } from "./utils-
|
|
1
|
+
import { c as installCommand, i as detectPackageManagerFromLockfile, o as exec, s as fileExists, t as detectFramework } from "./utils-DSMXVnEu.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import pc from "picocolors";
|
|
4
4
|
import * as p from "@clack/prompts";
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { B as McpDocsSearchConfig, C as DocsSearchAdapter, D as DocsSearchConfig, E as DocsSearchChunkingConfig, N as DocsSearchSourcePage, O as DocsSearchDocument, T as DocsSearchAdapterFactory, ct as TypesenseDocsSearchConfig, d as CustomDocsSearchConfig, j as DocsSearchResult, r as AlgoliaDocsSearchConfig } from "./types-bAjvrTGU.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/search.d.ts
|
|
4
|
-
declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig): DocsSearchDocument[];
|
|
5
|
-
declare function createSimpleSearchAdapter(): DocsSearchAdapter;
|
|
6
|
-
declare function createTypesenseSearchAdapter(config: TypesenseDocsSearchConfig): DocsSearchAdapter;
|
|
7
|
-
declare function resolveSearchRequestConfig(search: boolean | DocsSearchConfig | undefined, requestUrl?: string): boolean | DocsSearchConfig | undefined;
|
|
8
|
-
declare function createMcpSearchAdapter(config: McpDocsSearchConfig): DocsSearchAdapter;
|
|
9
|
-
declare function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): DocsSearchAdapter;
|
|
10
|
-
declare function performDocsSearch(options: {
|
|
11
|
-
pages: DocsSearchSourcePage[];
|
|
12
|
-
query: string;
|
|
13
|
-
search?: boolean | DocsSearchConfig;
|
|
14
|
-
locale?: string;
|
|
15
|
-
pathname?: string;
|
|
16
|
-
siteTitle?: string;
|
|
17
|
-
limit?: number;
|
|
18
|
-
}): Promise<DocsSearchResult[]>;
|
|
19
|
-
declare function createCustomSearchAdapter(adapter: DocsSearchAdapter | DocsSearchAdapterFactory): CustomDocsSearchConfig;
|
|
20
|
-
//#endregion
|
|
21
|
-
export { createSimpleSearchAdapter as a, resolveSearchRequestConfig as c, createMcpSearchAdapter as i, createAlgoliaSearchAdapter as n, createTypesenseSearchAdapter as o, createCustomSearchAdapter as r, performDocsSearch as s, buildDocsSearchDocuments as t };
|
|
File without changes
|