@agimon-ai/doompi-style-system 0.0.1-alpha.100

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 (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +53 -0
  3. package/dist/apiContracts.cjs +118 -0
  4. package/dist/apiContracts.cjs.map +1 -0
  5. package/dist/apiContracts.d.mts +52 -0
  6. package/dist/apiContracts.d.mts.map +1 -0
  7. package/dist/apiContracts.mjs +113 -0
  8. package/dist/apiContracts.mjs.map +1 -0
  9. package/dist/cli.cjs +242 -0
  10. package/dist/cli.cjs.map +1 -0
  11. package/dist/cli.d.mts +4 -0
  12. package/dist/cli.d.mts.map +1 -0
  13. package/dist/cli.mjs +239 -0
  14. package/dist/cli.mjs.map +1 -0
  15. package/dist/designCheck-7P9r9ijq.mjs +475 -0
  16. package/dist/designCheck-7P9r9ijq.mjs.map +1 -0
  17. package/dist/designCheck-zx4PsRvE.cjs +495 -0
  18. package/dist/designCheck-zx4PsRvE.cjs.map +1 -0
  19. package/dist/extensions/pi.cjs +94 -0
  20. package/dist/extensions/pi.cjs.map +1 -0
  21. package/dist/extensions/pi.d.mts +5 -0
  22. package/dist/extensions/pi.d.mts.map +1 -0
  23. package/dist/extensions/pi.mjs +87 -0
  24. package/dist/extensions/pi.mjs.map +1 -0
  25. package/dist/extensions/server.cjs +136 -0
  26. package/dist/extensions/server.cjs.map +1 -0
  27. package/dist/extensions/server.d.mts +5 -0
  28. package/dist/extensions/server.d.mts.map +1 -0
  29. package/dist/extensions/server.mjs +131 -0
  30. package/dist/extensions/server.mjs.map +1 -0
  31. package/dist/extensions/web.mjs +942 -0
  32. package/dist/extensions/web.mjs.map +1 -0
  33. package/dist/index.cjs +8 -0
  34. package/dist/index.d.mts +171 -0
  35. package/dist/index.d.mts.map +1 -0
  36. package/dist/index.mjs +3 -0
  37. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  38. package/dist/storyPreview-D-hGhlig.cjs +371 -0
  39. package/dist/storyPreview-D-hGhlig.cjs.map +1 -0
  40. package/dist/storyPreview-Dhejqhos.mjs +357 -0
  41. package/dist/storyPreview-Dhejqhos.mjs.map +1 -0
  42. package/package.json +132 -0
  43. package/skills/design-workflow/SKILL.md +84 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.mjs","names":["routes","fillStyleSystem"],"sources":["../../src/types/apiRoutes.ts","../../generated/client.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/previewApi.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/previewFrame.ts","../../src/extensions/workspaces/sessions/(frontend)/_components/StoryPreviewPanel.tsx","../../src/extensions/workspaces/sessions/(frontend)/_components/StoryPreviewLauncher.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/StyleSystem.author.preview-action.web.tsx","../../generated/web.ts"],"sourcesContent":["import { apiResponse, defineApiRoutes } from '@agimon-ai/doompi-core/web';\n\nimport type {\n BuildStoryPreviewView,\n DisposeStoryPreviewView,\n ExportStoryPreviewImageView,\n StoryPreviewMetadataView,\n} from './previewApi';\n\nexport default defineApiRoutes({\n metadata: {\n method: 'POST',\n path: '/metadata',\n response: apiResponse<StoryPreviewMetadataView>(),\n },\n build: {\n method: 'POST',\n path: '/build',\n response: apiResponse<BuildStoryPreviewView>(),\n },\n image: {\n method: 'POST',\n path: '/image',\n response: apiResponse<ExportStoryPreviewImageView>(),\n },\n dispose: {\n method: 'DELETE',\n path: '/artifact',\n response: apiResponse<DisposeStoryPreviewView>(),\n },\n});\n","// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { createApiClient, sessionApiAddress } from '@agimon-ai/doompi-core/web';\nimport { sealedTransport } from '@agimon-ai/doompi-web-security/browser';\n\nimport routes from '../src/types/apiRoutes';\n\n/** Scopes the tree mounts 'style-system-preview' at. */\nexport const apiScopes = ['session'] as const;\n\nexport const api = createApiClient(routes, {\n scopes: apiScopes,\n basePath: 'style-system-preview',\n transport: (input, init) => sealedTransport.fetch(input, init),\n sessionAddress: sessionApiAddress,\n});\n","import { api } from '../../../../../../generated/client';\nimport type {\n BuildStoryPreviewRequest,\n BuildStoryPreviewView,\n ExportStoryPreviewImageView,\n StoryPreviewMetadataRequest,\n StoryPreviewMetadataView,\n} from '../../../../../types/previewApi';\n\nfunction errorMessage(result: { status: number; error: string }): string {\n if (result.status === 0) return 'The preview service is unreachable.';\n return result.error === '' ? `The preview service answered ${String(result.status)}.` : result.error;\n}\n\nexport async function storyMetadata(\n sessionId: string,\n request: StoryPreviewMetadataRequest,\n): Promise<{ ok: true; metadata: StoryPreviewMetadataView } | { ok: false; error: string }> {\n const result = await api.session(sessionId).metadata({ body: request });\n return result.ok ? { ok: true, metadata: result.data } : { ok: false, error: errorMessage(result) };\n}\n\nexport async function buildPreview(\n sessionId: string,\n request: BuildStoryPreviewRequest,\n): Promise<{ ok: true; preview: BuildStoryPreviewView } | { ok: false; error: string }> {\n const result = await api.session(sessionId).build({ body: request });\n return result.ok ? { ok: true, preview: result.data } : { ok: false, error: errorMessage(result) };\n}\n\nexport async function exportPreviewImage(\n sessionId: string,\n request: BuildStoryPreviewRequest,\n): Promise<{ ok: true; image: ExportStoryPreviewImageView } | { ok: false; error: string }> {\n const result = await api.session(sessionId).image({ body: request });\n return result.ok ? { ok: true, image: result.data } : { ok: false, error: errorMessage(result) };\n}\n\nexport async function disposePreview(sessionId: string, handle: string): Promise<void> {\n await api.session(sessionId).dispose({ body: { handle } });\n}\n","const PREVIEW_CSP =\n \"default-src 'none'; base-uri 'none'; connect-src 'none'; font-src data:; form-action 'none'; frame-src 'none'; img-src data: blob:; media-src data: blob:; object-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'\";\n\nexport interface PreviewPoint {\n x: number;\n y: number;\n}\n\nexport interface PreviewAnnotationRect extends PreviewPoint {\n width: number;\n height: number;\n}\n\nfunction findHeadInsertion(html: string): number | undefined {\n const lower = html.toLowerCase();\n let index = 0;\n while (index < html.length) {\n if (lower.startsWith('<!--', index)) {\n const end = lower.indexOf('-->', index + 4);\n index = end < 0 ? html.length : end + 3;\n continue;\n }\n if (html[index] !== '<') {\n index += 1;\n continue;\n }\n const tag = html.slice(index).match(/^<([a-z][a-z0-9:-]*)(?:\\s[^>]*)?>/i);\n if (tag === null) {\n index += 1;\n continue;\n }\n const name = tag[1]!.toLowerCase();\n const end = index + tag[0].length;\n if (name === 'head') return end;\n if (name === 'script' || name === 'style' || name === 'template' || name === 'textarea' || name === 'title') {\n const closing = lower.indexOf(`</${name}`, end);\n index = closing < 0 ? html.length : closing;\n continue;\n }\n index = end;\n }\n return undefined;\n}\n\nexport function isolatedPreviewHtml(html: string): string {\n const policy = `<meta http-equiv=\"Content-Security-Policy\" content=\"${PREVIEW_CSP}\">`;\n const headInsertion = findHeadInsertion(html);\n if (headInsertion !== undefined) return `${html.slice(0, headInsertion)}${policy}${html.slice(headInsertion)}`;\n const doctype = html.match(/^\\s*<!doctype[^>]*>/i);\n if (doctype !== null) return `${doctype[0]}<head>${policy}</head>${html.slice(doctype[0].length)}`;\n return `<head>${policy}</head>${html}`;\n}\n\nexport function normalizedAnnotationRect(start: PreviewPoint, end: PreviewPoint): PreviewAnnotationRect {\n return {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y),\n width: Math.abs(end.x - start.x),\n height: Math.abs(end.y - start.y),\n };\n}\n\nexport function previewAnnotationLocation(\n tool: 'mark' | 'comment',\n start: PreviewPoint,\n end: PreviewPoint,\n):\n | { mode: 'region'; point: PreviewPoint; rect: PreviewAnnotationRect }\n | { mode: 'point'; point: PreviewPoint }\n | null {\n if (tool === 'comment') return { mode: 'point', point: end };\n const rect = normalizedAnnotationRect(start, end);\n return rect.width === 0 || rect.height === 0 ? null : { mode: 'region', point: rect, rect };\n}\n","import type { WebPluginSlotProps } from '@agimon-ai/doompi-core/web';\nimport { Button } from '@agimon-ai/doompi-web-components';\nimport { useCallback, useEffect, useMemo, useRef, useState, type PointerEvent as ReactPointerEvent } from 'react';\n\nimport type {\n BuildStoryPreviewRequest,\n BuildStoryPreviewView,\n ExportStoryPreviewImageView,\n StoryPreviewMetadataView,\n StoryPreviewSeed,\n} from '../../../../../types/previewApi';\nimport { buildPreview, disposePreview, exportPreviewImage, storyMetadata } from '../_lib/previewApi';\nimport {\n isolatedPreviewHtml,\n normalizedAnnotationRect,\n previewAnnotationLocation,\n type PreviewAnnotationRect,\n type PreviewPoint,\n} from '../_lib/previewFrame';\n\nfunction imageDownload(data: string, storyExport: string): void {\n const link = document.createElement('a');\n link.href = `data:image/png;base64,${data}`;\n link.download = `${storyExport.replace(/[^A-Za-z0-9_-]/g, '-')}.png`;\n link.click();\n}\n\nfunction point(event: ReactPointerEvent<HTMLElement>): PreviewPoint {\n const bounds = event.currentTarget.getBoundingClientRect();\n return {\n x: Math.min(1, Math.max(0, (event.clientX - bounds.left) / bounds.width)),\n y: Math.min(1, Math.max(0, (event.clientY - bounds.top) / bounds.height)),\n };\n}\n\ninterface StoryPreviewSource {\n path: string;\n hasUnsavedChanges: boolean;\n kind?: string;\n revision?: number;\n sourceSha256?: string;\n}\n\ninterface StoryPreviewIdentity {\n version: 1;\n provider: string;\n projectPath: string;\n storyPath: string;\n storyExport: string;\n buildRevision: string;\n viewport: { width: number; height: number };\n sources: readonly { path: string; sha256: string }[];\n}\n\ninterface StoryPreviewPanelProps extends WebPluginSlotProps {\n seed?: StoryPreviewSeed;\n source?: StoryPreviewSource;\n activeTool?: 'select' | 'mark' | 'comment' | 'draw' | 'pan';\n displayedAnnotations?: readonly {\n ordinal: number;\n mode: 'region' | 'point';\n point: PreviewPoint;\n rect?: PreviewAnnotationRect;\n stroke?: readonly PreviewPoint[];\n }[];\n pendingCandidate?: boolean;\n onAnnotationCandidate?: (candidate: {\n mode: 'region' | 'point';\n point: PreviewPoint;\n rect?: PreviewAnnotationRect;\n stroke?: readonly PreviewPoint[];\n preview: StoryPreviewIdentity;\n evidence: Blob;\n thumbnailUrl: string;\n }) => void;\n}\n\nfunction preferredExport(exports: readonly StoryPreviewMetadataView['exports'][number][]): string {\n return exports.find((entry) => entry.exportName === 'Playground')?.exportName ?? exports[0]?.exportName ?? '';\n}\n\nfunction errorText(reason: unknown): string {\n return reason instanceof Error ? reason.message : String(reason);\n}\n\nexport function StoryPreviewPanel({\n sessionId,\n submitCapture,\n seed,\n source,\n activeTool = 'select',\n displayedAnnotations = [],\n pendingCandidate = false,\n onAnnotationCandidate,\n}: StoryPreviewPanelProps) {\n const contextualSource = source ?? seed?.source;\n const sourcePath = contextualSource?.path ?? '';\n const sourceDirty = contextualSource?.hasUnsavedChanges === true;\n const sourceRevision = contextualSource?.revision ?? 0;\n const sourceSha256 = contextualSource?.sourceSha256 ?? '';\n const contextual = contextualSource !== undefined;\n const [appPath, setAppPath] = useState(contextual ? '' : '.');\n const [storyPath, setStoryPath] = useState(sourcePath);\n const [storyExport, setStoryExport] = useState(contextual ? '' : 'Playground');\n const [storyExports, setStoryExports] = useState<\n readonly StoryPreviewMetadataView['exports'][number][] | undefined\n >();\n const [darkMode, setDarkMode] = useState(false);\n const [preview, setPreview] = useState<BuildStoryPreviewView | undefined>(undefined);\n const [builtRequest, setBuiltRequest] = useState<BuildStoryPreviewRequest | undefined>(undefined);\n const [annotationImage, setAnnotationImage] = useState<ExportStoryPreviewImageView | undefined>(undefined);\n const [annotationStart, setAnnotationStart] = useState<PreviewPoint | undefined>(undefined);\n const [annotationRect, setAnnotationRect] = useState<PreviewAnnotationRect | undefined>(undefined);\n const [feedback, setFeedback] = useState('');\n const [status, setStatus] = useState(\n contextual\n ? sourceDirty\n ? 'Loading story metadata. Preview uses saved source.'\n : 'Loading story metadata…'\n : 'Choose an exact story file and export.',\n );\n const [working, setWorking] = useState(false);\n const generationRef = useRef(0);\n const operationRef = useRef(0);\n const previewRef = useRef<BuildStoryPreviewView | undefined>(undefined);\n const builtRequestRef = useRef<BuildStoryPreviewRequest | undefined>(undefined);\n const workingRef = useRef(false);\n const dirtyRef = useRef(sourceDirty);\n const annotationExportRef = useRef('');\n const [stroke, setStroke] = useState<readonly PreviewPoint[]>([]);\n const [zoom, setZoom] = useState(1);\n const [gesture, setGesture] = useState<number>();\n const pointers = useRef(new Map<number, PreviewPoint>());\n const pinch = useRef<{ distance: number; zoom: number } | undefined>(undefined);\n const pan = useRef<{ x: number; y: number; left: number; top: number } | undefined>(undefined);\n const imageScroll = useRef<HTMLDivElement>(null);\n\n dirtyRef.current = sourceDirty;\n\n const request = useMemo<BuildStoryPreviewRequest>(\n () => ({ appPath, storyPath, storyExport, darkMode }),\n [appPath, storyPath, storyExport, darkMode],\n );\n\n useEffect(() => {\n operationRef.current += 1;\n if (!workingRef.current) return;\n workingRef.current = false;\n setWorking(false);\n }, [request]);\n\n useEffect(() => {\n const generation = generationRef.current + 1;\n generationRef.current = generation;\n operationRef.current += 1;\n workingRef.current = false;\n setWorking(false);\n setStoryExports(undefined);\n setAppPath(contextual ? '' : '.');\n setStoryPath(sourcePath);\n setStoryExport(contextual ? '' : 'Playground');\n builtRequestRef.current = undefined;\n setBuiltRequest(undefined);\n setAnnotationImage(undefined);\n setAnnotationStart(undefined);\n setAnnotationRect(undefined);\n setStroke([]);\n setZoom(1);\n pointers.current.clear();\n pinch.current = undefined;\n\n if (sessionId === null || sourcePath === '') {\n setPreview(undefined);\n previewRef.current = undefined;\n return () => {\n if (generationRef.current === generation) generationRef.current += 1;\n };\n }\n\n const previous = previewRef.current;\n previewRef.current = undefined;\n setPreview(undefined);\n if (previous !== undefined) void disposePreview(sessionId, previous.handle);\n\n let current = true;\n setStatus(sourceDirty ? 'Loading story metadata. Preview uses saved source.' : 'Loading story metadata…');\n void storyMetadata(sessionId, { storyPath: sourcePath })\n .then((result) => {\n if (!current || generationRef.current !== generation) return;\n if (!result.ok) {\n setStoryExports(undefined);\n setStatus(result.error);\n return;\n }\n const exports = result.metadata.exports;\n setAppPath(result.metadata.appPath);\n setStoryPath(result.metadata.storyPath);\n setStoryExports(exports);\n setStoryExport(preferredExport(exports));\n if (exports.length === 0) {\n setStatus('No story exports were found in this file.');\n } else if (dirtyRef.current) {\n setStatus('Save changes to preview. Preview uses saved source.');\n } else if (exports.length === 1) {\n setStatus('Story found. Building preview…');\n } else {\n setStatus('Story found. Building the Playground export…');\n }\n })\n .catch((reason: unknown) => {\n if (current && generationRef.current === generation) setStatus(errorText(reason));\n });\n\n return () => {\n current = false;\n if (generationRef.current === generation) generationRef.current += 1;\n operationRef.current += 1;\n const ownedPreview = previewRef.current;\n previewRef.current = undefined;\n if (ownedPreview !== undefined) void disposePreview(sessionId, ownedPreview.handle);\n };\n }, [contextual, sessionId, sourcePath, sourceRevision, sourceSha256]);\n\n useEffect(() => {\n if (!contextual || !sourceDirty) return;\n setStatus('Save changes to preview. Preview uses saved source.');\n }, [contextual, sourceDirty]);\n\n const rebuild = useCallback(async (): Promise<boolean> => {\n if (\n sessionId === null ||\n workingRef.current ||\n request.appPath.trim() === '' ||\n request.storyPath.trim() === '' ||\n request.storyExport.trim() === ''\n )\n return false;\n if (dirtyRef.current) {\n setStatus('Save changes to preview. Preview uses saved source.');\n return false;\n }\n\n const generation = generationRef.current;\n const operation = operationRef.current + 1;\n operationRef.current = operation;\n const requestSessionId = sessionId;\n workingRef.current = true;\n setWorking(true);\n setStatus('Building preview…');\n try {\n const result = await buildPreview(requestSessionId, request);\n if (generationRef.current !== generation || operationRef.current !== operation) {\n if (result.ok) void disposePreview(requestSessionId, result.preview.handle);\n return false;\n }\n if (!result.ok) {\n setStatus(result.error);\n return false;\n }\n const previous = previewRef.current;\n previewRef.current = result.preview;\n builtRequestRef.current = request;\n setPreview(result.preview);\n setBuiltRequest(request);\n setAnnotationImage(undefined);\n setAnnotationStart(undefined);\n setAnnotationRect(undefined);\n if (previous !== undefined && previous.handle !== result.preview.handle) {\n void disposePreview(requestSessionId, previous.handle);\n }\n setStatus(\n dirtyRef.current\n ? 'Preview ready from saved source. Save changes to refresh.'\n : 'Preview ready. Refresh after source edits.',\n );\n return true;\n } catch (reason: unknown) {\n if (generationRef.current === generation && operationRef.current === operation) setStatus(errorText(reason));\n return false;\n } finally {\n if (generationRef.current === generation && operationRef.current === operation) {\n workingRef.current = false;\n setWorking(false);\n }\n }\n }, [request, sessionId]);\n\n useEffect(() => {\n if (\n !contextual ||\n sessionId === null ||\n sourceDirty ||\n storyExports === undefined ||\n storyExport.trim() === '' ||\n appPath.trim() === '' ||\n storyPath.trim() === ''\n )\n return;\n void rebuild();\n }, [appPath, contextual, rebuild, sessionId, sourceDirty, storyExport, storyExports, storyPath]);\n\n const image = useCallback(async (): Promise<ExportStoryPreviewImageView | undefined> => {\n const currentRequest = builtRequestRef.current;\n if (sessionId === null || workingRef.current || currentRequest === undefined) return undefined;\n const generation = generationRef.current;\n const operation = operationRef.current + 1;\n operationRef.current = operation;\n const requestSessionId = sessionId;\n workingRef.current = true;\n setWorking(true);\n setStatus('Rendering a fresh source-backed image…');\n try {\n const result = await exportPreviewImage(requestSessionId, currentRequest);\n if (generationRef.current !== generation || operationRef.current !== operation) return undefined;\n if (!result.ok) {\n setStatus(result.error);\n return undefined;\n }\n setStatus('Image rendered from the current source. Transient iframe interactions are not included.');\n return result.image;\n } catch (reason: unknown) {\n if (generationRef.current === generation && operationRef.current === operation) setStatus(errorText(reason));\n return undefined;\n } finally {\n if (generationRef.current === generation && operationRef.current === operation) {\n workingRef.current = false;\n setWorking(false);\n }\n }\n }, [sessionId]);\n\n async function prepareAnnotation(): Promise<void> {\n const generation = generationRef.current;\n const result = await image();\n if (result === undefined || generationRef.current !== generation) return;\n setAnnotationImage(result);\n setAnnotationRect(undefined);\n setStatus('Annotation image ready. Drag a region or comment on the whole preview.');\n }\n\n useEffect(() => {\n if (onAnnotationCandidate === undefined) return;\n if (activeTool === 'select') {\n annotationExportRef.current = '';\n setAnnotationImage(undefined);\n setAnnotationStart(undefined);\n setAnnotationRect(undefined);\n return;\n }\n if (\n preview === undefined ||\n annotationImage !== undefined ||\n working ||\n annotationExportRef.current === preview.handle\n )\n return;\n const generation = generationRef.current;\n void image().then((result) => {\n if (result === undefined || generationRef.current !== generation) return;\n annotationExportRef.current = preview.handle;\n setAnnotationImage(result);\n setStatus('Frozen source-backed image ready for Author annotations.');\n });\n }, [activeTool, annotationImage, image, onAnnotationCandidate, preview, working]);\n\n function updateAnnotation(event: ReactPointerEvent<HTMLDivElement>): void {\n if (annotationStart === undefined) return;\n const end = point(event);\n setAnnotationRect(normalizedAnnotationRect(annotationStart, end));\n }\n\n function authorCandidate(\n location: PreviewPoint,\n rect?: PreviewAnnotationRect,\n points?: readonly PreviewPoint[],\n ): void {\n if (annotationImage === undefined || onAnnotationCandidate === undefined || builtRequest === undefined) return;\n const binary = atob(annotationImage.data);\n const bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));\n const evidence = new Blob([bytes], { type: annotationImage.mimeType });\n const thumbnailUrl = URL.createObjectURL(evidence);\n try {\n onAnnotationCandidate({\n mode: rect === undefined ? 'point' : 'region',\n point: location,\n ...(rect === undefined ? {} : { rect }),\n ...(points === undefined ? {} : { stroke: points.map((point) => ({ ...point })) }),\n preview: {\n version: 1,\n provider: 'style-system',\n projectPath: builtRequest.appPath,\n storyPath: annotationImage.storyPath,\n storyExport: annotationImage.storyExport,\n buildRevision: annotationImage.sourceSha256,\n viewport: { width: annotationImage.width, height: annotationImage.height },\n sources: [{ path: annotationImage.storyPath, sha256: annotationImage.sourceSha256 }],\n },\n evidence,\n thumbnailUrl,\n });\n } catch (reason) {\n URL.revokeObjectURL(thumbnailUrl);\n setStatus(errorText(reason));\n }\n }\n\n const multipleExports = storyExports !== undefined && storyExports.length > 1;\n const previewVisible = preview !== undefined;\n const authorAnnotationActive = onAnnotationCandidate !== undefined && activeTool !== 'select';\n useEffect(() => {\n setStroke([]);\n setAnnotationStart(undefined);\n pointers.current.clear();\n pinch.current = undefined;\n pan.current = undefined;\n }, [activeTool, annotationImage?.sourceSha256]);\n\n return (\n <section className=\"flex h-full min-h-0 min-w-0 flex-1 flex-col gap-3 p-3\" data-testid=\"style-system-preview-panel\">\n {contextual ? (\n <header className=\"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-doom-dim\">\n <span>\n Story: <strong className=\"text-doom-text\">{storyPath || sourcePath}</strong>\n </span>\n <span>\n Project: <strong className=\"text-doom-text\">{appPath || 'resolving…'}</strong>\n </span>\n {multipleExports ? (\n <label className=\"flex items-center gap-1\">\n Export\n <select\n className=\"rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n value={storyExport}\n aria-label=\"story export\"\n onChange={(event) => {\n setStoryExport(event.target.value);\n builtRequestRef.current = undefined;\n setBuiltRequest(undefined);\n setAnnotationImage(undefined);\n setAnnotationRect(undefined);\n }}\n >\n {storyExports.map((entry) => (\n <option key={entry.exportName} value={entry.exportName}>\n {entry.label ?? entry.exportName}\n </option>\n ))}\n </select>\n </label>\n ) : storyExport !== '' ? (\n <span>\n Export: <strong className=\"text-doom-text\">{storyExport}</strong>\n </span>\n ) : null}\n </header>\n ) : (\n <header className=\"grid gap-2 md:grid-cols-3\">\n <label className=\"grid gap-1 text-xs text-doom-dim\">\n Project path\n <input\n className=\"rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n value={appPath}\n onChange={(event) => setAppPath(event.target.value)}\n />\n </label>\n <label className=\"grid gap-1 text-xs text-doom-dim\">\n Story file\n <input\n className=\"rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n placeholder=\"packages/ui/Button.stories.tsx\"\n value={storyPath}\n onChange={(event) => {\n setStoryPath(event.target.value);\n setStoryExports(undefined);\n }}\n />\n </label>\n <label className=\"grid gap-1 text-xs text-doom-dim\">\n Story export\n {storyExports === undefined ? (\n <input\n className=\"rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n value={storyExport}\n onChange={(event) => setStoryExport(event.target.value)}\n />\n ) : (\n <select\n className=\"rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n value={storyExport}\n onChange={(event) => setStoryExport(event.target.value)}\n >\n <option value=\"\">Choose an export</option>\n {storyExports.map((entry) => (\n <option key={entry.exportName} value={entry.exportName}>\n {entry.label ?? entry.exportName}\n </option>\n ))}\n </select>\n )}\n </label>\n </header>\n )}\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button\n disabled={\n sessionId === null ||\n working ||\n sourceDirty ||\n request.storyPath.trim() === '' ||\n request.storyExport.trim() === ''\n }\n onClick={() => void rebuild()}\n >\n {previewVisible ? 'Refresh preview' : 'Build preview'}\n </Button>\n <Button\n variant=\"outline\"\n disabled={preview === undefined || working}\n onClick={() => void image().then((result) => result && imageDownload(result.data, result.storyExport))}\n >\n Export PNG\n </Button>\n {onAnnotationCandidate === undefined ? (\n <Button\n variant=\"outline\"\n disabled={preview === undefined || working}\n onClick={() => void prepareAnnotation()}\n >\n Prepare annotation\n </Button>\n ) : null}\n <label className=\"flex items-center gap-1 text-xs text-doom-dim\">\n <input type=\"checkbox\" checked={darkMode} onChange={(event) => setDarkMode(event.target.checked)} /> Dark mode\n </label>\n <output className=\"text-xs text-doom-dim\" aria-live=\"polite\">\n {status}\n </output>\n </div>\n {sourceDirty ? (\n <p data-testid=\"style-system-preview-dirty\" className=\"text-xs text-doom-yellow\">\n Save changes to preview. Preview uses saved source.\n </p>\n ) : null}\n {preview === undefined ? (\n <div className=\"grid min-h-48 place-items-center rounded border border-dashed border-doom-border text-sm text-doom-faint\">\n No preview built.\n </div>\n ) : authorAnnotationActive && annotationImage !== undefined ? (\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden rounded border border-doom-border bg-doom-deep\">\n <div className=\"flex items-center gap-2 p-2\" role=\"group\" aria-label=\"Preview zoom\">\n <Button\n variant=\"outline\"\n className=\"min-h-11 min-w-11\"\n aria-label=\"Zoom out\"\n onClick={() => setZoom((value) => Math.max(1, value / 1.5))}\n >\n −\n </Button>\n <output className=\"text-xs text-doom-dim\">{Math.round(zoom * 100)}%</output>\n <Button\n variant=\"outline\"\n className=\"min-h-11 min-w-11\"\n aria-label=\"Zoom in\"\n onClick={() => setZoom((value) => Math.min(8, value * 1.5))}\n >\n +\n </Button>\n <Button variant=\"outline\" className=\"min-h-11\" aria-label=\"Fit preview\" onClick={() => setZoom(1)}>\n Fit\n </Button>\n </div>\n <div ref={imageScroll} className=\"min-h-0 flex-1 overflow-auto\">\n <div\n className=\"relative w-fit max-w-full overflow-hidden\"\n style={{ zoom, touchAction: 'none' }}\n aria-label={\n activeTool === 'comment'\n ? 'Click to place an annotation point'\n : activeTool === 'draw'\n ? 'Draw a feedback location mark'\n : activeTool === 'pan'\n ? 'Drag to pan preview'\n : 'Drag to mark an annotation region'\n }\n data-testid=\"style-system-author-annotation-overlay\"\n onPointerDown={(event) => {\n if (pendingCandidate) return;\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });\n event.currentTarget.setPointerCapture(event.pointerId);\n if (pointers.current.size === 2) {\n setStroke([]);\n setAnnotationStart(undefined);\n const [a, b] = [...pointers.current.values()];\n pinch.current = { distance: Math.hypot(a!.x - b!.x, a!.y - b!.y), zoom };\n return;\n }\n if (activeTool === 'pan') {\n const container = imageScroll.current;\n if (container)\n pan.current = {\n x: event.clientX,\n y: event.clientY,\n left: container.scrollLeft,\n top: container.scrollTop,\n };\n return;\n }\n if (activeTool !== 'mark' && activeTool !== 'comment' && activeTool !== 'draw') return;\n setGesture(event.pointerId);\n if (activeTool === 'draw') setStroke([point(event)]);\n const start = point(event);\n setAnnotationStart(start);\n setAnnotationRect(activeTool === 'mark' ? { ...start, width: 0, height: 0 } : undefined);\n }}\n onPointerMove={(event) => {\n if (pointers.current.has(event.pointerId))\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });\n if (pinch.current !== undefined && pointers.current.size >= 2) {\n const [a, b] = [...pointers.current.values()];\n if (pinch.current.distance > 0)\n setZoom(\n Math.max(\n 1,\n Math.min(\n 8,\n (pinch.current.zoom * Math.hypot(a!.x - b!.x, a!.y - b!.y)) / pinch.current.distance,\n ),\n ),\n );\n return;\n }\n if (pan.current !== undefined && activeTool === 'pan') {\n const container = imageScroll.current;\n if (container) {\n container.scrollLeft = pan.current.left + pan.current.x - event.clientX;\n container.scrollTop = pan.current.top + pan.current.y - event.clientY;\n }\n return;\n }\n if (gesture !== event.pointerId) return;\n if (activeTool === 'mark') updateAnnotation(event);\n if (activeTool === 'draw')\n setStroke((points) => (points.length >= 128 ? points : [...points, point(event)]));\n }}\n onPointerUp={(event) => {\n pointers.current.delete(event.pointerId);\n if (pinch.current !== undefined || pan.current !== undefined) {\n if (pointers.current.size < 2) pinch.current = undefined;\n pan.current = undefined;\n return;\n }\n const start = annotationStart;\n if (start === undefined || gesture !== event.pointerId) return;\n if (activeTool === 'draw') {\n const points = stroke.length >= 128 ? stroke : [...stroke, point(event)];\n setStroke([]);\n setAnnotationStart(undefined);\n if (points.length < 2 || !points.some((item) => item.x !== points[0]?.x || item.y !== points[0]?.y))\n return;\n const x = Math.min(...points.map((item) => item.x));\n const y = Math.min(...points.map((item) => item.y));\n const rect = {\n x: Math.min(x, 0.999),\n y: Math.min(y, 0.999),\n width: Math.max(0.001, Math.max(...points.map((item) => item.x)) - x),\n height: Math.max(0.001, Math.max(...points.map((item) => item.y)) - y),\n };\n authorCandidate(points[0]!, rect, points);\n return;\n }\n const end = point(event);\n setAnnotationStart(undefined);\n const location = previewAnnotationLocation(activeTool === 'comment' ? 'comment' : 'mark', start, end);\n if (location === null) return;\n setAnnotationRect(location.mode === 'region' ? location.rect : undefined);\n authorCandidate(location.point, location.mode === 'region' ? location.rect : undefined);\n }}\n onPointerCancel={() => {\n setAnnotationStart(undefined);\n setAnnotationRect(undefined);\n setStroke([]);\n pointers.current.clear();\n pinch.current = undefined;\n pan.current = undefined;\n }}\n >\n <img\n className=\"block max-h-full max-w-full select-none\"\n src={`data:${annotationImage.mimeType};base64,${annotationImage.data}`}\n alt=\"Frozen source-backed story render for Author annotation\"\n draggable={false}\n />\n {displayedAnnotations.map((annotation) =>\n annotation.stroke !== undefined ? (\n <div\n key={annotation.ordinal}\n data-author-stroke={annotation.ordinal}\n className=\"pointer-events-none absolute inset-0\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"absolute inset-0 h-full w-full text-doom-yellow\"\n viewBox=\"0 0 1000 1000\"\n preserveAspectRatio=\"none\"\n >\n <polyline\n points={annotation.stroke\n .map((point) => `${String(point.x * 1000)},${String(point.y * 1000)}`)\n .join(' ')}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n <span\n className=\"absolute flex h-5 min-w-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-doom-yellow px-1 text-2xs font-bold text-doom-deep\"\n style={{\n left: `${String(annotation.stroke[0]!.x * 100)}%`,\n top: `${String(annotation.stroke[0]!.y * 100)}%`,\n }}\n >\n {annotation.ordinal}\n </span>\n </div>\n ) : annotation.mode === 'point' || annotation.rect === undefined ? (\n <span\n key={annotation.ordinal}\n data-author-point={annotation.ordinal}\n className=\"pointer-events-none absolute z-10 flex h-5 min-w-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 border-doom-deep bg-doom-yellow px-1 text-2xs font-bold text-doom-deep\"\n style={{\n left: `${String(annotation.point.x * 100)}%`,\n top: `${String(annotation.point.y * 100)}%`,\n }}\n >\n {annotation.ordinal}\n </span>\n ) : (\n <div\n key={annotation.ordinal}\n data-author-region={annotation.ordinal}\n className=\"pointer-events-none absolute border border-doom-yellow bg-doom-yellow/10\"\n style={{\n left: `${String(annotation.rect.x * 100)}%`,\n top: `${String(annotation.rect.y * 100)}%`,\n width: `${String(annotation.rect.width * 100)}%`,\n height: `${String(annotation.rect.height * 100)}%`,\n }}\n >\n <span className=\"bg-doom-yellow text-doom-deep\">{annotation.ordinal}</span>\n </div>\n ),\n )}\n {stroke.length < 2 ? null : (\n <svg\n aria-hidden=\"true\"\n data-testid=\"style-system-author-stroke-selection\"\n className=\"pointer-events-none absolute inset-0 h-full w-full text-doom-red\"\n viewBox=\"0 0 1000 1000\"\n preserveAspectRatio=\"none\"\n >\n <polyline\n points={stroke.map((point) => `${String(point.x * 1000)},${String(point.y * 1000)}`).join(' ')}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )}\n {annotationRect === undefined ? null : (\n <div\n className=\"pointer-events-none absolute border-2 border-red-500 bg-red-500/10\"\n style={{\n left: `${String(annotationRect.x * 100)}%`,\n top: `${String(annotationRect.y * 100)}%`,\n width: `${String(annotationRect.width * 100)}%`,\n height: `${String(annotationRect.height * 100)}%`,\n }}\n />\n )}\n </div>\n </div>\n </div>\n ) : (\n <iframe\n key={preview.handle}\n title={`${preview.storyExport} story preview`}\n sandbox=\"allow-scripts\"\n referrerPolicy=\"no-referrer\"\n srcDoc={isolatedPreviewHtml(preview.html)}\n className=\"min-h-0 flex-1 rounded border border-doom-border bg-white\"\n />\n )}\n {annotationImage === undefined || onAnnotationCandidate !== undefined ? null : (\n <div className=\"grid gap-2\">\n <div\n className=\"relative max-h-80 w-fit max-w-full touch-none overflow-hidden rounded border border-doom-border\"\n aria-label=\"Drag to mark an annotation region\"\n onPointerDown={(event) => {\n event.currentTarget.setPointerCapture(event.pointerId);\n const start = point(event);\n setAnnotationStart(start);\n setAnnotationRect({ ...start, width: 0, height: 0 });\n }}\n onPointerMove={updateAnnotation}\n onPointerUp={(event) => {\n updateAnnotation(event);\n setAnnotationStart(undefined);\n }}\n >\n <img\n className=\"block max-h-80 max-w-full select-none\"\n src={`data:${annotationImage.mimeType};base64,${annotationImage.data}`}\n alt=\"Fresh source-backed story render for annotation\"\n draggable={false}\n />\n {annotationRect === undefined ? null : (\n <div\n className=\"pointer-events-none absolute border-2 border-red-500 bg-red-500/10\"\n style={{\n left: `${String(annotationRect.x * 100)}%`,\n top: `${String(annotationRect.y * 100)}%`,\n width: `${String(annotationRect.width * 100)}%`,\n height: `${String(annotationRect.height * 100)}%`,\n }}\n />\n )}\n </div>\n <p className=\"text-xs text-doom-faint\">\n This image is rebuilt from source and does not preserve transient iframe interactions.\n </p>\n </div>\n )}\n {preview === undefined || onAnnotationCandidate !== undefined ? null : (\n <div className=\"flex gap-2\">\n <label className=\"grid min-w-0 flex-1 gap-1 text-xs text-doom-dim\">\n AI design feedback\n <textarea\n className=\"min-h-20 rounded border border-doom-border bg-doom-bg px-2 py-1 text-doom-text\"\n value={feedback}\n onChange={(event) => setFeedback(event.target.value)}\n />\n </label>\n <Button\n className=\"self-end\"\n variant=\"outline\"\n disabled={working || submitCapture === undefined || feedback.trim() === '' || annotationImage === undefined}\n onClick={() => {\n if (submitCapture === undefined || annotationImage === undefined) return;\n const location =\n annotationRect === undefined\n ? 'Whole preview'\n : `Region: x=${annotationRect.x.toFixed(3)}, y=${annotationRect.y.toFixed(3)}, width=${annotationRect.width.toFixed(3)}, height=${annotationRect.height.toFixed(3)}`;\n const generation = generationRef.current;\n void submitCapture({\n ...annotationImage,\n context: {\n kind: 'author-capture',\n source: 'style-system',\n id: crypto.randomUUID(),\n label: `${annotationImage.storyPath}#${annotationImage.storyExport}`,\n content: [\n 'Edit the underlying story or component source, never the generated preview HTML.',\n `Project: ${builtRequest?.appPath ?? appPath}`,\n `Story: ${annotationImage.storyPath}#${annotationImage.storyExport}`,\n `Story source sha256: ${annotationImage.sourceSha256}`,\n `Source-backed image revision: ${annotationImage.sourceSha256}`,\n location,\n `Feedback: ${feedback.trim()}`,\n 'After editing, rebuild this preview before treating it as visually verified.',\n ].join('\\n'),\n },\n })\n .then(() => {\n if (generationRef.current !== generation) return;\n setStatus('Feedback and the frozen source-backed annotation image were submitted to the agent.');\n setFeedback('');\n })\n .catch((reason: unknown) => {\n if (generationRef.current === generation) setStatus(errorText(reason));\n });\n }}\n >\n Send to AI\n </Button>\n </div>\n )}\n </section>\n );\n}\n","import type { TransientTab } from '@agimon-ai/doompi-core/web';\n\nimport type { StoryPreviewSeed } from '../../../../../types/previewApi';\nimport { StoryPreviewPanel } from './StoryPreviewPanel';\n\nfunction sourceKey(path: string): string {\n let hash = 2_166_136_261;\n for (const character of path) hash = Math.imul(hash ^ character.codePointAt(0)!, 16_777_619);\n return (hash >>> 0).toString(36);\n}\n\nexport function storyPreviewTab(seed?: StoryPreviewSeed): TransientTab {\n const sourcePath = seed?.source?.path;\n return {\n id: sourcePath === undefined ? 'style-system-story-preview' : `style-system-story-preview-${sourceKey(sourcePath)}`,\n label: 'Story preview',\n panel: (props) => <StoryPreviewPanel {...props} seed={seed} />,\n retainComposer: true,\n };\n}\n","import { defineFill } from '@agimon-ai/doompi-core/web';\n\nimport { storyPreviewTab } from '../_components/StoryPreviewLauncher';\nimport { StoryPreviewPanel } from '../_components/StoryPreviewPanel';\n\nexport default defineFill({\n slot: 'author.preview-action',\n id: 'style-system',\n data: {\n version: 1 as const,\n label: 'Preview',\n detail: 'Build, inspect, refresh, and send source-targeted visual feedback.',\n supportsSource: (source: { kind?: string }) => source.kind === 'story-preview',\n embeddedPanel: StoryPreviewPanel,\n createTab: ({ source }: { source?: { path: string; hasUnsavedChanges: boolean } }) =>\n storyPreviewTab(source === undefined ? undefined : { source }),\n },\n});\n","// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/doompi-core/web';\n\nimport fillStyleSystem from '../src/extensions/workspaces/sessions/(frontend)/fill/StyleSystem.author.preview-action.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'style-system',\n session: {\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'author.preview-action', id: 'style-system' }, fillStyleSystem)]; },\n },\n});\n"],"mappings":";;;;;;AASA,IAAA,oBAAe,gBAAgB;CAC7B,UAAU;EACR,QAAQ;EACR,MAAM;EACN,UAAU,YAAsC;CAClD;CACA,OAAO;EACL,QAAQ;EACR,MAAM;EACN,UAAU,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Y,YAAY;OAC1C,UAAU,qFAAqF;OAC/F,YAAY,EAAE;MAChB,CAAC,CAAC,CACD,OAAO,WAAoB;OAC1B,IAAI,cAAc,YAAY,YAAY,UAAU,UAAU,MAAM,CAAC;MACvE,CAAC;KACL;KACD,UAAA;IAEO,CAAA,CACL;;EAEA;;AAEb;;;ACv3BA,SAAS,UAAU,MAAsB;CACvC,IAAI,OAAO;CACX,KAAK,MAAM,aAAa,MAAM,OAAO,KAAK,KAAK,OAAO,UAAU,YAAY,CAAC,GAAI,QAAU;CAC3F,QAAQ,SAAS,EAAA,CAAG,SAAS,EAAE;AACjC;AAEA,SAAgB,gBAAgB,MAAuC;CACrE,MAAM,aAAa,MAAM,QAAQ;CACjC,OAAO;EACL,IAAI,eAAe,KAAA,IAAY,+BAA+B,8BAA8B,UAAU,UAAU;EAChH,OAAO;EACP,QAAQ,UAAU,oBAAC,mBAAD;GAAmB,GAAI;GAAa;EAAO,CAAA;EAC7D,gBAAgB;CAClB;AACF;;;ACdA,IAAA,gDAAe,WAAW;CACxB,MAAM;CACN,IAAI;CACJ,MAAM;EACJ,SAAS;EACT,OAAO;EACP,QAAQ;EACR,iBAAiB,WAA8B,OAAO,SAAS;EAC/D,eAAe;EACf,YAAY,EAAE,aACZ,gBAAgB,WAAW,KAAA,IAAY,KAAA,IAAY,EAAE,OAAO,CAAC;CACjE;AACF,CAAC;;;ACZD,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,SAAS,EACP,IAAI,QAAyC;EAAE,OAAO,CAAC,IAAI;GAAE,MAAM;GAAyB,IAAI;EAAe,GAAGC,6CAAe,CAAC;CAAG,EACvI;AACF,CAAC"}
package/dist/index.cjs ADDED
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_storyPreview = require("./storyPreview-D-hGhlig.cjs");
3
+ const require_designCheck = require("./designCheck-zx4PsRvE.cjs");
4
+ exports.StoryPreviewService = require_storyPreview.StoryPreviewService;
5
+ exports.checkDesignTarget = require_designCheck.checkDesignTarget;
6
+ exports.extractStoryExports = require_storyPreview.extractStoryExports;
7
+ exports.readDesignTarget = require_designCheck.readDesignTarget;
8
+ exports.verifyDesignReport = require_designCheck.verifyDesignReport;
@@ -0,0 +1,171 @@
1
+ import { BaseBundlerService, ComponentRendererService, DesignSystemConfig } from "@agimon-ai/style-system";
2
+ //#region src/services/designCheck/index.d.ts
3
+ interface DesignTargetManifest {
4
+ version: 1;
5
+ appPath: string;
6
+ storyPath: string;
7
+ storyExport: string;
8
+ sourceRoots?: readonly string[];
9
+ styleFiles?: readonly string[];
10
+ principleDocuments?: readonly string[];
11
+ managedTokens?: readonly string[];
12
+ managedTokenPrefixes?: readonly string[];
13
+ }
14
+ interface DesignFinding {
15
+ kind: 'policy-violation' | 'unsupported-token' | 'unresolved';
16
+ code: string;
17
+ message: string;
18
+ filePath?: string;
19
+ line?: number;
20
+ value?: string;
21
+ }
22
+ interface DesignFingerprint {
23
+ path: string;
24
+ sha256: string;
25
+ bytes: number;
26
+ }
27
+ interface DesignCheckReport {
28
+ version: 1;
29
+ status: 'ready' | 'not-ready' | 'incomplete';
30
+ target: DesignTargetManifest;
31
+ fingerprints: readonly DesignFingerprint[];
32
+ violations: readonly DesignFinding[];
33
+ recognized: readonly {
34
+ value: string;
35
+ filePath: string;
36
+ line: number;
37
+ }[];
38
+ unresolved: readonly DesignFinding[];
39
+ coverage: {
40
+ filesChecked: number;
41
+ bytesChecked: number;
42
+ limits: {
43
+ maxFiles: number;
44
+ maxFileBytes: number;
45
+ maxTotalBytes: number;
46
+ };
47
+ classValidation: 'static-extraction-only';
48
+ tokenValidation: 'declared-contract' | 'prefixes-only' | 'not-configured';
49
+ };
50
+ }
51
+ interface DesignVerificationResult {
52
+ current: boolean;
53
+ stalePaths: readonly string[];
54
+ report: DesignCheckReport;
55
+ }
56
+ export declare function readDesignTarget(filePath: string): Promise<DesignTargetManifest>;
57
+ export declare function checkDesignTarget(target: DesignTargetManifest, workspaceRoot: string): Promise<DesignCheckReport>;
58
+ export declare function verifyDesignReport(reportPath: string, workspaceRoot: string): Promise<DesignVerificationResult>;
59
+ //#endregion
60
+ //#region src/types/previewApi.d.ts
61
+ declare const STYLE_SYSTEM_PREVIEW_BASE_PATH = "style-system-preview";
62
+ interface StoryPreviewSeed {
63
+ source?: {
64
+ path: string;
65
+ hasUnsavedChanges: boolean;
66
+ kind?: string;
67
+ revision?: number;
68
+ sourceSha256?: string;
69
+ };
70
+ }
71
+ interface StoryPreviewMetadataRequest {
72
+ storyPath: string;
73
+ appPath?: string;
74
+ }
75
+ interface StoryPreviewExport {
76
+ exportName: string;
77
+ label?: string;
78
+ }
79
+ interface StoryPreviewMetadataView {
80
+ storyPath: string;
81
+ appPath: string;
82
+ projectResolution: 'explicit' | 'config' | 'package' | 'workspace';
83
+ exports: readonly StoryPreviewExport[];
84
+ }
85
+ interface BuildStoryPreviewRequest {
86
+ appPath: string;
87
+ storyPath: string;
88
+ storyExport: string;
89
+ darkMode?: boolean;
90
+ }
91
+ interface BuildStoryPreviewView {
92
+ handle: string;
93
+ html: string;
94
+ storyPath: string;
95
+ storyExport: string;
96
+ sourceSha256: string;
97
+ }
98
+ type ExportStoryPreviewImageRequest = BuildStoryPreviewRequest;
99
+ interface ExportStoryPreviewImageView {
100
+ data: string;
101
+ mimeType: 'image/png';
102
+ captureId: string;
103
+ width: number;
104
+ height: number;
105
+ storyPath: string;
106
+ storyExport: string;
107
+ sourceSha256: string;
108
+ }
109
+ interface DisposeStoryPreviewRequest {
110
+ handle: string;
111
+ }
112
+ interface DisposeStoryPreviewView {
113
+ disposed: boolean;
114
+ }
115
+ //#endregion
116
+ //#region src/services/storyPreview/type.d.ts
117
+ interface StoryPreviewBuildInput {
118
+ appPath: string;
119
+ storyPath: string;
120
+ storyExport: string;
121
+ args?: Record<string, unknown>;
122
+ darkMode?: boolean;
123
+ }
124
+ interface StoryPreviewBuildResult {
125
+ handle: string;
126
+ html: string;
127
+ storyPath: string;
128
+ storyExport: string;
129
+ sourceSha256: string;
130
+ }
131
+ interface StoryPreviewImageResult {
132
+ data: string;
133
+ mimeType: 'image/png';
134
+ captureId: string;
135
+ width: number;
136
+ height: number;
137
+ storyPath: string;
138
+ storyExport: string;
139
+ sourceSha256: string;
140
+ }
141
+ type StoryPreviewRenderer = Pick<ComponentRendererService, 'renderComponent' | 'dispose'>;
142
+ interface StoryPreviewServiceDependencies {
143
+ loadConfig(appPath: string): Promise<DesignSystemConfig>;
144
+ createBundler(config: DesignSystemConfig): BaseBundlerService;
145
+ createRenderer(config: DesignSystemConfig, appPath: string): StoryPreviewRenderer;
146
+ rendererTemporaryRoot(): string;
147
+ createHandle(): string;
148
+ }
149
+ //#endregion
150
+ //#region src/services/storyPreview/index.d.ts
151
+ /** Extracts named CSF candidates without evaluating workspace source. */
152
+ export declare function extractStoryExports(source: string): readonly StoryPreviewExport[];
153
+ /** Owns disposable static story-preview artifacts for one trusted workspace. */
154
+ export declare class StoryPreviewService {
155
+ private readonly root;
156
+ private readonly dependencies;
157
+ private readonly artifacts;
158
+ constructor(workspaceRoot: string, dependencies?: Partial<StoryPreviewServiceDependencies>);
159
+ metadata(input: StoryPreviewMetadataRequest): Promise<StoryPreviewMetadataView>;
160
+ private resolveProject;
161
+ private exactStory;
162
+ build(input: StoryPreviewBuildInput): Promise<StoryPreviewBuildResult>;
163
+ /** Renders a fresh source-backed PNG. This does not preserve transient iframe interaction state. */
164
+ exportImage(input: StoryPreviewBuildInput): Promise<StoryPreviewImageResult>;
165
+ dispose(handle: string): Promise<boolean>;
166
+ disposeAll(): Promise<void>;
167
+ private resolveContainedPath;
168
+ }
169
+ //#endregion
170
+ export type { BuildStoryPreviewRequest, BuildStoryPreviewView, DesignCheckReport, DesignFinding, DesignFingerprint, DesignTargetManifest, DesignVerificationResult, DisposeStoryPreviewRequest, DisposeStoryPreviewView, ExportStoryPreviewImageRequest, ExportStoryPreviewImageView, STYLE_SYSTEM_PREVIEW_BASE_PATH, StoryPreviewBuildInput, StoryPreviewBuildResult, StoryPreviewExport, StoryPreviewImageResult, StoryPreviewMetadataRequest, StoryPreviewMetadataView, StoryPreviewSeed, StoryPreviewServiceDependencies };
171
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/services/designCheck/index.ts","../src/types/previewApi.ts","../src/services/storyPreview/type.ts","../src/services/storyPreview/index.ts"],"mappings":";;UA2BiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA,QAAQ;EACR,uBAAuB;EACvB,qBAAqB;EACrB;IAAuB;IAAe;IAAkB;;EACxD,qBAAqB;EACrB;IACE;IACA;IACA;MAAU;MAAkB;MAAsB;;IAClD;IACA;;;UAIa;EACf;EACA;EACA,QAAQ;;wBAmUY,iBAAiB,mBAAmB,QAAQ;wBAI5C,kBACpB,QAAQ,sBACR,wBACC,QAAQ;wBAgKW,mBAAmB,oBAAoB,wBAAwB,QAAQ;;;cCpjBhF;UAEI;EACf;IACE;IACA;IACA;IACA;IACA;;;UAIa;EACf;EACA;;UAGe;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,kBAAkB;;UAGH;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;;KAGU,iCAAiC;UAE5B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;;UAGe;EACf;;;;UC5De;EACf;EACA;EACA;EACA,OAAO;EACP;;UAGe;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,uBAAuB,KAAK;UAEvB;EACf,WAAW,kBAAkB,QAAQ;EACrC,cAAc,QAAQ,qBAAqB;EAC3C,eAAe,QAAQ,oBAAoB,kBAAkB;EAC7D;EACA;;;;;wBC+Ec,oBAAoB,0BAA0B;;qBAqGjD;mBACM;mBACA;mBACA;EAEjB,YAAY,uBAAuB,eAAc,QAAQ;EAKnD,SAAS,OAAO,8BAA8B,QAAQ;UAe9C;UAuBA;EAYR,MAAM,OAAO,yBAAyB,QAAQ;;EAqD9C,YAAY,OAAO,yBAAyB,QAAQ;EAoDpD,QAAQ,iBAAiB;EAQzB,cAAc;UAIN"}
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { n as extractStoryExports, t as StoryPreviewService } from "./storyPreview-Dhejqhos.mjs";
2
+ import { n as readDesignTarget, r as verifyDesignReport, t as checkDesignTarget } from "./designCheck-7P9r9ijq.mjs";
3
+ export { StoryPreviewService, checkDesignTarget, extractStoryExports, readDesignTarget, verifyDesignReport };
@@ -0,0 +1,28 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ Object.defineProperty(exports, "__toESM", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return __toESM;
27
+ }
28
+ });