@hahlex/millar-mcp 0.0.0-stage → 0.1.0-draft.1

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/dist/docs/CHANGELOG.md +21 -0
  3. package/dist/docs/GLOSSARY.md +77 -0
  4. package/dist/http.d.ts +3 -0
  5. package/dist/http.d.ts.map +1 -0
  6. package/dist/http.js +39566 -0
  7. package/dist/http.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/server.d.ts +6 -0
  13. package/dist/server.d.ts.map +1 -0
  14. package/dist/server.js +1115 -0
  15. package/dist/server.js.map +1 -0
  16. package/dist/skills/millar-animation/SKILL.md +66 -0
  17. package/dist/skills/millar-animation/references/animation-research-patterns.md +28 -0
  18. package/dist/skills/millar-animation/references/motion-choreography.md +80 -0
  19. package/dist/skills/millar-build-web/SKILL.md +59 -0
  20. package/dist/skills/millar-build-web/references/seo-cwv-and-copy.md +24 -0
  21. package/dist/skills/millar-build-web/references/web-architecture-checklist.md +47 -0
  22. package/dist/skills/millar-create-image/SKILL.md +62 -0
  23. package/dist/skills/millar-create-image/references/human-editorial-photography.md +74 -0
  24. package/dist/skills/millar-create-image/references/hybrid-plate-compositing.md +43 -0
  25. package/dist/skills/millar-create-image/references/image-art-direction.md +74 -0
  26. package/dist/skills/millar-create-image/references/multi-page-asset-map.md +27 -0
  27. package/dist/skills/millar-create-image/references/natural-editorial-illustration.md +57 -0
  28. package/dist/skills/millar-create-image/references/procedural-gallery-craft.md +84 -0
  29. package/dist/skills/millar-create-image/scripts/embed-provenance.mjs +185 -0
  30. package/dist/skills/millar-deep-research/SKILL.md +62 -0
  31. package/dist/skills/millar-deep-research/references/visual-extraction-protocol.md +36 -0
  32. package/dist/skills/millar-deep-research/references/world-class-benchmarks.md +30 -0
  33. package/dist/skills/millar-design/SKILL.md +83 -0
  34. package/dist/skills/millar-design/references/aesthetic-movements.md +49 -0
  35. package/dist/skills/millar-design/references/cross-page-sync-audit.md +25 -0
  36. package/dist/skills/millar-design/references/style-dna-contract.md +89 -0
  37. package/dist/skills/millar-verify-web/SKILL.md +76 -0
  38. package/dist/skills/millar-verify-web/references/five-layer-qa-gate.md +104 -0
  39. package/dist/skills/millar-verify-web/references/two-axis-review-rubric.md +23 -0
  40. package/dist/skills/millar-verify-web/scripts/millar-audit.mjs +617 -0
  41. package/dist/skills/millar-web-workflow/SKILL.md +60 -0
  42. package/dist/skills/millar-web-workflow/references/creative-divergence-protocol.md +52 -0
  43. package/dist/skills/millar-web-workflow/references/track-routing-and-gates.md +32 -0
  44. package/dist/skills-loader.d.ts +47 -0
  45. package/dist/skills-loader.d.ts.map +1 -0
  46. package/dist/skills-loader.js +204 -0
  47. package/dist/skills-loader.js.map +1 -0
  48. package/dist/sources/packages/marketing/src/assets/BrandAndGeometricAssets.tsx +373 -0
  49. package/dist/sources/packages/marketing/src/assets/SchematicAndProductAssets.tsx +497 -0
  50. package/dist/sources/packages/marketing/src/sections/MarketingSections.tsx +946 -0
  51. package/dist/sources/packages/marketing/src/templates/PageTemplates.tsx +304 -0
  52. package/dist/sources/packages/ui/src/components/Button.tsx +162 -0
  53. package/dist/sources/packages/ui/src/components/FormControls.tsx +476 -0
  54. package/dist/sources/packages/ui/src/components/Layout.tsx +176 -0
  55. package/dist/sources/packages/ui/src/components/OverlaysAndFeedback.tsx +291 -0
  56. package/dist/sources/packages/ui/src/components/SurfacesAndData.tsx +564 -0
  57. package/dist/stdio.d.ts +3 -0
  58. package/dist/stdio.d.ts.map +1 -0
  59. package/dist/stdio.js +37380 -0
  60. package/dist/stdio.js.map +1 -0
  61. package/package.json +48 -3
  62. package/README.md +0 -3
