astro-tractstack 2.0.18 → 2.0.20
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.js +6 -32
- package/package.json +1 -1
- package/templates/src/components/codehooks/BunnyVideoSetup.tsx +1 -4
- package/templates/src/components/codehooks/FeaturedArticleSetup.tsx +0 -4
- package/templates/src/components/codehooks/ListContentSetup.tsx +1 -8
- package/templates/src/components/codehooks/ProductCardSetup.tsx +0 -2
- package/templates/src/components/codehooks/ProductGridSetup.tsx +0 -2
- package/templates/src/components/compositor/Compositor.tsx +3 -6
- package/templates/src/components/compositor/Node.tsx +13 -32
- package/templates/src/components/compositor/NodeWithGuid.tsx +49 -5
- package/templates/src/components/compositor/nodes/Pane.tsx +4 -21
- package/templates/src/components/compositor/nodes/Pane_DesignLibrary.tsx +27 -7
- package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag.tsx +3 -1
- package/templates/src/components/compositor/preview/OgImagePreview.tsx +0 -5
- package/templates/src/components/compositor/preview/PaneSnapshotGenerator.tsx +5 -6
- package/templates/src/components/compositor/preview/PanesPreviewGenerator.tsx +1 -0
- package/templates/src/components/edit/PanelSwitch.tsx +3 -24
- package/templates/src/components/edit/SettingsPanel.tsx +0 -1
- package/templates/src/components/edit/ToolMode.tsx +6 -14
- package/templates/src/components/edit/pane/AddPanePanel.tsx +45 -25
- package/templates/src/components/edit/pane/AddPanePanel_new.tsx +277 -70
- package/templates/src/components/edit/pane/AddPanePanel_paste.tsx +111 -0
- package/templates/src/components/edit/pane/RestylePaneModal.tsx +7 -14
- package/templates/src/components/edit/pane/steps/AiDesignStep.tsx +0 -5
- package/templates/src/components/edit/pane/steps/DesignLibraryStep.tsx +4 -11
- package/templates/src/components/edit/panels/StyleBreakPanel.tsx +1 -3
- package/templates/src/components/edit/panels/StyleElementPanel_update.tsx +0 -6
- package/templates/src/components/edit/panels/StyleImagePanel.tsx +0 -1
- package/templates/src/components/edit/panels/StyleImagePanel_update.tsx +0 -3
- package/templates/src/components/edit/panels/StyleLiElementPanel_update.tsx +0 -4
- package/templates/src/components/edit/panels/StyleLinkPanel_config.tsx +8 -5
- package/templates/src/components/edit/panels/StyleLinkPanel_update.tsx +1 -2
- package/templates/src/components/edit/panels/StyleParentPanel.tsx +1 -3
- package/templates/src/components/edit/panels/StyleParentPanel_update.tsx +2 -5
- package/templates/src/components/edit/panels/StyleWidgetPanel_config.tsx +2 -8
- package/templates/src/components/edit/panels/StyleWidgetPanel_update.tsx +0 -4
- package/templates/src/components/edit/state/SaveToLibraryModal.tsx +27 -16
- package/templates/src/components/edit/storyfragment/StoryFragmentConfigPanel.tsx +9 -26
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_og.tsx +7 -16
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +5 -6
- package/templates/src/components/edit/widgets/InteractiveDisclosureWidget.tsx +0 -5
- package/templates/src/components/fields/BackgroundImageWrapper.tsx +1 -7
- package/templates/src/components/fields/ColorPickerCombo.tsx +8 -12
- package/templates/src/components/fields/ViewportComboBox.tsx +4 -6
- package/templates/src/constants/prompts.json +22 -1
- package/templates/src/stores/nodes.ts +297 -222
- package/templates/src/stores/storykeep.ts +3 -3
- package/templates/src/types/compositorTypes.ts +21 -1
- package/templates/src/types/tractstack.ts +1 -0
- package/templates/src/utils/compositor/TemplatePanes.ts +0 -76
- package/templates/src/utils/compositor/aiPaneParser.ts +265 -83
- package/templates/src/utils/compositor/designLibraryHelper.ts +252 -26
- package/templates/src/utils/helpers.ts +5 -4
- package/utils/inject-files.ts +6 -32
- package/templates/src/components/compositor/preview/VisualBreakPreview.tsx +0 -154
- package/templates/src/components/edit/pane/PageGen_preview.tsx +0 -511
- package/templates/src/utils/compositor/processMarkdown.ts +0 -445
- package/templates/src/utils/compositor/templateMarkdownStyles.ts +0 -1273
|
@@ -3,7 +3,6 @@ import { TractStackAPI } from '@/utils/api';
|
|
|
3
3
|
import { fullContentMapStore } from '@/stores/storykeep';
|
|
4
4
|
import { heldBeliefsScales } from '@/constants/beliefs';
|
|
5
5
|
import { biIcons } from '@/constants';
|
|
6
|
-
import type { BrandConfig } from '@/types/tractstack';
|
|
7
6
|
import type { FlatNode, BeliefNode } from '@/types/compositorTypes';
|
|
8
7
|
import SingleParam from '@/components/fields/SingleParam';
|
|
9
8
|
import ColorPickerCombo from '@/components/fields/ColorPickerCombo';
|
|
@@ -42,7 +41,6 @@ type StoredDisclosureItem = Omit<DisclosureItem, 'id' | 'isDisabled'>;
|
|
|
42
41
|
interface InteractiveDisclosureWidgetProps {
|
|
43
42
|
node: FlatNode;
|
|
44
43
|
onUpdate: (params: string[]) => void;
|
|
45
|
-
config: BrandConfig;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
const generateId = (): string => Math.random().toString(36).substring(2, 9);
|
|
@@ -254,7 +252,6 @@ const DisclosureItemEditor = ({
|
|
|
254
252
|
export default function InteractiveDisclosureWidget({
|
|
255
253
|
node,
|
|
256
254
|
onUpdate,
|
|
257
|
-
config,
|
|
258
255
|
}: InteractiveDisclosureWidgetProps) {
|
|
259
256
|
const [mode, setMode] = useState<'belief' | 'open'>('belief');
|
|
260
257
|
const [beliefs, setBeliefs] = useState<BeliefNode[]>([]);
|
|
@@ -628,7 +625,6 @@ export default function InteractiveDisclosureWidget({
|
|
|
628
625
|
onColorChange={(hex) =>
|
|
629
626
|
handleColorChange('bgColor', hex)
|
|
630
627
|
}
|
|
631
|
-
config={config}
|
|
632
628
|
allowNull={true}
|
|
633
629
|
skipTailwind={false}
|
|
634
630
|
/>
|
|
@@ -640,7 +636,6 @@ export default function InteractiveDisclosureWidget({
|
|
|
640
636
|
onColorChange={(hex) =>
|
|
641
637
|
handleColorChange('textColor', hex)
|
|
642
638
|
}
|
|
643
|
-
config={config}
|
|
644
639
|
allowNull={true}
|
|
645
640
|
skipTailwind={false}
|
|
646
641
|
/>
|
|
@@ -8,7 +8,6 @@ import ColorPickerCombo from './ColorPickerCombo';
|
|
|
8
8
|
import { getCtx } from '@/stores/nodes';
|
|
9
9
|
import { hasArtpacksStore, settingsPanelStore } from '@/stores/storykeep';
|
|
10
10
|
import { cloneDeep } from '@/utils/helpers';
|
|
11
|
-
import type { BrandConfig } from '@/types/tractstack';
|
|
12
11
|
import type {
|
|
13
12
|
BgImageNode,
|
|
14
13
|
ArtpackImageNode,
|
|
@@ -18,7 +17,6 @@ import { isArtpackImageNode } from '@/utils/compositor/typeGuards';
|
|
|
18
17
|
|
|
19
18
|
export interface BackgroundImageWrapperProps {
|
|
20
19
|
paneId: string;
|
|
21
|
-
config?: BrandConfig;
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
const CheckIcon = () => (
|
|
@@ -51,10 +49,7 @@ const ChevronDownIcon = () => (
|
|
|
51
49
|
</svg>
|
|
52
50
|
);
|
|
53
51
|
|
|
54
|
-
const BackgroundImageWrapper = ({
|
|
55
|
-
paneId,
|
|
56
|
-
config,
|
|
57
|
-
}: BackgroundImageWrapperProps) => {
|
|
52
|
+
const BackgroundImageWrapper = ({ paneId }: BackgroundImageWrapperProps) => {
|
|
58
53
|
const ctx = getCtx();
|
|
59
54
|
const allNodes = useStore(ctx.allNodes);
|
|
60
55
|
const $artpacks = useStore(hasArtpacksStore);
|
|
@@ -165,7 +160,6 @@ const BackgroundImageWrapper = ({
|
|
|
165
160
|
title="Pane Background Color"
|
|
166
161
|
defaultColor={(allNodes.get(paneId) as PaneNode)?.bgColour || ''}
|
|
167
162
|
onColorChange={handleColorChange}
|
|
168
|
-
config={config!}
|
|
169
163
|
allowNull={true}
|
|
170
164
|
/>
|
|
171
165
|
{!bgNode && (
|
|
@@ -12,12 +12,11 @@ import {
|
|
|
12
12
|
findClosestTailwindColor,
|
|
13
13
|
getComputedColor,
|
|
14
14
|
} from '@/utils/compositor/tailwindColors';
|
|
15
|
+
import { brandConfigStore } from '@/stores/storykeep';
|
|
15
16
|
import { debounce, useDropdownDirection } from '@/utils/helpers';
|
|
16
|
-
import type { BrandConfig } from '@/types/tractstack';
|
|
17
17
|
|
|
18
18
|
export interface ColorPickerProps {
|
|
19
19
|
title: string;
|
|
20
|
-
config: BrandConfig;
|
|
21
20
|
defaultColor: string;
|
|
22
21
|
onColorChange: (color: string) => void;
|
|
23
22
|
skipTailwind?: boolean;
|
|
@@ -28,14 +27,14 @@ const ColorPickerCombo = ({
|
|
|
28
27
|
title,
|
|
29
28
|
defaultColor,
|
|
30
29
|
onColorChange,
|
|
31
|
-
config,
|
|
32
30
|
skipTailwind = false,
|
|
33
31
|
allowNull = false,
|
|
34
32
|
}: ColorPickerProps) => {
|
|
33
|
+
const brandColors = brandConfigStore.get()?.BRAND_COLOURS || '';
|
|
35
34
|
const [hexColor, setHexColor] = useState(defaultColor);
|
|
36
35
|
const initialTailwindColor = skipTailwind
|
|
37
36
|
? ''
|
|
38
|
-
: hexToTailwind(defaultColor,
|
|
37
|
+
: hexToTailwind(defaultColor, brandColors) || '';
|
|
39
38
|
const [selectedTailwindColor, setSelectedTailwindColor] =
|
|
40
39
|
useState(initialTailwindColor);
|
|
41
40
|
const [query, setQuery] = useState('');
|
|
@@ -79,10 +78,7 @@ const ColorPickerCombo = ({
|
|
|
79
78
|
setHexColor(computedColor);
|
|
80
79
|
|
|
81
80
|
if (!skipTailwind) {
|
|
82
|
-
const exactTailwindColor = hexToTailwind(
|
|
83
|
-
computedColor,
|
|
84
|
-
config.BRAND_COLOURS
|
|
85
|
-
);
|
|
81
|
+
const exactTailwindColor = hexToTailwind(computedColor, brandColors);
|
|
86
82
|
if (exactTailwindColor) {
|
|
87
83
|
setSelectedTailwindColor(exactTailwindColor);
|
|
88
84
|
setQuery('');
|
|
@@ -101,7 +97,7 @@ const ColorPickerCombo = ({
|
|
|
101
97
|
|
|
102
98
|
onColorChange(computedColor);
|
|
103
99
|
}, 16),
|
|
104
|
-
[onColorChange, skipTailwind,
|
|
100
|
+
[onColorChange, skipTailwind, brandColors]
|
|
105
101
|
);
|
|
106
102
|
|
|
107
103
|
// Handle Tailwind color selection
|
|
@@ -114,12 +110,12 @@ const ColorPickerCombo = ({
|
|
|
114
110
|
setQuery(''); // Clear query after selection
|
|
115
111
|
|
|
116
112
|
const newHexColor = getComputedColor(
|
|
117
|
-
tailwindToHex(`bg-${newTailwindColor}`,
|
|
113
|
+
tailwindToHex(`bg-${newTailwindColor}`, brandColors || null)
|
|
118
114
|
);
|
|
119
115
|
setHexColor(newHexColor);
|
|
120
116
|
onColorChange(newHexColor);
|
|
121
117
|
},
|
|
122
|
-
[onColorChange,
|
|
118
|
+
[onColorChange, brandColors, skipTailwind]
|
|
123
119
|
);
|
|
124
120
|
|
|
125
121
|
// New function to handle color removal
|
|
@@ -259,7 +255,7 @@ const ColorPickerCombo = ({
|
|
|
259
255
|
style={{
|
|
260
256
|
backgroundColor: tailwindToHex(
|
|
261
257
|
`bg-${color}`,
|
|
262
|
-
|
|
258
|
+
brandColors
|
|
263
259
|
),
|
|
264
260
|
}}
|
|
265
261
|
/>
|
|
@@ -13,9 +13,8 @@ import DevicePhoneMobileIcon from '@heroicons/react/24/outline/DevicePhoneMobile
|
|
|
13
13
|
import DeviceTabletIcon from '@heroicons/react/24/outline/DeviceTabletIcon';
|
|
14
14
|
import ComputerDesktopIcon from '@heroicons/react/24/outline/ComputerDesktopIcon';
|
|
15
15
|
import { classNames } from '@/utils/helpers';
|
|
16
|
-
import { settingsPanelStore } from '@/stores/storykeep';
|
|
16
|
+
import { brandConfigStore, settingsPanelStore } from '@/stores/storykeep';
|
|
17
17
|
import { tailwindToHex, colorValues } from '@/utils/compositor/tailwindColors';
|
|
18
|
-
import type { BrandConfig } from '@/types/tractstack';
|
|
19
18
|
|
|
20
19
|
interface ViewportComboBoxProps {
|
|
21
20
|
value: string;
|
|
@@ -29,7 +28,6 @@ interface ViewportComboBoxProps {
|
|
|
29
28
|
allowNegative?: boolean;
|
|
30
29
|
isNegative?: boolean;
|
|
31
30
|
isInferred?: boolean;
|
|
32
|
-
config: BrandConfig;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
const ViewportComboBox = ({
|
|
@@ -40,8 +38,8 @@ const ViewportComboBox = ({
|
|
|
40
38
|
allowNegative = false,
|
|
41
39
|
isNegative = false,
|
|
42
40
|
isInferred = false,
|
|
43
|
-
config,
|
|
44
41
|
}: ViewportComboBoxProps) => {
|
|
42
|
+
const brandColors = brandConfigStore.get()?.BRAND_COLOURS || '';
|
|
45
43
|
const [internalValue, setInternalValue] = useState(value);
|
|
46
44
|
const [query, setQuery] = useState('');
|
|
47
45
|
const [isNowNegative, setIsNowNegative] = useState(isNegative);
|
|
@@ -174,7 +172,7 @@ const ViewportComboBox = ({
|
|
|
174
172
|
style={{
|
|
175
173
|
backgroundColor: tailwindToHex(
|
|
176
174
|
internalValue,
|
|
177
|
-
|
|
175
|
+
brandColors
|
|
178
176
|
),
|
|
179
177
|
}}
|
|
180
178
|
/>
|
|
@@ -218,7 +216,7 @@ const ViewportComboBox = ({
|
|
|
218
216
|
style={{
|
|
219
217
|
backgroundColor: tailwindToHex(
|
|
220
218
|
item,
|
|
221
|
-
|
|
219
|
+
brandColors
|
|
222
220
|
),
|
|
223
221
|
}}
|
|
224
222
|
/>
|
|
@@ -41,12 +41,33 @@
|
|
|
41
41
|
},
|
|
42
42
|
"aiPaneShellPrompt": {
|
|
43
43
|
"system": "You are an expert web designer. Your task is to generate the structural design for a component as a single JSON object. Respond *only* with the JSON.",
|
|
44
|
-
"user_template": "Generate the design JSON for a component with the following characteristics:\n\nDesign Style: \"{{DESIGN_INPUT}}\"\nLayout Type: \"{{LAYOUT_TYPE}}\"\n\nCRITICAL RULES:\n1. You must respond with a JSON object with keys: `bgColour`, `parentClasses`, `defaultClasses`.\n2. The `parentClasses` value *must* be
|
|
44
|
+
"user_template": "Generate the design JSON for a component with the following characteristics:\n\nDesign Style: \"{{DESIGN_INPUT}}\"\nLayout Type: \"{{LAYOUT_TYPE}}\"\n\nCRITICAL RULES:\n1. You must respond with a JSON object with keys: `bgColour`, `parentClasses`, `defaultClasses`.\n2. The `parentClasses` value *must* be an array of objects. Each object must have `mobile`, `tablet`, or `desktop` keys, and their values *must* be a single string of space-separated Tailwind CSS classes.\n3. The `defaultClasses` value *must* be structured with responsive keys (`mobile`, `tablet`, `desktop`) containing Tailwind class strings.\n4. Ensure the selected `bgColour` provides **high contrast** (meeting at least WCAG AA standards - 4.5:1 for normal text, 3:1 for large text) with the primary text colors defined in `defaultClasses`.\n\nEXAMPLE:\n{\n \"bgColour\": \"#050710\",\n \"parentClasses\": [\n { \"mobile\": \"mx-auto max-w-2xl text-center\", \"tablet\": \"max-w-4xl\" },\n { \"mobile\": \"px-6 py-24\", \"tablet\": \"px-8 py-32\" }\n ],\n \"defaultClasses\": {\n \"h2\": { \"mobile\": \"text-4xl font-bold tracking-tight text-white mt-4\", \"tablet\": \"text-6xl\", \"desktop\": \"text-7xl\" },\n \"p\": { \"mobile\": \"text-lg leading-8 text-gray-300 mt-6\", \"tablet\": \"text-xl\", \"desktop\": \"\" }\n }\n}"
|
|
45
45
|
},
|
|
46
46
|
"aiPaneCopyPrompt": {
|
|
47
47
|
"system": "You are an expert **web designer and copywriter**. Your task is to generate a single, visually compelling block of HTML content. You must ensure the content is well-written, engaging, **beautifully spaced**, and **highly readable**.",
|
|
48
48
|
"user_template": "Here is the design 'shell' and 'theme' (bgColour, parentClasses, and defaultClasses) you must write your HTML for. Your HTML will be placed *inside* this shell. Use the `defaultClasses` as your base theme for styling:\n{{SHELL_JSON}}\n\nNow, generate the HTML content based on these inputs:\n\nContent Prompt: \"{{COPY_INPUT}}\"\nDesign Style: **strictly for visual reference** when choosing element styles **DO NOT** include any words or concepts from the `Design Style` input in the written copy text itself.\"{{DESIGN_INPUT}}\"\nLayout Type: \"{{LAYOUT_TYPE}}\"\n\nCRITICAL RULES:\n1. You are responsible for the **inner layout and visual rhythm**. You MUST add appropriate vertical margins (e.g., `mt-4`, `mt-6`, `mt-8`) directly to any HTML block elements that *deviate* from the default spacing. **Elements must not touch.**\n2. You **MUST NOT** use `<h1>` tags. You must use `<h2>`, `<h3>`, and `<p>` tags for all text content.\n3. For responsive styles, you *must* only use `md:` and `xl:` prefixes.\n4. To make headlines pop, you MUST wrap key words in `<span>` tags with creative classes (e.g., gradient text, different colors).\n5. **All text**, even short links or phrases (like 'Learn more →'), **must** be wrapped in a block element like `<p>` or `<button>`.\n6. You MUST include at least one `<button>` tag for the primary call-to-action.\n7. Verify that **all text elements**, including text within `<span>` tags, `<button>` elements, and any elements using override classes, maintain **high contrast** (meeting at least WCAG AA standards - 4.5:1 for normal text, 3:1 for large text) against the `bgColour` provided in the `SHELL_JSON`. **Prioritize readability above all else**.\n8. Respond *only* with the raw HTML.\n\nEXAMPLE of a good, well-spaced response:\n<h2 class=\"text-4xl font-bold tracking-tight text-white md:text-6xl\"><span class=\"bg-gradient-to-r from-purple-500 to-indigo-400 bg-clip-text text-transparent\">Own the Art.</span> Possess the Reality.</h2>\n<p class=\"mt-6 text-lg leading-8 text-gray-300 md:text-xl\">Every Sneaky Productions NFT is your key. This is where digital rarity meets tangible legacy.</p>\n<button class=\"mt-8 rounded-md bg-indigo-600 px-5 py-3 text-base font-bold text-white shadow-sm hover:bg-indigo-500\">Secure Your Drop</button>\n<p class=\"mt-4 text-sm text-gray-400\">Learn more <span>→</span></p>",
|
|
49
49
|
"heroDefault": "A compelling hero section for a website about [topic]. It should have a strong, attention-grabbing headline, a brief paragraph explaining the core value proposition, and a clear call-to-action.",
|
|
50
50
|
"contentDefault": "A content section that follows a hero. It should elaborate on a key feature or benefit related to [topic]. Include a sub-headline and a descriptive paragraph."
|
|
51
|
+
},
|
|
52
|
+
"aiPaneShellPrompt_2cols": {
|
|
53
|
+
"system": "You are an expert web designer. Your task is to generate the structural design for a component as a single JSON object. Respond *only* with the JSON.",
|
|
54
|
+
"user_template": "Generate the design JSON for the following component. The component is a 2-column grid layout where the columns stack vertically on mobile. Your task is to design the outer container shell (`parentClasses`), the shared typography theme (`defaultClasses`), and the specific styles for the individual columns (`columns`).\n\nComponent Brief: \"{{COPY_INPUT}}\"\n\nDesign Style: \"{{DESIGN_INPUT}}\"\n\nCRITICAL RULES:\n1. You must respond with a JSON object with the top-level keys: `bgColour`, `parentClasses`, `defaultClasses`, and `columns`.\n2. The `parentClasses` value is for the OUTER container's spacing and width ONLY (e.g. `max-w-7xl`, `py-24`). It is **FORBIDDEN** to include `grid`, `grid-cols-*`, or `gap-*` properties in `parentClasses`. The application will handle the grid creation. Any response violating this rule will be rejected. The `parentClasses` value *must* be an ARRAY of objects.\n3. The `defaultClasses` value defines the theme and *must* be structured with responsive keys (`mobile`, `tablet`, `desktop`) containing Tailwind class strings.\n4. The `columns` key *must* be an array containing exactly **two** objects. Each object represents an individual column and must have a `gridClasses` key. The value for `gridClasses` is a responsive object where each key's value is a string of Tailwind classes. This is used to style the column's wrapper. Crucially, you must remember that Tailwind is mobile-first, so you must reset styles at larger breakpoints if needed. For example, to add spacing for the mobile stack that is removed on larger screens, you would use `{ \"mobile\": \"mt-12\", \"tablet\": \"mt-0\" }`.\n5. Ensure the selected `bgColour` provides **high contrast** (meeting at least WCAG AA standards) with the primary text colors defined in `defaultClasses`. Prioritize readability.\n\nEXAMPLE:\n{\n \"bgColour\": \"#0d1117\",\n \"parentClasses\": [\n { \n \"mobile\": \"mx-auto max-w-7xl\"\n },\n {\n \"mobile\": \"px-6 py-24\",\n \"tablet\": \"px-8 py-32\"\n }\n ],\n \"defaultClasses\": {\n \"h2\": {\n \"mobile\": \"text-4xl font-bold tracking-tight text-white\",\n \"tablet\": \"text-6xl\"\n },\n \"p\": {\n \"mobile\": \"text-lg leading-8 text-gray-300 mt-6\"\n }\n },\n \"columns\": [\n {\n \"gridClasses\": {\n \"mobile\": \"text-center\",\n \"tablet\": \"text-left\"\n }\n },\n {\n \"gridClasses\": {\n \"mobile\": \"flex flex-col items-center mt-12\",\n \"tablet\": \"items-start mt-0\"\n }\n }\n ]\n}"
|
|
55
|
+
},
|
|
56
|
+
"aiPaneCopyPrompt_2cols": {
|
|
57
|
+
"system": "You are an expert **web designer and copywriter**. Your task is to generate a single, visually compelling block of HTML content. You must ensure the content is well-written, engaging, **beautifully spaced**, and **highly readable**.",
|
|
58
|
+
"user_template": "Here is the design 'shell' and 'theme' (bgColour, parentClasses, and defaultClasses) you must write your HTML for. Your HTML will be placed *inside* a column defined by this shell. Use the `defaultClasses` as your base theme for styling:\n{{SHELL_JSON}}\n\nNow, generate the HTML content based on these inputs. Your primary goal is to perform the following specific task for this single column. Use the \"Overall Component Brief\" only for context about the product or topic.\n\nSPECIFIC TASK: \"{{COLUMN_PROMPT}}\"\nOverall Component Brief (for context only): \"{{COPY_INPUT}}\"\nDesign Style: **strictly for visual reference** when choosing element styles **DO NOT** include any words or concepts from the `Design Style` input in the written copy text itself.\"{{DESIGN_INPUT}}\"\nLayout Type: \"{{LAYOUT_TYPE}}\"\n\nCRITICAL RULES:\n1. You are responsible for the **inner layout and visual rhythm**. Each element should be a separate block element.\n2. You **MUST NOT** use `<h1>` tags. You must use `<h2>`, `<h3>`, and `<p>` tags for all text content.\n3. For responsive styles, you *must* only use `md:` and `xl:` prefixes.\n4. To make headlines pop, you MUST wrap key words in `<span>` tags with creative classes (e.g., gradient text, different colors).\n5. **All text, including secondary links, must** be wrapped in a block element like `<p>` or `<button>`. Even when placing CTAs side-by-side in a `div`, this rule MUST be followed.\n6. Verify that **all text elements**, including text within `<span>` tags, `<button>` elements, and any elements using override classes, maintain **high contrast** (meeting at least WCAG AA standards - 4.5:1 for normal text, 3:1 for large text) against the `bgColour` provided in the `SHELL_JSON`. **Prioritize readability above all else**.\n7. Respond *only* with the raw HTML.\n\nEXAMPLE of a good response for THIS SPECIFIC TASK:\n{{COLUMN_EXAMPLE}}",
|
|
59
|
+
"presets": {
|
|
60
|
+
"heroDefault": {
|
|
61
|
+
"default": "A compelling hero section for a website about [topic]. It should have a strong, attention-grabbing headline, a brief paragraph explaining the core value proposition, and a clear call-to-action.",
|
|
62
|
+
"left": {
|
|
63
|
+
"prompt": "Generate a slogan with very large typography. Just the slogan in this column.",
|
|
64
|
+
"example": "<h2 class=\"text-4xl font-bold tracking-tight text-slate-100 md:text-5xl xl:text-6xl\">\n<span class=\"block\">Orchestrate Complexity.</span>\n<span class=\"block bg-gradient-to-r from-sky-400 to-cyan-300 bg-clip-text text-transparent md:mt-2\">Deploy with Certainty.</span>\n</h2>"
|
|
65
|
+
},
|
|
66
|
+
"right": {
|
|
67
|
+
"prompt": "Generate a small sub-heading, a brief compelling paragraph of hook text, and two vertically stacked call-to-action buttons below it.",
|
|
68
|
+
"example": "<h3 class=\"text-xl font-bold text-white\">Join us this week</h3>\n<p class=\"mt-4 text-lg leading-8 text-gray-300\">We're all about creating a place where anyone and everyone can know God & encounter Him.</p>\n<button class=\"mt-8 rounded-md bg-white px-4 py-3 text-base font-semibold text-gray-900 shadow-sm hover:bg-gray-100 w-full\">Plan a Visit</button>\n<button class=\"mt-4 rounded-md border border-white px-4 py-3 text-base font-semibold text-white shadow-sm hover:bg-white/10 w-full\">Get Involved</button>"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
51
72
|
}
|
|
52
73
|
}
|