leadership_styles_inventorymain.tsx4 matches
41];
4243function shuffleArray(array) {
44const shuffled = [...array];
45for (let i = shuffled.length - 1; i > 0; i--) {
50}
5152function App() {
53const [questions, setQuestions] = useState([]);
54const [currentQuestion, setCurrentQuestion] = useState(0);
222}
223224function client() {
225createRoot(document.getElementById("root")).render(<App />);
226}
230}
231232export default async function server(request: Request): Promise<Response> {
233return new Response(`
234<html>
dailyScheduleTrackermain.tsx4 matches
236};
237238function AnalogueScheduleClock({
239schedule = defaultSchedule,
240todoList = defaultTodoList,
340}
341342function App() {
343return <AnalogueScheduleClock />;
344}
345346function client() {
347const rootElement = document.getElementById("root");
348if (rootElement) {
357}
358359export default async function server(request: Request): Promise<Response> {
360return new Response(
361`
transformEvalCodemain.tsx9 matches
2import ts from "npm:typescript";
34function createSourceFile(code: string) {
5return ts.createSourceFile(
6"index.tsx",
11}
1213function getInterestingChildren(node: ts.Node) {
14const children: ts.Node[] = [];
15node.forEachChild((c) => {
2021// From https://github.com/microsoft/TypeScript/blob/b3770e78527a379d2345412bbab5acc0bafe0090/src/compiler/utilitiesPublic.ts#L2313
22function isDeclarationStatementKind(kind: ts.SyntaxKind) {
23return (
24kind === ts.SyntaxKind.FunctionDeclaration
25|| kind === ts.SyntaxKind.MissingDeclaration
26|| kind === ts.SyntaxKind.ClassDeclaration
39// Returns true if `node` is a ECMAScript StatementListItem, otherwise false.
40// See §14.2 Block (https://tc39.es/ecma262/#sec-block) in the spec.
41function isESStatementListItem(node: ts.Node) {
42/*
43Some notes about the differences between the ECMAScript spec and what the
52return (
53(ts.isStatement(node) && !isDeclarationStatementKind(node.kind))
54|| ts.isFunctionDeclaration(node)
55|| ts.isVariableDeclaration(node)
56|| ts.isClassDeclaration(node)
58}
5960function hasModifier(node: ts.Node, kw: ts.SyntaxKind) {
61if (ts.canHaveModifiers(node)) {
62const modifiers = ts.getModifiers(node) ?? [];
68const { ExportKeyword, DeclareKeyword } = ts.SyntaxKind;
6970export function transform(code: string): string {
71const sourceFile = createSourceFile(code);
72const moduleItems = getInterestingChildren(sourceFile);
103if (ts.isVariableStatement(item)) {
104convertedCode.appendLeft(item.getStart(), "export ");
105} else if (ts.isFunctionDeclaration(item) || ts.isClassDeclaration(item)) {
106convertedCode.appendLeft(item.getStart(), "export ");
107} else if (ts.isExpressionStatement(item)) {
routineTrackerAppmain.tsx5 matches
21];
2223// Simple hash function for the password
24const simpleHash = (str) => {
25let hash = 0;
130};
131132function App() {
133const [completedTasks, setCompletedTasks] = useState([]);
134const [timerStates, setTimerStates] = useState(routineTasks.map(task => ({
149};
150151function fire(particleRatio, opts) {
152confetti({
153...defaults,
363}
364365function client() {
366createRoot(document.getElementById("root")).render(<App />);
367}
368if (typeof document !== "undefined") { client(); }
369370async function server(request: Request): Promise<Response> {
371return new Response(
372`
5import { renderToString } from "npm:react-dom/server";
67function StatusRow({ rows }) {
8return (
9<div className="w-full flex flex-col space-y-2">
28}
2930function StatusSection({ url, rows }) {
31const sectionRows = rows.filter(row => row[0] === url);
32const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
44}
4546export default async function(req: Request): Promise<Response> {
47const { rows } = await sqlite.execute(
48"select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",
isMyWebsiteDownmain.tsx1 match
6);
78export async function uptimeCheck(url: string) {
9let ok = true;
10let reason: string;
GDI_AITranslatormain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [germanText, setGermanText] = useState("");
7const [englishTranslation, setEnglishTranslation] = useState("");
61}
6263function client() {
64createRoot(document.getElementById("root")).render(<App />);
65}
69}
7071export default async function server(request: Request): Promise<Response> {
72return new Response(
73`
lovableVioletLandfowlmain.tsx5 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function Popup({ isOpen, onClose, content }) {
6const [convertedImages, setConvertedImages] = useState({});
7const [converting, setConverting] = useState({});
92}
9394function HTMLPreview({ html, isFullView, toggleView }) {
95return (
96<div className="html-preview-container">
111}
112113function App() {
114const [url, setUrl] = useState('');
115const [results, setResults] = useState(null);
305}
306307function client() {
308createRoot(document.getElementById("root")).render(<App />);
309}
313}
314315export default async function server(request: Request): Promise<Response> {
316const url = new URL(request.url);
317
imageToWebPConvertermain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [imageUrl, setImageUrl] = useState(null);
7const [webpUrl, setWebpUrl] = useState(null);
93}
9495function client() {
96createRoot(document.getElementById("root")).render(<App />);
97}
99if (typeof document !== "undefined") { client(); }
100101export default async function server(request: Request): Promise<Response> {
102return new Response(`
103<!DOCTYPE html>
steadfastCrimsonAlligatormain.tsx3 matches
4import { createRoot } from "https://esm.sh/react-dom/client";
56function App() {
7const [colors, setColors] = useState(['#ff0000', '#00ff00', '#0000ff']);
8const [positions, setPositions] = useState([
89}
9091function client() {
92createRoot(document.getElementById("root")).render(<App />);
93}
94if (typeof document !== "undefined") { client(); }
9596export default async function server(request: Request): Promise<Response> {
97return new Response(`
98<html>