π The fast, Pythonic way to build MCP servers and clients.
Fix docs app demo iframe assets (#4194)
Jeremiah Lowin2ac23a4de5bd
diff --git a/docs/apps/demos/bar-chart.html b/docs/apps/demos/bar-chart.htmldeleted file mode 100644index 81372d859..000000000--- a/docs/apps/demos/bar-chart.html+++ /dev/null@@ -1,76 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "p-6",- "type": "Column",- "children": [- {- "type": "BarChart",- "data": [- {- "quarter": "Q1",- "revenue": 42000,- "costs": 28000- },- {- "quarter": "Q2",- "revenue": 51000,- "costs": 31000- },- {- "quarter": "Q3",- "revenue": 47000,- "costs": 29000- },- {- "quarter": "Q4",- "revenue": 63000,- "costs": 35000- }- ],- "series": [- {- "dataKey": "revenue",- "label": "Revenue"- },- {- "dataKey": "costs",- "label": "Costs"- }- ],- "xAxis": "quarter",- "height": 250,- "stacked": false,- "horizontal": false,- "barRadius": 4,- "showLegend": true,- "showTooltip": true,- "animate": true,- "showGrid": true,- "showYAxis": true,- "yAxisFormat": "auto"- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/contacts.html b/docs/apps/demos/contacts.htmldeleted file mode 100644index 5831d639c..000000000--- a/docs/apps/demos/contacts.html+++ /dev/null@@ -1,172 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "type": "Column",- "children": [- {- "type": "DataTable",- "columns": [- {- "key": "name",- "header": "Name",- "sortable": true- },- {- "key": "email",- "header": "Email",- "sortable": false- },- {- "key": "category",- "header": "Category",- "sortable": false- }- ],- "rows": [- {- "name": "Arthur Dent",- "email": "[email protected]",- "category": {- "type": "Badge",- "label": "Customer",- "variant": "success"- }- },- {- "name": "Ford Prefect",- "email": "[email protected]",- "category": {- "type": "Badge",- "label": "Partner",- "variant": "secondary"- }- },- {- "name": "Trillian Astra",- "email": "[email protected]",- "category": {- "type": "Badge",- "label": "Customer",- "variant": "success"- }- },- {- "name": "Zaphod Beeblebrox",- "email": "[email protected]",- "category": {- "type": "Badge",- "label": "Vendor",- "variant": "outline"- }- }- ],- "search": true,- "paginated": false,- "pageSize": 10- },- {- "type": "Separator",- "orientation": "horizontal"- },- {- "content": "Add Contact",- "type": "H3"- },- {- "cssClass": "gap-4",- "type": "Form",- "onSubmit": {- "action": "showToast",- "message": "Contact saved! (preview demo \u2014 no backend wired)",- "variant": "success"- },- "children": [- {- "cssClass": "gap-4",- "type": "Row",- "children": [- {- "name": "name",- "type": "Input",- "inputType": "text",- "placeholder": "Full name",- "disabled": false,- "readOnly": false,- "required": true- },- {- "name": "email",- "type": "Input",- "inputType": "text",- "placeholder": "[email protected]",- "disabled": false,- "readOnly": false,- "required": true- }- ]- },- {- "name": "category",- "type": "Select",- "size": "default",- "disabled": false,- "required": false,- "invalid": false,- "children": [- {- "type": "SelectOption",- "value": "Customer",- "label": "Customer",- "selected": false,- "disabled": false- },- {- "type": "SelectOption",- "value": "Partner",- "label": "Partner",- "selected": false,- "disabled": false- },- {- "type": "SelectOption",- "value": "Vendor",- "label": "Vendor",- "selected": false,- "disabled": false- }- ]- },- {- "type": "Button",- "label": "Save Contact",- "variant": "default",- "size": "default",- "disabled": false- }- ]- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/dashboard.html b/docs/apps/demos/dashboard.htmldeleted file mode 100644index 21c1c8924..000000000--- a/docs/apps/demos/dashboard.html+++ /dev/null@@ -1,157 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "type": "Column",- "children": [- {- "cssClass": "gap-6",- "type": "Row",- "children": [- {- "type": "Metric",- "label": "Revenue (Q1-Q4)",- "value": "$220,500"- },- {- "type": "Metric",- "label": "Deals",- "value": "4"- }- ]- },- {- "type": "BarChart",- "data": [- {- "month": "Jan",- "revenue": 48200,- "costs": 31000- },- {- "month": "Feb",- "revenue": 52100,- "costs": 32500- },- {- "month": "Mar",- "revenue": 61800,- "costs": 34200- },- {- "month": "Apr",- "revenue": 58400,- "costs": 33800- }- ],- "series": [- {- "dataKey": "revenue",- "label": "Revenue"- },- {- "dataKey": "costs",- "label": "Costs"- }- ],- "xAxis": "month",- "height": 200,- "stacked": false,- "horizontal": false,- "barRadius": 4,- "showLegend": true,- "showTooltip": true,- "animate": true,- "showGrid": true,- "showYAxis": true,- "yAxisFormat": "auto"- },- {- "type": "Separator",- "orientation": "horizontal"- },- {- "type": "DataTable",- "columns": [- {- "key": "account",- "header": "Account",- "sortable": true- },- {- "key": "value",- "header": "Value",- "sortable": true- },- {- "key": "stage",- "header": "Stage",- "sortable": false- }- ],- "rows": [- {- "account": "Acme Corp",- "value": "$84,000",- "stage": {- "type": "Badge",- "label": "Won",- "variant": "success"- }- },- {- "account": "Globex Inc",- "value": "$52,000",- "stage": {- "type": "Badge",- "label": "Negotiation",- "variant": "secondary"- }- },- {- "account": "Initech",- "value": "$31,500",- "stage": {- "type": "Badge",- "label": "Proposal",- "variant": "secondary"- }- },- {- "account": "Wayne Enterprises",- "value": "$45,000",- "stage": {- "type": "Badge",- "label": "Lost",- "variant": "destructive"- }- }- ],- "search": false,- "paginated": false,- "pageSize": 10- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/data-table.html b/docs/apps/demos/data-table.htmldeleted file mode 100644index fe84abcd4..000000000--- a/docs/apps/demos/data-table.html+++ /dev/null@@ -1,90 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "type": "Column",- "children": [- {- "type": "DataTable",- "columns": [- {- "key": "name",- "header": "Name",- "sortable": true- },- {- "key": "role",- "header": "Role",- "sortable": true- },- {- "key": "dept",- "header": "Dept",- "sortable": true- }- ],- "rows": [- {- "name": "Alice Chen",- "role": "Staff Engineer",- "dept": "Platform"- },- {- "name": "Bob Martinez",- "role": "Lead Designer",- "dept": "Design"- },- {- "name": "Carol Johnson",- "role": "Senior Engineer",- "dept": "Platform"- },- {- "name": "David Kim",- "role": "Product Manager",- "dept": "Product"- },- {- "name": "Eva Mueller",- "role": "Engineer",- "dept": "Platform"- },- {- "name": "Frank Lee",- "role": "Data Scientist",- "dept": "ML"- },- {- "name": "Grace Park",- "role": "Eng Manager",- "dept": "Platform"- }- ],- "search": true,- "paginated": false,- "pageSize": 10- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/hitchhikers.html b/docs/apps/demos/hitchhikers.htmldeleted file mode 100644index 7f26f9796..000000000--- a/docs/apps/demos/hitchhikers.html+++ /dev/null@@ -1,1105 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab Showcase</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-<style>html, body, #root { background: transparent !important; }</style></head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "onMount": {- "action": "setInterval",- "duration": 400,- "onTick": {- "action": "setState",- "key": "ctx_tick",- "value": "{{ ctx_tick + 1 }}"- }- },- "type": "Div",- "children": [- {- "cssClass": "gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4",- "type": "Grid",- "children": [- {- "cssClass": "gap-4",- "type": "Column",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Register Towel"- },- {- "type": "CardDescription",- "content": "The most important item in the galaxy"- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-3",- "type": "Column",- "children": [- {- "name": "combobox_1",- "type": "Combobox",- "placeholder": "Type...",- "searchPlaceholder": "Search types...",- "disabled": false,- "invalid": false,- "children": [- {- "type": "ComboboxOption",- "value": "bath",- "label": "Bath",- "disabled": false- },- {- "type": "ComboboxOption",- "value": "beach",- "label": "Beach",- "disabled": false- },- {- "type": "ComboboxOption",- "value": "interstellar",- "label": "Interstellar",- "disabled": false- },- {- "type": "ComboboxOption",- "value": "micro",- "label": "Microfiber",- "disabled": false- }- ]- },- {- "name": "datepicker_1",- "type": "DatePicker",- "placeholder": "Registration date"- }- ]- }- ]- },- {- "type": "CardFooter",- "children": [- {- "cssClass": "gap-2",- "type": "Row",- "children": [- {- "type": "Dialog",- "title": "Towel Registered!",- "description": "Your towel has been added to the galactic registry.",- "dismissible": true,- "children": [- {- "type": "Button",- "label": "Register",- "variant": "default",- "size": "default",- "disabled": false- },- {- "content": "Don't forget to bring it.",- "type": "Text"- }- ]- },- {- "type": "Button",- "label": "Cancel",- "variant": "outline",- "size": "default",- "disabled": false- }- ]- }- ]- }- ]- },- {- "type": "Condition",- "cases": [- {- "when": "{{ !pressed }}",- "children": [- {- "type": "Button",- "label": "This is probably the best button to press.",- "variant": "success",- "size": "default",- "disabled": false,- "onClick": {- "action": "setState",- "key": "pressed",- "value": true- }- }- ]- }- ],- "else": [- {- "type": "Button",- "label": "Please do not press this button again.",- "variant": "destructive",- "size": "default",- "disabled": false,- "onClick": {- "action": "setState",- "key": "pressed",- "value": false- }- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Ship Status"- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-3",- "type": "Column",- "children": [- {- "cssClass": "items-center justify-between",- "type": "Row",- "children": [- {- "content": "heart-of-gold",- "type": "Text"- },- {- "type": "HoverCard",- "openDelay": 0,- "closeDelay": 200,- "children": [- {- "type": "Badge",- "label": "In Orbit",- "variant": "default"- },- {- "cssClass": "gap-2",- "type": "Column",- "children": [- {- "content": "heart-of-gold",- "type": "Text"- },- {- "content": "Deployed 2h ago",- "type": "Muted"- },- {- "type": "Progress",- "value": 100.0,- "max": 100.0,- "variant": "success",- "size": "default"- }- ]- }- ]- }- ]- },- {- "cssClass": "pf-progress-flat",- "type": "Progress",- "value": 100.0,- "max": 100.0,- "variant": "default",- "size": "default",- "indicatorClass": "bg-yellow-400"- },- {- "cssClass": "items-center justify-between",- "type": "Row",- "children": [- {- "content": "vogon-poetry",- "type": "Text"- },- {- "type": "Tooltip",- "content": "64% \u2014 ETA 12 min",- "delay": 0,- "children": [- {- "type": "Badge",- "variant": "secondary",- "children": [- {- "type": "Loader",- "variant": "spin",- "size": "sm"- },- {- "content": "Deploying",- "type": "Text"- }- ]- }- ]- }- ]- },- {- "type": "Progress",- "value": 64.0,- "max": 100.0,- "variant": "default",- "size": "default"- },- {- "cssClass": "items-center justify-between",- "type": "Row",- "children": [- {- "content": "deep-thought",- "type": "Text"- },- {- "type": "Tooltip",- "content": "Computing... 7.5 million years remaining",- "delay": 0,- "children": [- {- "type": "Badge",- "variant": "outline",- "children": [- {- "type": "Loader",- "variant": "ios",- "size": "sm"- },- {- "content": "Soon...",- "type": "Text"- }- ]- }- ]- }- ]- },- {- "type": "Progress",- "value": 12.0,- "max": 100.0,- "variant": "default",- "size": "default"- }- ]- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Planet Ratings"- }- ]- },- {- "type": "CardContent",- "children": [- {- "type": "RadarChart",- "data": [- {- "axis": "Views",- "earth": 30,- "mag": 95- },- {- "axis": "Fjords",- "earth": 65,- "mag": 100- },- {- "axis": "Pubs",- "earth": 90,- "mag": 10- },- {- "axis": "Mice",- "earth": 40,- "mag": 85- },- {- "axis": "Tea",- "earth": 95,- "mag": 15- },- {- "axis": "Safety",- "earth": 45,- "mag": 70- }- ],- "series": [- {- "dataKey": "earth",- "label": "Earth"- },- {- "dataKey": "mag",- "label": "Magrathea"- }- ],- "axisKey": "axis",- "height": 200,- "filled": true,- "showDots": false,- "showLegend": true,- "showTooltip": true,- "animate": true,- "showGrid": true- }- ]- }- ]- }- ]- },- {- "cssClass": "gap-4",- "type": "Column",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Survival Odds"- }- ]- },- {- "cssClass": "w-fit mx-auto",- "type": "CardContent",- "children": [- {- "type": "Ring",- "value": 42.0,- "min": 0,- "max": 100,- "label": "42%",- "variant": "info",- "size": "lg",- "thickness": 12.0,- "indicatorClass": "group-hover:drop-shadow-[0_0_24px_rgba(59,130,246,0.9)]"- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "cssClass": "gap-2 items-center",- "type": "Row",- "children": [- {- "type": "CardTitle",- "content": "Improbability Drive"- },- {- "cssClass": "text-blue-500",- "type": "Loader",- "variant": "pulse",- "size": "sm"- }- ]- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-2",- "type": "Column",- "children": [- {- "name": "improbability",- "value": 42.0,- "type": "Slider",- "min": 0.0,- "max": 100.0,- "disabled": false,- "size": "default"- },- {- "cssClass": "items-center justify-between",- "type": "Row",- "children": [- {- "content": "Probable",- "type": "Muted"- },- {- "content": "Infinite",- "type": "Muted"- }- ]- }- ]- }- ]- }- ]- },- {- "type": "Carousel",- "visible": 1,- "gap": 16,- "direction": "up",- "loop": true,- "autoAdvance": 3000,- "continuous": false,- "speed": 2,- "effect": "slide",- "dimInactive": false,- "showControls": false,- "controlsPosition": "outside",- "showDots": false,- "pauseOnHover": true,- "align": "start",- "slidesToScroll": 1,- "drag": true,- "children": [- {- "type": "Alert",- "variant": "success",- "icon": "circle-check",- "children": [- {- "type": "AlertTitle",- "content": "Don't Panic"- },- {- "type": "AlertDescription",- "content": "Normality achieved."- }- ]- },- {- "type": "Alert",- "variant": "destructive",- "icon": "triangle-alert",- "children": [- {- "type": "AlertTitle",- "content": "Display Department"- },- {- "type": "AlertDescription",- "content": "Beware of the leopard."- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Prefect Horizon Config"- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-3",- "type": "Column",- "children": [- {- "name": "autoscale",- "value": true,- "type": "Switch",- "label": "Auto-scale agents",- "size": "default",- "disabled": false,- "required": false- },- {- "type": "Separator",- "orientation": "horizontal"- },- {- "name": "code_mode",- "value": true,- "type": "Switch",- "label": "Code Mode",- "size": "default",- "disabled": false,- "required": false- },- {- "type": "Separator",- "orientation": "horizontal"- },- {- "name": "cache",- "value": false,- "type": "Switch",- "label": "Tool call caching",- "size": "default",- "disabled": false,- "required": false- }- ]- }- ]- },- {- "type": "CardFooter",- "children": [- {- "type": "Button",- "label": "Save Preferences",- "variant": "default",- "size": "default",- "disabled": false,- "onClick": {- "action": "showToast",- "message": "Preferences saved!"- }- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Travel Class"- }- ]- },- {- "type": "CardContent",- "children": [- {- "name": "travel_class",- "type": "RadioGroup",- "children": [- {- "name": "radio_1",- "value": false,- "type": "Radio",- "option": "economy",- "label": "Economy",- "disabled": false,- "required": false- },- {- "name": "radio_2",- "value": false,- "type": "Radio",- "option": "business",- "label": "Business Class",- "disabled": false,- "required": false- },- {- "name": "radio_3",- "value": true,- "type": "Radio",- "option": "improbability",- "label": "Infinite Improbability",- "disabled": false,- "required": false- }- ]- }- ]- }- ]- }- ]- },- {- "cssClass": "md:col-span-2",- "type": "GridItem",- "colSpan": 1,- "rowSpan": 1,- "children": [- {- "cssClass": "gap-4",- "type": "Column",- "children": [- {- "cssClass": "gap-4 grid-cols-2 h-32",- "type": "Grid",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Context Window"- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-6 justify-center h-full",- "type": "Column",- "children": [- {- "cssClass": "items-center justify-between",- "type": "Row",- "children": [- {- "content": "{{ ctx_tick % 20 * 3 + 20 }}% used",- "type": "Text"- },- {- "content": "{{ (ctx_tick % 20 * 3 + 20) * 2 }}k / 200k tokens",- "type": "Muted"- }- ]- },- {- "type": "Tooltip",- "content": "Auto-compact buffer: 12%",- "delay": 0,- "children": [- {- "type": "Progress",- "value": "{{ ctx_tick % 20 * 3 + 20 }}",- "max": 100.0,- "variant": "{{ ctx_tick % 20 * 3 + 20 > 70 ? 'destructive' : (ctx_tick % 20 * 3 + 20 <= 33 ? 'success' : 'default') }}",- "size": "default"- }- ]- }- ]- }- ]- }- ]- },- {- "cssClass": "pb-0 gap-0",- "type": "Card",- "children": [- {- "type": "CardContent",- "children": [- {- "type": "Metric",- "label": "Fjords designed",- "value": "1,847",- "delta": "+3 coastlines"- }- ]- },- {- "cssClass": "h-16",- "type": "Sparkline",- "data": [- 820,- 950,- 1100,- 980,- 1250,- 1400,- 1350,- 1500,- 1680,- 1847- ],- "variant": "success",- "fill": true,- "curve": "linear",- "strokeWidth": 1.5- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Towel Incidents"- }- ]- },- {- "type": "CardContent",- "children": [- {- "type": "BarChart",- "data": [- {- "month": "Jan",- "lost": 8,- "found": 5- },- {- "month": "Feb",- "lost": 24,- "found": 15- },- {- "month": "Mar",- "lost": 12,- "found": 28- },- {- "month": "Apr",- "lost": 35,- "found": 19- },- {- "month": "May",- "lost": 18,- "found": 38- },- {- "month": "Jun",- "lost": 42,- "found": 30- }- ],- "series": [- {- "dataKey": "lost",- "label": "Lost"- },- {- "dataKey": "found",- "label": "Found"- }- ],- "xAxis": "month",- "height": 200,- "stacked": false,- "horizontal": false,- "barRadius": 4,- "showLegend": true,- "showTooltip": true,- "animate": true,- "showGrid": true,- "showYAxis": true,- "yAxisFormat": "auto"- }- ]- }- ]- },- {- "cssClass": "gap-4 grid-cols-2",- "type": "Grid",- "children": [- {- "cssClass": "gap-4",- "type": "Column",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-2",- "type": "Column",- "children": [- {- "name": "checkbox_1",- "value": true,- "type": "Checkbox",- "label": "Towel packed",- "disabled": false,- "required": false- },- {- "name": "checkbox_2",- "value": true,- "type": "Checkbox",- "label": "Guide charged",- "disabled": false,- "required": false- },- {- "name": "checkbox_3",- "value": false,- "type": "Checkbox",- "label": "Babel fish inserted",- "disabled": false,- "required": false- }- ]- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "type": "CardTitle",- "content": "Marvin's Mood"- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-3",- "type": "Column",- "children": [- {- "content": "How's life?",- "type": "P"- },- {- "cssClass": "gap-2",- "type": "Column",- "children": [- {- "type": "Button",- "label": "Meh",- "variant": "default",- "size": "default",- "disabled": false,- "onClick": {- "action": "showToast",- "message": "Noted. Enthusiasm levels nominal."- }- },- {- "type": "Button",- "label": "Depressed",- "variant": "info",- "size": "default",- "disabled": false,- "onClick": {- "action": "showToast",- "message": "I think you ought to know I'm feeling very depressed."- }- },- {- "type": "Button",- "label": "Don't talk to me about life",- "variant": "warning",- "size": "default",- "disabled": false,- "onClick": {- "action": "showToast",- "message": "Brain the size of a planet and they ask me to pick up a piece of paper."- }- }- ]- }- ]- }- ]- }- ]- }- ]- },- {- "cssClass": "gap-4",- "type": "Column",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-2 items-center",- "type": "Row",- "children": [- {- "type": "Loader",- "variant": "dots",- "size": "sm"- },- {- "content": "Marvin is thinking...",- "type": "Muted"- }- ]- }- ]- }- ]- },- {- "type": "Card",- "children": [- {- "type": "CardContent",- "children": [- {- "type": "DataTable",- "columns": [- {- "key": "crew",- "header": "Crew",- "sortable": true- },- {- "key": "species",- "header": "Species",- "sortable": true- },- {- "key": "towel",- "header": "Towel?",- "sortable": true- },- {- "key": "status",- "header": "Status",- "sortable": true- }- ],- "rows": [- {- "crew": "Arthur Dent",- "species": "Human",- "towel": "Yes",- "status": "Confused"- },- {- "crew": "Ford Prefect",- "species": "Betelgeusian",- "towel": "Always",- "status": "Drinking"- },- {- "crew": "Zaphod",- "species": "Betelgeusian",- "towel": "Lost it",- "status": "Presidential"- },- {- "crew": "Trillian",- "species": "Human",- "towel": "Yes",- "status": "Navigating"- },- {- "crew": "Marvin",- "species": "Android",- "towel": "No point",- "status": "Depressed"- },- {- "crew": "Slartibartfast",- "species": "Magrathean",- "towel": "Somewhere",- "status": "Designing"- }- ],- "search": true,- "paginated": false,- "pageSize": 10- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- },- "state": {- "ctx_tick": 0,- "improbability": 42- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/pie-chart.html b/docs/apps/demos/pie-chart.htmldeleted file mode 100644index c712eeb33..000000000--- a/docs/apps/demos/pie-chart.html+++ /dev/null@@ -1,60 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "p-6",- "type": "Column",- "children": [- {- "type": "PieChart",- "data": [- {- "category": "Bug",- "count": 42- },- {- "category": "Feature",- "count": 28- },- {- "category": "Docs",- "count": 15- },- {- "category": "Infra",- "count": 10- }- ],- "dataKey": "count",- "nameKey": "category",- "height": 240,- "innerRadius": 50,- "showLabel": false,- "paddingAngle": 0,- "showLegend": true,- "showTooltip": true,- "animate": true- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/reactive.html b/docs/apps/demos/reactive.htmldeleted file mode 100644index 29f05e2d3..000000000--- a/docs/apps/demos/reactive.html+++ /dev/null@@ -1,167 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "let": {- "data": "{{ region == 'south' ? south : region == 'west' ? west : north }}"- },- "type": "Column",- "children": [- {- "cssClass": "gap-4 items-center",- "type": "Row",- "children": [- {- "cssClass": "w-40",- "name": "region",- "type": "Select",- "size": "default",- "disabled": false,- "required": false,- "invalid": false,- "children": [- {- "type": "SelectOption",- "value": "north",- "label": "North",- "selected": false,- "disabled": false- },- {- "type": "SelectOption",- "value": "south",- "label": "South",- "selected": false,- "disabled": false- },- {- "type": "SelectOption",- "value": "west",- "label": "West",- "selected": false,- "disabled": false- }- ]- },- {- "cssClass": "ml-auto",- "name": "show_target",- "value": false,- "type": "Switch",- "size": "default",- "disabled": false,- "required": false- },- {- "cssClass": "text-sm text-muted-foreground",- "content": "Show target",- "type": "Text"- }- ]- },- {- "type": "BarChart",- "data": "{{ data }}",- "series": [- {- "dataKey": "sales",- "label": "Sales"- }- ],- "xAxis": "month",- "height": 200,- "stacked": false,- "horizontal": false,- "barRadius": 4,- "showLegend": true,- "showTooltip": true,- "animate": true,- "showGrid": true,- "showYAxis": true,- "yAxisFormat": "auto"- },- {- "type": "Condition",- "cases": [- {- "when": "{{ show_target }}",- "children": [- {- "type": "Metric",- "label": "Q1 Target",- "value": "$75,000"- }- ]- }- ]- }- ]- }- ]- },- "state": {- "region": "north",- "north": [- {- "month": "Jan",- "sales": 22000- },- {- "month": "Feb",- "sales": 25500- },- {- "month": "Mar",- "sales": 24200- }- ],- "south": [- {- "month": "Jan",- "sales": 5800- },- {- "month": "Feb",- "sales": 6400- },- {- "month": "Mar",- "sales": 5600- }- ],- "west": [- {- "month": "Jan",- "sales": 6000- },- {- "month": "Feb",- "sales": 6000- },- {- "month": "Mar",- "sales": 5600- }- ],- "show_target": true- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/team-directory-reactive.html b/docs/apps/demos/team-directory-reactive.htmldeleted file mode 100644index f2ab5bf7e..000000000--- a/docs/apps/demos/team-directory-reactive.html+++ /dev/null@@ -1,237 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "type": "Column",- "children": [- {- "cssClass": "gap-4",- "type": "Grid",- "columnTemplate": "1fr 2fr",- "children": [- {- "type": "PieChart",- "data": [- {- "office": "San Francisco",- "count": 3- },- {- "office": "New York",- "count": 2- },- {- "office": "London",- "count": 1- },- {- "office": "Berlin",- "count": 1- }- ],- "dataKey": "count",- "nameKey": "office",- "height": 300,- "innerRadius": 0,- "showLabel": false,- "paddingAngle": 0,- "showLegend": true,- "showTooltip": true,- "animate": true- },- {- "type": "DataTable",- "columns": [- {- "key": "name",- "header": "Name",- "sortable": true- },- {- "key": "role",- "header": "Role",- "sortable": true- },- {- "key": "office",- "header": "Office",- "sortable": true- }- ],- "rows": [- {- "name": "Alice Chen",- "role": "Staff Engineer",- "office": "San Francisco",- "email": "[email protected]",- "projects": 3- },- {- "name": "Bob Martinez",- "role": "Lead Designer",- "office": "New York",- "email": "[email protected]",- "projects": 5- },- {- "name": "Carol Johnson",- "role": "Senior Engineer",- "office": "London",- "email": "[email protected]",- "projects": 2- },- {- "name": "David Kim",- "role": "Product Manager",- "office": "San Francisco",- "email": "[email protected]",- "projects": 7- },- {- "name": "Eva Mueller",- "role": "Engineer",- "office": "Berlin",- "email": "[email protected]",- "projects": 1- },- {- "name": "Frank Lee",- "role": "Data Scientist",- "office": "San Francisco",- "email": "[email protected]",- "projects": 4- },- {- "name": "Grace Park",- "role": "Engineering Manager",- "office": "New York",- "email": "[email protected]",- "projects": 6- }- ],- "search": true,- "paginated": false,- "pageSize": 10,- "onRowClick": {- "action": "setState",- "key": "selected",- "value": "{{ $event }}"- }- }- ]- },- {- "type": "Condition",- "cases": [- {- "when": "{{ selected }}",- "children": [- {- "type": "Card",- "children": [- {- "type": "CardHeader",- "children": [- {- "cssClass": "gap-2 items-center",- "type": "Row",- "children": [- {- "content": "{{ selected.name }}",- "type": "H3"- },- {- "type": "Badge",- "label": "{{ selected.office }}",- "variant": "default"- }- ]- }- ]- },- {- "type": "CardContent",- "children": [- {- "cssClass": "gap-4 grid-cols-3",- "type": "Grid",- "children": [- {- "cssClass": "gap-0",- "type": "Column",- "children": [- {- "content": "Role",- "type": "Small"- },- {- "content": "{{ selected.role }}",- "type": "Text"- }- ]- },- {- "cssClass": "gap-0",- "type": "Column",- "children": [- {- "content": "Email",- "type": "Small"- },- {- "content": "{{ selected.email }}",- "type": "Text"- }- ]- },- {- "cssClass": "gap-0",- "type": "Column",- "children": [- {- "content": "Active Projects",- "type": "Small"- },- {- "content": "{{ selected.projects }}",- "type": "Text"- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- }- ]- },- "state": {- "selected": null- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/demos/team-directory.html b/docs/apps/demos/team-directory.htmldeleted file mode 100644index be577ddde..000000000--- a/docs/apps/demos/team-directory.html+++ /dev/null@@ -1,127 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <title>Prefab</title>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css">- <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js"></script>-</head>-<body>- <div id="root" style="max-width:64rem;margin:0 auto;padding:2rem"></div>- <script id="prefab:initial-data" type="application/json">{- "$prefab": {- "version": "0.2"- },- "view": {- "cssClass": "pf-app-root",- "type": "Div",- "children": [- {- "cssClass": "gap-4 p-6",- "type": "Column",- "children": [- {- "cssClass": "gap-4",- "type": "Grid",- "columnTemplate": "1fr 2fr",- "children": [- {- "type": "PieChart",- "data": [- {- "office": "San Francisco",- "count": 3- },- {- "office": "New York",- "count": 2- },- {- "office": "London",- "count": 1- },- {- "office": "Berlin",- "count": 1- }- ],- "dataKey": "count",- "nameKey": "office",- "height": 300,- "innerRadius": 0,- "showLabel": false,- "paddingAngle": 0,- "showLegend": true,- "showTooltip": true,- "animate": true- },- {- "type": "DataTable",- "columns": [- {- "key": "name",- "header": "Name",- "sortable": true- },- {- "key": "role",- "header": "Role",- "sortable": true- },- {- "key": "office",- "header": "Office",- "sortable": true- }- ],- "rows": [- {- "name": "Alice Chen",- "role": "Staff Engineer",- "office": "San Francisco"- },- {- "name": "Bob Martinez",- "role": "Lead Designer",- "office": "New York"- },- {- "name": "Carol Johnson",- "role": "Senior Engineer",- "office": "London"- },- {- "name": "David Kim",- "role": "Product Manager",- "office": "San Francisco"- },- {- "name": "Eva Mueller",- "role": "Engineer",- "office": "Berlin"- },- {- "name": "Frank Lee",- "role": "Data Scientist",- "office": "San Francisco"- },- {- "name": "Grace Park",- "role": "Engineering Manager",- "office": "New York"- }- ],- "search": true,- "paginated": false,- "pageSize": 10- }- ]- }- ]- }- ]- }-}</script>-</body>-</html>\ No newline at end of filediff --git a/docs/apps/fastmcp-app.mdx b/docs/apps/fastmcp-app.mdxindex f3463da66..55b3b7ed7 100644--- a/docs/apps/fastmcp-app.mdx+++ b/docs/apps/fastmcp-app.mdx@@ -8,12 +8,13 @@ tag: NEWimport { VersionBadge } from '/snippets/version-badge.mdx'import PrefabPinWarning from '/snippets/prefab-pin-warning.mdx'+import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'<VersionBadge version="3.2.0" /><PrefabPinWarning />-<iframe src="/apps/demos/contacts.html" style={{width:"100%", height:"650px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="contacts" height="650px" title="Contacts app demo" />Search a list, fill out a form, click save, the list updates. That pattern β UI that reads and writes data on the server β needs two things: backend tools that actually do the work, and a way to call them from the UI. `FastMCPApp` handles the wiring.diff --git a/docs/apps/overview.mdx b/docs/apps/overview.mdxindex ed04580f6..ff9557058 100644--- a/docs/apps/overview.mdx+++ b/docs/apps/overview.mdx@@ -8,6 +8,7 @@ mode: centerimport { VersionBadge } from '/snippets/version-badge.mdx'import PrefabPinWarning from '/snippets/prefab-pin-warning.mdx'+import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'<VersionBadge version="3.0.0" />@@ -21,7 +22,7 @@ A FastMCP app is a tool that returns an interactive UI instead of text. When themaskImage: 'linear-gradient(to bottom, black 75%, transparent)',WebkitMaskImage: 'linear-gradient(to bottom, black 75%, transparent)',}}>- <iframe src="/apps/demos/hitchhikers.html" style={{width:"100%", height:"2000px", border:"none", borderRadius:"8px", background:"transparent"}} frameBorder="0" scrolling="no" allowtransparency="true"></iframe>+ <PrefabDemoFrame demo="hitchhikers" height="2000px" title="Prefab showcase demo" /></div>The dashboard above is a [Prefab](https://prefab.prefect.io) showcase β a taste of what you can deliver from a FastMCP tool. Every card, chart, slider, dialog, and carousel is a Python component. Build a composition like this, add `@mcp.tool(app=True)`, and the host renders it inside the conversation.diff --git a/docs/apps/prefab.mdx b/docs/apps/prefab.mdxindex 1bebc73de..e6ff7070f 100644--- a/docs/apps/prefab.mdx+++ b/docs/apps/prefab.mdx@@ -8,12 +8,13 @@ tag: NEWimport { VersionBadge } from '/snippets/version-badge.mdx'import PrefabPinWarning from '/snippets/prefab-pin-warning.mdx'+import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'<VersionBadge version="3.1.0" /><PrefabPinWarning />-<iframe src="/apps/demos/dashboard.html" style={{width:"100%", height:"680px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="dashboard" height="680px" title="Sales dashboard demo" />Believe it or not, that dashboard is a FastMCP tool. The chart has tooltips. The table is sortable. The badges are styled by deal stage. The whole thing is about 40 lines of Python, and the user sees it right inside their conversation instead of a wall of JSON.@@ -23,7 +24,7 @@ The pattern behind every example on this page is the same: add `app=True` to youMost tools return data the user wants to explore. A `DataTable` is often the smallest useful upgrade β your data goes from a JSON blob to a searchable, sortable table:-<iframe src="/apps/demos/data-table.html" style={{width:"100%", height:"530px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="data-table" height="530px" title="Data table demo" />```pythonfrom prefab_ui.components import DataTable, DataTableColumn@@ -62,7 +63,7 @@ That's it. Add `app=True`, return a Prefab component instead of raw dicts. FastMWhen numbers tell a better story as a visual, swap in a chart. The API is the same: pass your data as a list of dicts, tell the chart which keys to plot.-<iframe src="/apps/demos/bar-chart.html" style={{width:"100%", height:"430px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="bar-chart" height="430px" title="Bar chart demo" />```python@mcp.tool(app=True)@@ -88,7 +89,7 @@ def quarterly_revenue(year: int) -> BarChart:Each `ChartSeries` plots a different key from the data. `BarChart`, `LineChart`, `AreaChart`, `PieChart`, `RadarChart`, and `RadialChart` all follow the same pattern. Hover over the bars to see tooltips.-<iframe src="/apps/demos/pie-chart.html" style={{width:"100%", height:"410px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="pie-chart" height="410px" title="Pie chart demo" />```python@mcp.tool(app=True)@@ -116,7 +117,7 @@ See the [Prefab chart docs](https://prefab.prefect.io/docs/components) for stackTables and charts are useful on their own, but the real power comes from composing them. `Column` stacks children vertically, `Row` lays them out side by side, and `with` blocks establish nesting β the indentation is the layout.-<iframe src="/apps/demos/dashboard.html" style={{width:"100%", height:"680px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="dashboard" height="680px" title="Sales dashboard demo" />```python expandable@mcp.tool(app=True)@@ -184,7 +185,7 @@ Notice how `Badge` components can be placed inside table cells β any Prefab coEverything above renders once from the data your Python provides. But interactive tools can also respond to user input in real time, without any server round-trips. Prefab's state system lets components read and write client-side values, so the UI updates instantly as the user interacts with it.-<iframe src="/apps/demos/reactive.html" style={{width:"100%", height:"500px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="reactive" height="500px" title="Reactive sales demo" />Try switching regions in the dropdown, and toggling the switch on and off.diff --git a/docs/apps/quickstart.mdx b/docs/apps/quickstart.mdxindex 7b87d1981..2221b9de9 100644--- a/docs/apps/quickstart.mdx+++ b/docs/apps/quickstart.mdx@@ -7,12 +7,13 @@ tag: NEW---import { VersionBadge } from '/snippets/version-badge.mdx'+import { PrefabDemoFrame } from '/snippets/prefab-demo-frame.mdx'<VersionBadge version="3.2.0" />By the end of this page, you'll have a working tool that returns this:-<iframe src="/apps/demos/team-directory.html" style={{width:"100%", height:"545px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="team-directory" height="545px" title="Team directory demo" />A pie chart the user can hover, a table they can sort and search β and a single Python tool.@@ -103,7 +104,7 @@ The UI above renders once from your Python. Prefab apps can also respond to userClick a row in the demo below to see a detail card appear:-<iframe src="/apps/demos/team-directory-reactive.html" style={{width:"100%", height:"675px", border:"none", overflow:"hidden", borderRadius:"8px"}} frameBorder="0" scrolling="no"></iframe>+<PrefabDemoFrame demo="team-directory-reactive" height="675px" title="Reactive team directory demo" />Add a few imports, give each member a couple more fields, wire up a click handler, and render a detail card when something's selected:diff --git a/docs/prefab-demo-payloads.js b/docs/prefab-demo-payloads.jsnew file mode 100644index 000000000..885ce713b--- /dev/null+++ b/docs/prefab-demo-payloads.js@@ -0,0 +1 @@+window.__FASTMCP_PREFAB_DEMOS__ = {"bar-chart":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"BarChart\",\n \"data\": [\n {\n \"quarter\": \"Q1\",\n \"revenue\": 42000,\n \"costs\": 28000\n },\n {\n \"quarter\": \"Q2\",\n \"revenue\": 51000,\n \"costs\": 31000\n },\n {\n \"quarter\": \"Q3\",\n \"revenue\": 47000,\n \"costs\": 29000\n },\n {\n \"quarter\": \"Q4\",\n \"revenue\": 63000,\n \"costs\": 35000\n }\n ],\n \"series\": [\n {\n \"dataKey\": \"revenue\",\n \"label\": \"Revenue\"\n },\n {\n \"dataKey\": \"costs\",\n \"label\": \"Costs\"\n }\n ],\n \"xAxis\": \"quarter\",\n \"height\": 250,\n \"stacked\": false,\n \"horizontal\": false,\n \"barRadius\": 4,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true,\n \"showGrid\": true,\n \"showYAxis\": true,\n \"yAxisFormat\": \"auto\"\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>","contacts":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"name\",\n \"header\": \"Name\",\n \"sortable\": true\n },\n {\n \"key\": \"email\",\n \"header\": \"Email\",\n \"sortable\": false\n },\n {\n \"key\": \"category\",\n \"header\": \"Category\",\n \"sortable\": false\n }\n ],\n \"rows\": [\n {\n \"name\": \"Arthur Dent\",\n \"email\": \"[email protected]\",\n \"category\": {\n \"type\": \"Badge\",\n \"label\": \"Customer\",\n \"variant\": \"success\"\n }\n },\n {\n \"name\": \"Ford Prefect\",\n \"email\": \"[email protected]\",\n \"category\": {\n \"type\": \"Badge\",\n \"label\": \"Partner\",\n \"variant\": \"secondary\"\n }\n },\n {\n \"name\": \"Trillian Astra\",\n \"email\": \"[email protected]\",\n \"category\": {\n \"type\": \"Badge\",\n \"label\": \"Customer\",\n \"variant\": \"success\"\n }\n },\n {\n \"name\": \"Zaphod Beeblebrox\",\n \"email\": \"[email protected]\",\n \"category\": {\n \"type\": \"Badge\",\n \"label\": \"Vendor\",\n \"variant\": \"outline\"\n }\n }\n ],\n \"search\": true,\n \"paginated\": false,\n \"pageSize\": 10\n },\n {\n \"type\": \"Separator\",\n \"orientation\": \"horizontal\"\n },\n {\n \"content\": \"Add Contact\",\n \"type\": \"H3\"\n },\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Form\",\n \"onSubmit\": {\n \"action\": \"showToast\",\n \"message\": \"Contact saved! (preview demo \\u2014 no backend wired)\",\n \"variant\": \"success\"\n },\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"name\": \"name\",\n \"type\": \"Input\",\n \"inputType\": \"text\",\n \"placeholder\": \"Full name\",\n \"disabled\": false,\n \"readOnly\": false,\n \"required\": true\n },\n {\n \"name\": \"email\",\n \"type\": \"Input\",\n \"inputType\": \"text\",\n \"placeholder\": \"[email protected]\",\n \"disabled\": false,\n \"readOnly\": false,\n \"required\": true\n }\n ]\n },\n {\n \"name\": \"category\",\n \"type\": \"Select\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false,\n \"invalid\": false,\n \"children\": [\n {\n \"type\": \"SelectOption\",\n \"value\": \"Customer\",\n \"label\": \"Customer\",\n \"selected\": false,\n \"disabled\": false\n },\n {\n \"type\": \"SelectOption\",\n \"value\": \"Partner\",\n \"label\": \"Partner\",\n \"selected\": false,\n \"disabled\": false\n },\n {\n \"type\": \"SelectOption\",\n \"value\": \"Vendor\",\n \"label\": \"Vendor\",\n \"selected\": false,\n \"disabled\": false\n }\n ]\n },\n {\n \"type\": \"Button\",\n \"label\": \"Save Contact\",\n \"variant\": \"default\",\n \"size\": \"default\",\n \"disabled\": false\n }\n ]\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>","dashboard":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"gap-6\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"type\": \"Metric\",\n \"label\": \"Revenue (Q1-Q4)\",\n \"value\": \"$220,500\"\n },\n {\n \"type\": \"Metric\",\n \"label\": \"Deals\",\n \"value\": \"4\"\n }\n ]\n },\n {\n \"type\": \"BarChart\",\n \"data\": [\n {\n \"month\": \"Jan\",\n \"revenue\": 48200,\n \"costs\": 31000\n },\n {\n \"month\": \"Feb\",\n \"revenue\": 52100,\n \"costs\": 32500\n },\n {\n \"month\": \"Mar\",\n \"revenue\": 61800,\n \"costs\": 34200\n },\n {\n \"month\": \"Apr\",\n \"revenue\": 58400,\n \"costs\": 33800\n }\n ],\n \"series\": [\n {\n \"dataKey\": \"revenue\",\n \"label\": \"Revenue\"\n },\n {\n \"dataKey\": \"costs\",\n \"label\": \"Costs\"\n }\n ],\n \"xAxis\": \"month\",\n \"height\": 200,\n \"stacked\": false,\n \"horizontal\": false,\n \"barRadius\": 4,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true,\n \"showGrid\": true,\n \"showYAxis\": true,\n \"yAxisFormat\": \"auto\"\n },\n {\n \"type\": \"Separator\",\n \"orientation\": \"horizontal\"\n },\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"account\",\n \"header\": \"Account\",\n \"sortable\": true\n },\n {\n \"key\": \"value\",\n \"header\": \"Value\",\n \"sortable\": true\n },\n {\n \"key\": \"stage\",\n \"header\": \"Stage\",\n \"sortable\": false\n }\n ],\n \"rows\": [\n {\n \"account\": \"Acme Corp\",\n \"value\": \"$84,000\",\n \"stage\": {\n \"type\": \"Badge\",\n \"label\": \"Won\",\n \"variant\": \"success\"\n }\n },\n {\n \"account\": \"Globex Inc\",\n \"value\": \"$52,000\",\n \"stage\": {\n \"type\": \"Badge\",\n \"label\": \"Negotiation\",\n \"variant\": \"secondary\"\n }\n },\n {\n \"account\": \"Initech\",\n \"value\": \"$31,500\",\n \"stage\": {\n \"type\": \"Badge\",\n \"label\": \"Proposal\",\n \"variant\": \"secondary\"\n }\n },\n {\n \"account\": \"Wayne Enterprises\",\n \"value\": \"$45,000\",\n \"stage\": {\n \"type\": \"Badge\",\n \"label\": \"Lost\",\n \"variant\": \"destructive\"\n }\n }\n ],\n \"search\": false,\n \"paginated\": false,\n \"pageSize\": 10\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>","data-table":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"name\",\n \"header\": \"Name\",\n \"sortable\": true\n },\n {\n \"key\": \"role\",\n \"header\": \"Role\",\n \"sortable\": true\n },\n {\n \"key\": \"dept\",\n \"header\": \"Dept\",\n \"sortable\": true\n }\n ],\n \"rows\": [\n {\n \"name\": \"Alice Chen\",\n \"role\": \"Staff Engineer\",\n \"dept\": \"Platform\"\n },\n {\n \"name\": \"Bob Martinez\",\n \"role\": \"Lead Designer\",\n \"dept\": \"Design\"\n },\n {\n \"name\": \"Carol Johnson\",\n \"role\": \"Senior Engineer\",\n \"dept\": \"Platform\"\n },\n {\n \"name\": \"David Kim\",\n \"role\": \"Product Manager\",\n \"dept\": \"Product\"\n },\n {\n \"name\": \"Eva Mueller\",\n \"role\": \"Engineer\",\n \"dept\": \"Platform\"\n },\n {\n \"name\": \"Frank Lee\",\n \"role\": \"Data Scientist\",\n \"dept\": \"ML\"\n },\n {\n \"name\": \"Grace Park\",\n \"role\": \"Eng Manager\",\n \"dept\": \"Platform\"\n }\n ],\n \"search\": true,\n \"paginated\": false,\n \"pageSize\": 10\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>","hitchhikers":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab Showcase</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n<style>html, body, #root { background: transparent !important; }</style></head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"onMount\": {\n \"action\": \"setInterval\",\n \"duration\": 400,\n \"onTick\": {\n \"action\": \"setState\",\n \"key\": \"ctx_tick\",\n \"value\": \"{{ ctx_tick + 1 }}\"\n }\n },\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n \"type\": \"Grid\",\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Register Towel\"\n },\n {\n \"type\": \"CardDescription\",\n \"content\": \"The most important item in the galaxy\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-3\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"name\": \"combobox_1\",\n \"type\": \"Combobox\",\n \"placeholder\": \"Type...\",\n \"searchPlaceholder\": \"Search types...\",\n \"disabled\": false,\n \"invalid\": false,\n \"children\": [\n {\n \"type\": \"ComboboxOption\",\n \"value\": \"bath\",\n \"label\": \"Bath\",\n \"disabled\": false\n },\n {\n \"type\": \"ComboboxOption\",\n \"value\": \"beach\",\n \"label\": \"Beach\",\n \"disabled\": false\n },\n {\n \"type\": \"ComboboxOption\",\n \"value\": \"interstellar\",\n \"label\": \"Interstellar\",\n \"disabled\": false\n },\n {\n \"type\": \"ComboboxOption\",\n \"value\": \"micro\",\n \"label\": \"Microfiber\",\n \"disabled\": false\n }\n ]\n },\n {\n \"name\": \"datepicker_1\",\n \"type\": \"DatePicker\",\n \"placeholder\": \"Registration date\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"CardFooter\",\n \"children\": [\n {\n \"cssClass\": \"gap-2\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"type\": \"Dialog\",\n \"title\": \"Towel Registered!\",\n \"description\": \"Your towel has been added to the galactic registry.\",\n \"dismissible\": true,\n \"children\": [\n {\n \"type\": \"Button\",\n \"label\": \"Register\",\n \"variant\": \"default\",\n \"size\": \"default\",\n \"disabled\": false\n },\n {\n \"content\": \"Don't forget to bring it.\",\n \"type\": \"Text\"\n }\n ]\n },\n {\n \"type\": \"Button\",\n \"label\": \"Cancel\",\n \"variant\": \"outline\",\n \"size\": \"default\",\n \"disabled\": false\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Condition\",\n \"cases\": [\n {\n \"when\": \"{{ !pressed }}\",\n \"children\": [\n {\n \"type\": \"Button\",\n \"label\": \"This is probably the best button to press.\",\n \"variant\": \"success\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"setState\",\n \"key\": \"pressed\",\n \"value\": true\n }\n }\n ]\n }\n ],\n \"else\": [\n {\n \"type\": \"Button\",\n \"label\": \"Please do not press this button again.\",\n \"variant\": \"destructive\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"setState\",\n \"key\": \"pressed\",\n \"value\": false\n }\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Ship Status\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-3\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"items-center justify-between\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"heart-of-gold\",\n \"type\": \"Text\"\n },\n {\n \"type\": \"HoverCard\",\n \"openDelay\": 0,\n \"closeDelay\": 200,\n \"children\": [\n {\n \"type\": \"Badge\",\n \"label\": \"In Orbit\",\n \"variant\": \"default\"\n },\n {\n \"cssClass\": \"gap-2\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"content\": \"heart-of-gold\",\n \"type\": \"Text\"\n },\n {\n \"content\": \"Deployed 2h ago\",\n \"type\": \"Muted\"\n },\n {\n \"type\": \"Progress\",\n \"value\": 100.0,\n \"max\": 100.0,\n \"variant\": \"success\",\n \"size\": \"default\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"pf-progress-flat\",\n \"type\": \"Progress\",\n \"value\": 100.0,\n \"max\": 100.0,\n \"variant\": \"default\",\n \"size\": \"default\",\n \"indicatorClass\": \"bg-yellow-400\"\n },\n {\n \"cssClass\": \"items-center justify-between\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"vogon-poetry\",\n \"type\": \"Text\"\n },\n {\n \"type\": \"Tooltip\",\n \"content\": \"64% \\u2014 ETA 12 min\",\n \"delay\": 0,\n \"children\": [\n {\n \"type\": \"Badge\",\n \"variant\": \"secondary\",\n \"children\": [\n {\n \"type\": \"Loader\",\n \"variant\": \"spin\",\n \"size\": \"sm\"\n },\n {\n \"content\": \"Deploying\",\n \"type\": \"Text\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Progress\",\n \"value\": 64.0,\n \"max\": 100.0,\n \"variant\": \"default\",\n \"size\": \"default\"\n },\n {\n \"cssClass\": \"items-center justify-between\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"deep-thought\",\n \"type\": \"Text\"\n },\n {\n \"type\": \"Tooltip\",\n \"content\": \"Computing... 7.5 million years remaining\",\n \"delay\": 0,\n \"children\": [\n {\n \"type\": \"Badge\",\n \"variant\": \"outline\",\n \"children\": [\n {\n \"type\": \"Loader\",\n \"variant\": \"ios\",\n \"size\": \"sm\"\n },\n {\n \"content\": \"Soon...\",\n \"type\": \"Text\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Progress\",\n \"value\": 12.0,\n \"max\": 100.0,\n \"variant\": \"default\",\n \"size\": \"default\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Planet Ratings\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"type\": \"RadarChart\",\n \"data\": [\n {\n \"axis\": \"Views\",\n \"earth\": 30,\n \"mag\": 95\n },\n {\n \"axis\": \"Fjords\",\n \"earth\": 65,\n \"mag\": 100\n },\n {\n \"axis\": \"Pubs\",\n \"earth\": 90,\n \"mag\": 10\n },\n {\n \"axis\": \"Mice\",\n \"earth\": 40,\n \"mag\": 85\n },\n {\n \"axis\": \"Tea\",\n \"earth\": 95,\n \"mag\": 15\n },\n {\n \"axis\": \"Safety\",\n \"earth\": 45,\n \"mag\": 70\n }\n ],\n \"series\": [\n {\n \"dataKey\": \"earth\",\n \"label\": \"Earth\"\n },\n {\n \"dataKey\": \"mag\",\n \"label\": \"Magrathea\"\n }\n ],\n \"axisKey\": \"axis\",\n \"height\": 200,\n \"filled\": true,\n \"showDots\": false,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true,\n \"showGrid\": true\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Survival Odds\"\n }\n ]\n },\n {\n \"cssClass\": \"w-fit mx-auto\",\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"type\": \"Ring\",\n \"value\": 42.0,\n \"min\": 0,\n \"max\": 100,\n \"label\": \"42%\",\n \"variant\": \"info\",\n \"size\": \"lg\",\n \"thickness\": 12.0,\n \"indicatorClass\": \"group-hover:drop-shadow-[0_0_24px_rgba(59,130,246,0.9)]\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"cssClass\": \"gap-2 items-center\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Improbability Drive\"\n },\n {\n \"cssClass\": \"text-blue-500\",\n \"type\": \"Loader\",\n \"variant\": \"pulse\",\n \"size\": \"sm\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-2\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"name\": \"improbability\",\n \"value\": 42.0,\n \"type\": \"Slider\",\n \"min\": 0.0,\n \"max\": 100.0,\n \"disabled\": false,\n \"size\": \"default\"\n },\n {\n \"cssClass\": \"items-center justify-between\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"Probable\",\n \"type\": \"Muted\"\n },\n {\n \"content\": \"Infinite\",\n \"type\": \"Muted\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Carousel\",\n \"visible\": 1,\n \"gap\": 16,\n \"direction\": \"up\",\n \"loop\": true,\n \"autoAdvance\": 3000,\n \"continuous\": false,\n \"speed\": 2,\n \"effect\": \"slide\",\n \"dimInactive\": false,\n \"showControls\": false,\n \"controlsPosition\": \"outside\",\n \"showDots\": false,\n \"pauseOnHover\": true,\n \"align\": \"start\",\n \"slidesToScroll\": 1,\n \"drag\": true,\n \"children\": [\n {\n \"type\": \"Alert\",\n \"variant\": \"success\",\n \"icon\": \"circle-check\",\n \"children\": [\n {\n \"type\": \"AlertTitle\",\n \"content\": \"Don't Panic\"\n },\n {\n \"type\": \"AlertDescription\",\n \"content\": \"Normality achieved.\"\n }\n ]\n },\n {\n \"type\": \"Alert\",\n \"variant\": \"destructive\",\n \"icon\": \"triangle-alert\",\n \"children\": [\n {\n \"type\": \"AlertTitle\",\n \"content\": \"Display Department\"\n },\n {\n \"type\": \"AlertDescription\",\n \"content\": \"Beware of the leopard.\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Prefect Horizon Config\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-3\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"name\": \"autoscale\",\n \"value\": true,\n \"type\": \"Switch\",\n \"label\": \"Auto-scale agents\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"type\": \"Separator\",\n \"orientation\": \"horizontal\"\n },\n {\n \"name\": \"code_mode\",\n \"value\": true,\n \"type\": \"Switch\",\n \"label\": \"Code Mode\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"type\": \"Separator\",\n \"orientation\": \"horizontal\"\n },\n {\n \"name\": \"cache\",\n \"value\": false,\n \"type\": \"Switch\",\n \"label\": \"Tool call caching\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false\n }\n ]\n }\n ]\n },\n {\n \"type\": \"CardFooter\",\n \"children\": [\n {\n \"type\": \"Button\",\n \"label\": \"Save Preferences\",\n \"variant\": \"default\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"showToast\",\n \"message\": \"Preferences saved!\"\n }\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Travel Class\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"name\": \"travel_class\",\n \"type\": \"RadioGroup\",\n \"children\": [\n {\n \"name\": \"radio_1\",\n \"value\": false,\n \"type\": \"Radio\",\n \"option\": \"economy\",\n \"label\": \"Economy\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"name\": \"radio_2\",\n \"value\": false,\n \"type\": \"Radio\",\n \"option\": \"business\",\n \"label\": \"Business Class\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"name\": \"radio_3\",\n \"value\": true,\n \"type\": \"Radio\",\n \"option\": \"improbability\",\n \"label\": \"Infinite Improbability\",\n \"disabled\": false,\n \"required\": false\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"md:col-span-2\",\n \"type\": \"GridItem\",\n \"colSpan\": 1,\n \"rowSpan\": 1,\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 grid-cols-2 h-32\",\n \"type\": \"Grid\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Context Window\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-6 justify-center h-full\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"items-center justify-between\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"{{ ctx_tick % 20 * 3 + 20 }}% used\",\n \"type\": \"Text\"\n },\n {\n \"content\": \"{{ (ctx_tick % 20 * 3 + 20) * 2 }}k / 200k tokens\",\n \"type\": \"Muted\"\n }\n ]\n },\n {\n \"type\": \"Tooltip\",\n \"content\": \"Auto-compact buffer: 12%\",\n \"delay\": 0,\n \"children\": [\n {\n \"type\": \"Progress\",\n \"value\": \"{{ ctx_tick % 20 * 3 + 20 }}\",\n \"max\": 100.0,\n \"variant\": \"{{ ctx_tick % 20 * 3 + 20 > 70 ? 'destructive' : (ctx_tick % 20 * 3 + 20 <= 33 ? 'success' : 'default') }}\",\n \"size\": \"default\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"pb-0 gap-0\",\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"type\": \"Metric\",\n \"label\": \"Fjords designed\",\n \"value\": \"1,847\",\n \"delta\": \"+3 coastlines\"\n }\n ]\n },\n {\n \"cssClass\": \"h-16\",\n \"type\": \"Sparkline\",\n \"data\": [\n 820,\n 950,\n 1100,\n 980,\n 1250,\n 1400,\n 1350,\n 1500,\n 1680,\n 1847\n ],\n \"variant\": \"success\",\n \"fill\": true,\n \"curve\": \"linear\",\n \"strokeWidth\": 1.5\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Towel Incidents\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"type\": \"BarChart\",\n \"data\": [\n {\n \"month\": \"Jan\",\n \"lost\": 8,\n \"found\": 5\n },\n {\n \"month\": \"Feb\",\n \"lost\": 24,\n \"found\": 15\n },\n {\n \"month\": \"Mar\",\n \"lost\": 12,\n \"found\": 28\n },\n {\n \"month\": \"Apr\",\n \"lost\": 35,\n \"found\": 19\n },\n {\n \"month\": \"May\",\n \"lost\": 18,\n \"found\": 38\n },\n {\n \"month\": \"Jun\",\n \"lost\": 42,\n \"found\": 30\n }\n ],\n \"series\": [\n {\n \"dataKey\": \"lost\",\n \"label\": \"Lost\"\n },\n {\n \"dataKey\": \"found\",\n \"label\": \"Found\"\n }\n ],\n \"xAxis\": \"month\",\n \"height\": 200,\n \"stacked\": false,\n \"horizontal\": false,\n \"barRadius\": 4,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true,\n \"showGrid\": true,\n \"showYAxis\": true,\n \"yAxisFormat\": \"auto\"\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"gap-4 grid-cols-2\",\n \"type\": \"Grid\",\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-2\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"name\": \"checkbox_1\",\n \"value\": true,\n \"type\": \"Checkbox\",\n \"label\": \"Towel packed\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"name\": \"checkbox_2\",\n \"value\": true,\n \"type\": \"Checkbox\",\n \"label\": \"Guide charged\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"name\": \"checkbox_3\",\n \"value\": false,\n \"type\": \"Checkbox\",\n \"label\": \"Babel fish inserted\",\n \"disabled\": false,\n \"required\": false\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"type\": \"CardTitle\",\n \"content\": \"Marvin's Mood\"\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-3\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"content\": \"How's life?\",\n \"type\": \"P\"\n },\n {\n \"cssClass\": \"gap-2\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"Button\",\n \"label\": \"Meh\",\n \"variant\": \"default\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"showToast\",\n \"message\": \"Noted. Enthusiasm levels nominal.\"\n }\n },\n {\n \"type\": \"Button\",\n \"label\": \"Depressed\",\n \"variant\": \"info\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"showToast\",\n \"message\": \"I think you ought to know I'm feeling very depressed.\"\n }\n },\n {\n \"type\": \"Button\",\n \"label\": \"Don't talk to me about life\",\n \"variant\": \"warning\",\n \"size\": \"default\",\n \"disabled\": false,\n \"onClick\": {\n \"action\": \"showToast\",\n \"message\": \"Brain the size of a planet and they ask me to pick up a piece of paper.\"\n }\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-2 items-center\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"type\": \"Loader\",\n \"variant\": \"dots\",\n \"size\": \"sm\"\n },\n {\n \"content\": \"Marvin is thinking...\",\n \"type\": \"Muted\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"crew\",\n \"header\": \"Crew\",\n \"sortable\": true\n },\n {\n \"key\": \"species\",\n \"header\": \"Species\",\n \"sortable\": true\n },\n {\n \"key\": \"towel\",\n \"header\": \"Towel?\",\n \"sortable\": true\n },\n {\n \"key\": \"status\",\n \"header\": \"Status\",\n \"sortable\": true\n }\n ],\n \"rows\": [\n {\n \"crew\": \"Arthur Dent\",\n \"species\": \"Human\",\n \"towel\": \"Yes\",\n \"status\": \"Confused\"\n },\n {\n \"crew\": \"Ford Prefect\",\n \"species\": \"Betelgeusian\",\n \"towel\": \"Always\",\n \"status\": \"Drinking\"\n },\n {\n \"crew\": \"Zaphod\",\n \"species\": \"Betelgeusian\",\n \"towel\": \"Lost it\",\n \"status\": \"Presidential\"\n },\n {\n \"crew\": \"Trillian\",\n \"species\": \"Human\",\n \"towel\": \"Yes\",\n \"status\": \"Navigating\"\n },\n {\n \"crew\": \"Marvin\",\n \"species\": \"Android\",\n \"towel\": \"No point\",\n \"status\": \"Depressed\"\n },\n {\n \"crew\": \"Slartibartfast\",\n \"species\": \"Magrathean\",\n \"towel\": \"Somewhere\",\n \"status\": \"Designing\"\n }\n ],\n \"search\": true,\n \"paginated\": false,\n \"pageSize\": 10\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n \"state\": {\n \"ctx_tick\": 0,\n \"improbability\": 42\n }\n}</script>\n</body>\n</html>","pie-chart":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"type\": \"PieChart\",\n \"data\": [\n {\n \"category\": \"Bug\",\n \"count\": 42\n },\n {\n \"category\": \"Feature\",\n \"count\": 28\n },\n {\n \"category\": \"Docs\",\n \"count\": 15\n },\n {\n \"category\": \"Infra\",\n \"count\": 10\n }\n ],\n \"dataKey\": \"count\",\n \"nameKey\": \"category\",\n \"height\": 240,\n \"innerRadius\": 50,\n \"showLabel\": false,\n \"paddingAngle\": 0,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>","reactive":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"let\": {\n \"data\": \"{{ region == 'south' ? south : region == 'west' ? west : north }}\"\n },\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 items-center\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"cssClass\": \"w-40\",\n \"name\": \"region\",\n \"type\": \"Select\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false,\n \"invalid\": false,\n \"children\": [\n {\n \"type\": \"SelectOption\",\n \"value\": \"north\",\n \"label\": \"North\",\n \"selected\": false,\n \"disabled\": false\n },\n {\n \"type\": \"SelectOption\",\n \"value\": \"south\",\n \"label\": \"South\",\n \"selected\": false,\n \"disabled\": false\n },\n {\n \"type\": \"SelectOption\",\n \"value\": \"west\",\n \"label\": \"West\",\n \"selected\": false,\n \"disabled\": false\n }\n ]\n },\n {\n \"cssClass\": \"ml-auto\",\n \"name\": \"show_target\",\n \"value\": false,\n \"type\": \"Switch\",\n \"size\": \"default\",\n \"disabled\": false,\n \"required\": false\n },\n {\n \"cssClass\": \"text-sm text-muted-foreground\",\n \"content\": \"Show target\",\n \"type\": \"Text\"\n }\n ]\n },\n {\n \"type\": \"BarChart\",\n \"data\": \"{{ data }}\",\n \"series\": [\n {\n \"dataKey\": \"sales\",\n \"label\": \"Sales\"\n }\n ],\n \"xAxis\": \"month\",\n \"height\": 200,\n \"stacked\": false,\n \"horizontal\": false,\n \"barRadius\": 4,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true,\n \"showGrid\": true,\n \"showYAxis\": true,\n \"yAxisFormat\": \"auto\"\n },\n {\n \"type\": \"Condition\",\n \"cases\": [\n {\n \"when\": \"{{ show_target }}\",\n \"children\": [\n {\n \"type\": \"Metric\",\n \"label\": \"Q1 Target\",\n \"value\": \"$75,000\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n \"state\": {\n \"region\": \"north\",\n \"north\": [\n {\n \"month\": \"Jan\",\n \"sales\": 22000\n },\n {\n \"month\": \"Feb\",\n \"sales\": 25500\n },\n {\n \"month\": \"Mar\",\n \"sales\": 24200\n }\n ],\n \"south\": [\n {\n \"month\": \"Jan\",\n \"sales\": 5800\n },\n {\n \"month\": \"Feb\",\n \"sales\": 6400\n },\n {\n \"month\": \"Mar\",\n \"sales\": 5600\n }\n ],\n \"west\": [\n {\n \"month\": \"Jan\",\n \"sales\": 6000\n },\n {\n \"month\": \"Feb\",\n \"sales\": 6000\n },\n {\n \"month\": \"Mar\",\n \"sales\": 5600\n }\n ],\n \"show_target\": true\n }\n}</script>\n</body>\n</html>","team-directory-reactive":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Grid\",\n \"columnTemplate\": \"1fr 2fr\",\n \"children\": [\n {\n \"type\": \"PieChart\",\n \"data\": [\n {\n \"office\": \"San Francisco\",\n \"count\": 3\n },\n {\n \"office\": \"New York\",\n \"count\": 2\n },\n {\n \"office\": \"London\",\n \"count\": 1\n },\n {\n \"office\": \"Berlin\",\n \"count\": 1\n }\n ],\n \"dataKey\": \"count\",\n \"nameKey\": \"office\",\n \"height\": 300,\n \"innerRadius\": 0,\n \"showLabel\": false,\n \"paddingAngle\": 0,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true\n },\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"name\",\n \"header\": \"Name\",\n \"sortable\": true\n },\n {\n \"key\": \"role\",\n \"header\": \"Role\",\n \"sortable\": true\n },\n {\n \"key\": \"office\",\n \"header\": \"Office\",\n \"sortable\": true\n }\n ],\n \"rows\": [\n {\n \"name\": \"Alice Chen\",\n \"role\": \"Staff Engineer\",\n \"office\": \"San Francisco\",\n \"email\": \"[email protected]\",\n \"projects\": 3\n },\n {\n \"name\": \"Bob Martinez\",\n \"role\": \"Lead Designer\",\n \"office\": \"New York\",\n \"email\": \"[email protected]\",\n \"projects\": 5\n },\n {\n \"name\": \"Carol Johnson\",\n \"role\": \"Senior Engineer\",\n \"office\": \"London\",\n \"email\": \"[email protected]\",\n \"projects\": 2\n },\n {\n \"name\": \"David Kim\",\n \"role\": \"Product Manager\",\n \"office\": \"San Francisco\",\n \"email\": \"[email protected]\",\n \"projects\": 7\n },\n {\n \"name\": \"Eva Mueller\",\n \"role\": \"Engineer\",\n \"office\": \"Berlin\",\n \"email\": \"[email protected]\",\n \"projects\": 1\n },\n {\n \"name\": \"Frank Lee\",\n \"role\": \"Data Scientist\",\n \"office\": \"San Francisco\",\n \"email\": \"[email protected]\",\n \"projects\": 4\n },\n {\n \"name\": \"Grace Park\",\n \"role\": \"Engineering Manager\",\n \"office\": \"New York\",\n \"email\": \"[email protected]\",\n \"projects\": 6\n }\n ],\n \"search\": true,\n \"paginated\": false,\n \"pageSize\": 10,\n \"onRowClick\": {\n \"action\": \"setState\",\n \"key\": \"selected\",\n \"value\": \"{{ $event }}\"\n }\n }\n ]\n },\n {\n \"type\": \"Condition\",\n \"cases\": [\n {\n \"when\": \"{{ selected }}\",\n \"children\": [\n {\n \"type\": \"Card\",\n \"children\": [\n {\n \"type\": \"CardHeader\",\n \"children\": [\n {\n \"cssClass\": \"gap-2 items-center\",\n \"type\": \"Row\",\n \"children\": [\n {\n \"content\": \"{{ selected.name }}\",\n \"type\": \"H3\"\n },\n {\n \"type\": \"Badge\",\n \"label\": \"{{ selected.office }}\",\n \"variant\": \"default\"\n }\n ]\n }\n ]\n },\n {\n \"type\": \"CardContent\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 grid-cols-3\",\n \"type\": \"Grid\",\n \"children\": [\n {\n \"cssClass\": \"gap-0\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"content\": \"Role\",\n \"type\": \"Small\"\n },\n {\n \"content\": \"{{ selected.role }}\",\n \"type\": \"Text\"\n }\n ]\n },\n {\n \"cssClass\": \"gap-0\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"content\": \"Email\",\n \"type\": \"Small\"\n },\n {\n \"content\": \"{{ selected.email }}\",\n \"type\": \"Text\"\n }\n ]\n },\n {\n \"cssClass\": \"gap-0\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"content\": \"Active Projects\",\n \"type\": \"Small\"\n },\n {\n \"content\": \"{{ selected.projects }}\",\n \"type\": \"Text\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n },\n \"state\": {\n \"selected\": null\n }\n}</script>\n</body>\n</html>","team-directory":"<!doctype html>\n<html lang=\"en\">\n<head>\n <title>Prefab</title>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" crossorigin href=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.css\">\n <script type=\"module\" crossorigin src=\"https://cdn.jsdelivr.net/npm/@prefecthq/[email protected]/dist/app/renderer.js\"></script>\n</head>\n<body>\n <div id=\"root\" style=\"max-width:64rem;margin:0 auto;padding:2rem\"></div>\n <script id=\"prefab:initial-data\" type=\"application/json\">{\n \"$prefab\": {\n \"version\": \"0.2\"\n },\n \"view\": {\n \"cssClass\": \"pf-app-root\",\n \"type\": \"Div\",\n \"children\": [\n {\n \"cssClass\": \"gap-4 p-6\",\n \"type\": \"Column\",\n \"children\": [\n {\n \"cssClass\": \"gap-4\",\n \"type\": \"Grid\",\n \"columnTemplate\": \"1fr 2fr\",\n \"children\": [\n {\n \"type\": \"PieChart\",\n \"data\": [\n {\n \"office\": \"San Francisco\",\n \"count\": 3\n },\n {\n \"office\": \"New York\",\n \"count\": 2\n },\n {\n \"office\": \"London\",\n \"count\": 1\n },\n {\n \"office\": \"Berlin\",\n \"count\": 1\n }\n ],\n \"dataKey\": \"count\",\n \"nameKey\": \"office\",\n \"height\": 300,\n \"innerRadius\": 0,\n \"showLabel\": false,\n \"paddingAngle\": 0,\n \"showLegend\": true,\n \"showTooltip\": true,\n \"animate\": true\n },\n {\n \"type\": \"DataTable\",\n \"columns\": [\n {\n \"key\": \"name\",\n \"header\": \"Name\",\n \"sortable\": true\n },\n {\n \"key\": \"role\",\n \"header\": \"Role\",\n \"sortable\": true\n },\n {\n \"key\": \"office\",\n \"header\": \"Office\",\n \"sortable\": true\n }\n ],\n \"rows\": [\n {\n \"name\": \"Alice Chen\",\n \"role\": \"Staff Engineer\",\n \"office\": \"San Francisco\"\n },\n {\n \"name\": \"Bob Martinez\",\n \"role\": \"Lead Designer\",\n \"office\": \"New York\"\n },\n {\n \"name\": \"Carol Johnson\",\n \"role\": \"Senior Engineer\",\n \"office\": \"London\"\n },\n {\n \"name\": \"David Kim\",\n \"role\": \"Product Manager\",\n \"office\": \"San Francisco\"\n },\n {\n \"name\": \"Eva Mueller\",\n \"role\": \"Engineer\",\n \"office\": \"Berlin\"\n },\n {\n \"name\": \"Frank Lee\",\n \"role\": \"Data Scientist\",\n \"office\": \"San Francisco\"\n },\n {\n \"name\": \"Grace Park\",\n \"role\": \"Engineering Manager\",\n \"office\": \"New York\"\n }\n ],\n \"search\": true,\n \"paginated\": false,\n \"pageSize\": 10\n }\n ]\n }\n ]\n }\n ]\n }\n}</script>\n</body>\n</html>"};diff --git a/docs/snippets/prefab-demo-frame.mdx b/docs/snippets/prefab-demo-frame.mdxnew file mode 100644index 000000000..c7d639ece--- /dev/null+++ b/docs/snippets/prefab-demo-frame.mdx@@ -0,0 +1,66 @@+export const PrefabDemoFrame = ({ demo, height, title }) => {+ const [blobUrl, setBlobUrl] = React.useState(null);++ React.useEffect(() => {+ let active = true;+ let objectUrl = null;+ let payloadsPromise = window.__FASTMCP_PREFAB_DEMOS_PROMISE__;++ if (window.__FASTMCP_PREFAB_DEMOS__) {+ payloadsPromise = Promise.resolve(window.__FASTMCP_PREFAB_DEMOS__);+ } else if (!payloadsPromise) {+ payloadsPromise = new Promise((resolve, reject) => {+ const script = document.createElement("script");+ script.src = "/prefab-demo-payloads.js";+ script.onload = () => resolve(window.__FASTMCP_PREFAB_DEMOS__);+ script.onerror = reject;+ document.head.appendChild(script);+ });+ window.__FASTMCP_PREFAB_DEMOS_PROMISE__ = payloadsPromise;+ }++ payloadsPromise+ .then((payloads) => {+ const html = payloads[demo];+ if (!html) {+ throw new Error(`Unknown Prefab demo: ${demo}`);+ }+ objectUrl = URL.createObjectURL(+ new Blob([html], { type: "text/html" }),+ );+ if (active) {+ setBlobUrl(objectUrl);+ } else {+ URL.revokeObjectURL(objectUrl);+ }+ });++ return () => {+ active = false;+ if (objectUrl) {+ URL.revokeObjectURL(objectUrl);+ }+ };+ }, [demo]);++ if (!blobUrl) {+ return <div style={{ width: "100%", height, borderRadius: "8px" }} />;+ }++ return (+ <iframe+ src={blobUrl}+ title={title}+ style={{+ width: "100%",+ height,+ border: "none",+ overflow: "hidden",+ borderRadius: "8px",+ }}+ frameBorder="0"+ scrolling="no"+ sandbox="allow-scripts allow-same-origin"+ />+ );+};