@vpxa/aikit 0.1.151 → 0.1.153
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 +1 -1
- package/packages/blocks-core/dist/index.d.ts +471 -0
- package/packages/blocks-core/dist/index.js +863 -0
- package/packages/chunker/dist/index.d.ts +12 -0
- package/packages/chunker/dist/index.js +4 -4
- package/packages/cli/dist/index.js +15 -15
- package/packages/cli/dist/{init-Dk0WDziB.js → init-O57V8aOH.js} +1 -1
- package/packages/cli/dist/{scaffold-BB6OrTuA.js → scaffold-DwQDdiCJ.js} +1 -1
- package/packages/cli/dist/{templates-D4t_3cJs.js → templates-VOIHbNnT.js} +1 -1
- package/packages/present/dist/index.html +818 -3629
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/server-Bs6Rib4s.js +398 -0
- package/packages/store/dist/index.js +12 -12
- package/scaffold/dist/adapters/_shared.mjs +2 -1
- package/scaffold/dist/adapters/claude-code.mjs +10 -9
- package/scaffold/dist/adapters/codex.mjs +3 -3
- package/scaffold/dist/adapters/copilot.mjs +20 -20
- package/scaffold/dist/adapters/gemini.mjs +9 -3
- package/scaffold/dist/definitions/agents.mjs +16 -120
- package/scaffold/dist/definitions/bodies.mjs +214 -254
- package/scaffold/dist/definitions/protocols.mjs +110 -206
- package/scaffold/dist/definitions/skills/adr-skill.mjs +27 -0
- package/scaffold/dist/definitions/skills/brainstorming.mjs +14 -0
- package/scaffold/dist/definitions/skills/browser-use.mjs +1 -1
- package/scaffold/dist/definitions/skills/c4-architecture.mjs +46 -1
- package/scaffold/dist/definitions/skills/docs.mjs +34 -0
- package/scaffold/dist/definitions/skills/frontend-design.mjs +20 -0
- package/scaffold/dist/definitions/skills/present.mjs +31 -0
- package/scaffold/dist/definitions/skills/session-handoff.mjs +20 -0
- package/packages/server/dist/server-D67lImHa.js +0 -540
package/package.json
CHANGED
|
@@ -0,0 +1,471 @@
|
|
|
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' | 'paragraph' | 'separator' | 'code' | 'table' | 'metrics' | 'cards' | 'tree' | 'graph' | 'mermaid' | 'chart' | 'timeline' | 'checklist' | 'comparison' | 'status-board' | 'prompt' | 'progress' | 'actions' | 'docs-browser' | 'finding' | '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
|
+
status?: string;
|
|
156
|
+
description?: string;
|
|
157
|
+
}>;
|
|
158
|
+
}
|
|
159
|
+
/** Value type for actions block. */
|
|
160
|
+
interface ActionItem {
|
|
161
|
+
type: 'button' | 'select';
|
|
162
|
+
id: string;
|
|
163
|
+
label: string;
|
|
164
|
+
variant?: 'primary' | 'danger' | 'default';
|
|
165
|
+
options?: Array<string | {
|
|
166
|
+
label: string;
|
|
167
|
+
value: string;
|
|
168
|
+
}>;
|
|
169
|
+
}
|
|
170
|
+
/** Value type for docs-browser block. */
|
|
171
|
+
interface DocFile {
|
|
172
|
+
path: string;
|
|
173
|
+
title?: string;
|
|
174
|
+
content?: string;
|
|
175
|
+
status?: 'current' | 'stale' | 'missing';
|
|
176
|
+
}
|
|
177
|
+
/** Block renderer function signature. */
|
|
178
|
+
type BlockRenderer = (block: TypedBlock, ctx?: RenderContext) => string;
|
|
179
|
+
/** Public alias for the renderer-specific context when another package claims RenderContext. */
|
|
180
|
+
type BlockRenderContext = RenderContext;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region packages/blocks-core/src/channel-surface.d.ts
|
|
183
|
+
/** Response policy for surfaces with actions. */
|
|
184
|
+
interface ResponsePolicy {
|
|
185
|
+
timeout?: number;
|
|
186
|
+
required?: boolean;
|
|
187
|
+
}
|
|
188
|
+
/** Surface metadata. */
|
|
189
|
+
interface SurfaceMetadata {
|
|
190
|
+
surfaceId?: string;
|
|
191
|
+
createdAt?: string;
|
|
192
|
+
source?: string;
|
|
193
|
+
}
|
|
194
|
+
/** Layout options. */
|
|
195
|
+
interface LayoutOptions {
|
|
196
|
+
maxWidth?: string;
|
|
197
|
+
padding?: string;
|
|
198
|
+
columns?: number;
|
|
199
|
+
}
|
|
200
|
+
/** Core LLM-to-user communication contract. */
|
|
201
|
+
interface ChannelSurface {
|
|
202
|
+
schemaVersion: 1;
|
|
203
|
+
title: string;
|
|
204
|
+
description?: string;
|
|
205
|
+
template?: string;
|
|
206
|
+
layout?: LayoutOptions;
|
|
207
|
+
blocks?: TypedBlock[];
|
|
208
|
+
data?: unknown;
|
|
209
|
+
actions?: SurfaceAction[];
|
|
210
|
+
response?: ResponsePolicy;
|
|
211
|
+
metadata?: SurfaceMetadata;
|
|
212
|
+
colorScheme?: 'light' | 'dark' | 'auto';
|
|
213
|
+
lang?: string;
|
|
214
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region packages/blocks-core/src/css.d.ts
|
|
218
|
+
/** Base CSS that's always needed. */
|
|
219
|
+
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-table,\n.bk-docs-browser,\n.bk-actions,\n.bk-comparison,\n.bk-status-board,\n.bk-progress,\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-markdown a,\n.bk-finding a {\n color: var(--dt-accent-fg);\n text-decoration: none;\n}\n\n.bk-text 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";
|
|
220
|
+
/** Collect CSS for specific block types only. */
|
|
221
|
+
declare function collectCss(blockTypes: string[]): string;
|
|
222
|
+
/** Get all block CSS. */
|
|
223
|
+
declare function allCss(): string;
|
|
224
|
+
declare function generateDarkTokenCss(): string;
|
|
225
|
+
/** Generate CSS custom properties from the typed token map. */
|
|
226
|
+
declare function generateTokenCss(colorScheme?: 'light' | 'dark' | 'auto'): string;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region packages/blocks-core/src/island-descriptor.d.ts
|
|
229
|
+
/** Describes a hydration island for blocks-interactive. */
|
|
230
|
+
interface IslandDescriptor {
|
|
231
|
+
/** Island identifier: 'table', 'tree', 'form', 'picker', 'actions'. */
|
|
232
|
+
id: string;
|
|
233
|
+
/** Island version for compatibility checking. */
|
|
234
|
+
version: number;
|
|
235
|
+
/** ESM path in blocks-interactive/dist. */
|
|
236
|
+
entry: string;
|
|
237
|
+
/** querySelector for hydration root element. */
|
|
238
|
+
selector: string;
|
|
239
|
+
/** Whether this island needs serialized data from payload. */
|
|
240
|
+
needsData?: boolean;
|
|
241
|
+
}
|
|
242
|
+
/** Known island identifiers for type-safe references. */
|
|
243
|
+
type KnownIslandId = 'table' | 'tree' | 'form' | 'picker' | 'actions';
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region packages/blocks-core/src/render.d.ts
|
|
246
|
+
/** Render a single block to HTML string. */
|
|
247
|
+
declare function renderBlock(block: TypedBlock, ctx?: RenderContext): string;
|
|
248
|
+
/** Render multiple blocks. */
|
|
249
|
+
declare function renderBlocks(blocks: TypedBlock[], ctx?: RenderContext): string;
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region packages/blocks-core/src/render-manifest.d.ts
|
|
252
|
+
/** Diagnostic information from rendering. */
|
|
253
|
+
interface RenderDiagnostic {
|
|
254
|
+
level: 'info' | 'warn' | 'error';
|
|
255
|
+
message: string;
|
|
256
|
+
blockIndex?: number;
|
|
257
|
+
}
|
|
258
|
+
/** Transport-neutral render output. */
|
|
259
|
+
interface RenderManifest {
|
|
260
|
+
surfaceId: string;
|
|
261
|
+
nonce: string;
|
|
262
|
+
html: string;
|
|
263
|
+
css: string[];
|
|
264
|
+
islands: IslandDescriptor[];
|
|
265
|
+
actions: SurfaceAction[];
|
|
266
|
+
payload?: string;
|
|
267
|
+
estimatedBytes: number;
|
|
268
|
+
exportPolicy: 'static-only' | 'local-interactive';
|
|
269
|
+
diagnostics?: RenderDiagnostic[];
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region packages/blocks-core/src/render-surface.d.ts
|
|
273
|
+
interface RenderSurfaceOptions {
|
|
274
|
+
transport: 'mcp-app' | 'browser' | 'export';
|
|
275
|
+
colorScheme?: 'light' | 'dark' | 'auto';
|
|
276
|
+
registry?: TemplateRegistry;
|
|
277
|
+
nonce?: string;
|
|
278
|
+
}
|
|
279
|
+
declare function renderSurface(surface: ChannelSurface, options: RenderSurfaceOptions): RenderManifest;
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region packages/blocks-core/src/rich-templates.d.ts
|
|
282
|
+
declare const dashboardTemplateDefinition: TemplateDefinition;
|
|
283
|
+
declare const kanbanTemplateDefinition: TemplateDefinition;
|
|
284
|
+
declare const listSortTemplateDefinition: TemplateDefinition;
|
|
285
|
+
declare const flameGraphTemplateDefinition: TemplateDefinition;
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region packages/blocks-core/src/shell.d.ts
|
|
288
|
+
interface ShellOptions {
|
|
289
|
+
title: string;
|
|
290
|
+
html: string;
|
|
291
|
+
css: string[];
|
|
292
|
+
tokenCss?: string;
|
|
293
|
+
generatedAt?: string;
|
|
294
|
+
islands: IslandDescriptor[];
|
|
295
|
+
payload?: string;
|
|
296
|
+
nonce: string;
|
|
297
|
+
colorScheme?: 'light' | 'dark' | 'auto';
|
|
298
|
+
lang?: string;
|
|
299
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
300
|
+
exportPolicy: 'static-only' | 'local-interactive';
|
|
301
|
+
}
|
|
302
|
+
declare function buildShell(options: ShellOptions): string;
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region packages/blocks-core/src/templates/checklist.d.ts
|
|
305
|
+
declare const checklistTemplate: TemplateDefinition;
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region packages/blocks-core/src/templates/data-table.d.ts
|
|
308
|
+
declare const dataTableTemplate: TemplateDefinition;
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region packages/blocks-core/src/templates/diff-view.d.ts
|
|
311
|
+
declare const diffViewTemplate: TemplateDefinition;
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region packages/blocks-core/src/templates/document.d.ts
|
|
314
|
+
declare const documentTemplate: TemplateDefinition;
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region packages/blocks-core/src/templates/error.d.ts
|
|
317
|
+
declare const errorTemplate: TemplateDefinition;
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region packages/blocks-core/src/templates/form.d.ts
|
|
320
|
+
declare const formTemplate: TemplateDefinition;
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region packages/blocks-core/src/templates/picker.d.ts
|
|
323
|
+
declare const pickerTemplate: TemplateDefinition;
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region packages/blocks-core/src/templates/report.d.ts
|
|
326
|
+
declare const reportTemplate: TemplateDefinition;
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region packages/blocks-core/src/templates/status-board.d.ts
|
|
329
|
+
declare const statusBoardTemplate: TemplateDefinition;
|
|
330
|
+
//#endregion
|
|
331
|
+
//#region packages/blocks-core/src/templates/timeline.d.ts
|
|
332
|
+
declare const timelineTemplate: TemplateDefinition;
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region packages/blocks-core/src/templates/tree.d.ts
|
|
335
|
+
declare const treeTemplate: TemplateDefinition;
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region packages/blocks-core/src/templates/index.d.ts
|
|
338
|
+
declare const defaultRegistry: TemplateRegistry;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region packages/blocks-core/src/tokens.d.ts
|
|
341
|
+
declare const tokens: {
|
|
342
|
+
readonly '--dt-bg-primary': "#ffffff";
|
|
343
|
+
readonly '--dt-bg-secondary': "#f6f8fa";
|
|
344
|
+
readonly '--dt-bg-tertiary': "#eaeef2";
|
|
345
|
+
readonly '--dt-bg-canvas': "#f0f0f0";
|
|
346
|
+
readonly '--dt-text-primary': "#1f2328";
|
|
347
|
+
readonly '--dt-text-secondary': "#656d76";
|
|
348
|
+
readonly '--dt-text-tertiary': "#8b949e";
|
|
349
|
+
readonly '--dt-border-default': "#d0d7de";
|
|
350
|
+
readonly '--dt-border-muted': "#d8dee4";
|
|
351
|
+
readonly '--dt-border-subtle': "#eaeef2";
|
|
352
|
+
readonly '--dt-accent-fg': "#0969da";
|
|
353
|
+
readonly '--dt-accent-emphasis': "#0550ae";
|
|
354
|
+
readonly '--dt-accent-muted': "rgba(9, 105, 218, 0.4)";
|
|
355
|
+
readonly '--dt-accent-subtle': "rgba(9, 105, 218, 0.1)";
|
|
356
|
+
readonly '--dt-success-fg': "#1a7f37";
|
|
357
|
+
readonly '--dt-success-emphasis': "#116329";
|
|
358
|
+
readonly '--dt-success-muted': "rgba(26, 127, 55, 0.4)";
|
|
359
|
+
readonly '--dt-success-subtle': "rgba(26, 127, 55, 0.1)";
|
|
360
|
+
readonly '--dt-danger-fg': "#cf222e";
|
|
361
|
+
readonly '--dt-danger-emphasis': "#a40e26";
|
|
362
|
+
readonly '--dt-danger-muted': "rgba(207, 34, 46, 0.4)";
|
|
363
|
+
readonly '--dt-danger-subtle': "rgba(207, 34, 46, 0.1)";
|
|
364
|
+
readonly '--dt-warning-fg': "#9a6700";
|
|
365
|
+
readonly '--dt-warning-emphasis': "#7d4e00";
|
|
366
|
+
readonly '--dt-warning-muted': "rgba(154, 103, 0, 0.4)";
|
|
367
|
+
readonly '--dt-warning-subtle': "rgba(154, 103, 0, 0.1)";
|
|
368
|
+
readonly '--dt-purple-fg': "#8250df";
|
|
369
|
+
readonly '--dt-purple-emphasis': "#6639ba";
|
|
370
|
+
readonly '--dt-purple-muted': "rgba(130, 80, 223, 0.4)";
|
|
371
|
+
readonly '--dt-purple-subtle': "rgba(130, 80, 223, 0.1)";
|
|
372
|
+
readonly '--dt-font-sans': "'Segoe UI', system-ui, -apple-system, sans-serif";
|
|
373
|
+
readonly '--dt-font-mono': "'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace";
|
|
374
|
+
readonly '--dt-font-size-xs': "0.75rem";
|
|
375
|
+
readonly '--dt-font-size-sm': "0.8125rem";
|
|
376
|
+
readonly '--dt-font-size-base': "0.875rem";
|
|
377
|
+
readonly '--dt-font-size-lg': "1rem";
|
|
378
|
+
readonly '--dt-font-size-xl': "1.25rem";
|
|
379
|
+
readonly '--dt-font-size-2xl': "1.5rem";
|
|
380
|
+
readonly '--dt-font-size-3xl': "2rem";
|
|
381
|
+
readonly '--dt-space-1': "0.25rem";
|
|
382
|
+
readonly '--dt-space-2': "0.5rem";
|
|
383
|
+
readonly '--dt-space-3': "0.75rem";
|
|
384
|
+
readonly '--dt-space-4': "1rem";
|
|
385
|
+
readonly '--dt-space-6': "1.5rem";
|
|
386
|
+
readonly '--dt-space-8': "2rem";
|
|
387
|
+
readonly '--dt-space-12': "3rem";
|
|
388
|
+
readonly '--dt-space-16': "4rem";
|
|
389
|
+
readonly '--dt-radius-sm': "6px";
|
|
390
|
+
readonly '--dt-radius-md': "8px";
|
|
391
|
+
readonly '--dt-radius-lg': "12px";
|
|
392
|
+
readonly '--dt-radius-xl': "16px";
|
|
393
|
+
readonly '--dt-shadow-sm': "0 1px 2px rgba(0, 0, 0, 0.07)";
|
|
394
|
+
readonly '--dt-shadow-md': "0 3px 6px rgba(0, 0, 0, 0.1)";
|
|
395
|
+
readonly '--dt-shadow-lg': "0 8px 24px rgba(0, 0, 0, 0.12)";
|
|
396
|
+
readonly '--dt-glow-accent': "rgba(9, 105, 218, 0.08)";
|
|
397
|
+
readonly '--dt-glow-success': "rgba(26, 127, 55, 0.08)";
|
|
398
|
+
readonly '--dt-glow-danger': "rgba(207, 34, 46, 0.08)";
|
|
399
|
+
readonly '--dt-glow-warning': "rgba(154, 103, 0, 0.08)";
|
|
400
|
+
readonly '--dt-glow-purple': "rgba(130, 80, 223, 0.08)";
|
|
401
|
+
readonly '--dt-transition-fast': "150ms ease";
|
|
402
|
+
readonly '--dt-transition-normal': "200ms ease";
|
|
403
|
+
};
|
|
404
|
+
declare const darkTokens: {
|
|
405
|
+
readonly '--dt-bg-primary': "#0d1117";
|
|
406
|
+
readonly '--dt-bg-secondary': "#161b22";
|
|
407
|
+
readonly '--dt-bg-tertiary': "#21262d";
|
|
408
|
+
readonly '--dt-bg-canvas': "#010409";
|
|
409
|
+
readonly '--dt-text-primary': "#f0f6fc";
|
|
410
|
+
readonly '--dt-text-secondary': "#9198a1";
|
|
411
|
+
readonly '--dt-text-tertiary': "#656d76";
|
|
412
|
+
readonly '--dt-border-default': "#30363d";
|
|
413
|
+
readonly '--dt-border-muted': "#21262d";
|
|
414
|
+
readonly '--dt-border-subtle': "#1f242d";
|
|
415
|
+
readonly '--dt-accent-fg': "#58a6ff";
|
|
416
|
+
readonly '--dt-accent-emphasis': "#1f6feb";
|
|
417
|
+
readonly '--dt-accent-muted': "rgba(56, 139, 253, 0.4)";
|
|
418
|
+
readonly '--dt-accent-subtle': "rgba(56, 139, 253, 0.15)";
|
|
419
|
+
readonly '--dt-success-fg': "#3fb950";
|
|
420
|
+
readonly '--dt-success-emphasis': "#238636";
|
|
421
|
+
readonly '--dt-success-muted': "rgba(63, 185, 80, 0.4)";
|
|
422
|
+
readonly '--dt-success-subtle': "rgba(63, 185, 80, 0.15)";
|
|
423
|
+
readonly '--dt-danger-fg': "#f85149";
|
|
424
|
+
readonly '--dt-danger-emphasis': "#da3633";
|
|
425
|
+
readonly '--dt-danger-muted': "rgba(248, 81, 73, 0.4)";
|
|
426
|
+
readonly '--dt-danger-subtle': "rgba(248, 81, 73, 0.15)";
|
|
427
|
+
readonly '--dt-warning-fg': "#d29922";
|
|
428
|
+
readonly '--dt-warning-emphasis': "#bb8009";
|
|
429
|
+
readonly '--dt-warning-muted': "rgba(210, 153, 34, 0.4)";
|
|
430
|
+
readonly '--dt-warning-subtle': "rgba(210, 153, 34, 0.15)";
|
|
431
|
+
readonly '--dt-purple-fg': "#bc8cff";
|
|
432
|
+
readonly '--dt-purple-emphasis': "#a371f7";
|
|
433
|
+
readonly '--dt-purple-muted': "rgba(188, 140, 255, 0.4)";
|
|
434
|
+
readonly '--dt-purple-subtle': "rgba(188, 140, 255, 0.15)";
|
|
435
|
+
readonly '--dt-shadow-sm': "0 1px 2px rgba(1, 4, 9, 0.35)";
|
|
436
|
+
readonly '--dt-shadow-md': "0 3px 6px rgba(1, 4, 9, 0.4)";
|
|
437
|
+
readonly '--dt-shadow-lg': "0 8px 24px rgba(1, 4, 9, 0.45)";
|
|
438
|
+
readonly '--dt-glow-accent': "rgba(56, 139, 253, 0.14)";
|
|
439
|
+
readonly '--dt-glow-success': "rgba(63, 185, 80, 0.14)";
|
|
440
|
+
readonly '--dt-glow-danger': "rgba(248, 81, 73, 0.14)";
|
|
441
|
+
readonly '--dt-glow-warning': "rgba(210, 153, 34, 0.14)";
|
|
442
|
+
readonly '--dt-glow-purple': "rgba(188, 140, 255, 0.14)";
|
|
443
|
+
};
|
|
444
|
+
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-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"];
|
|
445
|
+
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"];
|
|
446
|
+
type TokenName = (typeof tokenNames)[number];
|
|
447
|
+
type TokenValue = (typeof tokens)[TokenName];
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region packages/blocks-core/src/utils.d.ts
|
|
450
|
+
/** HTML-escape for safe insertion into content and attributes. */
|
|
451
|
+
declare function escapeHtml(s: string): string;
|
|
452
|
+
/** Sanitize URL — allow http, https, mailto, # only. */
|
|
453
|
+
declare function sanitizeUrl(url: string): string;
|
|
454
|
+
/** Sanitize string for use as HTML id/class. */
|
|
455
|
+
declare function sanitizeId(value: string): string;
|
|
456
|
+
/** Format unknown value for display. */
|
|
457
|
+
declare function formatValue(value: unknown): string;
|
|
458
|
+
/** Auto-parse JSON strings that LLMs sometimes pass as serialized. */
|
|
459
|
+
declare function tryParseJson(content: unknown): unknown;
|
|
460
|
+
/** Inline markdown: **bold**, `code`, [link](url). */
|
|
461
|
+
declare function inlineMarkdown(text: string): string;
|
|
462
|
+
/** Tone system — map aliases to canonical names. Returns only safe values for CSS injection. */
|
|
463
|
+
declare function toneName(status?: string): string;
|
|
464
|
+
/** Get CSS custom property for a tone variant. */
|
|
465
|
+
declare function toneVar(tone: string, variant?: 'fg' | 'emphasis' | 'muted' | 'subtle'): string;
|
|
466
|
+
/** Helper to extract items array from block value. */
|
|
467
|
+
declare function blockItems(block: {
|
|
468
|
+
value?: unknown;
|
|
469
|
+
}): Array<Record<string, unknown>>;
|
|
470
|
+
//#endregion
|
|
471
|
+
export { type ActionItem, type ActionOption, type BlockRenderContext, type BlockRenderer, type BlockType, type CardItem, type ChannelError, type ChannelOutcome, type ChannelSurface, type ChecklistItem, type ComparisonColumn, type DocFile, type IslandDescriptor, type KnownIslandId, type LayoutOptions, 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, 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 };
|