Device preview + responsive spacing in the Style panel

Style panel gets a real-viewport iframe preview (390/820/1280px) tied to the
breakpoint tab, reloaded after each edit, and spacing/gap controls per
breakpoint. The editor does not boot inside the preview frame. Mock and
tests mirror the new k6n layout template.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
matsandClaude Sonnet 5.5 committed 2026-11-01 11:02:20 +01:00
1 parent cb7a7a1fab
commit ec4212c113
7 files changed
+136 -9

No files matched your search

+2 -1
View File
@@ -25,7 +25,8 @@ describe('describeStyle', () => {
expect(byName('paddingTop')).toMatchObject({ kind: 'spacing', box: 'padding', side: 'top', overrides: 'padding', token: '--k6n-sp-{value}', inferred: false })
expect(byName('gap')).toMatchObject({ kind: 'gap', inferred: false })
expect(byName('flow').responsive).toEqual(['mobile', 'tablet', 'desktop'])
expect(byName('gap').responsive).toEqual([]) // spacing is not a breakpoint override (the template has no classes for it)
expect(byName('gap').responsive).toEqual(['mobile', 'tablet', 'desktop'])
expect(byName('padding').responsive).toEqual([]) // only declared per-side in the breakpoint def
expect(isWrapperSchema(layout)).toBe(true)
})