1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4export const LoadingSpinner = () => (
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?dev";
3import { App } from "./components/App.tsx";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useRef, useState } from "https://esm.sh/react@18.2.0?dev";
3
4// Maximum number of images that can be uploaded
15
16 // Handle file selection
17 const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
18 if (e.target.files) {
19 processFiles(Array.from(e.target.files));
74
75 {/* Expose the file input ref for external access */}
76 {React.cloneElement(<></>, { fileInputRef })}
77 </div>
78 );
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4export function Home({ onLoginClick }: { onLoginClick: () => void }) {
123 </p>
124 <ul className="list-disc pl-5 space-y-1 text-gray-700 mb-4">
125 <li>React frontend with TypeScript</li>
126 <li>Hono API server backend</li>
127 <li>Tailwind CSS for styling</li>
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4interface ErrorDisplayProps {
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4// Type definitions
144 };
145
146 const handleCheckChange = (e: React.ChangeEvent<HTMLInputElement>) => {
147 onCheck(node.path, e.target.checked);
148 };
149
150 const handleNodeClick = (e: React.MouseEvent) => {
151 // Don't toggle checkbox if clicking on the expand/collapse arrow
152 if ((e.target as HTMLElement).classList.contains("toggle-expand")) {
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3
4export function CreateProjectModal({
20 if (!isOpen) return null;
21
22 const handleSubmit = async (e: React.FormEvent) => {
23 e.preventDefault();
24
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useState } from "https://esm.sh/react@18.2.0?dev";
3
4interface CreateBranchProps {
25 };
26
27 const handleSubmit = async (e: React.FormEvent) => {
28 e.preventDefault();
29
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?dev";
4import { useChatLogic } from "../hooks/useChatLogic.ts";
5import { useProjectFiles } from "../hooks/useProjectFiles.ts";
65
66 // Handle drag events for the entire page
67 const handleDragEnter = (e: React.DragEvent) => {
68 e.preventDefault();
69 e.stopPropagation();
71 };
72
73 const handleDragLeave = (e: React.DragEvent) => {
74 e.preventDefault();
75 e.stopPropagation();
84 };
85
86 const handleDragOver = (e: React.DragEvent) => {
87 e.preventDefault();
88 e.stopPropagation();
89 };
90
91 const handleDrop = (e: React.DragEvent) => {
92 e.preventDefault();
93 e.stopPropagation();
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { MessageItem } from "./MessageItem.tsx";
4import { ErrorDisplay } from "./ErrorDisplay.tsx";