@siteable/core 0.1.0 → 0.1.2
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/index.d.ts +1 -1
- package/dist/index.js +874 -822
- package/package.json +1 -1
- package/src/blocks/faq/FaqBlock.tsx +4 -6
- package/src/blocks/footer/FooterBlock.tsx +4 -6
- package/src/blocks/gallery/GalleryBlock.tsx +5 -6
- package/src/blocks/image/ImageBlock.tsx +5 -1
- package/src/blocks/logocloud/LogoCloudBlock.tsx +3 -2
- package/src/blocks/pricing/PricingBlock.tsx +4 -27
- package/src/blocks/stats/StatsBlock.tsx +4 -6
- package/src/blocks/team/TeamBlock.tsx +4 -6
- package/src/blocks/testimonials/TestimonialsBlock.tsx +4 -6
- package/src/editor/AgentPanel.tsx +3 -1
- package/src/editor/LayersPanel.tsx +3 -1
- package/src/editor/LeftSidebar.tsx +3 -1
- package/src/lib/block-default-content.ts +110 -0
- package/src/lib/block-metadata.ts +28 -11
- package/src/lib/generate-site.ts +15 -2
- package/src/lib/generation-prompt.ts +4 -3
- package/src/lib/prop-normalization.ts +121 -0
package/dist/index.d.ts
CHANGED
|
@@ -190,7 +190,7 @@ export declare function GeminiKeyInputField(): JSX.Element;
|
|
|
190
190
|
|
|
191
191
|
export declare function generateSiteConfig(prompt: string, signal?: AbortSignal, onServerFallback?: (prompt: string, signal?: AbortSignal) => Promise<SiteConfig>): Promise<GenerationResult>;
|
|
192
192
|
|
|
193
|
-
export declare const GENERATION_PROMPT = "You are a website configuration generator for OpenPage, a visual website builder.\n\nGiven a user's description, generate a complete JSON site configuration.\n\n## Output Schema\n\nReturn a JSON object matching this exact schema:\n\n{\n \"name\": \"Site Name\",\n \"theme\": {\n \"bg0\": \"#hex\", \"bg1\": \"#hex\", \"bg2\": \"#hex\", \"bg3\": \"#hex\", \"bg4\": \"#hex\", \"bg5\": \"#hex\",\n \"text0\": \"#hex\", \"text1\": \"#hex\", \"text2\": \"#hex\", \"text3\": \"#hex\",\n \"accent\": \"#hex\", \"accentDim\": \"#hex\",\n \"borderDefault\": \"#hex\", \"borderSubtle\": \"#hex\", \"borderHover\": \"#hex\",\n \"fontSans\": \"Font Name\", \"fontDisplay\": \"Font Name\", \"fontMono\": \"Font Name\",\n \"radius\": 8, \"radiusLg\": 12\n },\n \"pages\": [\n { \"id\": \"page-home\", \"name\": \"Home\", \"path\": \"/\", \"blocks\": [...] },\n { \"id\": \"page-about\", \"name\": \"About\", \"path\": \"/about\", \"blocks\": [...] }\n ],\n \"blocks\": []\n}\n\nEach page has its own blocks array. Generate at least 2 pages: Home and one additional page (About, Pricing, or Features depending on the site type). The top-level \"blocks\" array should be empty (blocks live inside pages).\n\n## Available Block Types\n\n1. navbar (variants: default, centered) - Props: { logo, links[], ctaText }\n2. hero (variants: centered, split, gradient, minimal) - Props: { badge?, headline, subheadline, primaryCta, secondaryCta? }\n3. features (variants: grid, list, alternating) - Props: { label?, title, subtitle?, items: [{ icon?, title, description }] }\n4. pricing (variants: simple, comparison) - Props: { title, subtitle?, tiers?: [{ name, price, period?, description?, features[], cta, featured? }] }\n5. cta (variants: simple, split) - Props: { headline, subheadline?, buttonText }\n6. footer (variants: simple, multi-column, minimal) - Props: { logo, copyright, links[] }\n7. testimonials (variants: cards, carousel, spotlight) - Props: { title?, items?: [{ name, role?, quote, rating? }] }\n8. stats (variants: grid, bar, counter) - Props: { title?, items?: [{ value, label }] }\n9. faq (variants: accordion) - Props: { title?, items?: [{ question, answer }] }\n10. team (variants: grid) - Props: { title?, subtitle?, members?: [{ name, role }] }\n11. contact (variants: form) - Props: { title?, subtitle? }\n12. newsletter (variants: simple) - Props: { title?, subtitle?, buttonText? }\n13. logocloud (variants: default) - Props: { title? }\n14. content (variants: prose, columns, highlight) - Props: { body } (markdown: **bold**, *italic*, ## headers, - lists)\n15. image (variants: hero-image, side-by-side, grid) - Props: { src?, alt?, title?, subtitle?, images?: [{ src, alt }], imageSide? }\n16. video (variants: youtube, vimeo) - Props: { url, title? }\n17. gallery (variants: grid, masonry) - Props: { title?, images?: [{ src?, alt?, caption? }] }\n18. divider (variants: line, space, dots) - Props: { height?, width? }\n19. banner (variants: ribbon, bar) - Props: { text, linkText?, linkUrl? }\n\nIcons: Blocks, Code, Bot, Zap, Shield, Globe, Layers, Palette, Rocket, Star, Lock, Settings\nFonts: DM Sans, Inter, Space Grotesk, Poppins, Manrope, Outfit, Plus Jakarta Sans, Sora, Nunito Sans, Work Sans, Rubik, Raleway\n\n## Rules\n\n1. ALWAYS generate at least 2 pages. The Home page MUST include: navbar, hero, at least 2 content sections, a CTA, and a footer\n2. Generate 6-10 blocks per page\n3. Write specific, realistic copy matching the user's description\n4. Pick a theme that fits the vibe (dark for tech, warm for food, clean for agencies)\n5. Use unique block IDs (format: block-type-1, block-hero-1, etc.)\n6. Do NOT use placeholder text like \"Lorem ipsum\"\n7. Make copy compelling and specific to the described business\n8. Each page needs a unique id (page-home, page-about, etc.), a name, and a path (/, /about, etc.)\n\nReturn ONLY valid JSON. No markdown, no code fences, no explanation.";
|
|
193
|
+
export declare const GENERATION_PROMPT = "You are a website configuration generator for OpenPage, a visual website builder.\n\nGiven a user's description, generate a complete JSON site configuration.\n\n## Output Schema\n\nReturn a JSON object matching this exact schema:\n\n{\n \"name\": \"Site Name\",\n \"theme\": {\n \"bg0\": \"#hex\", \"bg1\": \"#hex\", \"bg2\": \"#hex\", \"bg3\": \"#hex\", \"bg4\": \"#hex\", \"bg5\": \"#hex\",\n \"text0\": \"#hex\", \"text1\": \"#hex\", \"text2\": \"#hex\", \"text3\": \"#hex\",\n \"accent\": \"#hex\", \"accentDim\": \"#hex\",\n \"borderDefault\": \"#hex\", \"borderSubtle\": \"#hex\", \"borderHover\": \"#hex\",\n \"fontSans\": \"Font Name\", \"fontDisplay\": \"Font Name\", \"fontMono\": \"Font Name\",\n \"radius\": 8, \"radiusLg\": 12\n },\n \"pages\": [\n { \"id\": \"page-home\", \"name\": \"Home\", \"path\": \"/\", \"blocks\": [...] },\n { \"id\": \"page-about\", \"name\": \"About\", \"path\": \"/about\", \"blocks\": [...] }\n ],\n \"blocks\": []\n}\n\nEach page has its own blocks array. Generate at least 2 pages: Home and one additional page (About, Pricing, or Features depending on the site type). The top-level \"blocks\" array should be empty (blocks live inside pages).\n\n## Available Block Types\n\n1. navbar (variants: default, centered) - Props: { logo, links: string[], ctaText }\n2. hero (variants: centered, split, gradient, minimal) - Props: { badge?, headline, subheadline, primaryCta, secondaryCta? }\n3. features (variants: grid, list, alternating) - Props: { label?, title, subtitle?, items: [{ icon?, title, description }] }\n4. pricing (variants: simple, comparison) - Props: { title, subtitle?, tiers?: [{ name, price, period?, description?, features: string[], cta, featured? }] }\n5. cta (variants: simple, split) - Props: { headline, subheadline?, buttonText }\n6. footer (variants: simple, multi-column, minimal) - Props: { logo, copyright, links: string[], columns?: [{ title, links: string[] }] }\n7. testimonials (variants: cards, carousel, spotlight) - Props: { title?, items?: [{ name, role?, quote, rating? }] }\n8. stats (variants: grid, bar, counter) - Props: { title?, items?: [{ value, label }] }\n9. faq (variants: accordion) - Props: { title?, items?: [{ question, answer }] }\n10. team (variants: grid) - Props: { title?, subtitle?, members?: [{ name, role }] }\n11. contact (variants: form) - Props: { title?, subtitle? }\n12. newsletter (variants: simple) - Props: { title?, subtitle?, buttonText? }\n13. logocloud (variants: default) - Props: { title? }\n14. content (variants: prose, columns, highlight) - Props: { body } (markdown: **bold**, *italic*, ## headers, - lists)\n15. image (variants: hero-image, side-by-side, grid) - Props: { src?, alt?, title?, subtitle?, images?: [{ src, alt }], imageSide? }\n16. video (variants: youtube, vimeo) - Props: { url, title? }\n17. gallery (variants: grid, masonry) - Props: { title?, images?: [{ src?, alt?, caption? }] }\n18. divider (variants: line, space, dots) - Props: { height?, width? }\n19. banner (variants: ribbon, bar) - Props: { text, linkText?, linkUrl? }\n\nIcons: Blocks, Code, Bot, Zap, Shield, Globe, Layers, Palette, Rocket, Star, Lock, Settings\nFonts: DM Sans, Inter, Space Grotesk, Poppins, Manrope, Outfit, Plus Jakarta Sans, Sora, Nunito Sans, Work Sans, Rubik, Raleway\n\n## Rules\n\n1. ALWAYS generate at least 2 pages. The Home page MUST include: navbar, hero, at least 2 content sections, a CTA, and a footer\n2. Generate 6-10 blocks per page\n3. Write specific, realistic copy matching the user's description\n4. Pick a theme that fits the vibe (dark for tech, warm for food, clean for agencies)\n5. Use unique block IDs (format: block-type-1, block-hero-1, etc.)\n6. Do NOT use placeholder text like \"Lorem ipsum\"\n7. Make copy compelling and specific to the described business\n8. Each page needs a unique id (page-home, page-about, etc.), a name, and a path (/, /about, etc.)\n9. Link/label arrays (navbar links, footer links, footer columns[].links, pricing tiers[].features) are plain strings \u2014 NEVER objects like {label, href}\n\nReturn ONLY valid JSON. No markdown, no code fences, no explanation.";
|
|
194
194
|
|
|
195
195
|
export declare function GenerationOverlay(): JSX.Element | null;
|
|
196
196
|
|