pizzaz-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,115 @@
1
+ import React from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import markers from "../pizzaz/markers.json";
4
+ import { PlusCircle, Star } from "lucide-react";
5
+ import { Button } from "@openai/apps-sdk-ui/components/Button";
6
+ import { Image } from "@openai/apps-sdk-ui/components/Image";
7
+
8
+ function App() {
9
+ const places = markers?.places || [];
10
+
11
+ return (
12
+ <div className="antialiased w-full text-black px-4 pb-2 border border-black/10 rounded-2xl sm:rounded-3xl overflow-hidden bg-white">
13
+ <div className="max-w-full">
14
+ <div className="flex flex-row items-center gap-4 sm:gap-4 border-b border-black/5 py-4">
15
+ <div
16
+ className="sm:w-18 w-16 aspect-square rounded-xl bg-cover bg-center"
17
+ style={{
18
+ backgroundImage:
19
+ "url(https://persistent.oaistatic.com/pizzaz/title.png)",
20
+ }}
21
+ ></div>
22
+ <div>
23
+ <div className="text-base sm:text-xl font-medium">
24
+ National Best Pizza List
25
+ </div>
26
+ <div className="text-sm text-black/60">
27
+ A ranking of the best pizzerias in the world
28
+ </div>
29
+ </div>
30
+ <div className="flex-auto hidden sm:flex justify-end pr-2">
31
+ <Button color="primary" variant="solid" size="md">
32
+ Save List
33
+ </Button>
34
+ </div>
35
+ </div>
36
+ <div className="min-w-full text-sm flex flex-col">
37
+ {places.slice(0, 7).map((place, i) => (
38
+ <div
39
+ key={place.id}
40
+ className="px-3 -mx-2 rounded-2xl hover:bg-black/5"
41
+ >
42
+ <div
43
+ style={{
44
+ borderBottom:
45
+ i === 7 - 1 ? "none" : "1px solid rgba(0, 0, 0, 0.05)",
46
+ }}
47
+ className="flex w-full items-center hover:border-black/0! gap-2"
48
+ >
49
+ <div className="py-3 pr-3 min-w-0 w-full sm:w-3/5">
50
+ <div className="flex items-center gap-3">
51
+ <Image
52
+ src={place.thumbnail}
53
+ alt={place.name}
54
+ className="h-10 w-10 sm:h-11 sm:w-11 rounded-lg object-cover ring ring-black/5"
55
+ />
56
+ <div className="w-3 text-end sm:block hidden text-sm text-black/40">
57
+ {i + 1}
58
+ </div>
59
+ <div className="min-w-0 sm:pl-1 flex flex-col items-start h-full">
60
+ <div className="font-medium text-sm sm:text-md truncate max-w-[40ch]">
61
+ {place.name}
62
+ </div>
63
+ <div className="mt-1 sm:mt-0.25 flex items-center gap-3 text-black/70 text-sm">
64
+ <div className="flex items-center gap-1">
65
+ <Star
66
+ strokeWidth={1.5}
67
+ className="h-3 w-3 text-black"
68
+ />
69
+ <span>
70
+ {place.rating?.toFixed
71
+ ? place.rating.toFixed(1)
72
+ : place.rating}
73
+ </span>
74
+ </div>
75
+ <div className="whitespace-nowrap sm:hidden">
76
+ {place.city || "–"}
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div className="hidden sm:block text-end py-2 px-3 text-sm text-black/60 whitespace-nowrap flex-auto">
83
+ {place.city || "–"}
84
+ </div>
85
+ <div className="py-2 whitespace-nowrap flex justify-end">
86
+ <Button
87
+ aria-label={`Add ${place.name}`}
88
+ color="secondary"
89
+ variant="ghost"
90
+ size="sm"
91
+ uniform
92
+ >
93
+ <PlusCircle strokeWidth={1.5} className="h-5 w-5" />
94
+ </Button>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ ))}
99
+ {places.length === 0 && (
100
+ <div className="py-6 text-center text-black/60">
101
+ No pizzerias found.
102
+ </div>
103
+ )}
104
+ </div>
105
+ <div className="sm:hidden px-0 pt-2 pb-2">
106
+ <Button color="primary" variant="solid" size="md" block>
107
+ Save List
108
+ </Button>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ );
113
+ }
114
+
115
+ createRoot(document.getElementById("pizzaz-list-root")).render(<App />);