@upstart.gg/sdk 0.0.137 → 0.0.138
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/shared/ai/schemas.js +2 -2
- package/dist/shared/ai/schemas.js.map +1 -1
- package/dist/shared/ai/types.d.ts +2 -2
- package/dist/shared/ai/types.d.ts.map +1 -1
- package/dist/shared/ajv.js +26 -25
- package/dist/shared/ajv.js.map +1 -1
- package/dist/shared/attributes.d.ts +8 -0
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +15 -14
- package/dist/shared/brick-manifest.js +2 -2
- package/dist/shared/bricks/manifests/accordion.manifest.js +8 -7
- package/dist/shared/bricks/manifests/all-manifests.js +38 -37
- package/dist/shared/bricks/manifests/all-props.d.ts +32 -22
- package/dist/shared/bricks/manifests/all-props.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-props.js +40 -39
- package/dist/shared/bricks/manifests/all-props.js.map +1 -1
- package/dist/shared/bricks/manifests/box.manifest.js +11 -10
- package/dist/shared/bricks/manifests/button.manifest.js +10 -9
- package/dist/shared/bricks/manifests/card.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +13 -12
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js +11 -10
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +9 -8
- package/dist/shared/bricks/manifests/form.manifest.js +9 -8
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +2 -4
- package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +10 -9
- package/dist/shared/bricks/manifests/html.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/html.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/html.manifest.js +6 -5
- package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.js +9 -8
- package/dist/shared/bricks/manifests/image.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +12 -11
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +11 -10
- package/dist/shared/bricks/manifests/map.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/map.manifest.js +9 -8
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +11 -10
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js +11 -10
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js +10 -9
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js +6 -5
- package/dist/shared/bricks/manifests/table.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/table.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/table.manifest.js +10 -9
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts +1 -1
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/tabs.manifest.js +11 -10
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +3 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js +13 -12
- package/dist/shared/bricks/manifests/text.manifest.d.ts +2 -5
- package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +10 -9
- package/dist/shared/bricks/manifests/timeline.manifest.js +11 -10
- package/dist/shared/bricks/manifests/video.manifest.js +9 -8
- package/dist/shared/bricks/props/background.d.ts.map +1 -1
- package/dist/shared/bricks/props/background.js +1 -1
- package/dist/shared/bricks/props/border.js +2 -2
- package/dist/shared/bricks/props/color.d.ts.map +1 -1
- package/dist/shared/bricks/props/color.js +1 -1
- package/dist/shared/bricks/props/common.d.ts.map +1 -1
- package/dist/shared/bricks/props/common.js +2 -1
- package/dist/shared/bricks/props/grow.d.ts +3 -0
- package/dist/shared/bricks/props/grow.d.ts.map +1 -0
- package/dist/shared/bricks/props/grow.js +10 -0
- package/dist/shared/bricks/props/grow.js.map +1 -0
- package/dist/shared/bricks/props/helpers.js +3 -2
- package/dist/shared/bricks/props/image.d.ts +1 -0
- package/dist/shared/bricks/props/image.d.ts.map +1 -1
- package/dist/shared/bricks/props/image.js +1 -1
- package/dist/shared/bricks/props/string.d.ts.map +1 -1
- package/dist/shared/bricks/props/string.js +1 -1
- package/dist/shared/bricks.d.ts +18 -17
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +39 -38
- package/dist/shared/chunk-2EOCK66Z.js +19 -0
- package/dist/shared/chunk-2EOCK66Z.js.map +1 -0
- package/dist/shared/{chunk-XXPSM6UA.js → chunk-2UEPTT5J.js} +5 -9
- package/dist/shared/chunk-2UEPTT5J.js.map +1 -0
- package/dist/shared/{chunk-DRQKKPTX.js → chunk-2Z5WOCFS.js} +41 -1
- package/dist/shared/chunk-2Z5WOCFS.js.map +1 -0
- package/dist/shared/{chunk-7U5WPHXB.js → chunk-34IUWNRX.js} +7 -7
- package/dist/shared/chunk-57NRTXRA.js +309 -0
- package/dist/shared/chunk-57NRTXRA.js.map +1 -0
- package/dist/shared/{chunk-T6C3NG2L.js → chunk-5HJT5NJ3.js} +8 -8
- package/dist/shared/{chunk-BZTWZC77.js → chunk-5J4Y43RM.js} +37 -179
- package/dist/shared/chunk-5J4Y43RM.js.map +1 -0
- package/dist/shared/{chunk-KKWT3OXF.js → chunk-5OVOXUFX.js} +3 -2
- package/dist/shared/{chunk-KKWT3OXF.js.map → chunk-5OVOXUFX.js.map} +1 -1
- package/dist/shared/{chunk-XK2CERPB.js → chunk-5SNSUC6Q.js} +7 -7
- package/dist/shared/{chunk-JLDAS3VE.js → chunk-B5T2LFV2.js} +10 -14
- package/dist/shared/chunk-B5T2LFV2.js.map +1 -0
- package/dist/shared/{chunk-PF75LW33.js → chunk-E3ZW57HF.js} +18 -9
- package/dist/shared/chunk-E3ZW57HF.js.map +1 -0
- package/dist/shared/{chunk-JSDKK5QN.js → chunk-EUFVTHAG.js} +5 -3
- package/dist/shared/chunk-EUFVTHAG.js.map +1 -0
- package/dist/shared/{chunk-U4KZUX37.js → chunk-FC52EHCC.js} +8 -8
- package/dist/shared/chunk-FC52EHCC.js.map +1 -0
- package/dist/shared/{chunk-JW7MQAU4.js → chunk-FVV27R73.js} +9 -94
- package/dist/shared/chunk-FVV27R73.js.map +1 -0
- package/dist/shared/{chunk-SQXZNGQF.js → chunk-FYGFB5U5.js} +3 -1
- package/dist/shared/chunk-FYGFB5U5.js.map +1 -0
- package/dist/shared/{chunk-J45LSQT6.js → chunk-GNTJT7MR.js} +2 -2
- package/dist/shared/chunk-HHUFGV7J.js +259 -0
- package/dist/shared/chunk-HHUFGV7J.js.map +1 -0
- package/dist/shared/{chunk-W2RFDII5.js → chunk-IMDOF55E.js} +12 -4
- package/dist/shared/chunk-IMDOF55E.js.map +1 -0
- package/dist/shared/{chunk-KQH6V22E.js → chunk-IPWYNE6Y.js} +25 -25
- package/dist/shared/{chunk-H6TMBELF.js → chunk-J6R3GSKS.js} +46 -34
- package/dist/shared/chunk-J6R3GSKS.js.map +1 -0
- package/dist/shared/{chunk-TBT2PTGB.js → chunk-KRODRZNS.js} +9 -9
- package/dist/shared/chunk-KTA7XES3.js +168 -0
- package/dist/shared/chunk-KTA7XES3.js.map +1 -0
- package/dist/shared/{chunk-SK2O7GFC.js → chunk-L4W4B2RQ.js} +15 -70
- package/dist/shared/chunk-L4W4B2RQ.js.map +1 -0
- package/dist/shared/{chunk-MYOLWTB2.js → chunk-NTP6BKRU.js} +9 -9
- package/dist/shared/chunk-NTP6BKRU.js.map +1 -0
- package/dist/shared/{chunk-JF52BBFD.js → chunk-O53V22BK.js} +18 -10
- package/dist/shared/chunk-O53V22BK.js.map +1 -0
- package/dist/shared/{chunk-ZVJNRKT4.js → chunk-ORIUCOED.js} +7 -7
- package/dist/shared/{chunk-LGDDJJHK.js → chunk-PFZMRSHJ.js} +11 -11
- package/dist/shared/{chunk-6AE7UD73.js → chunk-QHKOAIOK.js} +31 -60
- package/dist/shared/chunk-QHKOAIOK.js.map +1 -0
- package/dist/shared/{chunk-LPAQ47C6.js → chunk-RDOCVLCF.js} +11 -11
- package/dist/shared/{chunk-VSLRTXLF.js → chunk-RFH7PEVS.js} +5 -4
- package/dist/shared/chunk-RFH7PEVS.js.map +1 -0
- package/dist/shared/{chunk-XNRSL6FL.js → chunk-T3UPW5OW.js} +5 -4
- package/dist/shared/{chunk-XNRSL6FL.js.map → chunk-T3UPW5OW.js.map} +1 -1
- package/dist/shared/{chunk-FUUSAMN3.js → chunk-TGKNA2JS.js} +8 -8
- package/dist/shared/{chunk-HY7JOP3J.js → chunk-TZ6X7ZM5.js} +19 -11
- package/dist/shared/chunk-TZ6X7ZM5.js.map +1 -0
- package/dist/shared/{chunk-VTCHJT4O.js → chunk-UC75KRLX.js} +2 -2
- package/dist/shared/{chunk-4KY7OZWD.js → chunk-VMIJ6MG5.js} +13 -13
- package/dist/shared/{chunk-SRYBJ6NQ.js → chunk-VYA2FCTY.js} +2 -2
- package/dist/shared/{chunk-LGGPCCCY.js → chunk-XYWSIMZ6.js} +3 -3
- package/dist/shared/chunk-XYWSIMZ6.js.map +1 -0
- package/dist/shared/{chunk-FHA4DFIM.js → chunk-ZYQZUWF7.js} +10 -10
- package/dist/shared/{chunk-2O5HVPID.js → chunk-ZZVYD4BG.js} +3 -3
- package/dist/shared/context.d.ts +4 -0
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/context.js +43 -42
- package/dist/shared/context.js.map +1 -1
- package/dist/shared/page.d.ts +2 -0
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +41 -40
- package/dist/shared/site.d.ts +7 -0
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +43 -42
- package/dist/shared/sitemap.js +42 -41
- package/dist/shared/utils/schema.d.ts +0 -5
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +1 -3
- package/package.json +2 -2
- package/src/shared/ai/schemas.ts +1 -1
- package/src/shared/ai/types.ts +2 -2
- package/src/shared/bricks/manifests/card.manifest.ts +25 -168
- package/src/shared/bricks/manifests/hero.manifest.ts +44 -249
- package/src/shared/bricks/manifests/html.manifest.ts +6 -0
- package/src/shared/bricks/manifests/icon.manifest.ts +1 -89
- package/src/shared/bricks/manifests/image.manifest.ts +0 -4
- package/src/shared/bricks/manifests/images-gallery.manifest.ts +8 -0
- package/src/shared/bricks/manifests/map.manifest.ts +9 -65
- package/src/shared/bricks/manifests/sidebar.manifest.ts +0 -1
- package/src/shared/bricks/manifests/social-links.manifest.ts +0 -1
- package/src/shared/bricks/manifests/spacer.manifest.ts +0 -1
- package/src/shared/bricks/manifests/table.manifest.ts +6 -0
- package/src/shared/bricks/manifests/tabs.manifest.ts +12 -429
- package/src/shared/bricks/manifests/testimonials.manifest.ts +28 -226
- package/src/shared/bricks/manifests/text.manifest.ts +16 -44
- package/src/shared/bricks/props/background.ts +2 -1
- package/src/shared/bricks/props/color.ts +5 -2
- package/src/shared/bricks/props/common.ts +2 -8
- package/src/shared/bricks/props/grow.ts +11 -0
- package/src/shared/bricks/props/image.ts +40 -0
- package/src/shared/bricks/props/string.ts +2 -0
- package/src/shared/bricks.ts +33 -23
- package/src/shared/page.ts +1 -0
- package/src/shared/site.ts +1 -0
- package/src/shared/utils/schema.ts +28 -18
- package/src/shared/utils/tests/schema.test.ts +211 -4
- package/dist/shared/chunk-6AE7UD73.js.map +0 -1
- package/dist/shared/chunk-BZTWZC77.js.map +0 -1
- package/dist/shared/chunk-DRQKKPTX.js.map +0 -1
- package/dist/shared/chunk-H6TMBELF.js.map +0 -1
- package/dist/shared/chunk-HUWMIXNN.js +0 -570
- package/dist/shared/chunk-HUWMIXNN.js.map +0 -1
- package/dist/shared/chunk-HY7JOP3J.js.map +0 -1
- package/dist/shared/chunk-JF52BBFD.js.map +0 -1
- package/dist/shared/chunk-JLDAS3VE.js.map +0 -1
- package/dist/shared/chunk-JSDKK5QN.js.map +0 -1
- package/dist/shared/chunk-JW7MQAU4.js.map +0 -1
- package/dist/shared/chunk-LGGPCCCY.js.map +0 -1
- package/dist/shared/chunk-MYOLWTB2.js.map +0 -1
- package/dist/shared/chunk-O24RDXZS.js +0 -505
- package/dist/shared/chunk-O24RDXZS.js.map +0 -1
- package/dist/shared/chunk-PF75LW33.js.map +0 -1
- package/dist/shared/chunk-QEJGPYTB.js +0 -462
- package/dist/shared/chunk-QEJGPYTB.js.map +0 -1
- package/dist/shared/chunk-SK2O7GFC.js.map +0 -1
- package/dist/shared/chunk-SQXZNGQF.js.map +0 -1
- package/dist/shared/chunk-U4KZUX37.js.map +0 -1
- package/dist/shared/chunk-VSLRTXLF.js.map +0 -1
- package/dist/shared/chunk-W2RFDII5.js.map +0 -1
- package/dist/shared/chunk-XXPSM6UA.js.map +0 -1
- /package/dist/shared/{chunk-7U5WPHXB.js.map → chunk-34IUWNRX.js.map} +0 -0
- /package/dist/shared/{chunk-T6C3NG2L.js.map → chunk-5HJT5NJ3.js.map} +0 -0
- /package/dist/shared/{chunk-XK2CERPB.js.map → chunk-5SNSUC6Q.js.map} +0 -0
- /package/dist/shared/{chunk-J45LSQT6.js.map → chunk-GNTJT7MR.js.map} +0 -0
- /package/dist/shared/{chunk-KQH6V22E.js.map → chunk-IPWYNE6Y.js.map} +0 -0
- /package/dist/shared/{chunk-TBT2PTGB.js.map → chunk-KRODRZNS.js.map} +0 -0
- /package/dist/shared/{chunk-ZVJNRKT4.js.map → chunk-ORIUCOED.js.map} +0 -0
- /package/dist/shared/{chunk-LGDDJJHK.js.map → chunk-PFZMRSHJ.js.map} +0 -0
- /package/dist/shared/{chunk-LPAQ47C6.js.map → chunk-RDOCVLCF.js.map} +0 -0
- /package/dist/shared/{chunk-FUUSAMN3.js.map → chunk-TGKNA2JS.js.map} +0 -0
- /package/dist/shared/{chunk-VTCHJT4O.js.map → chunk-UC75KRLX.js.map} +0 -0
- /package/dist/shared/{chunk-4KY7OZWD.js.map → chunk-VMIJ6MG5.js.map} +0 -0
- /package/dist/shared/{chunk-SRYBJ6NQ.js.map → chunk-VYA2FCTY.js.map} +0 -0
- /package/dist/shared/{chunk-FHA4DFIM.js.map → chunk-ZYQZUWF7.js.map} +0 -0
- /package/dist/shared/{chunk-2O5HVPID.js.map → chunk-ZZVYD4BG.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/hero.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { textContent } from \"../props/text\";\nimport { BsAlphabetUppercase } from \"react-icons/bs\";\nimport type { BrickProps } from \"../props/types\";\nimport { Type } from \"@sinclair/typebox\";\nimport { shadow, textShadow } from \"../props/effects\";\nimport { border, rounding } from \"../props/border\";\nimport { colorPreset } from \"../props/color-preset\";\nimport { alignItems, justifyContent } from \"../props/align\";\nimport { cssLength } from \"../props/css-length\";\nimport type { BrickExample } from \"./_types\";\nimport { backgroundColor } from \"../props/background\";\nimport { color } from \"../props/color\";\n\nexport const manifest = defineBrickManifest({\n type: \"hero\",\n category: \"basic\",\n name: \"Hero\",\n description: \"A big textual element for home pages.\",\n aiInstructions: `PURPOSE\nA prominent textual block (main heading + optional tagline) used to introduce a page, product, event, company, or dynamic entity.\n\nSTRUCTURE\n1. Always supply 'content' (can be plain text or simple HTML like <h1>, <strong>, <br/>).\n2. 'tagline' is optional. Prefer concise value (1 short sentence). Omit if not needed.\n3. Do NOT add buttons, images, forms, lists, or unrelated HTML here (use dedicated bricks for that).\n4. Hero should be placed in vertical sections, except for very specific cases.\n\nCOLOR & BACKGROUND\n- Prefer omitting \"colorPreset\" so the hero inherits its parent section background.\n- If you do set \"colorPreset\", ensure sufficient contrast between text and background.\n\nLAYOUT & SPACING\n• Use padding suited to visual weight: landing hero: 5-8rem desktop; simple page intro: 2-4rem.\n• You may provide a mobile override via mobileProps (e.g. smaller padding such as 2rem).\n• Keep justifyContent + alignItems consistent (usually center/center or start/start). Avoid mixing center with start.\n\nTYPOGRAPHY\n• 'content' should typically render ONE main heading concept (avoid stacking multiple unrelated headings). Use <br/> to split lines when stylistic.\n• Avoid overly long taglines (>140 chars).\n\nDYNAMIC DATA\n• You may interpolate page queries fields fields: {{company.name}}, {{product.name}}, etc.\n• Ensure dynamic tokens exist in the referenced query context. Don't fabricate field names.\n\nRESPONSIVE\n• Use \"mobileProps\" only for necessary reductions (padding, alignment). Do not duplicate unchanged properties.\n\nDON'TS\n✗ Don't add properties that are not in the schema.\n✗ Don't wrap everything with extraneous HTML containers.\n✗ Don't use colorPreset plus a conflicting parent background rationale—choose one.\n\nDO\n✓ Keep content focused.\n✓ Wrap tagline in <p> for alignment control.\n`,\n icon: BsAlphabetUppercase,\n\n defaultWidth: { desktop: \"60dvw\", mobile: \"auto\" },\n\n // Force the wrapper direction to be the same as the text direction\n staticClasses: \"flex-col\",\n\n props: defineProps({\n content: textContent({\n title: \"Hero title\",\n default: \"<h1 style='text-align:center'>Lorem Ipsum<br />dolor sit amet</h1>\",\n }),\n tagline: Type.Optional(\n textContent({\n title: \"Hero tagline\",\n // default: \"<p style='text-align:center'>Use our platform to build your business with confidence.</p>\",\n }),\n ),\n backgroundColor: Type.Optional(\n backgroundColor({\n title: \"Background color\",\n }),\n ),\n color: Type.Optional(\n color({\n title: \"Text color\",\n default: \"text-inherit\",\n }),\n ),\n textShadow: Type.Optional(\n textShadow({\n default: \"text-shadow-sm\",\n }),\n ),\n padding: Type.Optional(\n cssLength({\n default: \"6rem\",\n description: \"Padding inside the hero.\",\n \"ai:instructions\": \"Use only a single value like '1rem' or '10px'\",\n title: \"Padding\",\n \"ui:responsive\": true,\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:padding\",\n }),\n ),\n rounding: rounding({\n default: \"rounded-md\",\n }),\n border: Type.Optional(\n border({\n \"ai:hidden\": true,\n }),\n ),\n shadow: Type.Optional(shadow()),\n justifyContent: Type.Optional(\n justifyContent({\n default: \"justify-center\",\n }),\n ),\n alignItems: Type.Optional(\n alignItems({\n default: \"items-center\",\n }),\n ),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [\n {\n description: \"Simple welcome hero with primary background, centered\",\n type: \"hero\",\n props: {\n content: \"Welcome to Our Platform\",\n tagline: \"<p style='text-align:center'>The future of productivity starts here</p>\",\n padding: \"3rem\",\n },\n },\n {\n description: \"Startup hero with primary gradient background to bottom-right\",\n type: \"hero\",\n props: {\n content: \"Build Something Amazing\",\n tagline: \"<p style='text-align:center'>Turn your ideas into reality with our cutting-edge tools</p>\",\n padding: \"3rem\",\n },\n },\n {\n description: \"Construction company hero with bold presence\",\n type: \"hero\",\n props: {\n content: \"Building Tomorrow Today\",\n tagline:\n \"<p style='text-align:center'>Quality construction services for residential and commercial projects</p>\",\n padding: \"3rem\",\n },\n },\n {\n description: \"Fitness studio hero with accent strong presence\",\n type: \"hero\",\n props: {\n content: \"Transform Your Body\",\n tagline: \"<p style='text-align:center'>High-intensity training programs that deliver real results</p>\",\n padding: \"5rem\",\n textShadow: \"text-shadow-md\",\n rounding: \"rounded-2xl\",\n justifyContent: \"justify-center\",\n alignItems: \"items-center\",\n },\n },\n {\n description: \"Responsive hero with large desktop padding and reduced mobile padding\",\n type: \"hero\",\n props: {\n content: \"All-In-One Platform\",\n tagline: \"<p style='text-align:center'>Design • <i>Launch</i> • Grow</p>\",\n padding: \"8rem\",\n },\n mobileProps: {\n padding: \"3rem\",\n },\n },\n {\n description: \"Hero using dynamic product dataset with light text shadow for contrast\",\n type: \"hero\",\n props: {\n content: \"Introducing {{product.name}}\",\n tagline: \"<p style='text-align:center'>{{product.shortTagline}}</p>\",\n padding: \"5rem\",\n textShadow: \"text-shadow-sm\",\n },\n },\n {\n description: \"Dynamic company hero using business query data; no tagline\",\n type: \"hero\",\n props: {\n content: \"Welcome to {{company.name}}\",\n padding: \"4rem\",\n },\n },\n {\n description: \"Dynamic employee spotlight using employee query\",\n type: \"hero\",\n props: {\n content: \"Meet {{employee.fullName}}\",\n tagline:\n \"<p style='text-align:center'>{{employee.position}} at {{employee.department}} - {{employee.yearsExperience}} years of experience</p>\",\n padding: \"3rem\",\n },\n },\n {\n description: \"Dynamic product launch hero using product query\",\n type: \"hero\",\n props: {\n content: \"Introducing {{product.name}}\",\n tagline: \"<p style='text-align:center'>{{product.description}} - Starting at ${{product.price}}</p>\",\n padding: \"5rem\",\n },\n },\n {\n description: \"Dynamic event announcement using 'allEvents' query, text shadow for contrast\",\n type: \"hero\",\n props: {\n content: \"{{allEvents.title}}\",\n tagline:\n \"<p style='text-align:center'>Join us on {{allEvents.date}} at {{allEvents.venue}} - {{allEvents.city}}</p>\",\n padding: \"4rem\",\n textShadow: \"text-shadow-md\",\n },\n },\n {\n description:\n \"Dynamic blog post hero using article query, alignment to left-center to be able to arrange a brick on its right\",\n type: \"hero\",\n props: {\n content: \"{{article.title}}\",\n tagline:\n \"<p style='text-align:center'>By {{article.author}} • Published {{article.publishDate}} • {{article.readTime}} min read</p>\",\n padding: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AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SACE;AAAA,MACF,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SACE;AAAA,MACF,SAAS;AAAA,MACT,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACA;AAAA,IACE,aACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SACE;AAAA,MACF,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,YAAY;AAAA,IACd;AAAA,EACF;AACF;","names":[]}
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
defineProps
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UC75KRLX.js";
|
|
6
|
+
import {
|
|
7
|
+
grow
|
|
8
|
+
} from "./chunk-2EOCK66Z.js";
|
|
6
9
|
import {
|
|
7
10
|
defineBrickManifest
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GNTJT7MR.js";
|
|
9
12
|
|
|
10
13
|
// src/shared/bricks/manifests/html.manifest.ts
|
|
11
14
|
import { BsCodeSquare } from "react-icons/bs";
|
|
@@ -32,7 +35,12 @@ var manifest = defineBrickManifest({
|
|
|
32
35
|
metadata: {
|
|
33
36
|
category: "content"
|
|
34
37
|
}
|
|
35
|
-
})
|
|
38
|
+
}),
|
|
39
|
+
grow: Type.Optional(
|
|
40
|
+
grow({
|
|
41
|
+
default: true
|
|
42
|
+
})
|
|
43
|
+
)
|
|
36
44
|
})
|
|
37
45
|
});
|
|
38
46
|
var examples = [
|
|
@@ -126,4 +134,4 @@ export {
|
|
|
126
134
|
manifest,
|
|
127
135
|
examples
|
|
128
136
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-IMDOF55E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/html.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport type { BrickProps } from \"../props/types\";\nimport { BsCodeSquare } from \"react-icons/bs\";\n\nimport { Type } from \"@sinclair/typebox\";\nimport type { BrickExample } from \"./_types\";\nimport { grow } from \"../props/grow\";\n\nexport const manifest = defineBrickManifest({\n type: \"html\",\n name: \"Html\",\n category: \"widgets\",\n description:\n \"A flexible brick that accepts HTML content. Useful for embeding custom HTML or third-party widgets.\",\n aiInstructions:\n \"Use only this brick type when integrating third party widgets or custom HTML content. Most of the time, you should use other bricks that are more secure and easier to use.\",\n staticClasses: \"self-stretch\",\n defaultWidth: {\n mobile: \"auto\",\n desktop: \"300px\",\n },\n icon: BsCodeSquare,\n props: defineProps({\n html: Type.String({\n title: \"HTML Content\",\n description: \"The HTML content to render. Use with caution, as it can introduce security risks.\",\n default: \"<div>Your HTML content here</div>\",\n \"ui:placeholder\": \"<div>Your HTML content here</div>\",\n \"ui:multiline\": true,\n metadata: {\n category: \"content\",\n },\n }),\n grow: Type.Optional(\n grow({\n default: true,\n }),\n ),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [\n {\n description: \"A tally form\",\n type: \"html\",\n props: {\n html: '<iframe data-tally-src=\"https://tally.so/embed/wQZpd8?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1\" loading=\"lazy\" width=\"100%\" height=\"282\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" title=\"test\"></iframe>',\n },\n },\n {\n description: \"YouTube video embed\",\n type: \"html\",\n props: {\n html: '<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/dQw4w9WgXcQ\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>',\n },\n },\n {\n description: \"Google Maps embed\",\n type: \"html\",\n props: {\n html: '<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3024.309059887159!2d-74.00849368459473!3d40.71278097932847!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25a165bedccab%3A0xa2008c34c27bfb67!2sWall%20St%2C%20New%20York%2C%20NY%2C%20USA!5e0!3m2!1sen!2sus!4v1620000000000\" width=\"100%\" height=\"300\" style=\"border:0;\" allowfullscreen=\"\" loading=\"lazy\"></iframe>',\n },\n },\n {\n description: \"Twitter tweet embed\",\n type: \"html\",\n props: {\n html: '<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Just setting up my twttr</p>— Jack Dorsey (@jack) <a href=\"https://twitter.com/jack/status/20?ref_src=twsrc%5Etfw\">March 21, 2006</a></blockquote> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>',\n },\n },\n {\n description: \"CodePen embed for code showcase\",\n type: \"html\",\n props: {\n html: '<iframe height=\"300\" style=\"width: 100%;\" scrolling=\"no\" title=\"CSS Animation Example\" src=\"https://codepen.io/team/codepen/embed/PNaGbb?height=300&theme-id=light&default-tab=result\" frameborder=\"no\" loading=\"lazy\" allowtransparency=\"true\" allowfullscreen=\"true\"></iframe>',\n },\n },\n {\n description: \"Calendly scheduling widget\",\n type: \"html\",\n props: {\n html: '<div class=\"calendly-inline-widget\" data-url=\"https://calendly.com/your-name/30min\" style=\"min-width:320px;height:630px;\"></div><script type=\"text/javascript\" src=\"https://assets.calendly.com/assets/external/widget.js\" async></script>',\n },\n },\n {\n description: \"Custom pricing table with CSS styling\",\n type: \"html\",\n props: {\n html: '<div style=\"display: flex; gap: 20px; justify-content: center;\"><div style=\"border: 2px solid #e2e8f0; border-radius: 12px; padding: 24px; text-align: center; background: white;\"><h3 style=\"margin: 0 0 16px; color: #1e293b;\">Basic</h3><div style=\"font-size: 32px; font-weight: bold; color: #0ea5e9;\">$9</div><p style=\"color: #64748b; margin: 8px 0 20px;\">per month</p><ul style=\"list-style: none; padding: 0; margin: 0;\"><li style=\"padding: 8px 0;\">✓ 5 Projects</li><li style=\"padding: 8px 0;\">✓ 10GB Storage</li><li style=\"padding: 8px 0;\">✓ Email Support</li></ul></div></div>',\n },\n },\n {\n description: \"Mailchimp newsletter signup form\",\n type: \"html\",\n props: {\n html: '<div id=\"mc_embed_signup\"><form action=\"https://your-domain.us1.list-manage.com/subscribe/post?u=123456789&id=abcdefghij\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\" novalidate><div id=\"mc_embed_signup_scroll\"><div class=\"mc-field-group\"><label for=\"mce-EMAIL\">Email Address</label><input type=\"email\" value=\"\" name=\"EMAIL\" class=\"required email\" id=\"mce-EMAIL\" style=\"width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ccc; border-radius: 4px;\"></div><div id=\"mce-responses\" class=\"clear\"><div class=\"response\" id=\"mce-error-response\" style=\"display:none\"></div><div class=\"response\" id=\"mce-success-response\" style=\"display:none\"></div></div><div style=\"position: absolute; left: -5000px;\" aria-hidden=\"true\"><input type=\"text\" name=\"b_123456789_abcdefghij\" tabindex=\"-1\" value=\"\"></div><div class=\"clear\"><input type=\"submit\" value=\"Subscribe\" name=\"subscribe\" id=\"mc-embedded-subscribe\" class=\"button\" style=\"background: #007cba; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;\"></div></div></form></div>',\n },\n },\n {\n description: \"Stripe payment button integration\",\n type: \"html\",\n props: {\n html: '<script async src=\"https://js.stripe.com/v3/buy-button.js\"></script><stripe-buy-button buy-button-id=\"buy_btn_1234567890\" publishable-key=\"pk_test_1234567890\"></stripe-buy-button>',\n },\n },\n {\n description: \"Instagram post embed\",\n type: \"html\",\n props: {\n html: '<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-permalink=\"https://www.instagram.com/p/ABC123/\" data-instgrm-version=\"14\" style=\"background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:540px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\"></blockquote><script async src=\"//www.instagram.com/embed.js\"></script>',\n },\n },\n {\n description: \"Custom countdown timer widget\",\n type: \"html\",\n props: {\n html: '<div style=\"text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white;\"><h3 style=\"margin: 0 0 20px; font-size: 24px;\">Event Countdown</h3><div id=\"countdown\" style=\"display: flex; justify-content: center; gap: 20px;\"><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">10</div><div style=\"font-size: 14px; opacity: 0.8;\">DAYS</div></div><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">15</div><div style=\"font-size: 14px; opacity: 0.8;\">HOURS</div></div><div style=\"text-align: center;\"><div style=\"font-size: 32px; font-weight: bold;\">30</div><div style=\"font-size: 14px; opacity: 0.8;\">MINUTES</div></div></div></div>',\n },\n },\n {\n description: \"Interactive feedback widget with rating stars\",\n type: \"html\",\n props: {\n html: '<div style=\"border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; background: #f8fafc;\"><h4 style=\"margin: 0 0 16px; color: #1e293b;\">How was your experience?</h4><div style=\"display: flex; gap: 8px; margin: 16px 0;\"><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #fbbf24;\">★</span><span style=\"font-size: 24px; cursor: pointer; color: #d1d5db;\">★</span></div><textarea placeholder=\"Tell us more about your experience...\" style=\"width: 100%; height: 80px; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; resize: vertical; font-family: inherit;\"></textarea><button style=\"margin-top: 12px; background: #3b82f6; color: white; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer;\">Submit Feedback</button></div>',\n },\n },\n];\n"],"mappings":";;;;;;;;;;;;;AAGA,SAAS,oBAAoB;AAE7B,SAAS,YAAY;AAId,IAAM,WAAW,oBAAoB;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aACE;AAAA,EACF,gBACE;AAAA,EACF,eAAe;AAAA,EACf,cAAc;AAAA,IACZ,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,MAAM;AAAA,EACN,OAAO,YAAY;AAAA,IACjB,MAAM,KAAK,OAAO;AAAA,MAChB,OAAO;AAAA,MACP,aAAa;AAAA,MACb,SAAS;AAAA,MACT,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,UAAU;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,IACD,MAAM,KAAK;AAAA,MACT,KAAK;AAAA,QACH,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;AAIM,IAAM,WAAqC;AAAA,EAChD;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -3,98 +3,98 @@
|
|
|
3
3
|
import {
|
|
4
4
|
examples as examples17,
|
|
5
5
|
manifest as manifest17
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-57NRTXRA.js";
|
|
7
7
|
import {
|
|
8
8
|
examples as examples18,
|
|
9
9
|
manifest as manifest18
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QHKOAIOK.js";
|
|
11
11
|
import {
|
|
12
12
|
examples as examples23,
|
|
13
13
|
manifest as manifest23
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KRODRZNS.js";
|
|
15
15
|
import {
|
|
16
16
|
examples as examples19,
|
|
17
17
|
manifest as manifest19
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ORIUCOED.js";
|
|
19
19
|
import {
|
|
20
20
|
examples as examples12,
|
|
21
21
|
manifest as manifest12
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-E3ZW57HF.js";
|
|
23
23
|
import {
|
|
24
24
|
examples as examples13,
|
|
25
25
|
manifest as manifest13
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-L4W4B2RQ.js";
|
|
27
27
|
import {
|
|
28
28
|
examples as examples14,
|
|
29
29
|
manifest as manifest14
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FC52EHCC.js";
|
|
31
31
|
import {
|
|
32
32
|
examples as examples15,
|
|
33
33
|
manifest as manifest15
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-NTP6BKRU.js";
|
|
35
35
|
import {
|
|
36
36
|
examples as examples16,
|
|
37
37
|
manifest as manifest16
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-XYWSIMZ6.js";
|
|
39
39
|
import {
|
|
40
40
|
examples as examples21,
|
|
41
41
|
manifest as manifest21
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-O53V22BK.js";
|
|
43
43
|
import {
|
|
44
44
|
examples as examples22,
|
|
45
45
|
manifest as manifest22
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-KTA7XES3.js";
|
|
47
47
|
import {
|
|
48
48
|
examples as examples6,
|
|
49
49
|
manifest as manifest6
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-5J4Y43RM.js";
|
|
51
51
|
import {
|
|
52
52
|
examples as examples7,
|
|
53
53
|
manifest as manifest7
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-TGKNA2JS.js";
|
|
55
55
|
import {
|
|
56
56
|
examples as examples8,
|
|
57
57
|
manifest as manifest8
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-5SNSUC6Q.js";
|
|
59
59
|
import {
|
|
60
60
|
examples as examples9,
|
|
61
61
|
manifest as manifest9
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-HHUFGV7J.js";
|
|
63
63
|
import {
|
|
64
64
|
examples as examples20,
|
|
65
65
|
manifest as manifest20
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-IMDOF55E.js";
|
|
67
67
|
import {
|
|
68
68
|
examples as examples10,
|
|
69
69
|
manifest as manifest10
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-FVV27R73.js";
|
|
71
71
|
import {
|
|
72
72
|
examples as examples11,
|
|
73
73
|
manifest as manifest11
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-B5T2LFV2.js";
|
|
75
75
|
import {
|
|
76
76
|
examples as examples3,
|
|
77
77
|
manifest as manifest3
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-RDOCVLCF.js";
|
|
79
79
|
import {
|
|
80
80
|
examples as examples4,
|
|
81
81
|
manifest as manifest4
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-PFZMRSHJ.js";
|
|
83
83
|
import {
|
|
84
84
|
examples as examples5,
|
|
85
85
|
manifest as manifest5
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-34IUWNRX.js";
|
|
87
87
|
import {
|
|
88
88
|
examples,
|
|
89
89
|
manifest
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-VMIJ6MG5.js";
|
|
91
91
|
import {
|
|
92
92
|
examples as examples2,
|
|
93
93
|
manifest as manifest2
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-ZYQZUWF7.js";
|
|
95
95
|
import {
|
|
96
96
|
getBrickManifestDefaults
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-GNTJT7MR.js";
|
|
98
98
|
import {
|
|
99
99
|
StringEnum
|
|
100
100
|
} from "./chunk-GDYCCB3B.js";
|
|
@@ -210,4 +210,4 @@ export {
|
|
|
210
210
|
brickTypes,
|
|
211
211
|
examples24 as examples
|
|
212
212
|
};
|
|
213
|
-
//# sourceMappingURL=chunk-
|
|
213
|
+
//# sourceMappingURL=chunk-IPWYNE6Y.js.map
|
|
@@ -3,13 +3,19 @@
|
|
|
3
3
|
import {
|
|
4
4
|
defaultProps,
|
|
5
5
|
manifests
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IPWYNE6Y.js";
|
|
7
7
|
import {
|
|
8
8
|
mergeIgnoringArrays
|
|
9
9
|
} from "./chunk-3ZDN5BWN.js";
|
|
10
10
|
import {
|
|
11
11
|
direction
|
|
12
12
|
} from "./chunk-WPZV3LYL.js";
|
|
13
|
+
import {
|
|
14
|
+
background
|
|
15
|
+
} from "./chunk-5OVOXUFX.js";
|
|
16
|
+
import {
|
|
17
|
+
colorPreset
|
|
18
|
+
} from "./chunk-IEMCCHM4.js";
|
|
13
19
|
import {
|
|
14
20
|
cssLength
|
|
15
21
|
} from "./chunk-OJ6KL7FU.js";
|
|
@@ -17,18 +23,12 @@ import {
|
|
|
17
23
|
alignItems,
|
|
18
24
|
justifyContent
|
|
19
25
|
} from "./chunk-ZRBTAC3G.js";
|
|
20
|
-
import {
|
|
21
|
-
background
|
|
22
|
-
} from "./chunk-KKWT3OXF.js";
|
|
23
|
-
import {
|
|
24
|
-
colorPreset
|
|
25
|
-
} from "./chunk-IEMCCHM4.js";
|
|
26
26
|
import {
|
|
27
27
|
toLLMSchema
|
|
28
28
|
} from "./chunk-MO6CRLQA.js";
|
|
29
29
|
import {
|
|
30
30
|
getSchemaDefaults
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TZ6X7ZM5.js";
|
|
32
32
|
import {
|
|
33
33
|
StringEnum
|
|
34
34
|
} from "./chunk-GDYCCB3B.js";
|
|
@@ -114,30 +114,23 @@ var brickSchema = Type.Object({
|
|
|
114
114
|
)
|
|
115
115
|
});
|
|
116
116
|
function makeFullBrickSchemaForLLM(type, otherTypes) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
})
|
|
135
|
-
)
|
|
136
|
-
)
|
|
137
|
-
})
|
|
138
|
-
])
|
|
139
|
-
})
|
|
140
|
-
]) : manifests[type].props;
|
|
117
|
+
if (!otherTypes || !otherTypes.length) {
|
|
118
|
+
return toLLMSchema(
|
|
119
|
+
Type.Object(
|
|
120
|
+
{
|
|
121
|
+
id: Type.String({
|
|
122
|
+
title: "ID",
|
|
123
|
+
description: "A unique identifier for the brick."
|
|
124
|
+
}),
|
|
125
|
+
type: Type.Literal(type),
|
|
126
|
+
props: manifests[type].props,
|
|
127
|
+
mobileProps: Type.Optional(Type.Partial(manifests[type].props))
|
|
128
|
+
}
|
|
129
|
+
// IMPORTANT: DO NOT set "additionalProperties" to `false` because it would break validation with Cabidela library
|
|
130
|
+
// { additionalProperties: false },
|
|
131
|
+
)
|
|
132
|
+
);
|
|
133
|
+
}
|
|
141
134
|
return toLLMSchema(
|
|
142
135
|
Type.Object(
|
|
143
136
|
{
|
|
@@ -146,7 +139,26 @@ function makeFullBrickSchemaForLLM(type, otherTypes) {
|
|
|
146
139
|
description: "A unique identifier for the brick."
|
|
147
140
|
}),
|
|
148
141
|
type: Type.Literal(type),
|
|
149
|
-
props
|
|
142
|
+
props: Type.Composite([
|
|
143
|
+
brickSchema.properties.props,
|
|
144
|
+
Type.Object({
|
|
145
|
+
$children: Type.Array(
|
|
146
|
+
Type.Union(
|
|
147
|
+
otherTypes.map(
|
|
148
|
+
(t) => Type.Object({
|
|
149
|
+
id: Type.String({
|
|
150
|
+
title: "ID",
|
|
151
|
+
description: "A unique identifier for the brick."
|
|
152
|
+
}),
|
|
153
|
+
type: Type.Literal(t),
|
|
154
|
+
props: manifests[t].props,
|
|
155
|
+
mobileProps: Type.Optional(Type.Partial(manifests[t].props))
|
|
156
|
+
})
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
)
|
|
160
|
+
})
|
|
161
|
+
]),
|
|
150
162
|
mobileProps: Type.Optional(Type.Partial(manifests[type].props))
|
|
151
163
|
}
|
|
152
164
|
// IMPORTANT: DO NOT set "additionalProperties" to `false` because it would break validation with Cabidela library
|
|
@@ -371,4 +383,4 @@ export {
|
|
|
371
383
|
getDefaultPropsForBrick,
|
|
372
384
|
createEmptyBrick
|
|
373
385
|
};
|
|
374
|
-
//# sourceMappingURL=chunk-
|
|
386
|
+
//# sourceMappingURL=chunk-J6R3GSKS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks.ts"],"sourcesContent":["import { Type, type Static } from \"@sinclair/typebox\";\nimport { customAlphabet } from \"nanoid\";\nimport { defaultProps, manifests } from \"./bricks/manifests/all-manifests\";\nimport { cssLength } from \"./bricks/props/css-length\";\nimport { colorPreset } from \"./bricks/props/color-preset\";\nimport { mergeIgnoringArrays } from \"./utils/merge\";\nimport { getSchemaDefaults } from \"./utils/schema\";\nimport { StringEnum } from \"./utils/string-enum\";\nimport { alignItems, justifyContent } from \"./bricks/props/align\";\nimport type { CommonBrickProps } from \"./bricks/props/common\";\nimport { direction } from \"./bricks/props/direction\";\nimport type { PageAttributes, SiteAttributes } from \"./attributes\";\nimport { toLLMSchema } from \"./utils/llm\";\nimport { background } from \"./bricks/props/background\";\n\n/**\n * Generates a unique identifier for bricks.\n */\nexport const generateId = customAlphabet(\"azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN\", 7);\n\nconst brickAbsolutePositionSchema = Type.Object({\n left: Type.Optional(\n Type.String({\n title: \"top\",\n description: \"The left position in css unit.\",\n }),\n ),\n top: Type.Optional(\n Type.String({\n title: \"top\",\n description: \"The top position in css unit.\",\n }),\n ),\n right: Type.Optional(\n Type.String({\n title: \"right\",\n description: \"The right position in css unit.\",\n }),\n ),\n bottom: Type.Optional(\n Type.String({\n title: \"bottom\",\n description: \"The bottom position in css unit.\",\n }),\n ),\n inset: Type.Optional(\n Type.String({\n title: \"inset\",\n description: \"The inset position in css unit.\",\n }),\n ),\n translateX: Type.Optional(\n Type.String({\n title: \"translateX\",\n description: \"The translateX position in css unit.\",\n }),\n ),\n translateY: Type.Optional(\n Type.String({\n title: \"translateY\",\n description: \"The translateY position in css unit.\",\n }),\n ),\n rotate: Type.Optional(\n Type.String({\n title: \"rotate\",\n description: \"The rotate position in css unit.\",\n }),\n ),\n});\n\nexport type BrickAbsolutePosition = Static<typeof brickAbsolutePositionSchema>;\n\nexport const brickTypeSchema = StringEnum(Object.keys(defaultProps), {\n title: \"Brick type\",\n});\n\nexport const brickSchema = Type.Object({\n id: Type.String({\n title: \"ID\",\n description: \"A unique identifier for the brick.\",\n }),\n type: brickTypeSchema,\n label: Type.Optional(\n Type.String({\n title: \"Label\",\n description: \"A human-readable label for the brick. Used for organization and identification.\",\n }),\n ),\n props: Type.Any({\n title: \"Props\",\n description: \"The static props of the brick. The available props depends on the brick type.\",\n }),\n mobileProps: Type.Optional(\n Type.Any({\n title: \"Props\",\n description:\n \"The overriden props for mobile, merged with desktop props. Same type as props but partial.\",\n }),\n ),\n});\n\nexport function makeFullBrickSchemaForLLM(type: string, otherTypes?: string[]) {\n if (!otherTypes || !otherTypes.length) {\n return toLLMSchema(\n Type.Object(\n {\n id: Type.String({\n title: \"ID\",\n description: \"A unique identifier for the brick.\",\n }),\n type: Type.Literal(type),\n props: manifests[type].props,\n mobileProps: Type.Optional(Type.Partial(manifests[type].props)),\n },\n // IMPORTANT: DO NOT set \"additionalProperties\" to `false` because it would break validation with Cabidela library\n // { additionalProperties: false },\n ),\n );\n }\n return toLLMSchema(\n Type.Object(\n {\n id: Type.String({\n title: \"ID\",\n description: \"A unique identifier for the brick.\",\n }),\n type: Type.Literal(type),\n props: Type.Composite([\n brickSchema.properties.props,\n Type.Object({\n $children: Type.Array(\n Type.Union(\n otherTypes.map((t) =>\n Type.Object({\n id: Type.String({\n title: \"ID\",\n description: \"A unique identifier for the brick.\",\n }),\n type: Type.Literal(t),\n props: manifests[t].props,\n mobileProps: Type.Optional(Type.Partial(manifests[t].props)),\n }),\n ),\n ),\n ),\n }),\n ]),\n mobileProps: Type.Optional(Type.Partial(manifests[type].props)),\n },\n // IMPORTANT: DO NOT set \"additionalProperties\" to `false` because it would break validation with Cabidela library\n // { additionalProperties: false },\n ),\n );\n}\n\nexport type Brick = Omit<Static<typeof brickSchema>, \"props\" | \"mobileProps\"> & {\n props: CommonBrickProps & Record<string, unknown>;\n mobileProps?: Partial<CommonBrickProps & Record<string, unknown>>;\n};\n\nexport const sectionProps = Type.Object({\n colorPreset: Type.Optional(\n colorPreset({\n title: \"Color\",\n }),\n ),\n backgroundImage: Type.Optional(\n background({\n title: \"Background\",\n }),\n ),\n direction: Type.Optional(\n direction({\n default: \"flex-row\",\n title: \"Direction\",\n description:\n \"The direction of the section. Only apply to desktop. On mobile, it is always vertical. By default, horizontal (row), which is the most common.\",\n \"ui:responsive\": \"desktop\",\n }),\n ),\n minHeight: Type.Optional(\n cssLength({\n title: \"Min height\",\n default: \"fit-content\",\n description:\n \"The min height of the section. default is 'fit-content'. You can also use the keyword 'full' to make it full viewport height. Lastly, you can use any valid CSS length unit.\",\n \"ui:field\": \"hidden\",\n }),\n ),\n variant: Type.Optional(\n StringEnum([\"navbar\", \"footer\", \"sidebar\"], {\n title: \"Custom section variant\",\n description: \"Used for custom styling and layout.\",\n enumNames: [\"Navbar\", \"Footer\", \"Sidebar\"],\n \"ui:field\": \"hidden\",\n \"ai:hidden\": true,\n }),\n ),\n maxWidth: Type.Optional(\n StringEnum([\"max-w-screen-lg\", \"max-w-screen-xl\", \"max-w-screen-2xl\", \"max-w-full\"], {\n title: \"Max width\",\n default: \"max-w-full\",\n enumNames: [\"M\", \"L\", \"XL\", \"Full\"],\n description: \"The maximum width of the section. Desktop only\",\n \"ai:instructions\":\n \"Choose the most appropriate max width for the section. The value 'max-w-full' is the most common and the default. Use the same value for all sections on the same page unless there is a good reason to do otherwise.\",\n displayAs: \"button-group\",\n \"ui:responsive\": \"desktop\",\n }),\n ),\n verticalMargin: Type.Optional(\n cssLength({\n title: \"Vertical Margin\",\n description:\n \"The vertical margin of the section. By default, all sections touch each other with no space in between. If you want to add space between sections, set this value to e.g. '2rem' or '32px'. Adding a vertical margin will reveal the background color of the page.\",\n default: \"0\",\n \"ui:styleId\": \"styles:verticalMargin\",\n }),\n ),\n justifyContent: Type.Optional(\n justifyContent({\n default: \"justify-center\",\n }),\n ),\n alignItems: Type.Optional(\n alignItems({\n default: \"items-center\",\n }),\n ),\n padding: Type.Optional(\n cssLength({\n default: \"2rem\",\n description: \"Padding inside the section.\",\n title: \"Padding\",\n \"ui:responsive\": true,\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:padding\",\n }),\n ),\n gap: Type.Optional(\n cssLength({\n title: \"Gap\",\n description: \"The gap between the bricks in the section.\",\n default: \"2rem\",\n \"ui:styleId\": \"styles:gap\",\n }),\n ),\n wrap: Type.Optional(\n Type.Boolean({\n title: \"Wrap\",\n description: \"Wrap bricks if they overflow the section.\",\n default: true,\n \"ui:styleId\": \"styles:wrap\",\n }),\n ),\n lastTouched: Type.Optional(\n Type.Number({\n description: \"Do not use this field. It is used internally by the editor.\",\n \"ui:field\": \"hidden\",\n \"ai:hidden\": true,\n }),\n ),\n});\n\nexport const sectionSchema = Type.Object(\n {\n id: Type.String({\n description: \"The unique ID of the section. Use a human readable url-safe slug\",\n examples: [\"content-section\", \"contact-section\"],\n }),\n label: Type.String({\n description: \"The label of the section. Shown only to the website owner, not public.\",\n examples: [\"Content\", \"Contact\"],\n }),\n order: Type.Number({\n description: \"Determines section order in the page (lower numbers appear first). 0-based\",\n }),\n props: sectionProps,\n mobileProps: Type.Optional(Type.Partial(sectionProps)),\n bricks: Type.Array(brickSchema),\n },\n {\n description: \"Sections are direct children of the page that are stacked vertically.\",\n },\n);\n\nexport const sectionSchemaNoBricks = Type.Omit(sectionSchema, [\"bricks\"]);\nexport type SectionSchemaNoBricks = Static<typeof sectionSchemaNoBricks>;\n\nconst sectionDefaultprops = getSchemaDefaults(sectionSchema.properties.props, \"desktop\") as Section[\"props\"];\nconst sectionMobileDefaultprops = getSchemaDefaults(\n sectionSchema.properties.mobileProps,\n \"mobile\",\n) as Section[\"mobileProps\"];\n\nexport type Section = Static<typeof sectionSchema>;\n\nexport function processSections(\n sections: Section[],\n siteAttributes: SiteAttributes,\n pageAttributes: PageAttributes,\n): Section[] {\n const processSection = (section: Section) => {\n return {\n ...section,\n props: mergeIgnoringArrays({} as Section[\"props\"], sectionDefaultprops, section.props),\n mobileProps: mergeIgnoringArrays({}, sectionMobileDefaultprops, section.mobileProps || {}),\n bricks: section.bricks.map(processBrick).filter(Boolean) as Brick[],\n } as const;\n };\n\n const finalSections = sections.map(processSection);\n\n if (siteAttributes.navbar && !pageAttributes.noNavbar) {\n finalSections.unshift(\n processSection({\n order: -1,\n id: \"navbar-section\",\n label: \"Navbar\",\n props: {\n variant: \"navbar\",\n direction: \"flex-row\",\n },\n mobileProps: {},\n bricks: [\n {\n id: \"navbar\",\n type: \"navbar\",\n props: siteAttributes.navbar,\n },\n ],\n }),\n );\n }\n if (siteAttributes.footer && !pageAttributes.noFooter) {\n finalSections.push(\n processSection({\n order: 1000,\n id: \"footer-section\",\n label: \"Footer\",\n props: {\n variant: \"footer\",\n direction: \"flex-row\",\n },\n mobileProps: {},\n bricks: [\n {\n id: \"footer\",\n type: \"footer\",\n props: siteAttributes.footer,\n },\n ],\n }),\n );\n }\n\n return finalSections satisfies Section[];\n}\n\n/**\n * process a brick and add default props\n */\nexport function processBrick<T extends Brick>(brick: T): T {\n const defProps = defaultProps[brick.type];\n // if (!defProps) {\n // console.warn(`No default props found for brick type: ${brick.type}`);\n // return false; // or throw an error if you prefer\n // }\n const result = {\n ...brick,\n props: mergeIgnoringArrays({} as Brick[\"props\"], defProps.props, {\n ...brick.props,\n ...(brick.props.$children\n ? { $children: (brick.props.$children as T[]).map(processBrick).filter(Boolean) }\n : {}),\n }),\n };\n\n return result;\n}\n\nexport function getDefaultPropsForBrick(type: string) {\n return defaultProps[type].props;\n}\n\nexport function createEmptyBrick(type: string, ghost = false): Brick {\n const props = { ...defaultProps[type].props, ghost };\n const newBrick = {\n id: `b-${generateId()}`,\n type,\n props,\n };\n return newBrick;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAyB;AAClC,SAAS,sBAAsB;AAiBxB,IAAM,aAAa,eAAe,wDAAwD,CAAC;AAElG,IAAM,8BAA8B,KAAK,OAAO;AAAA,EAC9C,MAAM,KAAK;AAAA,IACT,KAAK,OAAO;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EACA,KAAK,KAAK;AAAA,IACR,KAAK,OAAO;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EACA,OAAO,KAAK;AAAA,IACV,KAAK,OAAO;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EACA,QAAQ,KAAK;AAAA,IACX,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IAAI,EAAE;AAC5B;AAEO,SAAS,iBAAiB,MAAc,QAAQ,OAAc;AACnE,QAAM,QAAQ,EAAE,GAAG,aAAa,IAAI,EAAE,OAAO,MAAM;AACnD,QAAM,WAAW;AAAA,IACf,IAAI,KAAK,WAAW,CAAC;AAAA,IACrB;AAAA,IACA;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
import {
|
|
4
4
|
border,
|
|
5
5
|
rounding
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VYA2FCTY.js";
|
|
7
7
|
import {
|
|
8
8
|
defineProps
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UC75KRLX.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
shadow
|
|
12
|
+
} from "./chunk-5RCC2STG.js";
|
|
13
13
|
import {
|
|
14
14
|
loop
|
|
15
15
|
} from "./chunk-XFZQGRRL.js";
|
|
16
|
-
import {
|
|
17
|
-
shadow
|
|
18
|
-
} from "./chunk-5RCC2STG.js";
|
|
19
16
|
import {
|
|
20
17
|
colorPreset
|
|
21
18
|
} from "./chunk-IEMCCHM4.js";
|
|
19
|
+
import {
|
|
20
|
+
cssLength
|
|
21
|
+
} from "./chunk-OJ6KL7FU.js";
|
|
22
22
|
import {
|
|
23
23
|
defineBrickManifest
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GNTJT7MR.js";
|
|
25
25
|
import {
|
|
26
26
|
StringEnum
|
|
27
27
|
} from "./chunk-GDYCCB3B.js";
|
|
@@ -437,4 +437,4 @@ export {
|
|
|
437
437
|
manifest,
|
|
438
438
|
examples
|
|
439
439
|
};
|
|
440
|
-
//# sourceMappingURL=chunk-
|
|
440
|
+
//# sourceMappingURL=chunk-KRODRZNS.js.map
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
border,
|
|
5
|
+
rounding
|
|
6
|
+
} from "./chunk-VYA2FCTY.js";
|
|
7
|
+
import {
|
|
8
|
+
defineProps
|
|
9
|
+
} from "./chunk-UC75KRLX.js";
|
|
10
|
+
import {
|
|
11
|
+
shadow
|
|
12
|
+
} from "./chunk-5RCC2STG.js";
|
|
13
|
+
import {
|
|
14
|
+
loop
|
|
15
|
+
} from "./chunk-XFZQGRRL.js";
|
|
16
|
+
import {
|
|
17
|
+
colorPreset
|
|
18
|
+
} from "./chunk-IEMCCHM4.js";
|
|
19
|
+
import {
|
|
20
|
+
cssLength
|
|
21
|
+
} from "./chunk-OJ6KL7FU.js";
|
|
22
|
+
import {
|
|
23
|
+
defineBrickManifest
|
|
24
|
+
} from "./chunk-GNTJT7MR.js";
|
|
25
|
+
import {
|
|
26
|
+
StringEnum
|
|
27
|
+
} from "./chunk-GDYCCB3B.js";
|
|
28
|
+
|
|
29
|
+
// src/shared/bricks/manifests/tabs.manifest.ts
|
|
30
|
+
import { Type } from "@sinclair/typebox";
|
|
31
|
+
import { TfiLayoutTabWindow } from "react-icons/tfi";
|
|
32
|
+
var tabRef = Type.Object({
|
|
33
|
+
label: Type.String({
|
|
34
|
+
title: "Tab Label",
|
|
35
|
+
description: "The text shown on the tab button",
|
|
36
|
+
"ai:instructions": "Use a short, descriptive label for the tab"
|
|
37
|
+
}),
|
|
38
|
+
id: Type.Optional(
|
|
39
|
+
Type.String({
|
|
40
|
+
title: "Tab ID",
|
|
41
|
+
description: "Unique identifier for the tab (auto-generated if not provided)"
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
});
|
|
45
|
+
var manifest = defineBrickManifest({
|
|
46
|
+
type: "tabs",
|
|
47
|
+
category: "container",
|
|
48
|
+
name: "Tabs",
|
|
49
|
+
description: "A tabbed container that displays different content panels based on the selected tab.",
|
|
50
|
+
aiInstructions: "Tabs are containers for organizing content into multiple panels. Each tab has a label and contains child bricks. Users can click tab buttons to switch between different content panels. Ideal for organizing related content, settings panels, or product information.",
|
|
51
|
+
isContainer: true,
|
|
52
|
+
consumesMultipleQueryRows: true,
|
|
53
|
+
defaultWidth: {
|
|
54
|
+
desktop: "100%",
|
|
55
|
+
mobile: "100%"
|
|
56
|
+
},
|
|
57
|
+
defaultHeight: {
|
|
58
|
+
desktop: "auto"
|
|
59
|
+
},
|
|
60
|
+
icon: TfiLayoutTabWindow,
|
|
61
|
+
props: defineProps({
|
|
62
|
+
colorPreset: Type.Optional(
|
|
63
|
+
colorPreset({
|
|
64
|
+
title: "Color"
|
|
65
|
+
})
|
|
66
|
+
),
|
|
67
|
+
tabs: Type.Array(tabRef, {
|
|
68
|
+
title: "Tabs",
|
|
69
|
+
description: "List of tab configurations",
|
|
70
|
+
default: [{ label: "Tab 1" }, { label: "Tab 2" }],
|
|
71
|
+
"ai:instructions": "Each tab should have a descriptive label. Content for each tab is defined in the $children array.",
|
|
72
|
+
examples: [
|
|
73
|
+
[{ label: "Overview" }, { label: "Features" }, { label: "Pricing" }],
|
|
74
|
+
[{ label: "About" }, { label: "Services" }, { label: "Contact" }]
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
defaultTab: Type.Optional(
|
|
78
|
+
Type.Number({
|
|
79
|
+
title: "Default Tab",
|
|
80
|
+
description: "Index of the tab to show by default (0-based)",
|
|
81
|
+
default: 0,
|
|
82
|
+
minimum: 0,
|
|
83
|
+
"ai:instructions": "Use 0 for the first tab, 1 for the second tab, etc."
|
|
84
|
+
})
|
|
85
|
+
),
|
|
86
|
+
tabPosition: Type.Optional(
|
|
87
|
+
StringEnum(["top", "bottom"], {
|
|
88
|
+
title: "Tab Position",
|
|
89
|
+
description: "Position of the tab buttons relative to content",
|
|
90
|
+
default: "top",
|
|
91
|
+
"ai:instructions": "Use 'top' for tabs above content (most common) or 'bottom' for tabs below content"
|
|
92
|
+
})
|
|
93
|
+
),
|
|
94
|
+
tabStyle: Type.Optional(
|
|
95
|
+
StringEnum(["pills", "underline", "bordered"], {
|
|
96
|
+
title: "Tab Style",
|
|
97
|
+
description: "Visual style of the tab buttons",
|
|
98
|
+
default: "underline",
|
|
99
|
+
"ai:instructions": "Pills are rounded buttons, underline shows a line under active tab, bordered shows tabs with borders"
|
|
100
|
+
})
|
|
101
|
+
),
|
|
102
|
+
fullWidth: Type.Optional(
|
|
103
|
+
Type.Boolean({
|
|
104
|
+
title: "Full Width Tabs",
|
|
105
|
+
description: "Make tab buttons span the full width of the container",
|
|
106
|
+
default: false,
|
|
107
|
+
"ai:instructions": "Enable this to make tab buttons evenly distribute across the full width"
|
|
108
|
+
})
|
|
109
|
+
),
|
|
110
|
+
padding: Type.Optional(
|
|
111
|
+
cssLength({
|
|
112
|
+
default: "1.5rem",
|
|
113
|
+
description: "Padding inside each tab panel.",
|
|
114
|
+
"ai:instructions": "Use values like '1rem', '1.5rem', or '2rem' for tab content padding",
|
|
115
|
+
title: "Content Padding",
|
|
116
|
+
"ui:placeholder": "Not specified",
|
|
117
|
+
"ui:styleId": "styles:padding"
|
|
118
|
+
})
|
|
119
|
+
),
|
|
120
|
+
gap: Type.Optional(
|
|
121
|
+
cssLength({
|
|
122
|
+
title: "Tab Gap",
|
|
123
|
+
default: "0.5rem",
|
|
124
|
+
description: "Gap between tab buttons.",
|
|
125
|
+
"ai:instructions": "Small values like '0.25rem' or '0.5rem' work best for tab spacing",
|
|
126
|
+
"ui:placeholder": "Not specified",
|
|
127
|
+
"ui:styleId": "styles:gap"
|
|
128
|
+
})
|
|
129
|
+
),
|
|
130
|
+
rounding: rounding({
|
|
131
|
+
default: "rounded-md"
|
|
132
|
+
}),
|
|
133
|
+
border: Type.Optional(border()),
|
|
134
|
+
shadow: Type.Optional(shadow()),
|
|
135
|
+
loop: Type.Optional(loop()),
|
|
136
|
+
$children: Type.Array(Type.Any(), {
|
|
137
|
+
"ui:field": "hidden",
|
|
138
|
+
description: "Array of child bricks - each item represents the content for one tab. If you want multiple bricks in one tab, use a 'box' brick as the single child for that tab.",
|
|
139
|
+
examples: [
|
|
140
|
+
[
|
|
141
|
+
// Tab 1 content
|
|
142
|
+
{
|
|
143
|
+
type: "text",
|
|
144
|
+
props: {
|
|
145
|
+
content: "<h3>Overview</h3><p>This is the overview tab content.</p>"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
// Tab 2 content
|
|
149
|
+
[
|
|
150
|
+
{
|
|
151
|
+
type: "text",
|
|
152
|
+
props: {
|
|
153
|
+
content: "<h3>Features</h3><p>Here are our key features.</p>"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
]
|
|
158
|
+
]
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
var examples = [];
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
manifest,
|
|
166
|
+
examples
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=chunk-KTA7XES3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/shared/bricks/manifests/tabs.manifest.ts"],"sourcesContent":["import { defineBrickManifest } from \"~/shared/brick-manifest\";\nimport { defineProps } from \"../props/helpers\";\nimport { Type } from \"@sinclair/typebox\";\nimport { border, rounding } from \"../props/border\";\nimport { shadow } from \"../props/effects\";\nimport { cssLength } from \"../props/css-length\";\nimport { HiOutlineViewColumns } from \"react-icons/hi2\";\nimport { colorPreset } from \"../props/color-preset\";\nimport { loop } from \"../props/dynamic\";\nimport { StringEnum } from \"~/shared/utils/string-enum\";\nimport type { BrickExample } from \"./_types\";\nimport { TfiLayoutTabWindow } from \"react-icons/tfi\";\n\n// Tab configuration schema\nconst tabRef = Type.Object({\n label: Type.String({\n title: \"Tab Label\",\n description: \"The text shown on the tab button\",\n \"ai:instructions\": \"Use a short, descriptive label for the tab\",\n }),\n id: Type.Optional(\n Type.String({\n title: \"Tab ID\",\n description: \"Unique identifier for the tab (auto-generated if not provided)\",\n }),\n ),\n});\n\nexport const manifest = defineBrickManifest({\n type: \"tabs\",\n category: \"container\",\n name: \"Tabs\",\n description: \"A tabbed container that displays different content panels based on the selected tab.\",\n aiInstructions:\n \"Tabs are containers for organizing content into multiple panels. Each tab has a label and contains child bricks. Users can click tab buttons to switch between different content panels. Ideal for organizing related content, settings panels, or product information.\",\n isContainer: true,\n consumesMultipleQueryRows: true,\n defaultWidth: {\n desktop: \"100%\",\n mobile: \"100%\",\n },\n defaultHeight: {\n desktop: \"auto\",\n },\n icon: TfiLayoutTabWindow,\n props: defineProps({\n colorPreset: Type.Optional(\n colorPreset({\n title: \"Color\",\n }),\n ),\n tabs: Type.Array(tabRef, {\n title: \"Tabs\",\n description: \"List of tab configurations\",\n default: [{ label: \"Tab 1\" }, { label: \"Tab 2\" }],\n \"ai:instructions\":\n \"Each tab should have a descriptive label. Content for each tab is defined in the $children array.\",\n examples: [\n [{ label: \"Overview\" }, { label: \"Features\" }, { label: \"Pricing\" }],\n [{ label: \"About\" }, { label: \"Services\" }, { label: \"Contact\" }],\n ],\n }),\n defaultTab: Type.Optional(\n Type.Number({\n title: \"Default Tab\",\n description: \"Index of the tab to show by default (0-based)\",\n default: 0,\n minimum: 0,\n \"ai:instructions\": \"Use 0 for the first tab, 1 for the second tab, etc.\",\n }),\n ),\n tabPosition: Type.Optional(\n StringEnum([\"top\", \"bottom\"], {\n title: \"Tab Position\",\n description: \"Position of the tab buttons relative to content\",\n default: \"top\",\n \"ai:instructions\":\n \"Use 'top' for tabs above content (most common) or 'bottom' for tabs below content\",\n }),\n ),\n tabStyle: Type.Optional(\n StringEnum([\"pills\", \"underline\", \"bordered\"], {\n title: \"Tab Style\",\n description: \"Visual style of the tab buttons\",\n default: \"underline\",\n \"ai:instructions\":\n \"Pills are rounded buttons, underline shows a line under active tab, bordered shows tabs with borders\",\n }),\n ),\n fullWidth: Type.Optional(\n Type.Boolean({\n title: \"Full Width Tabs\",\n description: \"Make tab buttons span the full width of the container\",\n default: false,\n \"ai:instructions\": \"Enable this to make tab buttons evenly distribute across the full width\",\n }),\n ),\n padding: Type.Optional(\n cssLength({\n default: \"1.5rem\",\n description: \"Padding inside each tab panel.\",\n \"ai:instructions\": \"Use values like '1rem', '1.5rem', or '2rem' for tab content padding\",\n title: \"Content Padding\",\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:padding\",\n }),\n ),\n gap: Type.Optional(\n cssLength({\n title: \"Tab Gap\",\n default: \"0.5rem\",\n description: \"Gap between tab buttons.\",\n \"ai:instructions\": \"Small values like '0.25rem' or '0.5rem' work best for tab spacing\",\n \"ui:placeholder\": \"Not specified\",\n \"ui:styleId\": \"styles:gap\",\n }),\n ),\n rounding: rounding({\n default: \"rounded-md\",\n }),\n border: Type.Optional(border()),\n shadow: Type.Optional(shadow()),\n loop: Type.Optional(loop()),\n $children: Type.Array(Type.Any(), {\n \"ui:field\": \"hidden\",\n description:\n \"Array of child bricks - each item represents the content for one tab. If you want multiple bricks in one tab, use a 'box' brick as the single child for that tab.\",\n examples: [\n [\n // Tab 1 content\n {\n type: \"text\",\n props: {\n content: \"<h3>Overview</h3><p>This is the overview tab content.</p>\",\n },\n },\n // Tab 2 content\n [\n {\n type: \"text\",\n props: {\n content: \"<h3>Features</h3><p>Here are our key features.</p>\",\n },\n },\n ],\n ],\n ],\n }),\n }),\n});\n\nexport type Manifest = typeof manifest;\n\nexport const examples: BrickExample<Manifest>[] = [];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,YAAY;AASrB,SAAS,0BAA0B;AAGnC,IAAM,SAAS,KAAK,OAAO;AAAA,EACzB,OAAO,KAAK,OAAO;AAAA,IACjB,OAAO;AAAA,IACP,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AAAA,EACD,IAAI,KAAK;AAAA,IACP,KAAK,OAAO;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACF,CA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