@farming-labs/theme 0.1.142 → 0.1.143
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/docs-page-client.d.mts +1 -1
- package/dist/docs-page-client.mjs +143 -75
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/locale-theme-control.mjs +4 -0
- package/dist/page-actions.d.mts +2 -0
- package/dist/page-actions.mjs +109 -17
- package/dist/threadline/index.d.mts +149 -0
- package/dist/threadline/index.mjs +154 -0
- package/package.json +8 -2
- package/styles/threadline.css +1270 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as _farming_labs_docs0 from "@farming-labs/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/threadline/index.d.ts
|
|
4
|
+
declare const ThreadlineUIDefaults: {
|
|
5
|
+
colors: {
|
|
6
|
+
primary: string;
|
|
7
|
+
primaryForeground: string;
|
|
8
|
+
background: string;
|
|
9
|
+
foreground: string;
|
|
10
|
+
muted: string;
|
|
11
|
+
mutedForeground: string;
|
|
12
|
+
border: string;
|
|
13
|
+
card: string;
|
|
14
|
+
cardForeground: string;
|
|
15
|
+
accent: string;
|
|
16
|
+
accentForeground: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
secondaryForeground: string;
|
|
19
|
+
popover: string;
|
|
20
|
+
popoverForeground: string;
|
|
21
|
+
ring: string;
|
|
22
|
+
};
|
|
23
|
+
typography: {
|
|
24
|
+
font: {
|
|
25
|
+
style: {
|
|
26
|
+
sans: string;
|
|
27
|
+
mono: string;
|
|
28
|
+
};
|
|
29
|
+
h1: {
|
|
30
|
+
size: string;
|
|
31
|
+
weight: number;
|
|
32
|
+
lineHeight: string;
|
|
33
|
+
letterSpacing: string;
|
|
34
|
+
};
|
|
35
|
+
h2: {
|
|
36
|
+
size: string;
|
|
37
|
+
weight: number;
|
|
38
|
+
lineHeight: string;
|
|
39
|
+
letterSpacing: string;
|
|
40
|
+
};
|
|
41
|
+
h3: {
|
|
42
|
+
size: string;
|
|
43
|
+
weight: number;
|
|
44
|
+
lineHeight: string;
|
|
45
|
+
letterSpacing: string;
|
|
46
|
+
};
|
|
47
|
+
h4: {
|
|
48
|
+
size: string;
|
|
49
|
+
weight: number;
|
|
50
|
+
lineHeight: string;
|
|
51
|
+
letterSpacing: string;
|
|
52
|
+
};
|
|
53
|
+
body: {
|
|
54
|
+
size: string;
|
|
55
|
+
weight: number;
|
|
56
|
+
lineHeight: string;
|
|
57
|
+
};
|
|
58
|
+
small: {
|
|
59
|
+
size: string;
|
|
60
|
+
weight: number;
|
|
61
|
+
lineHeight: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
radius: string;
|
|
66
|
+
layout: {
|
|
67
|
+
contentWidth: number;
|
|
68
|
+
sidebarWidth: number;
|
|
69
|
+
tocWidth: number;
|
|
70
|
+
toc: {
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
depth: number;
|
|
73
|
+
style: "default";
|
|
74
|
+
};
|
|
75
|
+
header: {
|
|
76
|
+
height: number;
|
|
77
|
+
sticky: boolean;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
sidebar: {
|
|
81
|
+
style: "bordered";
|
|
82
|
+
};
|
|
83
|
+
components: {
|
|
84
|
+
Callout: {
|
|
85
|
+
variant: string;
|
|
86
|
+
icon: boolean;
|
|
87
|
+
};
|
|
88
|
+
CodeBlock: {
|
|
89
|
+
showCopyButton: boolean;
|
|
90
|
+
showLineNumbers: boolean;
|
|
91
|
+
};
|
|
92
|
+
HoverLink: {
|
|
93
|
+
linkLabel: string;
|
|
94
|
+
showIndicator: boolean;
|
|
95
|
+
};
|
|
96
|
+
Prompt: {
|
|
97
|
+
icon: string;
|
|
98
|
+
actions: string[];
|
|
99
|
+
providers: string[];
|
|
100
|
+
copyIcon: string;
|
|
101
|
+
copiedIcon: string;
|
|
102
|
+
openIcon: string;
|
|
103
|
+
};
|
|
104
|
+
Tabs: {
|
|
105
|
+
style: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Page-action defaults for compact agent-friendly docs affordances as closely
|
|
111
|
+
* as the shared page-actions API allows.
|
|
112
|
+
*/
|
|
113
|
+
declare const threadlinePageActions: {
|
|
114
|
+
position: "toc";
|
|
115
|
+
copyMarkdown: {
|
|
116
|
+
enabled: true;
|
|
117
|
+
};
|
|
118
|
+
alignment: "left";
|
|
119
|
+
openDocs: {
|
|
120
|
+
enabled: true;
|
|
121
|
+
target: "markdown";
|
|
122
|
+
prompt: string;
|
|
123
|
+
providers: ("chatgpt" | "claude" | {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
icon: string;
|
|
127
|
+
mode?: undefined;
|
|
128
|
+
urlTemplate?: undefined;
|
|
129
|
+
promptUrlTemplate?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
id: string;
|
|
132
|
+
mode: "app";
|
|
133
|
+
name?: undefined;
|
|
134
|
+
icon?: undefined;
|
|
135
|
+
urlTemplate?: undefined;
|
|
136
|
+
promptUrlTemplate?: undefined;
|
|
137
|
+
} | {
|
|
138
|
+
name: string;
|
|
139
|
+
urlTemplate: string;
|
|
140
|
+
promptUrlTemplate: string;
|
|
141
|
+
icon: string;
|
|
142
|
+
id?: undefined;
|
|
143
|
+
mode?: undefined;
|
|
144
|
+
})[];
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
declare const threadline: (overrides?: Partial<_farming_labs_docs0.DocsTheme>) => _farming_labs_docs0.DocsTheme;
|
|
148
|
+
//#endregion
|
|
149
|
+
export { ThreadlineUIDefaults, threadline, threadlinePageActions };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { createTheme } from "@farming-labs/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/threadline/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Threadline theme preset.
|
|
6
|
+
* Compact chat-docs-inspired documentation chrome with neutral
|
|
7
|
+
* shadcn-style tokens, Geist typography, soft surfaces, and page-action defaults.
|
|
8
|
+
*
|
|
9
|
+
* CSS: `@import "@farming-labs/theme/threadline/css";`
|
|
10
|
+
*/
|
|
11
|
+
const ThreadlineUIDefaults = {
|
|
12
|
+
colors: {
|
|
13
|
+
primary: "oklch(0.205 0 0)",
|
|
14
|
+
primaryForeground: "oklch(0.985 0 0)",
|
|
15
|
+
background: "oklch(1 0 0)",
|
|
16
|
+
foreground: "oklch(0.145 0 0)",
|
|
17
|
+
muted: "oklch(0.97 0 0)",
|
|
18
|
+
mutedForeground: "oklch(0.556 0 0)",
|
|
19
|
+
border: "oklch(0.922 0 0)",
|
|
20
|
+
card: "oklch(1 0 0)",
|
|
21
|
+
cardForeground: "oklch(0.145 0 0)",
|
|
22
|
+
accent: "oklch(0.97 0 0)",
|
|
23
|
+
accentForeground: "oklch(0.205 0 0)",
|
|
24
|
+
secondary: "oklch(0.97 0 0)",
|
|
25
|
+
secondaryForeground: "oklch(0.205 0 0)",
|
|
26
|
+
popover: "oklch(1 0 0)",
|
|
27
|
+
popoverForeground: "oklch(0.145 0 0)",
|
|
28
|
+
ring: "oklch(0.708 0 0)"
|
|
29
|
+
},
|
|
30
|
+
typography: { font: {
|
|
31
|
+
style: {
|
|
32
|
+
sans: "var(--font-geist-sans, GeistSans, GeistSans Fallback, ui-sans-serif, system-ui, sans-serif)",
|
|
33
|
+
mono: "var(--font-geist-mono, GeistMono, GeistMono Fallback, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)"
|
|
34
|
+
},
|
|
35
|
+
h1: {
|
|
36
|
+
size: "1.5rem",
|
|
37
|
+
weight: 600,
|
|
38
|
+
lineHeight: "1.35",
|
|
39
|
+
letterSpacing: "0"
|
|
40
|
+
},
|
|
41
|
+
h2: {
|
|
42
|
+
size: "1.25rem",
|
|
43
|
+
weight: 500,
|
|
44
|
+
lineHeight: "1.4",
|
|
45
|
+
letterSpacing: "0"
|
|
46
|
+
},
|
|
47
|
+
h3: {
|
|
48
|
+
size: "1rem",
|
|
49
|
+
weight: 500,
|
|
50
|
+
lineHeight: "1.5",
|
|
51
|
+
letterSpacing: "0"
|
|
52
|
+
},
|
|
53
|
+
h4: {
|
|
54
|
+
size: "0.875rem",
|
|
55
|
+
weight: 600,
|
|
56
|
+
lineHeight: "1.5",
|
|
57
|
+
letterSpacing: "0"
|
|
58
|
+
},
|
|
59
|
+
body: {
|
|
60
|
+
size: "0.875rem",
|
|
61
|
+
weight: 400,
|
|
62
|
+
lineHeight: "1.7"
|
|
63
|
+
},
|
|
64
|
+
small: {
|
|
65
|
+
size: "0.75rem",
|
|
66
|
+
weight: 400,
|
|
67
|
+
lineHeight: "1.45"
|
|
68
|
+
}
|
|
69
|
+
} },
|
|
70
|
+
radius: "0.625rem",
|
|
71
|
+
layout: {
|
|
72
|
+
contentWidth: 944,
|
|
73
|
+
sidebarWidth: 260,
|
|
74
|
+
tocWidth: 224,
|
|
75
|
+
toc: {
|
|
76
|
+
enabled: true,
|
|
77
|
+
depth: 3,
|
|
78
|
+
style: "default"
|
|
79
|
+
},
|
|
80
|
+
header: {
|
|
81
|
+
height: 48,
|
|
82
|
+
sticky: true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
sidebar: { style: "bordered" },
|
|
86
|
+
components: {
|
|
87
|
+
Callout: {
|
|
88
|
+
variant: "soft",
|
|
89
|
+
icon: true
|
|
90
|
+
},
|
|
91
|
+
CodeBlock: {
|
|
92
|
+
showCopyButton: true,
|
|
93
|
+
showLineNumbers: true
|
|
94
|
+
},
|
|
95
|
+
HoverLink: {
|
|
96
|
+
linkLabel: "Open page",
|
|
97
|
+
showIndicator: false
|
|
98
|
+
},
|
|
99
|
+
Prompt: {
|
|
100
|
+
icon: "sparkles",
|
|
101
|
+
actions: ["copy", "open"],
|
|
102
|
+
providers: [
|
|
103
|
+
"ChatGPT",
|
|
104
|
+
"Claude",
|
|
105
|
+
"Cursor",
|
|
106
|
+
"T3 Chat"
|
|
107
|
+
],
|
|
108
|
+
copyIcon: "copy",
|
|
109
|
+
copiedIcon: "check",
|
|
110
|
+
openIcon: "arrowUpRight"
|
|
111
|
+
},
|
|
112
|
+
Tabs: { style: "default" }
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Page-action defaults for compact agent-friendly docs affordances as closely
|
|
117
|
+
* as the shared page-actions API allows.
|
|
118
|
+
*/
|
|
119
|
+
const threadlinePageActions = {
|
|
120
|
+
position: "toc",
|
|
121
|
+
copyMarkdown: { enabled: true },
|
|
122
|
+
alignment: "left",
|
|
123
|
+
openDocs: {
|
|
124
|
+
enabled: true,
|
|
125
|
+
target: "markdown",
|
|
126
|
+
prompt: "Read this documentation: {url}",
|
|
127
|
+
providers: [
|
|
128
|
+
{
|
|
129
|
+
id: "github",
|
|
130
|
+
name: "GitHub",
|
|
131
|
+
icon: `<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.92.58.11.79-.25.79-.56v-2.02c-3.2.7-3.88-1.37-3.88-1.37-.53-1.33-1.29-1.69-1.29-1.69-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.2 1.77 1.2 1.03 1.76 2.71 1.25 3.37.96.1-.75.4-1.25.73-1.54-2.56-.29-5.26-1.28-5.26-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.05 0 0 .97-.31 3.18 1.18a10.9 10.9 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.58.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.41-5.27 5.7.41.36.78 1.06.78 2.14v3.03c0 .31.21.67.8.56A11.5 11.5 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"/></svg>`
|
|
132
|
+
},
|
|
133
|
+
"chatgpt",
|
|
134
|
+
"claude",
|
|
135
|
+
{
|
|
136
|
+
id: "cursor",
|
|
137
|
+
mode: "app"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "T3 Chat",
|
|
141
|
+
urlTemplate: "https://t3.chat/new?q={prompt}",
|
|
142
|
+
promptUrlTemplate: "https://t3.chat/new?q={prompt}",
|
|
143
|
+
icon: `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M4.5 5.5h15v9.75h-7.2L8 19.25v-4H4.5V5.5Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8"/><path d="M8 9h8M8 12h5.5" stroke="currentColor" stroke-linecap="round" stroke-width="1.8"/></svg>`
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const threadline = createTheme({
|
|
149
|
+
name: "threadline",
|
|
150
|
+
ui: ThreadlineUIDefaults
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
//#endregion
|
|
154
|
+
export { ThreadlineUIDefaults, threadline, threadlinePageActions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/theme",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.143",
|
|
4
4
|
"description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
"import": "./dist/ledger/index.mjs",
|
|
89
89
|
"default": "./dist/ledger/index.mjs"
|
|
90
90
|
},
|
|
91
|
+
"./threadline": {
|
|
92
|
+
"types": "./dist/threadline/index.d.mts",
|
|
93
|
+
"import": "./dist/threadline/index.mjs",
|
|
94
|
+
"default": "./dist/threadline/index.mjs"
|
|
95
|
+
},
|
|
91
96
|
"./search": {
|
|
92
97
|
"types": "./dist/search.d.mts",
|
|
93
98
|
"import": "./dist/search.mjs",
|
|
@@ -121,6 +126,7 @@
|
|
|
121
126
|
"./concrete/css": "./styles/concrete.css",
|
|
122
127
|
"./command-grid/css": "./styles/command-grid.css",
|
|
123
128
|
"./ledger/css": "./styles/ledger.css",
|
|
129
|
+
"./threadline/css": "./styles/threadline.css",
|
|
124
130
|
"./presets/neutral": "./styles/presets/neutral.css",
|
|
125
131
|
"./presets/black": "./styles/presets/black.css",
|
|
126
132
|
"./presets/base": "./styles/presets/base.css"
|
|
@@ -139,7 +145,7 @@
|
|
|
139
145
|
"tsdown": "^0.20.3",
|
|
140
146
|
"typescript": "^5.9.3",
|
|
141
147
|
"vitest": "^4.1.8",
|
|
142
|
-
"@farming-labs/docs": "0.1.
|
|
148
|
+
"@farming-labs/docs": "0.1.143"
|
|
143
149
|
},
|
|
144
150
|
"peerDependencies": {
|
|
145
151
|
"@farming-labs/docs": ">=0.0.1",
|