skullcatclient.tsx3 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from "https://esm.sh/react@15";
3import { render } from "https://esm.sh/react-dom@15";
45import Skullcat from "./App.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { NewGameForm } from "/frontend/components/NewGameForm.tsx";
3import { PlayerForm } from "/frontend/components/PlayerForm.tsx";
4import { PlayerList } from "/frontend/components/PlayerList.tsx";
5import { Card, CARD_SETS, CardSet, Game, GameState, Player } from "/shared/types.ts";
6import { motion, Reorder } from "https://esm.sh/motion/react?deps=react@18.2.0&dev=true";
7import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0?dev";
89// Define the different views/routes
15onReorder: (items: Card[]) => void;
16allowDrag: boolean;
17renderItem: (item: Card, index: number) => React.ReactNode;
18className?: string;
19}
23const [draggedOverIndex, setDraggedOverIndex] = useState<number | null>(null);
2425const handleDragStart = (e: React.DragEvent<HTMLDivElement>, item: Card) => {
26if (!allowDrag) return;
27setDraggedItem(item);
31};
3233const handleDragOver = (e: React.DragEvent<HTMLDivElement>, index: number) => {
34e.preventDefault();
35if (!draggedItem) return;
37};
3839const handleDrop = (e: React.DragEvent<HTMLDivElement>, index: number) => {
40e.preventDefault();
41if (!draggedItem) return;
515const current = card.id === gameState.currentCard?.id;
516return (
517<React.Fragment key={card.id}>
518<Reorder.Item
519value={card}
537</motion.div>
538</Reorder.Item>
539</React.Fragment>
540);
541})}
skullcatPaused.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import { Block } from 'https://esm.sh/rebass@0.2.4'
4import Centered from './Centered.tsx'
1/** @jsxImportSource https://esm.sh/react@15 */
23import React from 'https://esm.sh/react@15'
4import {
5d,
skullcatTriangle.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import {
4d,
skullcatTachyons.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import Tachyon from './Tachyon.tsx'
4
skullcatTachyon.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import {
4d,
1/** @jsxImportSource https://esm.sh/react@15 */
23import React from 'https://esm.sh/react@15'
45import {
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import getFrame from './get-frame.tsx'
4import Frame from './Frame.tsx'
42}
4344class Stage extends React.Component {
45shouldComponentUpdate (nextProps) {
46return nextProps.step !== this.props.step
239)
240241const ghostFrame = flip ? React.cloneElement(frame) : false
242243return (
skullcatSkullRightMagenta.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@15 */
2import React from 'https://esm.sh/react@15'
3import SkullRight from './SkullRight.tsx'
4