GodinoMawabankqueries.ts4 matches
98`INSERT INTO ${KYC_TABLE} (
99user_id, date_of_birth, address, city, state, country, postal_code,
100document_type, document_id, document_image_url, selfie_image_url, status
101)
102VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
105kycData.userId, kycData.dateOfBirth, kycData.address, kycData.city,
106kycData.state, kycData.country, kycData.postalCode, kycData.documentType,
107kycData.documentId, kycData.documentImageUrl, kycData.selfieImageUrl, kycData.status
108]
109);
133documentType: row.document_type,
134documentId: row.document_id,
135documentImageUrl: row.document_image_url,
136selfieImageUrl: row.selfie_image_url,
137status: row.status as KYCStatus,
138submittedAt: row.submitted_at,
GodinoMawabankmigrations.ts2 matches
35document_type TEXT NOT NULL,
36document_id TEXT NOT NULL,
37document_image_url TEXT NOT NULL,
38selfie_image_url TEXT NOT NULL,
39status TEXT NOT NULL DEFAULT '${KYCStatus.PENDING}',
40submitted_at TEXT NOT NULL DEFAULT (datetime('now')),
GodinoMawabanktypes.ts2 matches
45documentType: DocumentType;
46documentId: string;
47documentImageUrl: string;
48selfieImageUrl: string;
49status: KYCStatus;
50submittedAt: string;
NPLLMindex.html1 match
6<title>NPLLM</title>
7<link rel="stylesheet" href="/frontend/style.css">
8<link rel="icon" href="/frontend/favicon.svg" type="image/svg+xml">
9<link
10rel="stylesheet"
NPLLMPackageItem.tsx1 match
50<span className="flex items-center">
51<ProfilePicture
52imageUrl={profilePictureUrl}
53author={item.author}
54avatarText={item.avatarText}
NPLLMSearchPage.tsx3 matches
54// Use the package name and avatarText as the prompt
55const prompt = `${pkg.name} ${pkg.avatarText} profile picture`;
56const imageUrl = await generateProfilePicture(prompt);
57if (imageUrl) {
58newProfilePictures[pkg.id] = imageUrl;
59}
60});
NPLLMProfilePicture.tsx18 matches
34interface ProfilePictureProps {
5imageUrl?: string;
6author: string;
7avatarText: string;
26body: JSON.stringify({
27prompt,
28image_size: "landscape_4_3",
29num_inference_steps: 4,
30num_images: 1,
31enable_safety_checker: true,
32sync_mode: true,
3637if (!response.ok) {
38throw new Error(`Failed to generate image: ${response.statusText}`);
39}
4041const data = await response.json();
42return data.images[0].url;
43} catch (error) {
44console.error("Error generating profile picture:", error);
4849export function ProfilePicture(
50{ imageUrl, author, avatarText, packageId }: ProfilePictureProps,
51) {
52const [profileImage, setProfileImage] = useState<string | undefined>(
53imageUrl,
54);
55const [isLoading, setIsLoading] = useState<boolean>(!imageUrl);
5657useEffect(() => {
58// If we already have an image URL, don't fetch a new one
59if (imageUrl) {
60setProfileImage(imageUrl);
61setIsLoading(false);
62return;
63}
6465// If we're already loading or have an image, don't fetch again
66if (!isLoading || profileImage) return;
6768// Generate a profile picture if we don't have one
71const url = await generateProfilePicture(prompt);
72if (url) {
73setProfileImage(url);
74}
75setIsLoading(false);
7778fetchProfilePicture();
79}, [imageUrl, packageId, avatarText, isLoading, profileImage]);
8081if (profileImage) {
82return (
83<img
84src={profileImage}
85alt={`${author} avatar`}
86className="w-6 h-6 rounded-full mr-2 object-cover"
untitled-1852index.ts19 matches
52".css": ["style", "text/css"],
53".edgecss": ["style", "text/css"],
54// images (raster)
55".png": ["image", "image/png"],
56".jpg": ["image", "image/jpeg"],
57".jpeg": ["image", "image/jpeg"],
58".gif": ["image", "image/gif"],
59".bmp": ["image", "image/bmp"],
60".webp": ["image", "image/webp"],
61".jxl": ["image", "image/jxl"],
62".tif": ["image", "image/tiff"],
63".tiff": ["image", "image/tiff"],
64// images (vector)
65".svg": ["vector", "image/svg+xml"],
66".eps": ["vector", "application/postscript"],
67// fonts
458mime: obj?.mime || "application/octet-stream",
459isText: isTextFile(ext, obj?.mime),
460isImage: isImageFile(ext, obj?.mime),
461isDocument: isDocumentFile(ext, obj?.mime),
462isViewable: isViewableFile(ext, obj?.mime),
525}
526527function isImageFile(ext: string, mime?: string): boolean {
528const imageExtensions = [
529".png", ".jpg", ".jpeg", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tif", ".tiff"
530];
531
532return imageExtensions.includes(ext.toLowerCase()) ||
533(mime ? mime.startsWith("image/") : false);
534}
535540];
541const docMimeTypes = [
542"text/html", "text/markdown", "image/svg+xml", "application/pdf",
543"application/msword", "application/vnd.openxmlformats-officedocument"
544];
549550function isViewableFile(ext: string, mime?: string): boolean {
551return isTextFile(ext, mime) || isImageFile(ext, mime) || isDocumentFile(ext, mime);
552}
553
untitled-1852index.html9 matches
53padding: 1rem;
54}
55.image-viewer {
56display: flex;
57justify-content: center;
59padding: 1rem;
60}
61.image-viewer img {
62max-width: 100%;
63max-height: 500px;
561// Add icon based on file type
562let icon = '📄';
563if (file.isImage) {
564icon = '🖼️';
565} else if (file.type === 'text') {
682currentFileType = ext;
683
684if (file.isImage) {
685// Display image
686const imageContainer = document.createElement('div');
687imageContainer.className = 'image-viewer';
688
689const blob = await response.blob();
694img.onload = () => URL.revokeObjectURL(url);
695
696imageContainer.appendChild(img);
697fileViewer.appendChild(imageContainer);
698
699// Hide view toggle
untitled-1852README.md1 match
3233- **Text Files**: Displayed with syntax highlighting using Prism.js
34- **Images**: Displayed in an image viewer
35- **Binary Files**: Displayed as metadata with download option
36