Add emoji confetti bursts and component playground.

Support app.relay.emoji_confetti on jumbo emoji clicks with canvas physics,
per-emoji particle profiles, and a fixed overlay that does not affect scroll.
Also add a Vite playground for live component previews and theme hover preview.
This commit is contained in:
2026-07-29 20:40:36 +10:00
parent ea7642f0bb
commit 0da4f0d6cb
48 changed files with 3689 additions and 46 deletions

View File

@@ -0,0 +1,43 @@
/**
* Live preview harness — edit freely. Nothing is saved.
*
* - Import any Cinny module via `@cinny/...`
* - Use mocks / PlaygroundProviders from `@playground/mocks`
* - `export default` the component to render in the stage
*/
import { Message } from '@cinny/app/features/room/message';
import { MessageLayout } from '@cinny/app/state/settings';
import { Box, Text } from 'folds';
import { mocks } from '@playground/mocks';
export default function Preview() {
const room = mocks.room;
const mEvent = mocks.event;
return (
<Box direction="Column" gap="200" style={{ width: '100%', maxWidth: 520 }}>
<Text size="T200" priority="300">
Preview harness swap imports to any `@cinny/...` export
</Text>
<Message
room={room}
mEvent={mEvent}
collapse={false}
highlight={false}
messageLayout={MessageLayout.Modern}
messageSpacing="400"
canDelete
canSendReaction
canPinEvent
hour24Clock={false}
dateFormatString="D MMM YYYY"
onUserClick={() => undefined}
onUsernameClick={() => undefined}
onReplyClick={() => undefined}
onReactionToggle={() => undefined}
>
<Text style={{ margin: 0 }}>{mEvent.getContent().body}</Text>
</Message>
</Box>
);
}