autoblogger 0.1.15 → 0.1.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/README.md +136 -54
- package/dist/cli/index.js +1224 -0
- package/dist/index.d.mts +54 -8
- package/dist/index.d.ts +54 -8
- package/dist/index.js +932 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +928 -99
- package/dist/index.mjs.map +1 -1
- package/dist/styles/article.d.mts +4 -4
- package/dist/styles/article.d.ts +4 -4
- package/dist/styles/article.js +4 -4
- package/dist/styles/article.js.map +1 -1
- package/dist/styles/article.mjs +4 -4
- package/dist/styles/article.mjs.map +1 -1
- package/dist/styles/autoblogger.css +165 -0
- package/dist/styles/preset.js +48 -8
- package/dist/ui.d.mts +5 -2
- package/dist/ui.d.ts +5 -2
- package/dist/ui.js +1814 -1369
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1734 -1290
- package/dist/ui.mjs.map +1 -1
- package/package.json +15 -2
- package/prisma/schema.prisma +4 -0
|
@@ -3,11 +3,11 @@ declare const ARTICLE_LAYOUT: {
|
|
|
3
3
|
readonly padding: 24;
|
|
4
4
|
};
|
|
5
5
|
declare const ARTICLE_CLASSES: {
|
|
6
|
-
readonly container: "max-w-
|
|
7
|
-
readonly title: "text-
|
|
8
|
-
readonly subtitle: "text-
|
|
6
|
+
readonly container: "max-w-[680px] mx-auto px-6";
|
|
7
|
+
readonly title: "text-title font-bold";
|
|
8
|
+
readonly subtitle: "text-h2 text-muted-foreground";
|
|
9
9
|
readonly byline: "text-sm text-muted-foreground";
|
|
10
|
-
readonly body: "text-
|
|
10
|
+
readonly body: "text-body prose dark:prose-invert";
|
|
11
11
|
readonly prose: "prose dark:prose-invert max-w-none";
|
|
12
12
|
};
|
|
13
13
|
type ArticleClasses = typeof ARTICLE_CLASSES;
|
package/dist/styles/article.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ declare const ARTICLE_LAYOUT: {
|
|
|
3
3
|
readonly padding: 24;
|
|
4
4
|
};
|
|
5
5
|
declare const ARTICLE_CLASSES: {
|
|
6
|
-
readonly container: "max-w-
|
|
7
|
-
readonly title: "text-
|
|
8
|
-
readonly subtitle: "text-
|
|
6
|
+
readonly container: "max-w-[680px] mx-auto px-6";
|
|
7
|
+
readonly title: "text-title font-bold";
|
|
8
|
+
readonly subtitle: "text-h2 text-muted-foreground";
|
|
9
9
|
readonly byline: "text-sm text-muted-foreground";
|
|
10
|
-
readonly body: "text-
|
|
10
|
+
readonly body: "text-body prose dark:prose-invert";
|
|
11
11
|
readonly prose: "prose dark:prose-invert max-w-none";
|
|
12
12
|
};
|
|
13
13
|
type ArticleClasses = typeof ARTICLE_CLASSES;
|
package/dist/styles/article.js
CHANGED
|
@@ -29,11 +29,11 @@ var ARTICLE_LAYOUT = {
|
|
|
29
29
|
padding: 24
|
|
30
30
|
};
|
|
31
31
|
var ARTICLE_CLASSES = {
|
|
32
|
-
container: "max-w-
|
|
33
|
-
title: "text-
|
|
34
|
-
subtitle: "text-
|
|
32
|
+
container: "max-w-[680px] mx-auto px-6",
|
|
33
|
+
title: "text-title font-bold",
|
|
34
|
+
subtitle: "text-h2 text-muted-foreground",
|
|
35
35
|
byline: "text-sm text-muted-foreground",
|
|
36
|
-
body: "text-
|
|
36
|
+
body: "text-body prose dark:prose-invert",
|
|
37
37
|
prose: "prose dark:prose-invert max-w-none"
|
|
38
38
|
};
|
|
39
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/styles/article.ts"],"sourcesContent":["export const ARTICLE_LAYOUT = {\n maxWidth: 680,\n padding: 24,\n} as const\n\nexport const ARTICLE_CLASSES = {\n container: 'max-w-
|
|
1
|
+
{"version":3,"sources":["../../src/styles/article.ts"],"sourcesContent":["export const ARTICLE_LAYOUT = {\n maxWidth: 680,\n padding: 24,\n} as const\n\nexport const ARTICLE_CLASSES = {\n container: 'max-w-[680px] mx-auto px-6',\n title: 'text-title font-bold',\n subtitle: 'text-h2 text-muted-foreground',\n byline: 'text-sm text-muted-foreground',\n body: 'text-body prose dark:prose-invert',\n prose: 'prose dark:prose-invert max-w-none',\n} as const\n\nexport type ArticleClasses = typeof ARTICLE_CLASSES\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,iBAAiB;AAAA,EAC5B,UAAU;AAAA,EACV,SAAS;AACX;AAEO,IAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;","names":[]}
|
package/dist/styles/article.mjs
CHANGED
|
@@ -4,11 +4,11 @@ var ARTICLE_LAYOUT = {
|
|
|
4
4
|
padding: 24
|
|
5
5
|
};
|
|
6
6
|
var ARTICLE_CLASSES = {
|
|
7
|
-
container: "max-w-
|
|
8
|
-
title: "text-
|
|
9
|
-
subtitle: "text-
|
|
7
|
+
container: "max-w-[680px] mx-auto px-6",
|
|
8
|
+
title: "text-title font-bold",
|
|
9
|
+
subtitle: "text-h2 text-muted-foreground",
|
|
10
10
|
byline: "text-sm text-muted-foreground",
|
|
11
|
-
body: "text-
|
|
11
|
+
body: "text-body prose dark:prose-invert",
|
|
12
12
|
prose: "prose dark:prose-invert max-w-none"
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/styles/article.ts"],"sourcesContent":["export const ARTICLE_LAYOUT = {\n maxWidth: 680,\n padding: 24,\n} as const\n\nexport const ARTICLE_CLASSES = {\n container: 'max-w-
|
|
1
|
+
{"version":3,"sources":["../../src/styles/article.ts"],"sourcesContent":["export const ARTICLE_LAYOUT = {\n maxWidth: 680,\n padding: 24,\n} as const\n\nexport const ARTICLE_CLASSES = {\n container: 'max-w-[680px] mx-auto px-6',\n title: 'text-title font-bold',\n subtitle: 'text-h2 text-muted-foreground',\n byline: 'text-sm text-muted-foreground',\n body: 'text-body prose dark:prose-invert',\n prose: 'prose dark:prose-invert max-w-none',\n} as const\n\nexport type ArticleClasses = typeof ARTICLE_CLASSES\n"],"mappings":";AAAO,IAAM,iBAAiB;AAAA,EAC5B,UAAU;AAAA,EACV,SAAS;AACX;AAEO,IAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autoblogger Theme CSS (Isolated)
|
|
3
|
+
*
|
|
4
|
+
* All styles are scoped under .autoblogger container
|
|
5
|
+
* Variables are prefixed with --ab- to avoid conflicts
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ============================================
|
|
9
|
+
CSS VARIABLES (namespaced with --ab-)
|
|
10
|
+
============================================ */
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
--ab-background: 0 0% 100%;
|
|
14
|
+
--ab-foreground: 240 10% 3.9%;
|
|
15
|
+
--ab-card: 0 0% 100%;
|
|
16
|
+
--ab-card-foreground: 240 10% 3.9%;
|
|
17
|
+
--ab-popover: 0 0% 100%;
|
|
18
|
+
--ab-popover-foreground: 240 10% 3.9%;
|
|
19
|
+
--ab-primary: 240 5.9% 10%;
|
|
20
|
+
--ab-primary-foreground: 0 0% 98%;
|
|
21
|
+
--ab-secondary: 240 4.8% 95.9%;
|
|
22
|
+
--ab-secondary-foreground: 240 5.9% 10%;
|
|
23
|
+
--ab-muted: 240 4.8% 95.9%;
|
|
24
|
+
--ab-muted-foreground: 240 3.8% 46.1%;
|
|
25
|
+
--ab-accent: 240 4.8% 95.9%;
|
|
26
|
+
--ab-accent-foreground: 240 5.9% 10%;
|
|
27
|
+
--ab-destructive: 0 84.2% 60.2%;
|
|
28
|
+
--ab-destructive-foreground: 0 0% 98%;
|
|
29
|
+
--ab-border: 240 5.9% 90%;
|
|
30
|
+
--ab-input: 240 5.9% 90%;
|
|
31
|
+
--ab-ring: 240 10% 3.9%;
|
|
32
|
+
--ab-radius: 0.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dark {
|
|
36
|
+
--ab-background: 240 10% 3.9%;
|
|
37
|
+
--ab-foreground: 0 0% 98%;
|
|
38
|
+
--ab-card: 240 10% 3.9%;
|
|
39
|
+
--ab-card-foreground: 0 0% 98%;
|
|
40
|
+
--ab-popover: 240 10% 3.9%;
|
|
41
|
+
--ab-popover-foreground: 0 0% 98%;
|
|
42
|
+
--ab-primary: 0 0% 98%;
|
|
43
|
+
--ab-primary-foreground: 240 5.9% 10%;
|
|
44
|
+
--ab-secondary: 240 3.7% 15.9%;
|
|
45
|
+
--ab-secondary-foreground: 0 0% 98%;
|
|
46
|
+
--ab-muted: 240 3.7% 15.9%;
|
|
47
|
+
--ab-muted-foreground: 240 5% 64.9%;
|
|
48
|
+
--ab-accent: 240 3.7% 15.9%;
|
|
49
|
+
--ab-accent-foreground: 0 0% 98%;
|
|
50
|
+
--ab-destructive: 0 62.8% 30.6%;
|
|
51
|
+
--ab-destructive-foreground: 0 0% 98%;
|
|
52
|
+
--ab-border: 240 3.7% 15.9%;
|
|
53
|
+
--ab-input: 240 3.7% 15.9%;
|
|
54
|
+
--ab-ring: 240 4.9% 83.9%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Alias --ab-* to standard names for Tailwind compatibility */
|
|
58
|
+
.autoblogger {
|
|
59
|
+
--background: var(--ab-background);
|
|
60
|
+
--foreground: var(--ab-foreground);
|
|
61
|
+
--card: var(--ab-card);
|
|
62
|
+
--card-foreground: var(--ab-card-foreground);
|
|
63
|
+
--popover: var(--ab-popover);
|
|
64
|
+
--popover-foreground: var(--ab-popover-foreground);
|
|
65
|
+
--primary: var(--ab-primary);
|
|
66
|
+
--primary-foreground: var(--ab-primary-foreground);
|
|
67
|
+
--secondary: var(--ab-secondary);
|
|
68
|
+
--secondary-foreground: var(--ab-secondary-foreground);
|
|
69
|
+
--muted: var(--ab-muted);
|
|
70
|
+
--muted-foreground: var(--ab-muted-foreground);
|
|
71
|
+
--accent: var(--ab-accent);
|
|
72
|
+
--accent-foreground: var(--ab-accent-foreground);
|
|
73
|
+
--destructive: var(--ab-destructive);
|
|
74
|
+
--destructive-foreground: var(--ab-destructive-foreground);
|
|
75
|
+
--border: var(--ab-border);
|
|
76
|
+
--input: var(--ab-input);
|
|
77
|
+
--ring: var(--ab-ring);
|
|
78
|
+
--radius: var(--ab-radius);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ============================================
|
|
82
|
+
SCOPED BASE STYLES (only inside .autoblogger)
|
|
83
|
+
============================================ */
|
|
84
|
+
|
|
85
|
+
.autoblogger {
|
|
86
|
+
background-color: hsl(var(--background));
|
|
87
|
+
color: hsl(var(--foreground));
|
|
88
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
89
|
+
-webkit-font-smoothing: antialiased;
|
|
90
|
+
-moz-osx-font-smoothing: grayscale;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.autoblogger *, .autoblogger *::before, .autoblogger *::after {
|
|
94
|
+
border-color: hsl(var(--border));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.autoblogger * {
|
|
98
|
+
transition-property: background-color, border-color;
|
|
99
|
+
transition-duration: 150ms;
|
|
100
|
+
transition-timing-function: ease-out;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.autoblogger a, .autoblogger button {
|
|
104
|
+
touch-action: manipulation;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* ============================================
|
|
108
|
+
ANIMATIONS
|
|
109
|
+
============================================ */
|
|
110
|
+
|
|
111
|
+
@keyframes ab-fadeInUp {
|
|
112
|
+
from { opacity: 0; transform: translateY(12px); }
|
|
113
|
+
to { opacity: 1; transform: translateY(0); }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.autoblogger .animate-fade-in-up {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
animation: ab-fadeInUp 0.5s ease-out forwards;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (prefers-reduced-motion: reduce) {
|
|
122
|
+
.autoblogger .animate-fade-in-up {
|
|
123
|
+
animation: none;
|
|
124
|
+
opacity: 1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ============================================
|
|
129
|
+
PROSE STYLES (scoped)
|
|
130
|
+
============================================ */
|
|
131
|
+
|
|
132
|
+
.autoblogger .prose { max-width: none; }
|
|
133
|
+
.autoblogger .prose h1 { font-size: 22px; line-height: 1.3; font-weight: 700; margin-bottom: 1.5rem; }
|
|
134
|
+
.autoblogger .prose h2 { font-size: 18px; line-height: 1.4; font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; }
|
|
135
|
+
.autoblogger .prose h3 { font-size: 16px; line-height: 1.4; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; }
|
|
136
|
+
.autoblogger .prose p { margin-bottom: 1rem; line-height: 1.625; }
|
|
137
|
+
.autoblogger .prose ul, .autoblogger .prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
|
|
138
|
+
.autoblogger .prose li { margin-bottom: 0.5rem; }
|
|
139
|
+
.autoblogger .prose ul li { list-style-type: disc; }
|
|
140
|
+
.autoblogger .prose ol li { list-style-type: decimal; }
|
|
141
|
+
.autoblogger .prose a { color: #2563eb; text-decoration: underline; }
|
|
142
|
+
.dark .autoblogger .prose a { color: #60a5fa; }
|
|
143
|
+
.autoblogger .prose code { background-color: hsl(var(--muted)); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; }
|
|
144
|
+
.autoblogger .prose pre { background-color: hsl(var(--muted)); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin-bottom: 1rem; }
|
|
145
|
+
.autoblogger .prose pre code { background-color: transparent; padding: 0; }
|
|
146
|
+
.autoblogger .prose blockquote { border-left: 4px solid hsl(var(--border)); padding-left: 1rem; font-style: italic; margin: 1rem 0; }
|
|
147
|
+
.autoblogger .prose img { border-radius: 0.5rem; margin: 1rem 0; }
|
|
148
|
+
.autoblogger .prose hr { margin: 2rem 0; border-color: hsl(var(--border)); }
|
|
149
|
+
|
|
150
|
+
/* ============================================
|
|
151
|
+
TIPTAP EDITOR STYLES (scoped)
|
|
152
|
+
============================================ */
|
|
153
|
+
|
|
154
|
+
.autoblogger .ProseMirror:focus { outline: none; }
|
|
155
|
+
.autoblogger .ProseMirror p.is-editor-empty:first-child::before {
|
|
156
|
+
content: attr(data-placeholder);
|
|
157
|
+
color: #d1d5db;
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
float: left;
|
|
160
|
+
height: 0;
|
|
161
|
+
}
|
|
162
|
+
.dark .autoblogger .ProseMirror p.is-editor-empty:first-child::before { color: #374151; }
|
|
163
|
+
.autoblogger .ProseMirror h1 { font-size: 22px; line-height: 1.3; }
|
|
164
|
+
.autoblogger .ProseMirror h2 { font-size: 18px; line-height: 1.4; }
|
|
165
|
+
.autoblogger .ProseMirror h3 { font-size: 16px; line-height: 1.4; }
|
package/dist/styles/preset.js
CHANGED
|
@@ -3,18 +3,58 @@ module.exports = {
|
|
|
3
3
|
theme: {
|
|
4
4
|
extend: {
|
|
5
5
|
fontSize: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
title: ['24px', { lineHeight: '1.2' }],
|
|
7
|
+
h1: ['22px', { lineHeight: '1.3' }],
|
|
8
|
+
h2: ['18px', { lineHeight: '1.4' }],
|
|
9
|
+
h3: ['16px', { lineHeight: '1.4' }],
|
|
10
|
+
body: ['16px', { lineHeight: '1.6' }],
|
|
11
|
+
table: ['14px', { lineHeight: '1.5' }],
|
|
12
12
|
},
|
|
13
13
|
maxWidth: {
|
|
14
|
-
|
|
14
|
+
content: '680px',
|
|
15
15
|
},
|
|
16
16
|
spacing: {
|
|
17
|
-
'
|
|
17
|
+
'content-padding': '24px',
|
|
18
|
+
},
|
|
19
|
+
colors: {
|
|
20
|
+
background: 'hsl(var(--background))',
|
|
21
|
+
foreground: 'hsl(var(--foreground))',
|
|
22
|
+
card: {
|
|
23
|
+
DEFAULT: 'hsl(var(--card))',
|
|
24
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
25
|
+
},
|
|
26
|
+
popover: {
|
|
27
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
28
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
29
|
+
},
|
|
30
|
+
primary: {
|
|
31
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
32
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
33
|
+
},
|
|
34
|
+
secondary: {
|
|
35
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
36
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
37
|
+
},
|
|
38
|
+
muted: {
|
|
39
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
40
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
41
|
+
},
|
|
42
|
+
accent: {
|
|
43
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
44
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
45
|
+
},
|
|
46
|
+
destructive: {
|
|
47
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
48
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
49
|
+
},
|
|
50
|
+
border: 'hsl(var(--border))',
|
|
51
|
+
input: 'hsl(var(--input))',
|
|
52
|
+
ring: 'hsl(var(--ring))',
|
|
53
|
+
},
|
|
54
|
+
borderRadius: {
|
|
55
|
+
lg: 'var(--radius)',
|
|
56
|
+
md: 'calc(var(--radius) - 2px)',
|
|
57
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
18
58
|
},
|
|
19
59
|
},
|
|
20
60
|
},
|
package/dist/ui.d.mts
CHANGED
|
@@ -63,6 +63,7 @@ interface SharedData {
|
|
|
63
63
|
counts: Record<string, number>;
|
|
64
64
|
settings: {
|
|
65
65
|
autoDraftEnabled: boolean;
|
|
66
|
+
postUrlPattern: string;
|
|
66
67
|
};
|
|
67
68
|
posts: unknown[];
|
|
68
69
|
suggestedPosts: unknown[];
|
|
@@ -284,6 +285,8 @@ interface ChatProviderProps {
|
|
|
284
285
|
}
|
|
285
286
|
declare function ChatProvider({ children, apiBasePath, chatApiPath, historyApiPath, }: ChatProviderProps): react_jsx_runtime.JSX.Element;
|
|
286
287
|
declare function useChatContext(): ChatContextValue;
|
|
288
|
+
/** Optional chat context - returns null if not within ChatProvider */
|
|
289
|
+
declare function useChatContextOptional(): ChatContextValue | null;
|
|
287
290
|
|
|
288
291
|
interface ChatPanelProps {
|
|
289
292
|
/** Optional prose classes for message rendering */
|
|
@@ -295,7 +298,7 @@ interface ChatPanelProps {
|
|
|
295
298
|
/** API path for fetching models (defaults to /api/cms/ai/settings) */
|
|
296
299
|
modelsApiPath?: string;
|
|
297
300
|
}
|
|
298
|
-
declare function ChatPanel({ proseClasses, onNavigate, isOnEditor: isOnEditorProp, }: ChatPanelProps): react.ReactPortal | null;
|
|
301
|
+
declare function ChatPanel({ proseClasses, onNavigate: onNavigateProp, isOnEditor: isOnEditorProp, modelsApiPath, }: ChatPanelProps): react.ReactPortal | null;
|
|
299
302
|
|
|
300
303
|
/** AI model option for UI dropdowns */
|
|
301
304
|
interface AIModelOption {
|
|
@@ -341,4 +344,4 @@ interface ControlButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
341
344
|
}
|
|
342
345
|
declare const ControlButton: react.ForwardRefExoticComponent<ControlButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
343
346
|
|
|
344
|
-
export { type AIModelOption, AutobloggerDashboard, type AutobloggerDashboardProps, ChatContext, type EditHandler as ChatEditHandler, type EssayContext as ChatEssayContext, type Message as ChatMessage, type ChatMode, ChatPanel, ChatProvider, CommentThread, CommentsPanel, type CommentsState, ControlButton, type CustomFieldConfig, type CustomFieldProps, type EditCommand, type EditHandler$1 as EditHandler, type EditorContent, type EditorState, type EssayEdit, type EssaySnapshot, type ExpandPlanHandler, ModelSelector, Navbar, type NavbarProps, type Session, type SessionUser, type StylesConfig, useAIModels, useChatContext, useComments, useDashboardContext };
|
|
347
|
+
export { type AIModelOption, AutobloggerDashboard, type AutobloggerDashboardProps, ChatContext, type EditHandler as ChatEditHandler, type EssayContext as ChatEssayContext, type Message as ChatMessage, type ChatMode, ChatPanel, ChatProvider, CommentThread, CommentsPanel, type CommentsState, ControlButton, type CustomFieldConfig, type CustomFieldProps, type EditCommand, type EditHandler$1 as EditHandler, type EditorContent, type EditorState, type EssayEdit, type EssaySnapshot, type ExpandPlanHandler, ModelSelector, Navbar, type NavbarProps, type Session, type SessionUser, type StylesConfig, useAIModels, useChatContext, useChatContextOptional, useComments, useDashboardContext };
|
package/dist/ui.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ interface SharedData {
|
|
|
63
63
|
counts: Record<string, number>;
|
|
64
64
|
settings: {
|
|
65
65
|
autoDraftEnabled: boolean;
|
|
66
|
+
postUrlPattern: string;
|
|
66
67
|
};
|
|
67
68
|
posts: unknown[];
|
|
68
69
|
suggestedPosts: unknown[];
|
|
@@ -284,6 +285,8 @@ interface ChatProviderProps {
|
|
|
284
285
|
}
|
|
285
286
|
declare function ChatProvider({ children, apiBasePath, chatApiPath, historyApiPath, }: ChatProviderProps): react_jsx_runtime.JSX.Element;
|
|
286
287
|
declare function useChatContext(): ChatContextValue;
|
|
288
|
+
/** Optional chat context - returns null if not within ChatProvider */
|
|
289
|
+
declare function useChatContextOptional(): ChatContextValue | null;
|
|
287
290
|
|
|
288
291
|
interface ChatPanelProps {
|
|
289
292
|
/** Optional prose classes for message rendering */
|
|
@@ -295,7 +298,7 @@ interface ChatPanelProps {
|
|
|
295
298
|
/** API path for fetching models (defaults to /api/cms/ai/settings) */
|
|
296
299
|
modelsApiPath?: string;
|
|
297
300
|
}
|
|
298
|
-
declare function ChatPanel({ proseClasses, onNavigate, isOnEditor: isOnEditorProp, }: ChatPanelProps): react.ReactPortal | null;
|
|
301
|
+
declare function ChatPanel({ proseClasses, onNavigate: onNavigateProp, isOnEditor: isOnEditorProp, modelsApiPath, }: ChatPanelProps): react.ReactPortal | null;
|
|
299
302
|
|
|
300
303
|
/** AI model option for UI dropdowns */
|
|
301
304
|
interface AIModelOption {
|
|
@@ -341,4 +344,4 @@ interface ControlButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
341
344
|
}
|
|
342
345
|
declare const ControlButton: react.ForwardRefExoticComponent<ControlButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
343
346
|
|
|
344
|
-
export { type AIModelOption, AutobloggerDashboard, type AutobloggerDashboardProps, ChatContext, type EditHandler as ChatEditHandler, type EssayContext as ChatEssayContext, type Message as ChatMessage, type ChatMode, ChatPanel, ChatProvider, CommentThread, CommentsPanel, type CommentsState, ControlButton, type CustomFieldConfig, type CustomFieldProps, type EditCommand, type EditHandler$1 as EditHandler, type EditorContent, type EditorState, type EssayEdit, type EssaySnapshot, type ExpandPlanHandler, ModelSelector, Navbar, type NavbarProps, type Session, type SessionUser, type StylesConfig, useAIModels, useChatContext, useComments, useDashboardContext };
|
|
347
|
+
export { type AIModelOption, AutobloggerDashboard, type AutobloggerDashboardProps, ChatContext, type EditHandler as ChatEditHandler, type EssayContext as ChatEssayContext, type Message as ChatMessage, type ChatMode, ChatPanel, ChatProvider, CommentThread, CommentsPanel, type CommentsState, ControlButton, type CustomFieldConfig, type CustomFieldProps, type EditCommand, type EditHandler$1 as EditHandler, type EditorContent, type EditorState, type EssayEdit, type EssaySnapshot, type ExpandPlanHandler, ModelSelector, Navbar, type NavbarProps, type Session, type SessionUser, type StylesConfig, useAIModels, useChatContext, useChatContextOptional, useComments, useDashboardContext };
|