@@ -0,0 +1,291 @@
1
+ import React, { useEffect, useId, useRef } from "react";
2
+ import { IconBox, IconClose, IconError, IconInfo, IconRefresh, IconSuccess, IconWarning } from "../icons.js";
3
+ import { Button } from "./Button.js";
4
+
5
+ /* --- Dialog (Escape close, focus management, dirty-form backdrop lock, accessible modal) --- */
6
+
7
+ export interface DialogProps {
8
+ open: boolean;
9
+ onClose: () => void;
10
+ title: string;
11
+ dirty?: boolean;
12
+ footer?: React.ReactNode;
13
+ children: React.ReactNode;
14
+ }
15
+
16
+ export function Dialog({ open, onClose, title, dirty = false, footer, children }: DialogProps) {
17
+ const titleId = useId();
18
+ const dialogRef = useRef<HTMLDivElement>(null);
19
+
20
+ useEffect(() => {
21
+ if (!open) return;
22
+ const prevFocused = document.activeElement as HTMLElement | null;
23
+ dialogRef.current?.focus();
24
+
25
+ const onKeyDown = (e: KeyboardEvent) => {
26
+ if (e.key === "Escape") {
27
+ e.preventDefault();
28
+ onClose();
29
+ }
30
+ };
31
+ document.addEventListener("keydown", onKeyDown);
32
+ return () => {
33
+ document.removeEventListener("keydown", onKeyDown);
34
+ prevFocused?.focus();
35
+ };
36
+ }, [open, onClose]);
37
+
38
+ if (!open) return null;
39
+
40
+ return (
41
+ <div
42
+ role="presentation"
43
+ onClick={(e) => {
44
+ if (e.target === e.currentTarget && !dirty) onClose();
45
+ }}
46
+ style={{
47
+ position: "fixed",
48
+ inset: 0,
49
+ zIndex: "var(--z-modal-backdrop, 9000)" as unknown as number,
50
+ backgroundColor: "rgba(43, 31, 22, 0.45)",
51
+ display: "flex",
52
+ alignItems: "center",
53
+ justifyContent: "center",
54
+ padding: 16,
55
+ }}
56
+ >
57
+ <div
58
+ ref={dialogRef}
59
+ role="dialog"
60
+ aria-modal="true"
61
+ aria-labelledby={titleId}
62
+ tabIndex={-1}
63
+ className="millar-focus"
64
+ style={{
65
+ position: "relative",
66
+ zIndex: "var(--z-dialog, 10001)" as unknown as number,
67
+ width: "100%",
68
+ maxWidth: 520,
69
+ maxHeight: "85dvh",
70
+ overflowY: "auto",
71
+ borderRadius: "var(--radius-lg, 16px)",
72
+ backgroundColor: "var(--bg-elevated)",
73
+ border: "1px solid var(--border-default)",
74
+ boxShadow: "var(--shadow-popover)",
75
+ padding: 24,
76
+ display: "flex",
77
+ flexDirection: "column",
78
+ gap: 16,
79
+ }}
80
+ >
81
+ <div style={{ display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }}>
82
+ <h2
83
+ id={titleId}
84
+ style={{
85
+ margin: 0,
86
+ fontFamily: "var(--font-display)",
87
+ fontSize: "var(--text-section-title, 1.125rem)",
88
+ fontWeight: 600,
89
+ color: "var(--fg-default)",
90
+ }}
91
+ >
92
+ {title}
93
+ </h2>
94
+ <Button variant="ghost" size="sm" iconOnly aria-label="Close dialog" onClick={onClose} icon={<IconClose size="md" />} />
95
+ </div>
96
+ <div>{children}</div>
97
+ {footer ? (
98
+ <div style={{ display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 10, paddingTop: 8, borderTop: "1px solid var(--border-soft)" }}>
99
+ {footer}
100
+ </div>
101
+ ) : null}
102
+ </div>
103
+ </div>
104
+ );
105
+ }
106
+
107
+ /* --- ConfirmDialog (Mandatory confirmation for destructive actions) --- */
108
+
109
+ export interface ConfirmDialogProps {
110
+ open: boolean;
111
+ onClose: () => void;
112
+ onConfirm: () => void | Promise<unknown>;
113
+ title: string;
114
+ message: string;
115
+ confirmLabel?: string;
116
+ cancelLabel?: string;
117
+ tone?: "danger" | "primary";
118
+ }
119
+
120
+ export function ConfirmDialog({
121
+ open,
122
+ onClose,
123
+ onConfirm,
124
+ title,
125
+ message,
126
+ confirmLabel = "Confirm",
127
+ cancelLabel = "Cancel",
128
+ tone = "danger",
129
+ }: ConfirmDialogProps) {
130
+ return (
131
+ <Dialog
132
+ open={open}
133
+ onClose={onClose}
134
+ title={title}
135
+ footer={
136
+ <>
137
+ <Button variant="white" onClick={onClose}>
138
+ {cancelLabel}
139
+ </Button>
140
+ <Button
141
+ variant={tone === "danger" ? "danger" : "primary"}
142
+ onClick={async () => {
143
+ await onConfirm();
144
+ onClose();
145
+ }}
146
+ >
147
+ {confirmLabel}
148
+ </Button>
149
+ </>
150
+ }
151
+ >
152
+ <p style={{ margin: 0, fontSize: "var(--text-body-sm, 0.875rem)", color: "var(--fg-muted)", lineHeight: 1.55 }}>
153
+ {message}
154
+ </p>
155
+ </Dialog>
156
+ );
157
+ }
158
+
159
+ /* --- Alert (Semantic feedback; never color alone, pairs icon + bordered soft wash + live role) --- */
160
+
161
+ export type AlertTone = "info" | "success" | "warning" | "error";
162
+
163
+ const ALERT_MAP: Record<AlertTone, { bg: string; border: string; fg: string; icon: React.ReactNode; role: "status" | "alert" }> = {
164
+ info: { bg: "var(--tone-brand-soft)", border: "var(--tone-brand-border)", fg: "var(--tone-brand-fg)", icon: <IconInfo size="md" />, role: "status" },
165
+ success: { bg: "var(--status-success-soft)", border: "var(--status-success-border)", fg: "var(--status-success)", icon: <IconSuccess size="md" />, role: "status" },
166
+ warning: { bg: "var(--status-warning-soft)", border: "var(--status-warning-border)", fg: "var(--status-warning)", icon: <IconWarning size="md" />, role: "status" },
167
+ error: { bg: "var(--status-error-soft)", border: "var(--status-error-border)", fg: "var(--status-error)", icon: <IconError size="md" />, role: "alert" },
168
+ };
169
+
170
+ export interface AlertProps {
171
+ tone?: AlertTone;
172
+ title: string;
173
+ message?: string;
174
+ action?: React.ReactNode;
175
+ }
176
+
177
+ export function Alert({ tone = "info", title, message, action }: AlertProps) {
178
+ const cfg = ALERT_MAP[tone];
179
+ return (
180
+ <div
181
+ role={cfg.role}
182
+ style={{
183
+ display: "flex",
184
+ alignItems: "flex-start",
185
+ justifyContent: "space-between",
186
+ gap: 12,
187
+ padding: "12px 14px",
188
+ borderRadius: "var(--radius-md, 12px)",
189
+ backgroundColor: cfg.bg,
190
+ border: `1px solid ${cfg.border}`,
191
+ color: cfg.fg,
192
+ }}
193
+ >
194
+ <div style={{ display: "flex", alignItems: "flex-start", gap: 10 }}>
195
+ <span style={{ display: "inline-flex", marginTop: 2, flexShrink: 0 }}>{cfg.icon}</span>
196
+ <div style={{ display: "flex", flexDirection: "column", gap: 2 }}>
197
+ <strong style={{ fontSize: "var(--text-body-sm, 0.875rem)", fontWeight: 600 }}>{title}</strong>
198
+ {message ? <span style={{ fontSize: "var(--text-meta, 0.8125rem)", color: "var(--fg-default)" }}>{message}</span> : null}
199
+ </div>
200
+ </div>
201
+ {action}
202
+ </div>
203
+ );
204
+ }
205
+
206
+ /* --- Skeleton (Strictly solid fill, zero CSS gradients per ADR-0002) --- */
207
+
208
+ export interface SkeletonProps {
209
+ width?: string | number;
210
+ height?: string | number;
211
+ radius?: "sm" | "md" | "lg" | "pill";
212
+ }
213
+
214
+ export function Skeleton({ width = "100%", height = 16, radius = "sm" }: SkeletonProps) {
215
+ return (
216
+ <div
217
+ aria-hidden="true"
218
+ style={{
219
+ width,
220
+ height,
221
+ borderRadius: `var(--radius-${radius}, 8px)`,
222
+ backgroundColor: "var(--bg-surface-2)",
223
+ border: "1px solid var(--border-soft)",
224
+ }}
225
+ />
226
+ );
227
+ }
228
+
229
+ /* --- EmptyState & LoadFailed --- */
230
+
231
+ export interface EmptyStateProps {
232
+ icon?: React.ReactNode;
233
+ title: string;
234
+ description?: string;
235
+ action?: React.ReactNode;
236
+ }
237
+
238
+ export function EmptyState({ icon, title, description, action }: EmptyStateProps) {
239
+ return (
240
+ <div
241
+ style={{
242
+ display: "flex",
243
+ flexDirection: "column",
244
+ alignItems: "center",
245
+ justifyContent: "center",
246
+ textAlign: "center",
247
+ gap: 12,
248
+ padding: "32px 24px",
249
+ borderRadius: "var(--radius-lg, 16px)",
250
+ border: "1px solid var(--border-default)",
251
+ backgroundColor: "var(--bg-surface)",
252
+ }}
253
+ >
254
+ {icon ? <IconBox tone="brand" size="lg">{icon}</IconBox> : null}
255
+ <h3 style={{ margin: 0, fontFamily: "var(--font-display)", fontSize: "var(--text-card-title, 1rem)", fontWeight: 600, color: "var(--fg-default)" }}>
256
+ {title}
257
+ </h3>
258
+ {description ? (
259
+ <p style={{ margin: 0, maxWidth: 420, fontSize: "var(--text-body-sm, 0.875rem)", color: "var(--fg-muted)" }}>{description}</p>
260
+ ) : null}
261
+ {action}
262
+ </div>
263
+ );
264
+ }
265
+
266
+ export interface LoadFailedProps {
267
+ title?: string;
268
+ message?: string;
269
+ onRetry?: () => void;
270
+ }
271
+
272
+ export function LoadFailed({
273
+ title = "Unable to load data",
274
+ message = "Check your connection and try again.",
275
+ onRetry,
276
+ }: LoadFailedProps) {
277
+ return (
278
+ <Alert
279
+ tone="error"
280
+ title={title}
281
+ message={message}
282
+ action={
283
+ onRetry ? (
284
+ <Button variant="white" size="sm" onClick={onRetry} icon={<IconRefresh size="sm" />}>
285
+ Retry
286
+ </Button>
287
+ ) : undefined
288
+ }
289
+ />
290
+ );
291
+ }