nitrostack 1.0.54 → 1.0.56
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.
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +14 -9
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/widgets/hooks/index.d.ts +7 -0
- package/dist/widgets/hooks/index.d.ts.map +1 -0
- package/dist/widgets/hooks/index.js +7 -0
- package/dist/widgets/hooks/index.js.map +1 -0
- package/dist/widgets/hooks/use-display-mode.d.ts +11 -0
- package/dist/widgets/hooks/use-display-mode.d.ts.map +1 -0
- package/dist/widgets/hooks/use-display-mode.js +13 -0
- package/dist/widgets/hooks/use-display-mode.js.map +1 -0
- package/dist/widgets/hooks/use-max-height.d.ts +10 -0
- package/dist/widgets/hooks/use-max-height.d.ts.map +1 -0
- package/dist/widgets/hooks/use-max-height.js +13 -0
- package/dist/widgets/hooks/use-max-height.js.map +1 -0
- package/dist/widgets/hooks/use-openai-global.d.ts +12 -0
- package/dist/widgets/hooks/use-openai-global.d.ts.map +1 -0
- package/dist/widgets/hooks/use-openai-global.js +32 -0
- package/dist/widgets/hooks/use-openai-global.js.map +1 -0
- package/dist/widgets/hooks/use-theme.d.ts +10 -0
- package/dist/widgets/hooks/use-theme.d.ts.map +1 -0
- package/dist/widgets/hooks/use-theme.js +12 -0
- package/dist/widgets/hooks/use-theme.js.map +1 -0
- package/dist/widgets/hooks/use-widget-state.d.ts +18 -0
- package/dist/widgets/hooks/use-widget-state.d.ts.map +1 -0
- package/dist/widgets/hooks/use-widget-state.js +27 -0
- package/dist/widgets/hooks/use-widget-state.js.map +1 -0
- package/dist/widgets/hooks/useWidgetSDK.d.ts +47 -0
- package/dist/widgets/hooks/useWidgetSDK.d.ts.map +1 -0
- package/dist/widgets/hooks/useWidgetSDK.js +67 -0
- package/dist/widgets/hooks/useWidgetSDK.js.map +1 -0
- package/dist/widgets/index.d.ts +7 -1
- package/dist/widgets/index.d.ts.map +1 -1
- package/dist/widgets/index.js +11 -1
- package/dist/widgets/index.js.map +1 -1
- package/dist/widgets/runtime/WidgetLayout.d.ts +32 -0
- package/dist/widgets/runtime/WidgetLayout.d.ts.map +1 -0
- package/dist/widgets/runtime/WidgetLayout.js +143 -0
- package/dist/widgets/runtime/WidgetLayout.js.map +1 -0
- package/dist/widgets/runtime/widget-polyfill.d.ts +1 -0
- package/dist/widgets/runtime/widget-polyfill.d.ts.map +1 -0
- package/dist/widgets/runtime/widget-polyfill.js +28 -0
- package/dist/widgets/runtime/widget-polyfill.js.map +1 -0
- package/dist/widgets/sdk.d.ts +109 -0
- package/dist/widgets/sdk.d.ts.map +1 -0
- package/dist/widgets/sdk.js +221 -0
- package/dist/widgets/sdk.js.map +1 -0
- package/dist/widgets/types.d.ts +89 -0
- package/dist/widgets/types.d.ts.map +1 -0
- package/dist/widgets/types.js +8 -0
- package/dist/widgets/types.js.map +1 -0
- package/dist/widgets/utils/media-queries.d.ts +34 -0
- package/dist/widgets/utils/media-queries.d.ts.map +1 -0
- package/dist/widgets/utils/media-queries.js +42 -0
- package/dist/widgets/utils/media-queries.js.map +1 -0
- package/package.json +2 -2
- package/src/studio/app/chat/page.tsx +274 -137
- package/src/studio/app/globals.css +140 -64
- package/src/studio/branding.md +807 -0
- package/src/studio/components/WidgetRenderer.tsx +222 -16
- package/src/studio/lib/llm-service.ts +39 -39
- package/templates/typescript-oauth/.env.example +27 -0
- package/templates/typescript-oauth/README.md +226 -306
- package/templates/typescript-oauth/package-lock.json +4253 -0
- package/templates/typescript-oauth/package.json +10 -5
- package/templates/typescript-oauth/src/app.module.ts +39 -36
- package/templates/typescript-oauth/src/guards/oauth.guard.ts +0 -1
- package/templates/typescript-oauth/src/index.ts +22 -30
- package/templates/typescript-oauth/src/modules/flights/booking.tools.ts +323 -0
- package/templates/typescript-oauth/src/modules/flights/flights.module.ts +14 -0
- package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +231 -0
- package/templates/typescript-oauth/src/modules/flights/flights.resources.ts +215 -0
- package/templates/typescript-oauth/src/modules/flights/flights.tools.ts +457 -0
- package/templates/typescript-oauth/src/services/duffel.service.ts +285 -0
- package/templates/typescript-oauth/src/widgets/app/airport-search/page.tsx +270 -0
- package/templates/typescript-oauth/src/widgets/app/flight-details/page.tsx +261 -0
- package/templates/typescript-oauth/src/widgets/app/flight-search-results/page.tsx +378 -0
- package/templates/typescript-oauth/src/widgets/app/globals.css +167 -0
- package/templates/typescript-oauth/src/widgets/app/layout.tsx +6 -2
- package/templates/typescript-oauth/src/widgets/app/order-cancellation/page.tsx +207 -0
- package/templates/typescript-oauth/src/widgets/app/order-summary/page.tsx +245 -0
- package/templates/typescript-oauth/src/widgets/app/payment-confirmation/page.tsx +152 -0
- package/templates/typescript-oauth/src/widgets/app/seat-selection/page.tsx +486 -0
- package/templates/typescript-oauth/src/widgets/next-env.d.ts +5 -0
- package/templates/typescript-oauth/src/widgets/package-lock.json +155 -126
- package/templates/typescript-oauth/src/widgets/widget-manifest.json +374 -27
- package/templates/typescript-pizzaz/IMPLEMENTATION.md +98 -0
- package/templates/typescript-pizzaz/README.md +233 -0
- package/templates/typescript-pizzaz/package.json +31 -0
- package/templates/typescript-pizzaz/src/app.module.ts +28 -0
- package/templates/typescript-pizzaz/src/index.ts +30 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.data.ts +106 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.module.ts +11 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.service.ts +60 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.tools.ts +197 -0
- package/templates/typescript-pizzaz/src/widgets/app/layout.tsx +18 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-list/page.tsx +272 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-map/page.tsx +216 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-shop/page.tsx +374 -0
- package/templates/typescript-pizzaz/src/widgets/components/CompactShopCard.tsx +144 -0
- package/templates/typescript-pizzaz/src/widgets/components/PizzaCard.tsx +191 -0
- package/templates/typescript-pizzaz/src/widgets/package.json +30 -0
- package/templates/typescript-pizzaz/src/widgets/widget-manifest.json +253 -0
- package/templates/typescript-pizzaz/tsconfig.json +30 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.resources.ts +0 -1
- package/templates/typescript-starter/src/widgets/app/calculator-result/page.tsx +102 -56
- package/templates/typescript-starter/src/widgets/app/layout.tsx +6 -2
- package/templates/typescript-auth/AI_AGENT_CLI_REFERENCE.md +0 -702
- package/templates/typescript-auth/AI_AGENT_SDK_REFERENCE.md +0 -1260
- package/templates/typescript-auth/README.md +0 -402
- package/templates/typescript-auth/package.json +0 -36
- package/templates/typescript-auth/src/app.module.ts +0 -103
- package/templates/typescript-auth/src/db/database.ts +0 -160
- package/templates/typescript-auth/src/db/seed.ts +0 -374
- package/templates/typescript-auth/src/db/setup.ts +0 -87
- package/templates/typescript-auth/src/events/analytics.service.ts +0 -52
- package/templates/typescript-auth/src/events/notification.service.ts +0 -40
- package/templates/typescript-auth/src/filters/global-exception.filter.ts +0 -28
- package/templates/typescript-auth/src/guards/README.md +0 -75
- package/templates/typescript-auth/src/guards/jwt.guard.ts +0 -105
- package/templates/typescript-auth/src/health/database.health.ts +0 -41
- package/templates/typescript-auth/src/index.ts +0 -29
- package/templates/typescript-auth/src/interceptors/transform.interceptor.ts +0 -24
- package/templates/typescript-auth/src/middleware/logging.middleware.ts +0 -42
- package/templates/typescript-auth/src/modules/addresses/addresses.module.ts +0 -16
- package/templates/typescript-auth/src/modules/addresses/addresses.prompts.ts +0 -114
- package/templates/typescript-auth/src/modules/addresses/addresses.resources.ts +0 -40
- package/templates/typescript-auth/src/modules/addresses/addresses.tools.ts +0 -284
- package/templates/typescript-auth/src/modules/auth/auth.module.ts +0 -16
- package/templates/typescript-auth/src/modules/auth/auth.prompts.ts +0 -147
- package/templates/typescript-auth/src/modules/auth/auth.resources.ts +0 -84
- package/templates/typescript-auth/src/modules/auth/auth.tools.ts +0 -139
- package/templates/typescript-auth/src/modules/cart/cart.module.ts +0 -16
- package/templates/typescript-auth/src/modules/cart/cart.prompts.ts +0 -95
- package/templates/typescript-auth/src/modules/cart/cart.resources.ts +0 -44
- package/templates/typescript-auth/src/modules/cart/cart.tools.ts +0 -277
- package/templates/typescript-auth/src/modules/orders/orders.module.ts +0 -16
- package/templates/typescript-auth/src/modules/orders/orders.prompts.ts +0 -88
- package/templates/typescript-auth/src/modules/orders/orders.resources.ts +0 -48
- package/templates/typescript-auth/src/modules/orders/orders.tools.ts +0 -303
- package/templates/typescript-auth/src/modules/products/products.module.ts +0 -16
- package/templates/typescript-auth/src/modules/products/products.prompts.ts +0 -146
- package/templates/typescript-auth/src/modules/products/products.resources.ts +0 -98
- package/templates/typescript-auth/src/modules/products/products.tools.ts +0 -266
- package/templates/typescript-auth/src/pipes/validation.pipe.ts +0 -42
- package/templates/typescript-auth/src/services/database.service.ts +0 -90
- package/templates/typescript-auth/src/widgets/app/add-to-cart/page.tsx +0 -122
- package/templates/typescript-auth/src/widgets/app/address-added/page.tsx +0 -116
- package/templates/typescript-auth/src/widgets/app/address-deleted/page.tsx +0 -105
- package/templates/typescript-auth/src/widgets/app/address-list/page.tsx +0 -139
- package/templates/typescript-auth/src/widgets/app/address-updated/page.tsx +0 -153
- package/templates/typescript-auth/src/widgets/app/cart-cleared/page.tsx +0 -86
- package/templates/typescript-auth/src/widgets/app/cart-updated/page.tsx +0 -116
- package/templates/typescript-auth/src/widgets/app/categories/page.tsx +0 -134
- package/templates/typescript-auth/src/widgets/app/layout.tsx +0 -21
- package/templates/typescript-auth/src/widgets/app/login-result/page.tsx +0 -129
- package/templates/typescript-auth/src/widgets/app/order-confirmation/page.tsx +0 -231
- package/templates/typescript-auth/src/widgets/app/order-details/page.tsx +0 -225
- package/templates/typescript-auth/src/widgets/app/order-history/page.tsx +0 -218
- package/templates/typescript-auth/src/widgets/app/product-card/page.tsx +0 -121
- package/templates/typescript-auth/src/widgets/app/products-grid/page.tsx +0 -198
- package/templates/typescript-auth/src/widgets/app/shopping-cart/page.tsx +0 -187
- package/templates/typescript-auth/src/widgets/app/whoami/page.tsx +0 -165
- package/templates/typescript-auth/src/widgets/next.config.js +0 -38
- package/templates/typescript-auth/src/widgets/package.json +0 -18
- package/templates/typescript-auth/src/widgets/styles/ecommerce.ts +0 -169
- package/templates/typescript-auth/src/widgets/tsconfig.json +0 -28
- package/templates/typescript-auth/src/widgets/types/tool-data.ts +0 -141
- package/templates/typescript-auth/src/widgets/widget-manifest.json +0 -464
- package/templates/typescript-auth/tsconfig.json +0 -27
- package/templates/typescript-auth-api-key/AI_AGENT_CLI_REFERENCE.md +0 -701
- package/templates/typescript-auth-api-key/AI_AGENT_SDK_REFERENCE.md +0 -1260
- package/templates/typescript-auth-api-key/README.md +0 -485
- package/templates/typescript-auth-api-key/package.json +0 -21
- package/templates/typescript-auth-api-key/src/app.module.ts +0 -38
- package/templates/typescript-auth-api-key/src/guards/apikey.guard.ts +0 -47
- package/templates/typescript-auth-api-key/src/guards/multi-auth.guard.ts +0 -157
- package/templates/typescript-auth-api-key/src/index.ts +0 -47
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.module.ts +0 -12
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.prompts.ts +0 -73
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.resources.ts +0 -60
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.tools.ts +0 -71
- package/templates/typescript-auth-api-key/src/modules/demo/demo.module.ts +0 -18
- package/templates/typescript-auth-api-key/src/modules/demo/demo.tools.ts +0 -155
- package/templates/typescript-auth-api-key/src/modules/demo/multi-auth.tools.ts +0 -123
- package/templates/typescript-auth-api-key/src/widgets/app/calculator-operations/page.tsx +0 -133
- package/templates/typescript-auth-api-key/src/widgets/app/calculator-result/page.tsx +0 -134
- package/templates/typescript-auth-api-key/src/widgets/app/layout.tsx +0 -14
- package/templates/typescript-auth-api-key/src/widgets/package.json +0 -24
- package/templates/typescript-auth-api-key/src/widgets/widget-manifest.json +0 -48
- package/templates/typescript-auth-api-key/tsconfig.json +0 -23
- package/templates/typescript-oauth/OAUTH_SETUP.md +0 -592
- package/templates/typescript-oauth/src/modules/demo/demo.module.ts +0 -16
- package/templates/typescript-oauth/src/modules/demo/demo.tools.ts +0 -190
- package/templates/typescript-oauth/src/widgets/app/calculator-operations/page.tsx +0 -133
- package/templates/typescript-oauth/src/widgets/app/calculator-result/page.tsx +0 -134
- package/templates/typescript-oauth/src/widgets/out/404.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/WU9THacVqL52RZbrZOLS1/_buildManifest.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/WU9THacVqL52RZbrZOLS1/_ssgManifest.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/117-eb57c7ef86f964a4.js +0 -2
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/_not-found/page-dcb83ba3e4d0aafd.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/calculator-operations/page-b8913a740073ea8a.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/calculator-result/page-ddaaab2fce95dea2.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/layout-cbd3ebdc4ecc5247.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/fd9d1056-749e5812300142af.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/main-76df43fcef3db344.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/main-app-f9c40224d04023c5.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/webpack-100b9e646d9c912e.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-operations.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-operations.txt +0 -7
- package/templates/typescript-oauth/src/widgets/out/calculator-result.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-result.txt +0 -7
- package/templates/typescript-starter/src/widgets/app/calculator-operations/page.tsx +0 -133
- /package/templates/{typescript-auth-api-key → typescript-oauth}/src/health/system.health.ts +0 -0
- /package/templates/{typescript-auth-api-key → typescript-pizzaz}/src/widgets/next.config.js +0 -0
- /package/templates/{typescript-auth-api-key → typescript-pizzaz}/src/widgets/tsconfig.json +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useTheme, useWidgetState, useMaxHeight, useDisplayMode } from 'nitrostack/widgets';
|
|
4
|
+
import { Star, MapPin, Phone, Globe, Clock } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface PizzaShop {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
address: string;
|
|
11
|
+
coords: [number, number];
|
|
12
|
+
rating: number;
|
|
13
|
+
reviews: number;
|
|
14
|
+
priceLevel: 1 | 2 | 3;
|
|
15
|
+
cuisine: string[];
|
|
16
|
+
hours: { open: string; close: string };
|
|
17
|
+
phone: string;
|
|
18
|
+
website?: string;
|
|
19
|
+
image: string;
|
|
20
|
+
specialties: string[];
|
|
21
|
+
openNow: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface PizzaCardProps {
|
|
25
|
+
shop: PizzaShop;
|
|
26
|
+
onSelect?: (shop: PizzaShop) => void;
|
|
27
|
+
isFavorite?: boolean;
|
|
28
|
+
onToggleFavorite?: (shopId: string) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function PizzaCard({ shop, onSelect, isFavorite, onToggleFavorite }: PizzaCardProps) {
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
const isDark = theme === 'dark';
|
|
34
|
+
|
|
35
|
+
const priceSymbol = '$'.repeat(shop.priceLevel);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
onClick={() => onSelect?.(shop)}
|
|
40
|
+
style={{
|
|
41
|
+
background: isDark ? '#1a1a1a' : '#ffffff',
|
|
42
|
+
border: `1px solid ${isDark ? '#333' : '#e5e7eb'}`,
|
|
43
|
+
borderRadius: '12px',
|
|
44
|
+
overflow: 'hidden',
|
|
45
|
+
cursor: onSelect ? 'pointer' : 'default',
|
|
46
|
+
transition: 'all 0.2s',
|
|
47
|
+
boxShadow: isDark ? '0 2px 8px rgba(0,0,0,0.3)' : '0 2px 8px rgba(0,0,0,0.1)',
|
|
48
|
+
}}
|
|
49
|
+
onMouseEnter={(e) => {
|
|
50
|
+
if (onSelect) {
|
|
51
|
+
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
52
|
+
e.currentTarget.style.boxShadow = isDark
|
|
53
|
+
? '0 4px 12px rgba(0,0,0,0.4)'
|
|
54
|
+
: '0 4px 12px rgba(0,0,0,0.15)';
|
|
55
|
+
}
|
|
56
|
+
}}
|
|
57
|
+
onMouseLeave={(e) => {
|
|
58
|
+
if (onSelect) {
|
|
59
|
+
e.currentTarget.style.transform = 'translateY(0)';
|
|
60
|
+
e.currentTarget.style.boxShadow = isDark
|
|
61
|
+
? '0 2px 8px rgba(0,0,0,0.3)'
|
|
62
|
+
: '0 2px 8px rgba(0,0,0,0.1)';
|
|
63
|
+
}
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{/* Image */}
|
|
67
|
+
<div style={{ position: 'relative', height: '160px', overflow: 'hidden' }}>
|
|
68
|
+
<img
|
|
69
|
+
src={shop.image}
|
|
70
|
+
alt={shop.name}
|
|
71
|
+
style={{
|
|
72
|
+
width: '100%',
|
|
73
|
+
height: '100%',
|
|
74
|
+
objectFit: 'cover',
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
{shop.openNow && (
|
|
78
|
+
<div style={{
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: '12px',
|
|
81
|
+
left: '12px',
|
|
82
|
+
background: '#10b981',
|
|
83
|
+
color: 'white',
|
|
84
|
+
padding: '4px 12px',
|
|
85
|
+
borderRadius: '12px',
|
|
86
|
+
fontSize: '12px',
|
|
87
|
+
fontWeight: '600',
|
|
88
|
+
}}>
|
|
89
|
+
Open Now
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
{onToggleFavorite && (
|
|
93
|
+
<button
|
|
94
|
+
onClick={(e) => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
onToggleFavorite(shop.id);
|
|
97
|
+
}}
|
|
98
|
+
style={{
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
top: '12px',
|
|
101
|
+
right: '12px',
|
|
102
|
+
background: 'rgba(255,255,255,0.9)',
|
|
103
|
+
border: 'none',
|
|
104
|
+
borderRadius: '50%',
|
|
105
|
+
width: '32px',
|
|
106
|
+
height: '32px',
|
|
107
|
+
display: 'flex',
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
cursor: 'pointer',
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<span style={{ fontSize: '18px' }}>{isFavorite ? '❤️' : '🤍'}</span>
|
|
114
|
+
</button>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
{/* Content */}
|
|
119
|
+
<div style={{ padding: '16px' }}>
|
|
120
|
+
<h3 style={{
|
|
121
|
+
margin: '0 0 8px 0',
|
|
122
|
+
fontSize: '18px',
|
|
123
|
+
fontWeight: '600',
|
|
124
|
+
color: isDark ? '#fff' : '#111',
|
|
125
|
+
}}>
|
|
126
|
+
{shop.name}
|
|
127
|
+
</h3>
|
|
128
|
+
|
|
129
|
+
{/* Rating & Price */}
|
|
130
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '8px' }}>
|
|
131
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
132
|
+
<Star size={16} fill="#fbbf24" stroke="#fbbf24" />
|
|
133
|
+
<span style={{ fontSize: '14px', fontWeight: '600', color: isDark ? '#fff' : '#111' }}>
|
|
134
|
+
{shop.rating}
|
|
135
|
+
</span>
|
|
136
|
+
<span style={{ fontSize: '14px', color: isDark ? '#999' : '#666' }}>
|
|
137
|
+
({shop.reviews})
|
|
138
|
+
</span>
|
|
139
|
+
</div>
|
|
140
|
+
<span style={{ fontSize: '14px', color: isDark ? '#999' : '#666' }}>
|
|
141
|
+
{priceSymbol}
|
|
142
|
+
</span>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
{/* Description */}
|
|
146
|
+
<p style={{
|
|
147
|
+
margin: '0 0 12px 0',
|
|
148
|
+
fontSize: '14px',
|
|
149
|
+
color: isDark ? '#ccc' : '#666',
|
|
150
|
+
lineHeight: '1.4',
|
|
151
|
+
}}>
|
|
152
|
+
{shop.description}
|
|
153
|
+
</p>
|
|
154
|
+
|
|
155
|
+
{/* Cuisine Tags */}
|
|
156
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px', marginBottom: '12px' }}>
|
|
157
|
+
{shop.cuisine.slice(0, 3).map(c => (
|
|
158
|
+
<span
|
|
159
|
+
key={c}
|
|
160
|
+
style={{
|
|
161
|
+
background: isDark ? '#333' : '#f3f4f6',
|
|
162
|
+
color: isDark ? '#ccc' : '#666',
|
|
163
|
+
padding: '4px 8px',
|
|
164
|
+
borderRadius: '6px',
|
|
165
|
+
fontSize: '12px',
|
|
166
|
+
}}
|
|
167
|
+
>
|
|
168
|
+
{c}
|
|
169
|
+
</span>
|
|
170
|
+
))}
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
{/* Address */}
|
|
174
|
+
<div style={{ display: 'flex', alignItems: 'start', gap: '8px', marginBottom: '8px' }}>
|
|
175
|
+
<MapPin size={16} style={{ color: isDark ? '#999' : '#666', marginTop: '2px', flexShrink: 0 }} />
|
|
176
|
+
<span style={{ fontSize: '13px', color: isDark ? '#ccc' : '#666' }}>
|
|
177
|
+
{shop.address}
|
|
178
|
+
</span>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
{/* Hours */}
|
|
182
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
183
|
+
<Clock size={16} style={{ color: isDark ? '#999' : '#666' }} />
|
|
184
|
+
<span style={{ fontSize: '13px', color: isDark ? '#ccc' : '#666' }}>
|
|
185
|
+
{shop.hours.open} - {shop.hours.close}
|
|
186
|
+
</span>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pizzaz-widgets",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev -p 3001 --port 3001",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start -p 3001"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"next": "^14.2.5",
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1",
|
|
15
|
+
"nitrostack": "^1",
|
|
16
|
+
"mapbox-gl": "^3.0.1",
|
|
17
|
+
"framer-motion": "^10.16.16",
|
|
18
|
+
"lucide-react": "^0.294.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^20",
|
|
22
|
+
"@types/react": "^18",
|
|
23
|
+
"@types/react-dom": "^18",
|
|
24
|
+
"@types/mapbox-gl": "^3.0.0",
|
|
25
|
+
"typescript": "^5",
|
|
26
|
+
"tailwindcss": "^3.4.0",
|
|
27
|
+
"postcss": "^8.4.32",
|
|
28
|
+
"autoprefixer": "^10.4.16"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"widgets": [
|
|
4
|
+
{
|
|
5
|
+
"uri": "/pizza-map",
|
|
6
|
+
"name": "Pizza Map",
|
|
7
|
+
"description": "Interactive map showing pizza shop locations",
|
|
8
|
+
"examples": [
|
|
9
|
+
{
|
|
10
|
+
"name": "All Shops",
|
|
11
|
+
"description": "Display all pizza shops on the map",
|
|
12
|
+
"data": {
|
|
13
|
+
"shops": [
|
|
14
|
+
{
|
|
15
|
+
"id": "tonys-pizza",
|
|
16
|
+
"name": "Tony's New York Pizza",
|
|
17
|
+
"description": "Authentic New York-style pizza with a crispy thin crust",
|
|
18
|
+
"address": "1570 Stockton St, San Francisco, CA 94133",
|
|
19
|
+
"coords": [
|
|
20
|
+
-122.4106,
|
|
21
|
+
37.8006
|
|
22
|
+
],
|
|
23
|
+
"rating": 4.5,
|
|
24
|
+
"reviews": 1250,
|
|
25
|
+
"priceLevel": 2,
|
|
26
|
+
"cuisine": [
|
|
27
|
+
"Italian",
|
|
28
|
+
"Pizza",
|
|
29
|
+
"New York Style"
|
|
30
|
+
],
|
|
31
|
+
"hours": {
|
|
32
|
+
"open": "11:00 AM",
|
|
33
|
+
"close": "10:00 PM"
|
|
34
|
+
},
|
|
35
|
+
"phone": "(415) 835-9888",
|
|
36
|
+
"website": "https://tonyspizzasf.com",
|
|
37
|
+
"image": "https://images.unsplash.com/photo-1513104890138-7c749659a591",
|
|
38
|
+
"specialties": [
|
|
39
|
+
"Margherita",
|
|
40
|
+
"Pepperoni",
|
|
41
|
+
"White Pizza"
|
|
42
|
+
],
|
|
43
|
+
"openNow": true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "bella-napoli",
|
|
47
|
+
"name": "Bella Napoli",
|
|
48
|
+
"description": "Traditional Neapolitan pizza baked in a wood-fired oven",
|
|
49
|
+
"address": "3854 Geary Blvd, San Francisco, CA 94118",
|
|
50
|
+
"coords": [
|
|
51
|
+
-122.4603,
|
|
52
|
+
37.7808
|
|
53
|
+
],
|
|
54
|
+
"rating": 4.7,
|
|
55
|
+
"reviews": 890,
|
|
56
|
+
"priceLevel": 3,
|
|
57
|
+
"cuisine": [
|
|
58
|
+
"Italian",
|
|
59
|
+
"Pizza",
|
|
60
|
+
"Neapolitan"
|
|
61
|
+
],
|
|
62
|
+
"hours": {
|
|
63
|
+
"open": "12:00 PM",
|
|
64
|
+
"close": "9:00 PM"
|
|
65
|
+
},
|
|
66
|
+
"phone": "(415) 221-0305",
|
|
67
|
+
"image": "https://images.unsplash.com/photo-1574071318508-1cdbab80d002",
|
|
68
|
+
"specialties": [
|
|
69
|
+
"Marinara",
|
|
70
|
+
"Quattro Formaggi",
|
|
71
|
+
"Prosciutto e Funghi"
|
|
72
|
+
],
|
|
73
|
+
"openNow": true
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"filter": "all",
|
|
77
|
+
"totalShops": 2
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"tags": [
|
|
82
|
+
"map",
|
|
83
|
+
"location",
|
|
84
|
+
"interactive"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"uri": "/pizza-list",
|
|
89
|
+
"name": "Pizza List",
|
|
90
|
+
"description": "List view of pizza shops with filtering and sorting",
|
|
91
|
+
"examples": [
|
|
92
|
+
{
|
|
93
|
+
"name": "All Shops List",
|
|
94
|
+
"description": "Display all shops in a list",
|
|
95
|
+
"data": {
|
|
96
|
+
"shops": [
|
|
97
|
+
{
|
|
98
|
+
"id": "tonys-pizza",
|
|
99
|
+
"name": "Tony's New York Pizza",
|
|
100
|
+
"description": "Authentic New York-style pizza with a crispy thin crust",
|
|
101
|
+
"address": "1570 Stockton St, San Francisco, CA 94133",
|
|
102
|
+
"coords": [
|
|
103
|
+
-122.4106,
|
|
104
|
+
37.8006
|
|
105
|
+
],
|
|
106
|
+
"rating": 4.5,
|
|
107
|
+
"reviews": 1250,
|
|
108
|
+
"priceLevel": 2,
|
|
109
|
+
"cuisine": [
|
|
110
|
+
"Italian",
|
|
111
|
+
"Pizza",
|
|
112
|
+
"New York Style"
|
|
113
|
+
],
|
|
114
|
+
"hours": {
|
|
115
|
+
"open": "11:00 AM",
|
|
116
|
+
"close": "10:00 PM"
|
|
117
|
+
},
|
|
118
|
+
"phone": "(415) 835-9888",
|
|
119
|
+
"website": "https://tonyspizzasf.com",
|
|
120
|
+
"image": "https://images.unsplash.com/photo-1513104890138-7c749659a591",
|
|
121
|
+
"specialties": [
|
|
122
|
+
"Margherita",
|
|
123
|
+
"Pepperoni",
|
|
124
|
+
"White Pizza"
|
|
125
|
+
],
|
|
126
|
+
"openNow": true
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "bella-napoli",
|
|
130
|
+
"name": "Bella Napoli",
|
|
131
|
+
"description": "Traditional Neapolitan pizza baked in a wood-fired oven",
|
|
132
|
+
"address": "3854 Geary Blvd, San Francisco, CA 94118",
|
|
133
|
+
"coords": [
|
|
134
|
+
-122.4603,
|
|
135
|
+
37.7808
|
|
136
|
+
],
|
|
137
|
+
"rating": 4.7,
|
|
138
|
+
"reviews": 890,
|
|
139
|
+
"priceLevel": 3,
|
|
140
|
+
"cuisine": [
|
|
141
|
+
"Italian",
|
|
142
|
+
"Pizza",
|
|
143
|
+
"Neapolitan"
|
|
144
|
+
],
|
|
145
|
+
"hours": {
|
|
146
|
+
"open": "12:00 PM",
|
|
147
|
+
"close": "9:00 PM"
|
|
148
|
+
},
|
|
149
|
+
"phone": "(415) 221-0305",
|
|
150
|
+
"image": "https://images.unsplash.com/photo-1574071318508-1cdbab80d002",
|
|
151
|
+
"specialties": [
|
|
152
|
+
"Marinara",
|
|
153
|
+
"Quattro Formaggi",
|
|
154
|
+
"Prosciutto e Funghi"
|
|
155
|
+
],
|
|
156
|
+
"openNow": true
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"filters": {},
|
|
160
|
+
"totalShops": 2
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"tags": [
|
|
165
|
+
"list",
|
|
166
|
+
"filter",
|
|
167
|
+
"sort"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"uri": "/pizza-shop",
|
|
172
|
+
"name": "Pizza Shop Details",
|
|
173
|
+
"description": "Detailed information about a specific pizza shop",
|
|
174
|
+
"examples": [
|
|
175
|
+
{
|
|
176
|
+
"name": "Shop Detail",
|
|
177
|
+
"description": "Show details for a specific shop",
|
|
178
|
+
"data": {
|
|
179
|
+
"shop": {
|
|
180
|
+
"id": "tonys-pizza",
|
|
181
|
+
"name": "Tony's New York Pizza",
|
|
182
|
+
"description": "Authentic New York-style pizza with a crispy thin crust",
|
|
183
|
+
"address": "1570 Stockton St, San Francisco, CA 94133",
|
|
184
|
+
"coords": [
|
|
185
|
+
-122.4106,
|
|
186
|
+
37.8006
|
|
187
|
+
],
|
|
188
|
+
"rating": 4.5,
|
|
189
|
+
"reviews": 1250,
|
|
190
|
+
"priceLevel": 2,
|
|
191
|
+
"cuisine": [
|
|
192
|
+
"Italian",
|
|
193
|
+
"Pizza",
|
|
194
|
+
"New York Style"
|
|
195
|
+
],
|
|
196
|
+
"hours": {
|
|
197
|
+
"open": "11:00 AM",
|
|
198
|
+
"close": "10:00 PM"
|
|
199
|
+
},
|
|
200
|
+
"phone": "(415) 835-9888",
|
|
201
|
+
"website": "https://tonyspizzasf.com",
|
|
202
|
+
"image": "https://images.unsplash.com/photo-1513104890138-7c749659a591",
|
|
203
|
+
"specialties": [
|
|
204
|
+
"Margherita",
|
|
205
|
+
"Pepperoni",
|
|
206
|
+
"White Pizza"
|
|
207
|
+
],
|
|
208
|
+
"openNow": true
|
|
209
|
+
},
|
|
210
|
+
"relatedShops": [
|
|
211
|
+
{
|
|
212
|
+
"id": "bella-napoli",
|
|
213
|
+
"name": "Bella Napoli",
|
|
214
|
+
"description": "Traditional Neapolitan pizza baked in a wood-fired oven",
|
|
215
|
+
"address": "3854 Geary Blvd, San Francisco, CA 94118",
|
|
216
|
+
"coords": [
|
|
217
|
+
-122.4603,
|
|
218
|
+
37.7808
|
|
219
|
+
],
|
|
220
|
+
"rating": 4.7,
|
|
221
|
+
"reviews": 890,
|
|
222
|
+
"priceLevel": 3,
|
|
223
|
+
"cuisine": [
|
|
224
|
+
"Italian",
|
|
225
|
+
"Pizza",
|
|
226
|
+
"Neapolitan"
|
|
227
|
+
],
|
|
228
|
+
"hours": {
|
|
229
|
+
"open": "12:00 PM",
|
|
230
|
+
"close": "9:00 PM"
|
|
231
|
+
},
|
|
232
|
+
"phone": "(415) 221-0305",
|
|
233
|
+
"image": "https://images.unsplash.com/photo-1574071318508-1cdbab80d002",
|
|
234
|
+
"specialties": [
|
|
235
|
+
"Marinara",
|
|
236
|
+
"Quattro Formaggi",
|
|
237
|
+
"Prosciutto e Funghi"
|
|
238
|
+
],
|
|
239
|
+
"openNow": true
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"tags": [
|
|
246
|
+
"detail",
|
|
247
|
+
"info",
|
|
248
|
+
"contact"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"generatedAt": "2025-12-03T00:00:00.000Z"
|
|
253
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2022"
|
|
7
|
+
],
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"rootDir": "./src",
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"declarationMap": true,
|
|
18
|
+
"sourceMap": true,
|
|
19
|
+
"experimentalDecorators": true,
|
|
20
|
+
"emitDecoratorMetadata": true
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"src/**/*"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"node_modules",
|
|
27
|
+
"dist",
|
|
28
|
+
"src/widgets"
|
|
29
|
+
]
|
|
30
|
+
}
|