@vpxa/aikit 0.1.195 → 0.1.197
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/package.json +7 -1
- package/packages/aikit-client/package.json +28 -0
- package/packages/analyzers/package.json +25 -0
- package/packages/blocks-core/package.json +23 -0
- package/packages/blocks-interactive/dist/flame-graph-CV8KCLKu.mjs +31 -0
- package/packages/blocks-interactive/dist/form-SyIoFeT1.mjs +73 -0
- package/packages/blocks-interactive/dist/index.d.mts +51 -0
- package/packages/blocks-interactive/dist/index.mjs +15 -0
- package/packages/blocks-interactive/dist/payload-DyKkZIOX.mjs +1 -0
- package/packages/blocks-interactive/dist/picker-CZJricO9.mjs +53 -0
- package/packages/blocks-interactive/package.json +51 -0
- package/packages/browser/package.json +26 -0
- package/packages/chunker/package.json +29 -0
- package/packages/cli/package.json +31 -0
- package/packages/core/package.json +19 -0
- package/packages/dashboard/package.json +29 -0
- package/packages/elicitation/package.json +22 -0
- package/packages/embeddings/dist/index.d.ts +8 -0
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/embeddings/package.json +25 -0
- package/packages/enterprise-bridge/package.json +22 -0
- package/packages/flows/package.json +16 -0
- package/packages/indexer/package.json +28 -0
- package/packages/present/package.json +21 -0
- package/packages/server/dist/dashboard-static-FmfoS46e.js +1 -0
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/resolve-sibling-1oDoO-Re.js +1 -0
- package/packages/server/dist/{server-DN97p2DP.js → server-DaayrH3p.js} +138 -134
- package/packages/server/dist/settings-static-BtvyIrza.js +1 -0
- package/packages/server/package.json +64 -0
- package/packages/settings-ui/dist/assets/index-cNrL0PXt.css +1 -0
- package/packages/settings-ui/dist/index.html +22 -0
- package/packages/settings-ui/package.json +26 -0
- package/packages/store/package.json +32 -0
- package/packages/tools/package.json +34 -0
- package/packages/blocks-core/dist/index.d.ts +0 -600
- package/packages/server/dist/dashboard-static-CnXafYTs.js +0 -1
- package/packages/server/dist/settings-static-BkVLqWOr.js +0 -1
- /package/packages/blocks-core/dist/{index.js → index.mjs} +0 -0
|
@@ -1,600 +0,0 @@
|
|
|
1
|
-
//#region packages/blocks-core/src/surface-action.d.ts
|
|
2
|
-
/** Option for select and multi-select actions. */
|
|
3
|
-
interface ActionOption {
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
}
|
|
8
|
-
/** Union type for supported transport identifiers. */
|
|
9
|
-
type TransportType = 'mcp-app' | 'browser' | 'export';
|
|
10
|
-
/** A user-facing interactive element on a surface. */
|
|
11
|
-
interface SurfaceAction {
|
|
12
|
-
id: string;
|
|
13
|
-
type: 'button' | 'select' | 'multi-select' | 'form-submit' | 'text-submit' | 'confirm' | 'custom';
|
|
14
|
-
label: string;
|
|
15
|
-
variant?: 'primary' | 'danger' | 'default';
|
|
16
|
-
options?: ActionOption[];
|
|
17
|
-
schema?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
/** Result returned to the LLM after user interaction. */
|
|
20
|
-
interface SurfaceActionResult {
|
|
21
|
-
surfaceId: string;
|
|
22
|
-
actionId: string;
|
|
23
|
-
actionType: SurfaceAction['type'];
|
|
24
|
-
value?: unknown;
|
|
25
|
-
formData?: Record<string, unknown>;
|
|
26
|
-
selection?: string | string[];
|
|
27
|
-
label?: string;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
sourceTransport: TransportType;
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region packages/blocks-core/src/channel-outcome.d.ts
|
|
33
|
-
interface ChannelError {
|
|
34
|
-
code: string;
|
|
35
|
-
message: string;
|
|
36
|
-
details?: unknown;
|
|
37
|
-
}
|
|
38
|
-
type ChannelOutcome = {
|
|
39
|
-
kind: 'result';
|
|
40
|
-
result: SurfaceActionResult;
|
|
41
|
-
} | {
|
|
42
|
-
kind: 'timeout';
|
|
43
|
-
waitedMs: number;
|
|
44
|
-
} | {
|
|
45
|
-
kind: 'cancelled';
|
|
46
|
-
reason: 'user-closed' | 'host-dismissed' | 'replaced';
|
|
47
|
-
} | {
|
|
48
|
-
kind: 'error';
|
|
49
|
-
error: ChannelError;
|
|
50
|
-
} | {
|
|
51
|
-
kind: 'rendered';
|
|
52
|
-
reason: 'no-response-required';
|
|
53
|
-
};
|
|
54
|
-
declare function isResult(outcome: ChannelOutcome): outcome is {
|
|
55
|
-
kind: 'result';
|
|
56
|
-
result: SurfaceActionResult;
|
|
57
|
-
};
|
|
58
|
-
declare function isError(outcome: ChannelOutcome): outcome is {
|
|
59
|
-
kind: 'error';
|
|
60
|
-
error: ChannelError;
|
|
61
|
-
};
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region packages/blocks-core/src/template-definition.d.ts
|
|
64
|
-
/** Context available to template rendering functions. */
|
|
65
|
-
interface RenderContext {
|
|
66
|
-
colorScheme: 'light' | 'dark' | 'auto';
|
|
67
|
-
transport: TransportType;
|
|
68
|
-
lang?: string;
|
|
69
|
-
dir?: 'ltr' | 'rtl' | 'auto';
|
|
70
|
-
}
|
|
71
|
-
/** Definition of a reusable template. */
|
|
72
|
-
interface TemplateDefinition {
|
|
73
|
-
/** Versioned template ID, e.g. 'report@1'. */
|
|
74
|
-
id: string;
|
|
75
|
-
/** Human-readable label. */
|
|
76
|
-
label: string;
|
|
77
|
-
/** Description for LLM guidance. */
|
|
78
|
-
description: string;
|
|
79
|
-
/** JSON Schema for the `data` field when this template is used. */
|
|
80
|
-
inputSchema: Record<string, unknown>;
|
|
81
|
-
/** Default layout for this template. */
|
|
82
|
-
defaultLayout: LayoutOptions;
|
|
83
|
-
/** Pure function: template data -> blocks. */
|
|
84
|
-
blocksFromData: (data: unknown, ctx: RenderContext) => TypedBlock[];
|
|
85
|
-
/** Optional: template data -> actions. */
|
|
86
|
-
actionsFromData?: (data: unknown) => SurfaceAction[];
|
|
87
|
-
/** Island IDs required for hydration. */
|
|
88
|
-
hydration: string[];
|
|
89
|
-
/** Which transports support this template. */
|
|
90
|
-
supportedTransports: TransportType[];
|
|
91
|
-
}
|
|
92
|
-
/** Template registry — maps template IDs to definitions. */
|
|
93
|
-
declare class TemplateRegistry {
|
|
94
|
-
private readonly templates;
|
|
95
|
-
register(definition: TemplateDefinition): void;
|
|
96
|
-
get(id: string): TemplateDefinition | undefined;
|
|
97
|
-
has(id: string): boolean;
|
|
98
|
-
list(): TemplateDefinition[];
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region packages/blocks-core/src/types.d.ts
|
|
102
|
-
/** Base typed block — the universal data contract. */
|
|
103
|
-
interface TypedBlock {
|
|
104
|
-
type: string;
|
|
105
|
-
title?: string;
|
|
106
|
-
value?: unknown;
|
|
107
|
-
[key: string]: unknown;
|
|
108
|
-
}
|
|
109
|
-
/** All supported block type literals. */
|
|
110
|
-
type BlockType = 'markdown' | 'text' | 'heading' | 'kv' | 'list' | 'paragraph' | 'separator' | 'code' | 'table' | 'metrics' | 'cards' | 'tree' | 'graph' | 'mermaid' | 'chart' | 'timeline' | 'checklist' | 'comparison' | 'component-detail' | 'data-table-schema' | 'status-board' | 'docs-hub' | 'prompt' | 'progress' | 'actions' | 'docs-browser' | 'finding' | 'lifecycle-flow' | 'tags';
|
|
111
|
-
/** Value type for metrics block. */
|
|
112
|
-
interface MetricItem {
|
|
113
|
-
label: string;
|
|
114
|
-
value: string | number;
|
|
115
|
-
trend?: string | number;
|
|
116
|
-
status?: string;
|
|
117
|
-
}
|
|
118
|
-
/** Value type for cards block. */
|
|
119
|
-
interface CardItem {
|
|
120
|
-
title: string;
|
|
121
|
-
body?: string;
|
|
122
|
-
badge?: string;
|
|
123
|
-
status?: string;
|
|
124
|
-
description?: string;
|
|
125
|
-
}
|
|
126
|
-
/** Value type for timeline block. */
|
|
127
|
-
interface TimelineItem {
|
|
128
|
-
title: string;
|
|
129
|
-
description?: string;
|
|
130
|
-
timestamp?: string;
|
|
131
|
-
status?: string;
|
|
132
|
-
}
|
|
133
|
-
/** Value type for checklist block. */
|
|
134
|
-
interface ChecklistItem {
|
|
135
|
-
label: string;
|
|
136
|
-
checked?: boolean;
|
|
137
|
-
}
|
|
138
|
-
/** Value type for progress block. */
|
|
139
|
-
interface ProgressItem {
|
|
140
|
-
label: string;
|
|
141
|
-
value: number;
|
|
142
|
-
max?: number;
|
|
143
|
-
color?: string;
|
|
144
|
-
}
|
|
145
|
-
/** Value type for comparison block. */
|
|
146
|
-
interface ComparisonColumn {
|
|
147
|
-
title: string;
|
|
148
|
-
items: string[];
|
|
149
|
-
}
|
|
150
|
-
/** Value type for status-board block. */
|
|
151
|
-
interface StatusCategory {
|
|
152
|
-
category: string;
|
|
153
|
-
items: Array<{
|
|
154
|
-
label?: string;
|
|
155
|
-
name?: string;
|
|
156
|
-
status?: string;
|
|
157
|
-
description?: string;
|
|
158
|
-
}>;
|
|
159
|
-
}
|
|
160
|
-
/** Value type for actions block. */
|
|
161
|
-
interface ActionItem {
|
|
162
|
-
type: 'button' | 'select' | 'multi-select' | 'text-submit' | 'form-submit' | 'confirm' | 'custom';
|
|
163
|
-
id: string;
|
|
164
|
-
label: string;
|
|
165
|
-
variant?: 'primary' | 'danger' | 'default';
|
|
166
|
-
options?: Array<string | {
|
|
167
|
-
label: string;
|
|
168
|
-
value: string;
|
|
169
|
-
description?: string;
|
|
170
|
-
}>;
|
|
171
|
-
schema?: Record<string, unknown>;
|
|
172
|
-
}
|
|
173
|
-
/** Value type for docs-browser block. */
|
|
174
|
-
interface DocFile {
|
|
175
|
-
path: string;
|
|
176
|
-
title?: string;
|
|
177
|
-
content?: string;
|
|
178
|
-
status?: 'current' | 'stale' | 'missing';
|
|
179
|
-
}
|
|
180
|
-
interface DocsHubPage {
|
|
181
|
-
title: string;
|
|
182
|
-
description?: string;
|
|
183
|
-
icon?: string;
|
|
184
|
-
href?: string;
|
|
185
|
-
category?: string;
|
|
186
|
-
status?: 'current' | 'draft' | 'deprecated';
|
|
187
|
-
}
|
|
188
|
-
interface ComponentInterface {
|
|
189
|
-
name: string;
|
|
190
|
-
type: string;
|
|
191
|
-
description?: string;
|
|
192
|
-
}
|
|
193
|
-
interface ComponentDependency {
|
|
194
|
-
name: string;
|
|
195
|
-
relationship?: string;
|
|
196
|
-
}
|
|
197
|
-
interface ComponentDetailValue {
|
|
198
|
-
name: string;
|
|
199
|
-
description?: string;
|
|
200
|
-
type?: string;
|
|
201
|
-
technology?: string;
|
|
202
|
-
responsibilities?: string[];
|
|
203
|
-
interfaces?: ComponentInterface[];
|
|
204
|
-
dependencies?: ComponentDependency[];
|
|
205
|
-
metrics?: Record<string, string | number>;
|
|
206
|
-
codeLinks?: Array<{
|
|
207
|
-
label: string;
|
|
208
|
-
href: string;
|
|
209
|
-
}>;
|
|
210
|
-
}
|
|
211
|
-
interface LifecycleFlowStep {
|
|
212
|
-
id: string;
|
|
213
|
-
label: string;
|
|
214
|
-
description?: string;
|
|
215
|
-
type?: 'start' | 'end' | 'step' | 'decision' | 'parallel';
|
|
216
|
-
status?: 'active' | 'completed' | 'pending' | 'error';
|
|
217
|
-
}
|
|
218
|
-
interface LifecycleFlowEdge {
|
|
219
|
-
from: string;
|
|
220
|
-
to: string;
|
|
221
|
-
label?: string;
|
|
222
|
-
}
|
|
223
|
-
interface DataTableSchemaField {
|
|
224
|
-
name: string;
|
|
225
|
-
type: string;
|
|
226
|
-
required?: boolean;
|
|
227
|
-
description?: string;
|
|
228
|
-
constraints?: string[];
|
|
229
|
-
default?: string;
|
|
230
|
-
}
|
|
231
|
-
interface DataTableSchemaIndex {
|
|
232
|
-
name: string;
|
|
233
|
-
columns: string[];
|
|
234
|
-
unique?: boolean;
|
|
235
|
-
}
|
|
236
|
-
interface DataTableSchemaValue {
|
|
237
|
-
name: string;
|
|
238
|
-
description?: string;
|
|
239
|
-
fields: DataTableSchemaField[];
|
|
240
|
-
indexes?: DataTableSchemaIndex[];
|
|
241
|
-
}
|
|
242
|
-
/** Block renderer function signature. */
|
|
243
|
-
type BlockRenderer = (block: TypedBlock, ctx?: RenderContext) => string;
|
|
244
|
-
/** Public alias for the renderer-specific context when another package claims RenderContext. */
|
|
245
|
-
type BlockRenderContext = RenderContext;
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region packages/blocks-core/src/channel-surface.d.ts
|
|
248
|
-
/** Response policy for surfaces with actions. */
|
|
249
|
-
interface ResponsePolicy {
|
|
250
|
-
timeout?: number;
|
|
251
|
-
required?: boolean;
|
|
252
|
-
}
|
|
253
|
-
/** Surface metadata. */
|
|
254
|
-
interface SurfaceMetadata {
|
|
255
|
-
surfaceId?: string;
|
|
256
|
-
createdAt?: string;
|
|
257
|
-
source?: string;
|
|
258
|
-
}
|
|
259
|
-
/** Layout options. */
|
|
260
|
-
interface LayoutOptions {
|
|
261
|
-
maxWidth?: string;
|
|
262
|
-
padding?: string;
|
|
263
|
-
columns?: number;
|
|
264
|
-
}
|
|
265
|
-
/** Core LLM-to-user communication contract. */
|
|
266
|
-
interface ChannelSurface {
|
|
267
|
-
schemaVersion: 1;
|
|
268
|
-
title: string;
|
|
269
|
-
description?: string;
|
|
270
|
-
template?: string;
|
|
271
|
-
layout?: LayoutOptions;
|
|
272
|
-
blocks?: TypedBlock[];
|
|
273
|
-
data?: unknown;
|
|
274
|
-
actions?: SurfaceAction[];
|
|
275
|
-
response?: ResponsePolicy;
|
|
276
|
-
metadata?: SurfaceMetadata;
|
|
277
|
-
colorScheme?: 'light' | 'dark' | 'auto';
|
|
278
|
-
lang?: string;
|
|
279
|
-
dir?: 'ltr' | 'rtl' | 'auto';
|
|
280
|
-
}
|
|
281
|
-
//#endregion
|
|
282
|
-
//#region packages/blocks-core/src/css.d.ts
|
|
283
|
-
/** Base CSS that's always needed. */
|
|
284
|
-
declare const baseCss = "\n.bk-section {\n display: grid;\n gap: var(--dt-space-3);\n margin: 0 0 var(--dt-space-6);\n}\n\n.bk-section-title {\n margin: 0;\n color: var(--dt-text-primary);\n font-family: var(--dt-font-sans);\n font-size: var(--dt-font-size-lg);\n font-weight: 700;\n}\n\n.bk-text,\n.bk-markdown,\n.bk-paragraph,\n.bk-fallback,\n.bk-prompt,\n.bk-heading,\n.bk-kv,\n.bk-list,\n.bk-table,\n.bk-data-table-schema,\n.bk-docs-browser,\n.bk-docs-hub,\n.bk-actions,\n.bk-comparison,\n.bk-component-detail,\n.bk-status-board,\n.bk-progress,\n.bk-lifecycle-flow,\n.bk-timeline,\n.bk-tree,\n.bk-tags,\n.bk-cards,\n.bk-metrics,\n.bk-chart,\n.bk-code,\n.bk-mermaid,\n.bk-graph,\n.bk-checklist,\n.bk-finding {\n font-family: var(--dt-font-sans);\n}\n\n.bk-text a,\n.bk-kv a,\n.bk-list a,\n.bk-markdown a,\n.bk-finding a {\n color: var(--dt-accent-fg);\n text-decoration: none;\n}\n\n.bk-text code,\n.bk-kv code,\n.bk-list code,\n.bk-markdown code,\n.bk-finding code {\n padding: 0 var(--dt-space-1);\n border-radius: var(--dt-radius-sm);\n background: var(--dt-bg-tertiary);\n color: var(--dt-purple-fg);\n font-family: var(--dt-font-mono);\n font-size: 0.95em;\n}\n\n.bk-fallback {\n margin: 0;\n padding: var(--dt-space-4);\n border: 1px solid var(--dt-border-default);\n border-radius: var(--dt-radius-lg);\n background: var(--dt-bg-secondary);\n color: var(--dt-text-secondary);\n font-family: var(--dt-font-mono);\n font-size: var(--dt-font-size-sm);\n white-space: pre-wrap;\n}\n\n.bk-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n";
|
|
285
|
-
/** Collect CSS for specific block types only. */
|
|
286
|
-
declare function collectCss(blockTypes: string[]): string;
|
|
287
|
-
/** Get all block CSS. */
|
|
288
|
-
declare function allCss(): string;
|
|
289
|
-
declare function generateDarkTokenCss(): string;
|
|
290
|
-
/** Generate CSS custom properties from the typed token map. */
|
|
291
|
-
declare function generateTokenCss(colorScheme?: 'light' | 'dark' | 'auto'): string;
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region packages/blocks-core/src/header.d.ts
|
|
294
|
-
/**
|
|
295
|
-
* Shared header/footer module — single source of truth for all AI Kit templates.
|
|
296
|
-
* Used by: shell.ts (present tool), React viewers (via matching CSS classes), report template.
|
|
297
|
-
*/
|
|
298
|
-
interface HeaderOptions {
|
|
299
|
-
title: string;
|
|
300
|
-
subtitle?: string;
|
|
301
|
-
/** Brand text. Defaults to 'AI Kit' */
|
|
302
|
-
brand?: string;
|
|
303
|
-
/** Whether to include theme toggle button */
|
|
304
|
-
showThemeToggle?: boolean;
|
|
305
|
-
/** Transport type affects which toolbox items appear */
|
|
306
|
-
transport?: TransportType;
|
|
307
|
-
/** Additional action buttons HTML to inject */
|
|
308
|
-
actionsHtml?: string;
|
|
309
|
-
}
|
|
310
|
-
interface FooterOptions {
|
|
311
|
-
generatedAt?: string;
|
|
312
|
-
badge?: string;
|
|
313
|
-
contentHtml?: string;
|
|
314
|
-
}
|
|
315
|
-
declare const HEADER_CLASS_NAMES: {
|
|
316
|
-
readonly header: "aikit-header";
|
|
317
|
-
readonly brand: "aikit-header-brand";
|
|
318
|
-
readonly title: "aikit-header-title";
|
|
319
|
-
readonly titleText: "aikit-header-title-text";
|
|
320
|
-
readonly subtitle: "aikit-header-subtitle";
|
|
321
|
-
readonly actions: "aikit-header-actions";
|
|
322
|
-
readonly themeToggle: "aikit-theme-toggle";
|
|
323
|
-
readonly themeToggleIcon: "aikit-theme-toggle-icon";
|
|
324
|
-
readonly themeToggleIconSun: "aikit-theme-toggle-icon--sun";
|
|
325
|
-
readonly themeToggleIconMoon: "aikit-theme-toggle-icon--moon";
|
|
326
|
-
readonly toolbox: "aikit-toolbox";
|
|
327
|
-
readonly toolboxToggle: "aikit-toolbox-toggle";
|
|
328
|
-
readonly toolboxMenu: "aikit-toolbox-menu";
|
|
329
|
-
readonly toolboxItem: "aikit-toolbox-item";
|
|
330
|
-
readonly footer: "aikit-footer";
|
|
331
|
-
readonly footerMeta: "aikit-footer-meta";
|
|
332
|
-
readonly footerText: "aikit-footer-text";
|
|
333
|
-
readonly footerBrand: "aikit-footer-brand";
|
|
334
|
-
readonly footerTimestamp: "aikit-footer-timestamp";
|
|
335
|
-
readonly footerSlot: "aikit-footer-slot";
|
|
336
|
-
readonly footerBadge: "aikit-footer-badge";
|
|
337
|
-
};
|
|
338
|
-
declare function buildHeader(options: HeaderOptions): string;
|
|
339
|
-
declare function buildFooter(options?: FooterOptions): string;
|
|
340
|
-
declare const HEADER_CSS = "\n.aikit-header,\n.aikit-toolbox-menu,\n.aikit-footer {\n --aikit-background: var(--background, var(--dt-bg-primary));\n --aikit-foreground: var(--foreground, var(--dt-text-primary));\n --aikit-muted: var(--muted, var(--dt-bg-secondary));\n --aikit-muted-foreground: var(--muted-foreground, var(--dt-text-secondary));\n --aikit-border: var(--border, var(--dt-border-default));\n --aikit-accent: var(--accent, var(--dt-accent-subtle));\n --aikit-accent-foreground: var(--accent-foreground, var(--dt-accent-fg));\n --aikit-card: var(--card, var(--dt-bg-secondary));\n --aikit-card-foreground: var(--card-foreground, var(--dt-text-primary));\n}\n\n.aikit-header {\n position: sticky;\n top: 0;\n z-index: 100;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--dt-space-4);\n min-height: 3.5rem;\n padding: var(--dt-space-2) var(--dt-space-4);\n border-bottom: 1px solid var(--aikit-border);\n background: color-mix(in srgb, var(--aikit-background) 88%, transparent);\n backdrop-filter: blur(8px);\n}\n\n.aikit-header-brand,\n.aikit-header-actions {\n flex: 0 0 auto;\n min-width: 0;\n}\n\n.aikit-header-brand {\n display: flex;\n align-items: center;\n color: var(--aikit-muted-foreground);\n font-family: var(--dt-font-mono);\n font-size: var(--dt-font-size-sm);\n font-weight: 600;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.aikit-header-title {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: baseline;\n gap: var(--dt-space-2);\n justify-content: flex-start;\n min-height: 0;\n}\n\n.aikit-header-title-text {\n min-width: 0;\n flex: 1 1 auto;\n color: var(--aikit-foreground);\n font-size: var(--dt-font-size-lg);\n font-weight: 600;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.aikit-header-subtitle {\n flex: 0 1 auto;\n min-width: 0;\n color: var(--aikit-muted-foreground);\n font-size: var(--dt-font-size-sm);\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.aikit-header-actions {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--dt-space-2);\n min-width: max-content;\n}\n\n.aikit-header-actions > * {\n flex: 0 0 auto;\n}\n\n.aikit-toolbox {\n position: relative;\n}\n\n.aikit-theme-toggle,\n.aikit-toolbox-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 2.5rem;\n height: 2.5rem;\n padding: 0;\n border: 1px solid var(--aikit-border);\n border-radius: 999px;\n background: var(--aikit-card);\n color: var(--aikit-card-foreground);\n cursor: pointer;\n font: inherit;\n transition:\n background var(--dt-transition-fast),\n border-color var(--dt-transition-fast),\n color var(--dt-transition-fast),\n transform var(--dt-transition-fast);\n}\n\n.aikit-theme-toggle:hover,\n.aikit-toolbox-toggle:hover {\n background: var(--aikit-muted);\n}\n\n.aikit-theme-toggle:focus-visible,\n.aikit-toolbox-toggle:focus-visible,\n.aikit-toolbox-item:focus-visible {\n outline: 2px solid var(--aikit-accent-foreground);\n outline-offset: 2px;\n}\n\n.aikit-theme-toggle-icon {\n position: absolute;\n inset: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition:\n opacity var(--dt-transition-normal),\n transform var(--dt-transition-normal);\n}\n\n.aikit-theme-toggle-icon--sun {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n}\n\n.aikit-theme-toggle-icon--moon {\n opacity: 0;\n transform: scale(0.65) rotate(-40deg);\n}\n\nhtml[data-theme='dark'] .aikit-theme-toggle-icon--sun {\n opacity: 0;\n transform: scale(0.65) rotate(40deg);\n}\n\nhtml[data-theme='dark'] .aikit-theme-toggle-icon--moon {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n}\n\n.aikit-toolbox-menu {\n position: absolute;\n top: calc(100% + var(--dt-space-2));\n right: 0;\n min-width: 11rem;\n display: grid;\n gap: var(--dt-space-1);\n padding: var(--dt-space-2);\n border: 1px solid var(--aikit-border);\n border-radius: var(--dt-radius-lg);\n background: var(--aikit-background);\n box-shadow: var(--dt-shadow-lg);\n z-index: 120;\n}\n\n.aikit-toolbox-menu[hidden] {\n display: none;\n}\n\n.aikit-toolbox-item {\n display: inline-flex;\n align-items: center;\n gap: var(--dt-space-2);\n width: 100%;\n min-height: 2.5rem;\n padding: 0 var(--dt-space-3);\n border: 1px solid transparent;\n border-radius: var(--dt-radius-sm);\n background: transparent;\n color: var(--aikit-foreground);\n cursor: pointer;\n font: inherit;\n text-align: left;\n}\n\n.aikit-toolbox-item:hover {\n background: var(--aikit-muted);\n border-color: var(--aikit-border);\n}\n\n.aikit-toolbox-item svg {\n flex: 0 0 auto;\n}\n\n.aikit-footer {\n margin-top: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--dt-space-4) var(--dt-space-4) var(--dt-space-6);\n border-top: 1px solid var(--aikit-border);\n color: var(--aikit-muted-foreground);\n font-size: var(--dt-font-size-xs);\n}\n\n.aikit-footer-meta {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--dt-space-2);\n flex-wrap: wrap;\n text-align: center;\n}\n\n.aikit-footer-text {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.35rem;\n min-width: 0;\n}\n\n.aikit-footer-brand {\n color: var(--aikit-foreground);\n font-family: var(--dt-font-mono);\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n\n.aikit-footer-timestamp,\n.aikit-footer-slot {\n min-width: 0;\n}\n\n.aikit-footer-slot {\n display: inline-flex;\n align-items: center;\n gap: 0.35rem;\n}\n\n@supports not (background: color-mix(in srgb, white 50%, transparent)) {\n .aikit-header {\n background: var(--aikit-background);\n }\n}\n\n@media (max-width: 640px) {\n .aikit-header-brand {\n display: none;\n }\n\n .aikit-header {\n gap: var(--dt-space-2);\n padding-left: var(--dt-space-3);\n padding-right: var(--dt-space-3);\n }\n\n .aikit-toolbox-menu {\n right: 0;\n left: auto;\n min-width: auto;\n max-width: calc(100vw - 2rem);\n }\n}\n\n@media (max-width: 400px) {\n .aikit-header-actions {\n gap: var(--dt-space-1);\n }\n\n .aikit-footer {\n padding-left: var(--dt-space-3);\n padding-right: var(--dt-space-3);\n }\n\n .aikit-toolbox-menu {\n position: fixed;\n top: auto;\n bottom: 0;\n left: 0;\n right: 0;\n min-width: auto;\n max-width: 100%;\n border-radius: 0.5rem 0.5rem 0 0;\n box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);\n }\n}\n";
|
|
341
|
-
//#endregion
|
|
342
|
-
//#region packages/blocks-core/src/island-descriptor.d.ts
|
|
343
|
-
/** Describes a hydration island for blocks-interactive. */
|
|
344
|
-
interface IslandDescriptor {
|
|
345
|
-
/** Island identifier: 'table', 'tree', 'form', 'picker', 'actions'. */
|
|
346
|
-
id: string;
|
|
347
|
-
/** Island version for compatibility checking. */
|
|
348
|
-
version: number;
|
|
349
|
-
/** ESM path in blocks-interactive/dist. */
|
|
350
|
-
entry: string;
|
|
351
|
-
/** querySelector for hydration root element. */
|
|
352
|
-
selector: string;
|
|
353
|
-
/** Whether this island needs serialized data from payload. */
|
|
354
|
-
needsData?: boolean;
|
|
355
|
-
}
|
|
356
|
-
/** Known island identifiers for type-safe references. */
|
|
357
|
-
type KnownIslandId = 'table' | 'tree' | 'form' | 'picker' | 'actions';
|
|
358
|
-
//#endregion
|
|
359
|
-
//#region packages/blocks-core/src/render.d.ts
|
|
360
|
-
/** Render a single block to HTML string. */
|
|
361
|
-
declare function renderBlock(block: TypedBlock, ctx?: RenderContext): string;
|
|
362
|
-
/** Render multiple blocks. */
|
|
363
|
-
declare function renderBlocks(blocks: TypedBlock[], ctx?: RenderContext): string;
|
|
364
|
-
//#endregion
|
|
365
|
-
//#region packages/blocks-core/src/render-manifest.d.ts
|
|
366
|
-
/** Diagnostic information from rendering. */
|
|
367
|
-
interface RenderDiagnostic {
|
|
368
|
-
level: 'info' | 'warn' | 'error';
|
|
369
|
-
message: string;
|
|
370
|
-
blockIndex?: number;
|
|
371
|
-
}
|
|
372
|
-
/** Transport-neutral render output. */
|
|
373
|
-
interface RenderManifest {
|
|
374
|
-
surfaceId: string;
|
|
375
|
-
nonce: string;
|
|
376
|
-
html: string;
|
|
377
|
-
css: string[];
|
|
378
|
-
vendorScripts?: string[];
|
|
379
|
-
islands: IslandDescriptor[];
|
|
380
|
-
actions: SurfaceAction[];
|
|
381
|
-
payload?: string;
|
|
382
|
-
estimatedBytes: number;
|
|
383
|
-
exportPolicy: 'static-only' | 'local-interactive';
|
|
384
|
-
diagnostics?: RenderDiagnostic[];
|
|
385
|
-
}
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region packages/blocks-core/src/render-surface.d.ts
|
|
388
|
-
interface RenderSurfaceOptions {
|
|
389
|
-
transport: 'mcp-app' | 'browser' | 'export';
|
|
390
|
-
colorScheme?: 'light' | 'dark' | 'auto';
|
|
391
|
-
registry?: TemplateRegistry;
|
|
392
|
-
/** Block-type -> vendor-script-ids mapping. Blocks present on the page have their vendor deps collected automatically. */
|
|
393
|
-
blockVendorScripts?: Record<string, string[]>;
|
|
394
|
-
nonce?: string;
|
|
395
|
-
}
|
|
396
|
-
declare function renderSurface(surface: ChannelSurface, options: RenderSurfaceOptions): RenderManifest;
|
|
397
|
-
//#endregion
|
|
398
|
-
//#region packages/blocks-core/src/rich-templates.d.ts
|
|
399
|
-
declare const dashboardTemplateDefinition: TemplateDefinition;
|
|
400
|
-
declare const kanbanTemplateDefinition: TemplateDefinition;
|
|
401
|
-
declare const listSortTemplateDefinition: TemplateDefinition;
|
|
402
|
-
declare const flameGraphTemplateDefinition: TemplateDefinition;
|
|
403
|
-
//#endregion
|
|
404
|
-
//#region packages/blocks-core/src/shell.d.ts
|
|
405
|
-
interface HeadScript {
|
|
406
|
-
src?: string;
|
|
407
|
-
inlineSource?: string;
|
|
408
|
-
fallback?: string;
|
|
409
|
-
/** JS code to inject before loading the external script. */
|
|
410
|
-
initScript?: string;
|
|
411
|
-
/** JS expression for the script onload handler. */
|
|
412
|
-
onload?: string;
|
|
413
|
-
}
|
|
414
|
-
interface ShellOptions {
|
|
415
|
-
title: string;
|
|
416
|
-
html: string;
|
|
417
|
-
css: string[];
|
|
418
|
-
tokenCss?: string;
|
|
419
|
-
generatedAt?: string;
|
|
420
|
-
islands: IslandDescriptor[];
|
|
421
|
-
payload?: string;
|
|
422
|
-
nonce: string;
|
|
423
|
-
colorScheme?: 'light' | 'dark' | 'auto';
|
|
424
|
-
lang?: string;
|
|
425
|
-
dir?: 'ltr' | 'rtl' | 'auto';
|
|
426
|
-
transport?: TransportType;
|
|
427
|
-
exportPolicy: 'static-only' | 'local-interactive';
|
|
428
|
-
headScripts?: HeadScript[];
|
|
429
|
-
}
|
|
430
|
-
declare function buildShell(options: ShellOptions): string;
|
|
431
|
-
//#endregion
|
|
432
|
-
//#region packages/blocks-core/src/templates/checklist.d.ts
|
|
433
|
-
declare const checklistTemplate: TemplateDefinition;
|
|
434
|
-
//#endregion
|
|
435
|
-
//#region packages/blocks-core/src/templates/data-table.d.ts
|
|
436
|
-
declare const dataTableTemplate: TemplateDefinition;
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region packages/blocks-core/src/templates/diff-view.d.ts
|
|
439
|
-
declare const diffViewTemplate: TemplateDefinition;
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region packages/blocks-core/src/templates/document.d.ts
|
|
442
|
-
declare const documentTemplate: TemplateDefinition;
|
|
443
|
-
//#endregion
|
|
444
|
-
//#region packages/blocks-core/src/templates/error.d.ts
|
|
445
|
-
declare const errorTemplate: TemplateDefinition;
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region packages/blocks-core/src/templates/form.d.ts
|
|
448
|
-
declare const formTemplate: TemplateDefinition;
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region packages/blocks-core/src/templates/picker.d.ts
|
|
451
|
-
declare const pickerTemplate: TemplateDefinition;
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region packages/blocks-core/src/templates/report.d.ts
|
|
454
|
-
declare const reportTemplate: TemplateDefinition;
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region packages/blocks-core/src/templates/status-board.d.ts
|
|
457
|
-
declare const statusBoardTemplate: TemplateDefinition;
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region packages/blocks-core/src/templates/timeline.d.ts
|
|
460
|
-
declare const timelineTemplate: TemplateDefinition;
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region packages/blocks-core/src/templates/tree.d.ts
|
|
463
|
-
declare const treeTemplate: TemplateDefinition;
|
|
464
|
-
//#endregion
|
|
465
|
-
//#region packages/blocks-core/src/templates/index.d.ts
|
|
466
|
-
declare const defaultRegistry: TemplateRegistry;
|
|
467
|
-
//#endregion
|
|
468
|
-
//#region packages/blocks-core/src/tokens.d.ts
|
|
469
|
-
declare const tokens: {
|
|
470
|
-
readonly '--dt-bg-primary': "#ffffff";
|
|
471
|
-
readonly '--dt-bg-secondary': "#f6f8fa";
|
|
472
|
-
readonly '--dt-bg-tertiary': "#eaeef2";
|
|
473
|
-
readonly '--dt-bg-canvas': "#f0f0f0";
|
|
474
|
-
readonly '--dt-text-primary': "#1f2328";
|
|
475
|
-
readonly '--dt-text-secondary': "#656d76";
|
|
476
|
-
readonly '--dt-text-tertiary': "#8b949e";
|
|
477
|
-
readonly '--dt-border-default': "#d0d7de";
|
|
478
|
-
readonly '--dt-border-muted': "#d8dee4";
|
|
479
|
-
readonly '--dt-border-subtle': "#eaeef2";
|
|
480
|
-
readonly '--dt-accent-fg': "#0969da";
|
|
481
|
-
readonly '--dt-accent-emphasis': "#0550ae";
|
|
482
|
-
readonly '--dt-accent-muted': "rgba(9, 105, 218, 0.4)";
|
|
483
|
-
readonly '--dt-accent-subtle': "rgba(9, 105, 218, 0.1)";
|
|
484
|
-
readonly '--dt-success-fg': "#1a7f37";
|
|
485
|
-
readonly '--dt-success-emphasis': "#116329";
|
|
486
|
-
readonly '--dt-success-muted': "rgba(26, 127, 55, 0.4)";
|
|
487
|
-
readonly '--dt-success-subtle': "rgba(26, 127, 55, 0.1)";
|
|
488
|
-
readonly '--dt-danger-fg': "#cf222e";
|
|
489
|
-
readonly '--dt-danger-emphasis': "#a40e26";
|
|
490
|
-
readonly '--dt-danger-muted': "rgba(207, 34, 46, 0.4)";
|
|
491
|
-
readonly '--dt-danger-subtle': "rgba(207, 34, 46, 0.1)";
|
|
492
|
-
readonly '--dt-warning-fg': "#9a6700";
|
|
493
|
-
readonly '--dt-warning-emphasis': "#7d4e00";
|
|
494
|
-
readonly '--dt-warning-muted': "rgba(154, 103, 0, 0.4)";
|
|
495
|
-
readonly '--dt-warning-subtle': "rgba(154, 103, 0, 0.1)";
|
|
496
|
-
readonly '--dt-purple-fg': "#8250df";
|
|
497
|
-
readonly '--dt-purple-emphasis': "#6639ba";
|
|
498
|
-
readonly '--dt-purple-muted': "rgba(130, 80, 223, 0.4)";
|
|
499
|
-
readonly '--dt-purple-subtle': "rgba(130, 80, 223, 0.1)";
|
|
500
|
-
readonly '--dt-font-sans': "'Segoe UI', system-ui, -apple-system, sans-serif";
|
|
501
|
-
readonly '--dt-font-mono': "'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace";
|
|
502
|
-
readonly '--dt-font-size-xs': "0.75rem";
|
|
503
|
-
readonly '--dt-font-size-sm': "0.8125rem";
|
|
504
|
-
readonly '--dt-font-size-base': "0.875rem";
|
|
505
|
-
readonly '--dt-font-size-lg': "1rem";
|
|
506
|
-
readonly '--dt-font-size-xl': "1.25rem";
|
|
507
|
-
readonly '--dt-font-size-2xl': "1.5rem";
|
|
508
|
-
readonly '--dt-font-size-3xl': "2rem";
|
|
509
|
-
readonly '--dt-space-1': "0.25rem";
|
|
510
|
-
readonly '--dt-space-2': "0.5rem";
|
|
511
|
-
readonly '--dt-space-3': "0.75rem";
|
|
512
|
-
readonly '--dt-space-4': "1rem";
|
|
513
|
-
readonly '--dt-space-5': "1.25rem";
|
|
514
|
-
readonly '--dt-space-6': "1.5rem";
|
|
515
|
-
readonly '--dt-space-8': "2rem";
|
|
516
|
-
readonly '--dt-space-12': "3rem";
|
|
517
|
-
readonly '--dt-space-16': "4rem";
|
|
518
|
-
readonly '--dt-radius-sm': "6px";
|
|
519
|
-
readonly '--dt-radius-md': "8px";
|
|
520
|
-
readonly '--dt-radius-lg': "12px";
|
|
521
|
-
readonly '--dt-radius-xl': "16px";
|
|
522
|
-
readonly '--dt-shadow-sm': "0 1px 2px rgba(0, 0, 0, 0.07)";
|
|
523
|
-
readonly '--dt-shadow-md': "0 3px 6px rgba(0, 0, 0, 0.1)";
|
|
524
|
-
readonly '--dt-shadow-lg': "0 8px 24px rgba(0, 0, 0, 0.12)";
|
|
525
|
-
readonly '--dt-glow-accent': "rgba(9, 105, 218, 0.08)";
|
|
526
|
-
readonly '--dt-glow-success': "rgba(26, 127, 55, 0.08)";
|
|
527
|
-
readonly '--dt-glow-danger': "rgba(207, 34, 46, 0.08)";
|
|
528
|
-
readonly '--dt-glow-warning': "rgba(154, 103, 0, 0.08)";
|
|
529
|
-
readonly '--dt-glow-purple': "rgba(130, 80, 223, 0.08)";
|
|
530
|
-
readonly '--dt-transition-fast': "150ms ease";
|
|
531
|
-
readonly '--dt-transition-normal': "200ms ease";
|
|
532
|
-
};
|
|
533
|
-
declare const darkTokens: {
|
|
534
|
-
readonly '--dt-bg-primary': "#0d1117";
|
|
535
|
-
readonly '--dt-bg-secondary': "#161b22";
|
|
536
|
-
readonly '--dt-bg-tertiary': "#21262d";
|
|
537
|
-
readonly '--dt-bg-canvas': "#010409";
|
|
538
|
-
readonly '--dt-text-primary': "#f0f6fc";
|
|
539
|
-
readonly '--dt-text-secondary': "#9198a1";
|
|
540
|
-
readonly '--dt-text-tertiary': "#656d76";
|
|
541
|
-
readonly '--dt-border-default': "#30363d";
|
|
542
|
-
readonly '--dt-border-muted': "#21262d";
|
|
543
|
-
readonly '--dt-border-subtle': "#1f242d";
|
|
544
|
-
readonly '--dt-accent-fg': "#58a6ff";
|
|
545
|
-
readonly '--dt-accent-emphasis': "#1f6feb";
|
|
546
|
-
readonly '--dt-accent-muted': "rgba(56, 139, 253, 0.4)";
|
|
547
|
-
readonly '--dt-accent-subtle': "rgba(56, 139, 253, 0.15)";
|
|
548
|
-
readonly '--dt-success-fg': "#3fb950";
|
|
549
|
-
readonly '--dt-success-emphasis': "#238636";
|
|
550
|
-
readonly '--dt-success-muted': "rgba(63, 185, 80, 0.4)";
|
|
551
|
-
readonly '--dt-success-subtle': "rgba(63, 185, 80, 0.15)";
|
|
552
|
-
readonly '--dt-danger-fg': "#f85149";
|
|
553
|
-
readonly '--dt-danger-emphasis': "#da3633";
|
|
554
|
-
readonly '--dt-danger-muted': "rgba(248, 81, 73, 0.4)";
|
|
555
|
-
readonly '--dt-danger-subtle': "rgba(248, 81, 73, 0.15)";
|
|
556
|
-
readonly '--dt-warning-fg': "#d29922";
|
|
557
|
-
readonly '--dt-warning-emphasis': "#bb8009";
|
|
558
|
-
readonly '--dt-warning-muted': "rgba(210, 153, 34, 0.4)";
|
|
559
|
-
readonly '--dt-warning-subtle': "rgba(210, 153, 34, 0.15)";
|
|
560
|
-
readonly '--dt-purple-fg': "#bc8cff";
|
|
561
|
-
readonly '--dt-purple-emphasis': "#a371f7";
|
|
562
|
-
readonly '--dt-purple-muted': "rgba(188, 140, 255, 0.4)";
|
|
563
|
-
readonly '--dt-purple-subtle': "rgba(188, 140, 255, 0.15)";
|
|
564
|
-
readonly '--dt-shadow-sm': "0 1px 2px rgba(1, 4, 9, 0.35)";
|
|
565
|
-
readonly '--dt-shadow-md': "0 3px 6px rgba(1, 4, 9, 0.4)";
|
|
566
|
-
readonly '--dt-shadow-lg': "0 8px 24px rgba(1, 4, 9, 0.45)";
|
|
567
|
-
readonly '--dt-glow-accent': "rgba(56, 139, 253, 0.14)";
|
|
568
|
-
readonly '--dt-glow-success': "rgba(63, 185, 80, 0.14)";
|
|
569
|
-
readonly '--dt-glow-danger': "rgba(248, 81, 73, 0.14)";
|
|
570
|
-
readonly '--dt-glow-warning': "rgba(210, 153, 34, 0.14)";
|
|
571
|
-
readonly '--dt-glow-purple': "rgba(188, 140, 255, 0.14)";
|
|
572
|
-
};
|
|
573
|
-
declare const tokenNames: readonly ["--dt-bg-primary", "--dt-bg-secondary", "--dt-bg-tertiary", "--dt-bg-canvas", "--dt-text-primary", "--dt-text-secondary", "--dt-text-tertiary", "--dt-border-default", "--dt-border-muted", "--dt-border-subtle", "--dt-accent-fg", "--dt-accent-emphasis", "--dt-accent-muted", "--dt-accent-subtle", "--dt-success-fg", "--dt-success-emphasis", "--dt-success-muted", "--dt-success-subtle", "--dt-danger-fg", "--dt-danger-emphasis", "--dt-danger-muted", "--dt-danger-subtle", "--dt-warning-fg", "--dt-warning-emphasis", "--dt-warning-muted", "--dt-warning-subtle", "--dt-purple-fg", "--dt-purple-emphasis", "--dt-purple-muted", "--dt-purple-subtle", "--dt-font-sans", "--dt-font-mono", "--dt-font-size-xs", "--dt-font-size-sm", "--dt-font-size-base", "--dt-font-size-lg", "--dt-font-size-xl", "--dt-font-size-2xl", "--dt-font-size-3xl", "--dt-space-1", "--dt-space-2", "--dt-space-3", "--dt-space-4", "--dt-space-5", "--dt-space-6", "--dt-space-8", "--dt-space-12", "--dt-space-16", "--dt-radius-sm", "--dt-radius-md", "--dt-radius-lg", "--dt-radius-xl", "--dt-shadow-sm", "--dt-shadow-md", "--dt-shadow-lg", "--dt-glow-accent", "--dt-glow-success", "--dt-glow-danger", "--dt-glow-warning", "--dt-glow-purple", "--dt-transition-fast", "--dt-transition-normal"];
|
|
574
|
-
declare const darkTokenNames: readonly ["--dt-bg-primary", "--dt-bg-secondary", "--dt-bg-tertiary", "--dt-bg-canvas", "--dt-text-primary", "--dt-text-secondary", "--dt-text-tertiary", "--dt-border-default", "--dt-border-muted", "--dt-border-subtle", "--dt-accent-fg", "--dt-accent-emphasis", "--dt-accent-muted", "--dt-accent-subtle", "--dt-success-fg", "--dt-success-emphasis", "--dt-success-muted", "--dt-success-subtle", "--dt-danger-fg", "--dt-danger-emphasis", "--dt-danger-muted", "--dt-danger-subtle", "--dt-warning-fg", "--dt-warning-emphasis", "--dt-warning-muted", "--dt-warning-subtle", "--dt-purple-fg", "--dt-purple-emphasis", "--dt-purple-muted", "--dt-purple-subtle", "--dt-shadow-sm", "--dt-shadow-md", "--dt-shadow-lg", "--dt-glow-accent", "--dt-glow-success", "--dt-glow-danger", "--dt-glow-warning", "--dt-glow-purple"];
|
|
575
|
-
type TokenName = (typeof tokenNames)[number];
|
|
576
|
-
type TokenValue = (typeof tokens)[TokenName];
|
|
577
|
-
//#endregion
|
|
578
|
-
//#region packages/blocks-core/src/utils.d.ts
|
|
579
|
-
/** HTML-escape for safe insertion into content and attributes. */
|
|
580
|
-
declare function escapeHtml(s: string): string;
|
|
581
|
-
/** Sanitize URL — allow http, https, mailto, # only. */
|
|
582
|
-
declare function sanitizeUrl(url: string): string;
|
|
583
|
-
/** Sanitize string for use as HTML id/class. */
|
|
584
|
-
declare function sanitizeId(value: string): string;
|
|
585
|
-
/** Format unknown value for display. */
|
|
586
|
-
declare function formatValue(value: unknown): string;
|
|
587
|
-
/** Auto-parse JSON strings that LLMs sometimes pass as serialized. */
|
|
588
|
-
declare function tryParseJson(content: unknown): unknown;
|
|
589
|
-
/** Inline markdown: **bold**, `code`, [link](url). */
|
|
590
|
-
declare function inlineMarkdown(text: string): string;
|
|
591
|
-
/** Tone system — map aliases to canonical names. Returns only safe values for CSS injection. */
|
|
592
|
-
declare function toneName(status?: string): string;
|
|
593
|
-
/** Get CSS custom property for a tone variant. */
|
|
594
|
-
declare function toneVar(tone: string, variant?: 'fg' | 'emphasis' | 'muted' | 'subtle'): string;
|
|
595
|
-
/** Helper to extract items array from block value. */
|
|
596
|
-
declare function blockItems(block: {
|
|
597
|
-
value?: unknown;
|
|
598
|
-
}): Array<Record<string, unknown>>;
|
|
599
|
-
//#endregion
|
|
600
|
-
export { type ActionItem, type ActionOption, type BlockRenderContext, type BlockRenderer, type BlockType, type CardItem, type ChannelError, type ChannelOutcome, type ChannelSurface, type ChecklistItem, type ComparisonColumn, type ComponentDependency, type ComponentDetailValue, type ComponentInterface, type DataTableSchemaField, type DataTableSchemaIndex, type DataTableSchemaValue, type DocFile, type DocsHubPage, type FooterOptions, HEADER_CLASS_NAMES, HEADER_CSS, type HeadScript, type HeaderOptions, type IslandDescriptor, type KnownIslandId, type LayoutOptions, type LifecycleFlowEdge, type LifecycleFlowStep, type MetricItem, type ProgressItem, type RenderContext, type RenderDiagnostic, type RenderManifest, type RenderSurfaceOptions, type ResponsePolicy, type ShellOptions, type StatusCategory, type SurfaceAction, type SurfaceActionResult, type SurfaceMetadata, type TemplateDefinition, TemplateRegistry, type TimelineItem, type TokenName, type TokenValue, type TransportType, type TypedBlock, allCss, baseCss, blockItems, buildFooter, buildHeader, buildShell, checklistTemplate, collectCss, darkTokenNames, darkTokens, dashboardTemplateDefinition, dataTableTemplate, defaultRegistry, diffViewTemplate, documentTemplate, errorTemplate, escapeHtml, flameGraphTemplateDefinition, formTemplate, formatValue, generateDarkTokenCss, generateTokenCss, inlineMarkdown, isError, isResult, kanbanTemplateDefinition, listSortTemplateDefinition, pickerTemplate, renderBlock, renderBlocks, renderSurface, reportTemplate, sanitizeId, sanitizeUrl, statusBoardTemplate, timelineTemplate, tokenNames, tokens, toneName, toneVar, treeTemplate, tryParseJson };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createReadStream as e,existsSync as t,statSync as n}from"node:fs";import{dirname as r,extname as i,join as a,resolve as o,sep as s}from"node:path";import{fileURLToPath as c}from"node:url";const l=import.meta.dirname??r(c(import.meta.url)),u={".html":`text/html`,".js":`application/javascript`,".css":`text/css`,".json":`application/json`,".png":`image/png`,".svg":`image/svg+xml`,".ico":`image/x-icon`,".woff":`font/woff`,".woff2":`font/woff2`};function d(e=l){return a(e,`..`,`..`,`dashboard`,`dist`)}function f(e,r){let c=r.replace(/^\/_dashboard\/?/,``)||`index.html`;try{c=decodeURIComponent(c)}catch{}let l=o(e,c);if(!(l===e||l.startsWith(`${e}${s}`)))return{kind:`forbidden`};try{if(n(l).isFile())return{kind:`file`,path:l,contentType:u[i(l)]??`application/octet-stream`}}catch{}let d=a(e,`index.html`);return t(d)?{kind:`spa`,path:d,contentType:`text/html`}:{kind:`not-found`}}function p(n,r,i){return t(r)?(n.get(`/_dashboard{/*path}`,(t,n)=>{let i=f(r,t.path);if(i.kind===`forbidden`){n.status(403).end(`Forbidden`);return}if(i.kind===`not-found`){n.status(404).end(`Not found`);return}n.setHeader(`Content-Type`,i.contentType),i.kind===`file`&&/\.[a-f0-9]{8,}\.(js|css)$/i.test(i.path)?n.setHeader(`Cache-Control`,`public, max-age=31536000, immutable`):n.setHeader(`Cache-Control`,`no-cache`),e(i.path).pipe(n)}),i.info(`Dashboard available`,{url:`/_dashboard/`,dir:r}),!0):!1}export{p as registerDashboardRoutes,d as resolveDashboardDir,f as resolveDashboardRequest};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createReadStream as e,existsSync as t,statSync as n}from"node:fs";import{dirname as r,extname as i,join as a,resolve as o,sep as s}from"node:path";import{fileURLToPath as c}from"node:url";const l=import.meta.dirname??r(c(import.meta.url)),u={".html":`text/html`,".js":`application/javascript`,".css":`text/css`,".json":`application/json`,".png":`image/png`,".svg":`image/svg+xml`,".ico":`image/x-icon`,".woff":`font/woff`,".woff2":`font/woff2`};function d(e=l){return a(e,`..`,`..`,`settings-ui`,`dist`)}function f(e,r){let c=r.replace(/^\/settings\/?/,``)||`index.html`;if(c.startsWith(`api/`)||c===`api`)return{kind:`not-found`};try{c=decodeURIComponent(c)}catch{}let l=o(e,c);if(!(l===e||l.startsWith(`${e}${s}`)))return{kind:`forbidden`};try{if(n(l).isFile())return{kind:`file`,path:l,contentType:u[i(l)]??`application/octet-stream`}}catch{}let d=a(e,`index.html`);return t(d)?{kind:`spa`,path:d,contentType:`text/html`}:{kind:`not-found`}}function p(n,r,i){return t(r)?(n.get(`/settings{/*path}`,(t,n)=>{let i=f(r,t.path);if(i.kind===`forbidden`){n.status(403).end(`Forbidden`);return}if(i.kind===`not-found`){n.status(404).end(`Not found`);return}n.setHeader(`Content-Type`,i.contentType),i.kind===`file`&&/\.[a-f0-9]{8,}\.(js|css)$/i.test(i.path)?n.setHeader(`Cache-Control`,`public, max-age=31536000, immutable`):n.setHeader(`Cache-Control`,`no-cache`),e(i.path).pipe(n)}),i.info(`Settings UI available`,{url:`/settings/`,dir:r}),!0):!1}export{p as registerSettingsRoutes,d as resolveSettingsDir,f as resolveSettingsRequest};
|
|
File without changes
|