@delmaredigital/payload-puck 0.4.0 → 0.6.1
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/README.md +429 -17
- package/dist/admin/PuckEditorView.d.ts +1 -1
- package/dist/admin/PuckEditorView.d.ts.map +1 -1
- package/dist/ai/collections/AiContext.d.ts +16 -0
- package/dist/ai/collections/AiContext.d.ts.map +1 -0
- package/dist/ai/collections/AiContext.js +87 -0
- package/dist/ai/collections/AiContext.js.map +1 -0
- package/dist/ai/collections/AiPrompts.d.ts +10 -0
- package/dist/ai/collections/AiPrompts.d.ts.map +1 -0
- package/dist/ai/collections/AiPrompts.js +63 -0
- package/dist/ai/collections/AiPrompts.js.map +1 -0
- package/dist/ai/createAiApiRoutes.d.ts +40 -0
- package/dist/ai/createAiApiRoutes.d.ts.map +1 -0
- package/dist/ai/createAiApiRoutes.js +106 -0
- package/dist/ai/createAiApiRoutes.js.map +1 -0
- package/dist/ai/createAiGenerate.d.ts +65 -0
- package/dist/ai/createAiGenerate.d.ts.map +1 -0
- package/dist/ai/createAiGenerate.js +106 -0
- package/dist/ai/createAiGenerate.js.map +1 -0
- package/dist/ai/createAiPlugin.d.ts +39 -0
- package/dist/ai/createAiPlugin.d.ts.map +1 -0
- package/dist/ai/createAiPlugin.js +61 -0
- package/dist/ai/createAiPlugin.js.map +1 -0
- package/dist/ai/hooks/useAiContext.d.ts +63 -0
- package/dist/ai/hooks/useAiContext.d.ts.map +1 -0
- package/dist/ai/hooks/useAiContext.js +146 -0
- package/dist/ai/hooks/useAiContext.js.map +1 -0
- package/dist/ai/hooks/useAiPrompts.d.ts +25 -0
- package/dist/ai/hooks/useAiPrompts.d.ts.map +1 -0
- package/dist/ai/hooks/useAiPrompts.js +74 -0
- package/dist/ai/hooks/useAiPrompts.js.map +1 -0
- package/dist/ai/index.d.ts +51 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +69 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/plugins/ContextEditorPanel.d.ts +9 -0
- package/dist/ai/plugins/ContextEditorPanel.d.ts.map +1 -0
- package/dist/ai/plugins/ContextEditorPanel.js +399 -0
- package/dist/ai/plugins/ContextEditorPanel.js.map +1 -0
- package/dist/ai/plugins/PromptEditorPanel.d.ts +9 -0
- package/dist/ai/plugins/PromptEditorPanel.d.ts.map +1 -0
- package/dist/ai/plugins/PromptEditorPanel.js +270 -0
- package/dist/ai/plugins/PromptEditorPanel.js.map +1 -0
- package/dist/ai/plugins/contextEditorPlugin.d.ts +30 -0
- package/dist/ai/plugins/contextEditorPlugin.d.ts.map +1 -0
- package/dist/ai/plugins/contextEditorPlugin.js +40 -0
- package/dist/ai/plugins/contextEditorPlugin.js.map +1 -0
- package/dist/ai/plugins/promptApiRoutes.d.ts +68 -0
- package/dist/ai/plugins/promptApiRoutes.d.ts.map +1 -0
- package/dist/ai/plugins/promptApiRoutes.js +181 -0
- package/dist/ai/plugins/promptApiRoutes.js.map +1 -0
- package/dist/ai/plugins/promptEditorPlugin.d.ts +29 -0
- package/dist/ai/plugins/promptEditorPlugin.d.ts.map +1 -0
- package/dist/ai/plugins/promptEditorPlugin.js +39 -0
- package/dist/ai/plugins/promptEditorPlugin.js.map +1 -0
- package/dist/ai/presets/componentAiDefaults.d.ts +40 -0
- package/dist/ai/presets/componentAiDefaults.d.ts.map +1 -0
- package/dist/ai/presets/componentAiDefaults.js +239 -0
- package/dist/ai/presets/componentAiDefaults.js.map +1 -0
- package/dist/ai/presets/index.d.ts +94 -0
- package/dist/ai/presets/index.d.ts.map +1 -0
- package/dist/ai/presets/index.js +110 -0
- package/dist/ai/presets/index.js.map +1 -0
- package/dist/ai/presets/instructions/interactive.d.ts +15 -0
- package/dist/ai/presets/instructions/interactive.d.ts.map +1 -0
- package/dist/ai/presets/instructions/interactive.js +334 -0
- package/dist/ai/presets/instructions/interactive.js.map +1 -0
- package/dist/ai/presets/instructions/layout.d.ts +16 -0
- package/dist/ai/presets/instructions/layout.d.ts.map +1 -0
- package/dist/ai/presets/instructions/layout.js +486 -0
- package/dist/ai/presets/instructions/layout.js.map +1 -0
- package/dist/ai/presets/instructions/media.d.ts +15 -0
- package/dist/ai/presets/instructions/media.d.ts.map +1 -0
- package/dist/ai/presets/instructions/media.js +136 -0
- package/dist/ai/presets/instructions/media.js.map +1 -0
- package/dist/ai/presets/instructions/pagePatterns.d.ts +20 -0
- package/dist/ai/presets/instructions/pagePatterns.d.ts.map +1 -0
- package/dist/ai/presets/instructions/pagePatterns.js +290 -0
- package/dist/ai/presets/instructions/pagePatterns.js.map +1 -0
- package/dist/ai/presets/instructions/schemas.d.ts +1247 -0
- package/dist/ai/presets/instructions/schemas.d.ts.map +1 -0
- package/dist/ai/presets/instructions/schemas.js +240 -0
- package/dist/ai/presets/instructions/schemas.js.map +1 -0
- package/dist/ai/presets/instructions/typography.d.ts +16 -0
- package/dist/ai/presets/instructions/typography.d.ts.map +1 -0
- package/dist/ai/presets/instructions/typography.js +192 -0
- package/dist/ai/presets/instructions/typography.js.map +1 -0
- package/dist/ai/tools/index.d.ts +116 -0
- package/dist/ai/tools/index.d.ts.map +1 -0
- package/dist/ai/tools/index.js +214 -0
- package/dist/ai/tools/index.js.map +1 -0
- package/dist/ai/types.d.ts +507 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +2 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/ai/utils/injectAiConfig.d.ts +67 -0
- package/dist/ai/utils/injectAiConfig.d.ts.map +1 -0
- package/dist/ai/utils/injectAiConfig.js +216 -0
- package/dist/ai/utils/injectAiConfig.js.map +1 -0
- package/dist/api/createPuckApiRoutesWithId.d.ts.map +1 -1
- package/dist/api/createPuckApiRoutesWithId.js +12 -5
- package/dist/api/createPuckApiRoutesWithId.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/utils/mapRootProps.d.ts +19 -0
- package/dist/api/utils/mapRootProps.d.ts.map +1 -1
- package/dist/api/utils/mapRootProps.js +33 -0
- package/dist/api/utils/mapRootProps.js.map +1 -1
- package/dist/components/exports.d.ts +2 -1
- package/dist/components/exports.d.ts.map +1 -1
- package/dist/components/exports.js +5 -1
- package/dist/components/exports.js.map +1 -1
- package/dist/components/interactive/Accordion.d.ts +1 -1
- package/dist/components/interactive/Accordion.d.ts.map +1 -1
- package/dist/components/interactive/Accordion.js +4 -4
- package/dist/components/interactive/Accordion.js.map +1 -1
- package/dist/components/interactive/Accordion.server.d.ts +1 -1
- package/dist/components/interactive/Accordion.server.d.ts.map +1 -1
- package/dist/components/interactive/Button.d.ts +1 -1
- package/dist/components/interactive/Button.d.ts.map +1 -1
- package/dist/components/interactive/Button.server.d.ts +2 -3
- package/dist/components/interactive/Button.server.d.ts.map +1 -1
- package/dist/components/interactive/Button.server.js +1 -2
- package/dist/components/interactive/Button.server.js.map +1 -1
- package/dist/components/interactive/Card.d.ts +1 -1
- package/dist/components/interactive/Card.d.ts.map +1 -1
- package/dist/components/interactive/Card.server.d.ts +1 -1
- package/dist/components/interactive/Card.server.d.ts.map +1 -1
- package/dist/components/interactive/Divider.d.ts +1 -1
- package/dist/components/interactive/Divider.d.ts.map +1 -1
- package/dist/components/interactive/Divider.server.d.ts +1 -1
- package/dist/components/interactive/Divider.server.d.ts.map +1 -1
- package/dist/components/layout/Container.d.ts +3 -1
- package/dist/components/layout/Container.d.ts.map +1 -1
- package/dist/components/layout/Container.js +16 -2
- package/dist/components/layout/Container.js.map +1 -1
- package/dist/components/layout/Container.server.d.ts +3 -1
- package/dist/components/layout/Container.server.d.ts.map +1 -1
- package/dist/components/layout/Container.server.js +5 -2
- package/dist/components/layout/Container.server.js.map +1 -1
- package/dist/components/layout/Flex.d.ts +3 -1
- package/dist/components/layout/Flex.d.ts.map +1 -1
- package/dist/components/layout/Flex.js +18 -2
- package/dist/components/layout/Flex.js.map +1 -1
- package/dist/components/layout/Flex.server.d.ts +3 -1
- package/dist/components/layout/Flex.server.d.ts.map +1 -1
- package/dist/components/layout/Flex.server.js +5 -2
- package/dist/components/layout/Flex.server.js.map +1 -1
- package/dist/components/layout/Grid.d.ts +3 -1
- package/dist/components/layout/Grid.d.ts.map +1 -1
- package/dist/components/layout/Grid.js +15 -2
- package/dist/components/layout/Grid.js.map +1 -1
- package/dist/components/layout/Grid.server.d.ts +3 -1
- package/dist/components/layout/Grid.server.d.ts.map +1 -1
- package/dist/components/layout/Grid.server.js +5 -2
- package/dist/components/layout/Grid.server.js.map +1 -1
- package/dist/components/layout/Section.d.ts +3 -1
- package/dist/components/layout/Section.d.ts.map +1 -1
- package/dist/components/layout/Section.js +32 -5
- package/dist/components/layout/Section.js.map +1 -1
- package/dist/components/layout/Section.server.d.ts +3 -1
- package/dist/components/layout/Section.server.d.ts.map +1 -1
- package/dist/components/layout/Section.server.js +16 -4
- package/dist/components/layout/Section.server.js.map +1 -1
- package/dist/components/layout/Spacer.d.ts +1 -1
- package/dist/components/layout/Spacer.d.ts.map +1 -1
- package/dist/components/layout/Spacer.server.d.ts +1 -1
- package/dist/components/layout/Spacer.server.d.ts.map +1 -1
- package/dist/components/layout/Template.d.ts +1 -1
- package/dist/components/layout/Template.d.ts.map +1 -1
- package/dist/components/layout/Template.server.d.ts +1 -1
- package/dist/components/layout/Template.server.d.ts.map +1 -1
- package/dist/components/media/Image.d.ts +1 -1
- package/dist/components/media/Image.d.ts.map +1 -1
- package/dist/components/media/Image.server.d.ts +1 -1
- package/dist/components/media/Image.server.d.ts.map +1 -1
- package/dist/components/typography/Heading.d.ts +1 -1
- package/dist/components/typography/Heading.d.ts.map +1 -1
- package/dist/components/typography/Heading.server.d.ts +1 -1
- package/dist/components/typography/Heading.server.d.ts.map +1 -1
- package/dist/components/typography/RichText.editor.d.ts +15 -2
- package/dist/components/typography/RichText.editor.d.ts.map +1 -1
- package/dist/components/typography/RichText.editor.js +18 -11
- package/dist/components/typography/RichText.editor.js.map +1 -1
- package/dist/components/typography/RichText.server.d.ts +3 -2
- package/dist/components/typography/RichText.server.d.ts.map +1 -1
- package/dist/components/typography/RichText.server.js +10 -5
- package/dist/components/typography/RichText.server.js.map +1 -1
- package/dist/components/typography/Text.d.ts +1 -1
- package/dist/components/typography/Text.d.ts.map +1 -1
- package/dist/components/typography/Text.server.d.ts +1 -1
- package/dist/components/typography/Text.server.d.ts.map +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/index.d.ts.map +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/index.js.map +1 -1
- package/dist/config/config.editor.d.ts +4 -4
- package/dist/config/config.editor.d.ts.map +1 -1
- package/dist/config/index.d.ts +2 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/merge.d.ts +1 -1
- package/dist/config/merge.d.ts.map +1 -1
- package/dist/config/presets.d.ts +15 -15
- package/dist/config/presets.d.ts.map +1 -1
- package/dist/config/presets.js +2 -2
- package/dist/config/presets.js.map +1 -1
- package/dist/config/types.d.ts +111 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +8 -0
- package/dist/config/types.js.map +1 -0
- package/dist/editor/PuckEditor.d.ts +88 -2
- package/dist/editor/PuckEditor.d.ts.map +1 -1
- package/dist/editor/PuckEditor.js +41 -13
- package/dist/editor/PuckEditor.js.map +1 -1
- package/dist/editor/PuckEditorImpl.client.d.ts +49 -4
- package/dist/editor/PuckEditorImpl.client.d.ts.map +1 -1
- package/dist/editor/PuckEditorImpl.client.js +191 -14
- package/dist/editor/PuckEditorImpl.client.js.map +1 -1
- package/dist/editor/ai-plugin-overrides.css +20 -0
- package/dist/editor/components/HeaderActions.d.ts +7 -2
- package/dist/editor/components/HeaderActions.d.ts.map +1 -1
- package/dist/editor/components/HeaderActions.js +16 -3
- package/dist/editor/components/HeaderActions.js.map +1 -1
- package/dist/editor/components/IframeWrapper.d.ts +13 -0
- package/dist/editor/components/IframeWrapper.d.ts.map +1 -1
- package/dist/editor/components/IframeWrapper.js +60 -4
- package/dist/editor/components/IframeWrapper.js.map +1 -1
- package/dist/editor/components/PreviewModal.d.ts +9 -1
- package/dist/editor/components/PreviewModal.d.ts.map +1 -1
- package/dist/editor/components/PreviewModal.js +36 -1
- package/dist/editor/components/PreviewModal.js.map +1 -1
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +4 -0
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/plugins/VersionHistoryPanel.d.ts +43 -0
- package/dist/editor/plugins/VersionHistoryPanel.d.ts.map +1 -0
- package/dist/editor/plugins/VersionHistoryPanel.js +303 -0
- package/dist/editor/plugins/VersionHistoryPanel.js.map +1 -0
- package/dist/editor/plugins/index.d.ts +6 -3
- package/dist/editor/plugins/index.d.ts.map +1 -1
- package/dist/editor/plugins/index.js +7 -3
- package/dist/editor/plugins/index.js.map +1 -1
- package/dist/editor/plugins/versionHistoryPlugin.d.ts +37 -0
- package/dist/editor/plugins/versionHistoryPlugin.d.ts.map +1 -0
- package/dist/editor/plugins/versionHistoryPlugin.js +36 -0
- package/dist/editor/plugins/versionHistoryPlugin.js.map +1 -0
- package/dist/editor/utils/detectPageTree.d.ts +1 -1
- package/dist/editor/utils/detectPageTree.d.ts.map +1 -1
- package/dist/editor/utils/injectPageTreeFields.d.ts +1 -1
- package/dist/editor/utils/injectPageTreeFields.d.ts.map +1 -1
- package/dist/editor/utils/injectPageTreeFields.js +2 -2
- package/dist/editor/utils/injectPageTreeFields.js.map +1 -1
- package/dist/endpoints/ai.d.ts +36 -0
- package/dist/endpoints/ai.d.ts.map +1 -0
- package/dist/endpoints/ai.js +315 -0
- package/dist/endpoints/ai.js.map +1 -0
- package/dist/endpoints/context.d.ts +30 -0
- package/dist/endpoints/context.d.ts.map +1 -0
- package/dist/endpoints/context.js +123 -0
- package/dist/endpoints/context.js.map +1 -0
- package/dist/endpoints/prompts.d.ts +28 -0
- package/dist/endpoints/prompts.d.ts.map +1 -0
- package/dist/endpoints/prompts.js +118 -0
- package/dist/endpoints/prompts.js.map +1 -0
- package/dist/endpoints/styles.d.ts +19 -0
- package/dist/endpoints/styles.d.ts.map +1 -0
- package/dist/endpoints/styles.js +116 -0
- package/dist/endpoints/styles.js.map +1 -0
- package/dist/fields/AlignmentField.d.ts +1 -1
- package/dist/fields/AlignmentField.d.ts.map +1 -1
- package/dist/fields/AlignmentField.js +1 -0
- package/dist/fields/AlignmentField.js.map +1 -1
- package/dist/fields/AnimationField.d.ts +1 -1
- package/dist/fields/AnimationField.d.ts.map +1 -1
- package/dist/fields/BackgroundField.d.ts +1 -1
- package/dist/fields/BackgroundField.d.ts.map +1 -1
- package/dist/fields/BackgroundField.js +9 -4
- package/dist/fields/BackgroundField.js.map +1 -1
- package/dist/fields/BorderField.d.ts +1 -1
- package/dist/fields/BorderField.d.ts.map +1 -1
- package/dist/fields/BorderField.js +1 -0
- package/dist/fields/BorderField.js.map +1 -1
- package/dist/fields/ColorPickerField.d.ts +1 -1
- package/dist/fields/ColorPickerField.d.ts.map +1 -1
- package/dist/fields/ColorPickerField.js +4 -2
- package/dist/fields/ColorPickerField.js.map +1 -1
- package/dist/fields/ContentAlignmentField.d.ts +66 -0
- package/dist/fields/ContentAlignmentField.d.ts.map +1 -0
- package/dist/fields/ContentAlignmentField.js +255 -0
- package/dist/fields/ContentAlignmentField.js.map +1 -0
- package/dist/fields/DimensionsField.d.ts +1 -1
- package/dist/fields/DimensionsField.d.ts.map +1 -1
- package/dist/fields/DimensionsField.js +8 -2
- package/dist/fields/DimensionsField.js.map +1 -1
- package/dist/fields/FlexAlignmentField.d.ts +1 -1
- package/dist/fields/FlexAlignmentField.d.ts.map +1 -1
- package/dist/fields/FolderPickerField.d.ts +1 -1
- package/dist/fields/FolderPickerField.d.ts.map +1 -1
- package/dist/fields/GradientEditor.d.ts.map +1 -1
- package/dist/fields/GradientEditor.js +3 -0
- package/dist/fields/GradientEditor.js.map +1 -1
- package/dist/fields/LockedField.d.ts +1 -1
- package/dist/fields/LockedField.d.ts.map +1 -1
- package/dist/fields/MarginField.d.ts +1 -1
- package/dist/fields/MarginField.d.ts.map +1 -1
- package/dist/fields/MediaField.d.ts +1 -1
- package/dist/fields/MediaField.d.ts.map +1 -1
- package/dist/fields/MediaField.js +3 -2
- package/dist/fields/MediaField.js.map +1 -1
- package/dist/fields/PaddingField.d.ts +1 -1
- package/dist/fields/PaddingField.d.ts.map +1 -1
- package/dist/fields/PageSegmentField.d.ts +18 -1
- package/dist/fields/PageSegmentField.d.ts.map +1 -1
- package/dist/fields/PageSegmentField.js +106 -1
- package/dist/fields/PageSegmentField.js.map +1 -1
- package/dist/fields/ResetField.d.ts +1 -1
- package/dist/fields/ResetField.d.ts.map +1 -1
- package/dist/fields/ResetField.js +1 -1
- package/dist/fields/ResetField.js.map +1 -1
- package/dist/fields/ResponsiveField.d.ts +1 -1
- package/dist/fields/ResponsiveField.d.ts.map +1 -1
- package/dist/fields/ResponsiveField.js +5 -2
- package/dist/fields/ResponsiveField.js.map +1 -1
- package/dist/fields/ResponsiveVisibilityField.d.ts +1 -1
- package/dist/fields/ResponsiveVisibilityField.d.ts.map +1 -1
- package/dist/fields/ResponsiveVisibilityField.js +4 -3
- package/dist/fields/ResponsiveVisibilityField.js.map +1 -1
- package/dist/fields/SizeField.d.ts +3 -25
- package/dist/fields/SizeField.d.ts.map +1 -1
- package/dist/fields/SizeField.js +8 -34
- package/dist/fields/SizeField.js.map +1 -1
- package/dist/fields/SlugPreviewField.d.ts +1 -1
- package/dist/fields/SlugPreviewField.d.ts.map +1 -1
- package/dist/fields/TemplateField.d.ts +1 -1
- package/dist/fields/TemplateField.d.ts.map +1 -1
- package/dist/fields/TemplateField.js +1 -1
- package/dist/fields/TemplateField.js.map +1 -1
- package/dist/fields/TransformField.d.ts +1 -1
- package/dist/fields/TransformField.d.ts.map +1 -1
- package/dist/fields/TransformField.js +2 -0
- package/dist/fields/TransformField.js.map +1 -1
- package/dist/fields/VerticalAlignmentField.d.ts +1 -1
- package/dist/fields/VerticalAlignmentField.d.ts.map +1 -1
- package/dist/fields/WidthField.d.ts +1 -1
- package/dist/fields/WidthField.d.ts.map +1 -1
- package/dist/fields/index.d.ts +9 -37
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.js +21 -79
- package/dist/fields/index.js.map +1 -1
- package/dist/fields/richtext/controls/ColorPickerControl.d.ts +16 -0
- package/dist/fields/richtext/controls/ColorPickerControl.d.ts.map +1 -0
- package/dist/fields/richtext/controls/ColorPickerControl.js +116 -0
- package/dist/fields/richtext/controls/ColorPickerControl.js.map +1 -0
- package/dist/fields/richtext/controls/DropdownPortal.d.ts +17 -0
- package/dist/fields/richtext/controls/DropdownPortal.d.ts.map +1 -0
- package/dist/fields/richtext/controls/DropdownPortal.js +90 -0
- package/dist/fields/richtext/controls/DropdownPortal.js.map +1 -0
- package/dist/fields/richtext/controls/FontSizeControl.d.ts +8 -0
- package/dist/fields/richtext/controls/FontSizeControl.d.ts.map +1 -0
- package/dist/fields/richtext/controls/FontSizeControl.js +62 -0
- package/dist/fields/richtext/controls/FontSizeControl.js.map +1 -0
- package/dist/fields/richtext/controls/HighlightControl.d.ts +9 -0
- package/dist/fields/richtext/controls/HighlightControl.d.ts.map +1 -0
- package/dist/fields/richtext/controls/HighlightControl.js +44 -0
- package/dist/fields/richtext/controls/HighlightControl.js.map +1 -0
- package/dist/fields/richtext/controls/index.d.ts +11 -0
- package/dist/fields/richtext/controls/index.d.ts.map +1 -0
- package/dist/fields/richtext/controls/index.js +16 -0
- package/dist/fields/richtext/controls/index.js.map +1 -0
- package/dist/fields/richtext/controls/shared.d.ts +97 -0
- package/dist/fields/richtext/controls/shared.d.ts.map +1 -0
- package/dist/fields/richtext/controls/shared.js +344 -0
- package/dist/fields/richtext/controls/shared.js.map +1 -0
- package/dist/fields/richtext/createRichTextField.d.ts +165 -0
- package/dist/fields/richtext/createRichTextField.d.ts.map +1 -0
- package/dist/fields/richtext/createRichTextField.js +139 -0
- package/dist/fields/richtext/createRichTextField.js.map +1 -0
- package/dist/fields/richtext/extensions/FontSize.d.ts +23 -0
- package/dist/fields/richtext/extensions/FontSize.d.ts.map +1 -0
- package/dist/fields/richtext/extensions/FontSize.js +47 -0
- package/dist/fields/richtext/extensions/FontSize.js.map +1 -0
- package/dist/fields/richtext/extensions/index.d.ts +5 -0
- package/dist/fields/richtext/extensions/index.d.ts.map +1 -0
- package/dist/fields/richtext/extensions/index.js +5 -0
- package/dist/fields/richtext/extensions/index.js.map +1 -0
- package/dist/fields/richtext/index.d.ts +14 -0
- package/dist/fields/richtext/index.d.ts.map +1 -0
- package/dist/fields/richtext/index.js +19 -0
- package/dist/fields/richtext/index.js.map +1 -0
- package/dist/fields/richtext/richtext-menu.css +50 -0
- package/dist/fields/shared.d.ts +27 -1
- package/dist/fields/shared.d.ts.map +1 -1
- package/dist/fields/shared.js +34 -0
- package/dist/fields/shared.js.map +1 -1
- package/dist/layouts/types.d.ts +30 -0
- package/dist/layouts/types.d.ts.map +1 -1
- package/dist/plugin/index.d.ts +1 -0
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +111 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/render/HybridPageRenderer.d.ts +47 -4
- package/dist/render/HybridPageRenderer.d.ts.map +1 -1
- package/dist/render/HybridPageRenderer.js +45 -0
- package/dist/render/HybridPageRenderer.js.map +1 -1
- package/dist/render/PageRenderer.d.ts +1 -1
- package/dist/render/PageRenderer.d.ts.map +1 -1
- package/dist/render/PageRenderer.js +1 -1
- package/dist/render/PageRenderer.js.map +1 -1
- package/dist/render/PuckEditor.client.d.ts +2 -2
- package/dist/render/PuckEditor.client.d.ts.map +1 -1
- package/dist/render/PuckEditor.client.js +2 -2
- package/dist/render/PuckEditor.client.js.map +1 -1
- package/dist/render/index.d.ts +2 -2
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/types/index.d.ts +36 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/views/PuckConfigContext.d.ts +56 -2
- package/dist/views/PuckConfigContext.d.ts.map +1 -1
- package/dist/views/PuckConfigContext.js +6 -3
- package/dist/views/PuckConfigContext.js.map +1 -1
- package/dist/views/PuckEditorView.d.ts.map +1 -1
- package/dist/views/PuckEditorView.js +36 -8
- package/dist/views/PuckEditorView.js.map +1 -1
- package/package.json +34 -10
- package/dist/components/typography/RichText.d.ts +0 -20
- package/dist/components/typography/RichText.d.ts.map +0 -1
- package/dist/components/typography/RichText.js +0 -73
- package/dist/components/typography/RichText.js.map +0 -1
- package/dist/fields/TiptapField.d.ts +0 -40
- package/dist/fields/TiptapField.d.ts.map +0 -1
- package/dist/fields/TiptapField.js +0 -857
- package/dist/fields/TiptapField.js.map +0 -1
- package/dist/fields/TiptapModal.d.ts +0 -10
- package/dist/fields/TiptapModal.d.ts.map +0 -1
- package/dist/fields/TiptapModal.js +0 -114
- package/dist/fields/TiptapModal.js.map +0 -1
- package/dist/fields/TiptapModalField.d.ts +0 -23
- package/dist/fields/TiptapModalField.d.ts.map +0 -1
- package/dist/fields/TiptapModalField.js +0 -55
- package/dist/fields/TiptapModalField.js.map +0 -1
- package/dist/fields/richtext-output.css +0 -219
- package/dist/fields/tiptap-styles.css +0 -248
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { backgroundSchema, borderSchema, responsivePaddingSchema, responsiveDimensionsSchema, animationSchema, visibilitySchema, justifyContentSchema, alignItemsSchema, } from './schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* Comprehensive AI instructions for layout components
|
|
4
|
+
*
|
|
5
|
+
* These instructions teach the AI:
|
|
6
|
+
* - When to use each layout component
|
|
7
|
+
* - How to nest and compose layouts
|
|
8
|
+
* - Correct field names and recommended values
|
|
9
|
+
* - Common page structure patterns
|
|
10
|
+
*/
|
|
11
|
+
export const layoutInstructions = {
|
|
12
|
+
Section: {
|
|
13
|
+
ai: {
|
|
14
|
+
instructions: `Section component - the primary building block for page sections.
|
|
15
|
+
|
|
16
|
+
PURPOSE:
|
|
17
|
+
- Creates distinct page sections with full-width backgrounds
|
|
18
|
+
- Two-layer architecture: outer section (full-bleed) + inner content (constrained)
|
|
19
|
+
- Every major page section should be wrapped in a Section
|
|
20
|
+
|
|
21
|
+
ARCHITECTURE:
|
|
22
|
+
- Outer layer (section): Full viewport width, holds background color/image
|
|
23
|
+
- Inner layer (content): Constrained max-width, centered, holds actual content
|
|
24
|
+
|
|
25
|
+
USAGE GUIDELINES:
|
|
26
|
+
- Use Section as the outermost wrapper for every page section
|
|
27
|
+
- NEVER nest Section inside Flex or Grid (only at root level)
|
|
28
|
+
- Set sectionBackground for full-width colored backgrounds
|
|
29
|
+
- Use contentDimensions to control inner content width (default: 1200px)
|
|
30
|
+
|
|
31
|
+
COMMON PATTERNS:
|
|
32
|
+
- Hero Section: Dark/gradient sectionBackground, large sectionPadding
|
|
33
|
+
- Feature Section: Light/white background, medium padding
|
|
34
|
+
- CTA Section: Contrasting accent color background
|
|
35
|
+
- Alternating sections: Alternate background colors for visual rhythm
|
|
36
|
+
|
|
37
|
+
RECOMMENDED VALUES:
|
|
38
|
+
- sectionPadding: { xs: { top: 48, right: 0, bottom: 48, left: 0, unit: 'px', linked: false } } for standard sections
|
|
39
|
+
- sectionPadding: { xs: { top: 80, right: 0, bottom: 80, left: 0, unit: 'px', linked: false } } for hero sections
|
|
40
|
+
- contentDimensions: { xs: { mode: 'contained', maxWidth: { value: 1200, unit: 'px', enabled: true }, alignment: 'center' } }
|
|
41
|
+
|
|
42
|
+
COMPOSITION:
|
|
43
|
+
- Section > Container (for text-heavy content)
|
|
44
|
+
- Section > Flex (for grouped elements)
|
|
45
|
+
- Section > Grid (for card layouts)`,
|
|
46
|
+
},
|
|
47
|
+
fields: {
|
|
48
|
+
content: {
|
|
49
|
+
ai: {
|
|
50
|
+
required: true,
|
|
51
|
+
instructions: 'Slot for child components. Add Container, Flex, Grid, or individual components here.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
semanticElement: {
|
|
55
|
+
ai: {
|
|
56
|
+
instructions: "HTML element type. Use 'section' (default) for most cases, 'header' for page header, 'footer' for page footer, 'main' for primary content.",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
id: {
|
|
60
|
+
ai: {
|
|
61
|
+
instructions: 'Optional ID for anchor links. Use lowercase-with-dashes format, e.g., "features", "about-us", "contact".',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
sectionBackground: {
|
|
65
|
+
ai: {
|
|
66
|
+
instructions: `Full-width background for the section. Supports solid colors and gradients.
|
|
67
|
+
Use for: Hero sections (dark/gradient), CTA sections (brand color), alternating section backgrounds.
|
|
68
|
+
Example solid: { type: 'solid', solid: { hex: '#1e293b' } }
|
|
69
|
+
Example gradient: { type: 'gradient', gradient: { type: 'linear', angle: 135, stops: [{ color: { hex: '#3b82f6' }, position: 0 }, { color: { hex: '#8b5cf6' }, position: 100 }] } }`,
|
|
70
|
+
schema: backgroundSchema,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
sectionPadding: {
|
|
74
|
+
ai: {
|
|
75
|
+
instructions: `Vertical/horizontal padding for the section. Controls breathing room.
|
|
76
|
+
Hero sections: 80-96px top/bottom. Standard sections: 48-64px. Dense: 32-48px.
|
|
77
|
+
Example: { xs: { top: 64, right: 0, bottom: 64, left: 0, unit: 'px', linked: false } }`,
|
|
78
|
+
schema: responsivePaddingSchema,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
sectionMargin: {
|
|
82
|
+
ai: {
|
|
83
|
+
instructions: `Margin around the section. Usually leave null - use sectionPadding for internal spacing.`,
|
|
84
|
+
schema: responsivePaddingSchema,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
contentDimensions: {
|
|
88
|
+
ai: {
|
|
89
|
+
instructions: `Inner content width constraints. Default is 1200px max-width centered.
|
|
90
|
+
Example: { xs: { mode: 'contained', maxWidth: { value: 1200, unit: 'px', enabled: true }, alignment: 'center' } }
|
|
91
|
+
Use narrower (800-900px) for text-heavy content like blog posts.`,
|
|
92
|
+
schema: responsiveDimensionsSchema,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
contentBackground: {
|
|
96
|
+
ai: {
|
|
97
|
+
instructions: `Background for the inner content area (not full-width). Use for card-like treatments within sections.
|
|
98
|
+
Example: { type: 'solid', solid: { hex: '#ffffff' } }`,
|
|
99
|
+
schema: backgroundSchema,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
contentPadding: {
|
|
103
|
+
ai: {
|
|
104
|
+
instructions: `Padding for the inner content area.
|
|
105
|
+
Example: { xs: { top: 24, right: 24, bottom: 24, left: 24, unit: 'px', linked: true } }`,
|
|
106
|
+
schema: responsivePaddingSchema,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
contentBorder: {
|
|
110
|
+
ai: {
|
|
111
|
+
instructions: `Border for the inner content area. Use for card-like treatments.
|
|
112
|
+
Example: { style: 'solid', width: 1, color: { hex: '#e5e7eb' }, radius: 8, sides: { top: true, right: true, bottom: true, left: true } }`,
|
|
113
|
+
schema: borderSchema,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
animation: {
|
|
117
|
+
ai: {
|
|
118
|
+
instructions: `Entrance animation for the section. Use sparingly for key sections like heroes.
|
|
119
|
+
Example: { mode: 'preset', entrance: 'fade-up', entranceDuration: 600, triggerOnScroll: true, triggerOnce: true }`,
|
|
120
|
+
schema: animationSchema,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
visibility: {
|
|
124
|
+
ai: {
|
|
125
|
+
instructions: `Show/hide at different breakpoints.
|
|
126
|
+
Example: { xs: true, sm: true, md: true, lg: true, xl: true }`,
|
|
127
|
+
schema: visibilitySchema,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
Container: {
|
|
133
|
+
ai: {
|
|
134
|
+
instructions: `Container component for grouping and constraining content width.
|
|
135
|
+
|
|
136
|
+
PURPOSE:
|
|
137
|
+
- Constrains content to a maximum width
|
|
138
|
+
- Groups related elements together
|
|
139
|
+
- Provides padding/margin around content blocks
|
|
140
|
+
|
|
141
|
+
USAGE GUIDELINES:
|
|
142
|
+
- Use inside Section when you need additional grouping
|
|
143
|
+
- Useful for text-heavy content that needs width constraints
|
|
144
|
+
- Not always needed - Section already constrains content width
|
|
145
|
+
|
|
146
|
+
WHEN TO USE:
|
|
147
|
+
- Long-form text content (blog posts, about page)
|
|
148
|
+
- When you need nested width constraints
|
|
149
|
+
- To add background/border to a content group within a Section
|
|
150
|
+
|
|
151
|
+
WHEN NOT TO USE:
|
|
152
|
+
- For simple layouts - Section alone is sufficient
|
|
153
|
+
- For card grids - use Grid instead
|
|
154
|
+
- For horizontal layouts - use Flex instead
|
|
155
|
+
|
|
156
|
+
COMPOSITION:
|
|
157
|
+
- Section > Container > Heading + Text (for centered text blocks)
|
|
158
|
+
- Section > Container > RichText (for long-form content)`,
|
|
159
|
+
},
|
|
160
|
+
fields: {
|
|
161
|
+
content: {
|
|
162
|
+
ai: {
|
|
163
|
+
required: true,
|
|
164
|
+
instructions: 'Slot for child components.',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
semanticElement: {
|
|
168
|
+
ai: {
|
|
169
|
+
instructions: "HTML element type: 'div' (default), 'article', 'aside', 'section'.",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
background: {
|
|
173
|
+
ai: {
|
|
174
|
+
instructions: `Background color, gradient, or image. Use for card-like content blocks or visual emphasis.
|
|
175
|
+
Example: { type: 'solid', solid: { hex: '#f8fafc' } }`,
|
|
176
|
+
schema: backgroundSchema,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
border: {
|
|
180
|
+
ai: {
|
|
181
|
+
instructions: `Border styling. Use for card treatments or visual separation.
|
|
182
|
+
Example: { style: 'solid', width: 1, color: { hex: '#e5e7eb' }, radius: 12, sides: { top: true, right: true, bottom: true, left: true } }`,
|
|
183
|
+
schema: borderSchema,
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
padding: {
|
|
187
|
+
ai: {
|
|
188
|
+
instructions: `Internal padding.
|
|
189
|
+
Example: { xs: { top: 24, right: 24, bottom: 24, left: 24, unit: 'px', linked: true } }`,
|
|
190
|
+
schema: responsivePaddingSchema,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
dimensions: {
|
|
194
|
+
ai: {
|
|
195
|
+
instructions: `Width/height constraints.
|
|
196
|
+
Example: { xs: { mode: 'contained', maxWidth: { value: 800, unit: 'px', enabled: true }, alignment: 'center' } }`,
|
|
197
|
+
schema: responsiveDimensionsSchema,
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
margin: {
|
|
201
|
+
ai: {
|
|
202
|
+
instructions: `Margin outside the container.
|
|
203
|
+
Example: { xs: { top: 0, right: 0, bottom: 24, left: 0, unit: 'px', linked: false } }`,
|
|
204
|
+
schema: responsivePaddingSchema,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
animation: {
|
|
208
|
+
ai: {
|
|
209
|
+
instructions: `Entrance animation for the container. Use for key content blocks.
|
|
210
|
+
Example: { mode: 'preset', entrance: 'fade-up', entranceDuration: 500, triggerOnScroll: true, triggerOnce: true }`,
|
|
211
|
+
schema: animationSchema,
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
visibility: {
|
|
215
|
+
ai: {
|
|
216
|
+
instructions: `Show/hide at different breakpoints.
|
|
217
|
+
Example: { xs: true, sm: true, md: true, lg: true, xl: true }`,
|
|
218
|
+
schema: visibilitySchema,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
Flex: {
|
|
224
|
+
ai: {
|
|
225
|
+
instructions: `Flex component for flexible row/column layouts.
|
|
226
|
+
|
|
227
|
+
PURPOSE:
|
|
228
|
+
- Horizontal or vertical arrangements of elements
|
|
229
|
+
- Button groups, icon rows, horizontal lists
|
|
230
|
+
- Centering and distributing content
|
|
231
|
+
|
|
232
|
+
USAGE GUIDELINES:
|
|
233
|
+
- Use direction: 'row' for horizontal layouts (buttons side-by-side)
|
|
234
|
+
- Use direction: 'column' for vertical stacking (heading + text + button)
|
|
235
|
+
- NEVER place Section inside Flex
|
|
236
|
+
|
|
237
|
+
COMMON PATTERNS:
|
|
238
|
+
- Button Group: Flex (row, gap: 16) > Button + Button
|
|
239
|
+
- Hero Content: Flex (column, center) > Heading + Text + Flex(row) with Buttons
|
|
240
|
+
- Feature Item: Flex (column) > Image + Heading + Text
|
|
241
|
+
- Navigation: Flex (row, space-between) > Logo + Flex(row) with nav links
|
|
242
|
+
|
|
243
|
+
RECOMMENDED VALUES:
|
|
244
|
+
- gap: 8 (tight), 16 (compact), 24 (comfortable), 32 (spacious)
|
|
245
|
+
- direction: 'row' for horizontal, 'column' for vertical
|
|
246
|
+
- justifyContent: 'center' (centered), 'space-between' (spread out)
|
|
247
|
+
- alignItems: 'center' (vertically centered in row mode)
|
|
248
|
+
|
|
249
|
+
COMPOSITION:
|
|
250
|
+
- Section > Flex (column, center) > Content (for centered section content)
|
|
251
|
+
- Flex (row) > Button + Button (for button groups)
|
|
252
|
+
- Grid > Flex (column) > Content (for grid item content)`,
|
|
253
|
+
},
|
|
254
|
+
fields: {
|
|
255
|
+
content: {
|
|
256
|
+
ai: {
|
|
257
|
+
required: true,
|
|
258
|
+
instructions: 'Slot for child components. Cannot contain Section components.',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
direction: {
|
|
262
|
+
ai: {
|
|
263
|
+
instructions: "'row' for horizontal layout, 'column' for vertical stacking. Default: row.",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
justifyContent: {
|
|
267
|
+
ai: {
|
|
268
|
+
instructions: "Controls horizontal distribution: 'flex-start', 'center', 'flex-end', 'space-between', 'space-around'.",
|
|
269
|
+
schema: justifyContentSchema,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
alignItems: {
|
|
273
|
+
ai: {
|
|
274
|
+
instructions: "Controls vertical alignment: 'flex-start', 'center', 'flex-end', 'stretch'.",
|
|
275
|
+
schema: alignItemsSchema,
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
gap: {
|
|
279
|
+
ai: {
|
|
280
|
+
instructions: 'Space between items in pixels. Common values: 8, 16, 24, 32.',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
wrap: {
|
|
284
|
+
ai: {
|
|
285
|
+
instructions: "'wrap' allows items to wrap to new lines, 'nowrap' keeps them on one line.",
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
semanticElement: {
|
|
289
|
+
ai: {
|
|
290
|
+
instructions: "'div' (default), 'nav' for navigation, 'ul'/'ol' for lists.",
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
background: {
|
|
294
|
+
ai: {
|
|
295
|
+
instructions: `Background for the flex container. Use for grouped content with visual separation.
|
|
296
|
+
Example: { type: 'solid', solid: { hex: '#f1f5f9' } }`,
|
|
297
|
+
schema: backgroundSchema,
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
border: {
|
|
301
|
+
ai: {
|
|
302
|
+
instructions: `Border styling for the flex container.
|
|
303
|
+
Example: { style: 'solid', width: 1, color: { hex: '#e2e8f0' }, radius: 8, sides: { top: true, right: true, bottom: true, left: true } }`,
|
|
304
|
+
schema: borderSchema,
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
customPadding: {
|
|
308
|
+
ai: {
|
|
309
|
+
instructions: `Padding inside the flex container.
|
|
310
|
+
Example: { xs: { top: 16, right: 16, bottom: 16, left: 16, unit: 'px', linked: true } }`,
|
|
311
|
+
schema: responsivePaddingSchema,
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
margin: {
|
|
315
|
+
ai: {
|
|
316
|
+
instructions: `Margin outside the flex container.
|
|
317
|
+
Example: { xs: { top: 0, right: 0, bottom: 24, left: 0, unit: 'px', linked: false } }`,
|
|
318
|
+
schema: responsivePaddingSchema,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
dimensions: {
|
|
322
|
+
ai: {
|
|
323
|
+
instructions: `Width/height constraints for the flex container.
|
|
324
|
+
Example: { xs: { mode: 'contained', maxWidth: { value: 600, unit: 'px', enabled: true }, alignment: 'center' } }`,
|
|
325
|
+
schema: responsiveDimensionsSchema,
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
animation: {
|
|
329
|
+
ai: {
|
|
330
|
+
instructions: `Entrance animation for the flex container. Use for key content groups.
|
|
331
|
+
Example: { mode: 'preset', entrance: 'fade-up', entranceDuration: 500, triggerOnScroll: true, triggerOnce: true }`,
|
|
332
|
+
schema: animationSchema,
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
visibility: {
|
|
336
|
+
ai: {
|
|
337
|
+
instructions: `Show/hide at different breakpoints.
|
|
338
|
+
Example: { xs: true, sm: true, md: true, lg: true, xl: true }`,
|
|
339
|
+
schema: visibilitySchema,
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
Grid: {
|
|
345
|
+
ai: {
|
|
346
|
+
instructions: `Grid component for multi-column card/item layouts.
|
|
347
|
+
|
|
348
|
+
PURPOSE:
|
|
349
|
+
- Display items in a responsive grid
|
|
350
|
+
- Feature cards, team members, product listings
|
|
351
|
+
- Image galleries, testimonial grids
|
|
352
|
+
|
|
353
|
+
USAGE GUIDELINES:
|
|
354
|
+
- Use for 2-4 column layouts with equal-width items
|
|
355
|
+
- Grid automatically stacks to single column on mobile
|
|
356
|
+
- NEVER place Section inside Grid
|
|
357
|
+
|
|
358
|
+
COMMON PATTERNS:
|
|
359
|
+
- Feature Grid: Grid (3 columns) > Card + Card + Card
|
|
360
|
+
- Team Grid: Grid (4 columns) > Card + Card + Card + Card
|
|
361
|
+
- Pricing Grid: Grid (3 columns) > Card (pricing tier) x 3
|
|
362
|
+
- Gallery: Grid (2-3 columns) > Image + Image + Image
|
|
363
|
+
|
|
364
|
+
RECOMMENDED VALUES:
|
|
365
|
+
- numColumns: 2 (comparison), 3 (features/pricing), 4 (team/gallery)
|
|
366
|
+
- gap: 16 (tight), 24 (comfortable), 32 (spacious)
|
|
367
|
+
|
|
368
|
+
COMPOSITION:
|
|
369
|
+
- Section > Grid > Cards (for feature/team sections)
|
|
370
|
+
- Section > Heading + Grid > Items (for titled grid sections)`,
|
|
371
|
+
},
|
|
372
|
+
fields: {
|
|
373
|
+
content: {
|
|
374
|
+
ai: {
|
|
375
|
+
required: true,
|
|
376
|
+
instructions: 'Slot for child components (usually Cards). Cannot contain Section components.',
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
numColumns: {
|
|
380
|
+
ai: {
|
|
381
|
+
instructions: 'Number of columns (1-12). Common: 2, 3, or 4. Default: 3.',
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
gap: {
|
|
385
|
+
ai: {
|
|
386
|
+
instructions: 'Space between grid items in pixels. Common: 16, 24, 32. Default: 16.',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
semanticElement: {
|
|
390
|
+
ai: {
|
|
391
|
+
instructions: "'div' (default), 'ul' or 'ol' for list semantics.",
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
background: {
|
|
395
|
+
ai: {
|
|
396
|
+
instructions: `Background for the grid container. Use for grouped content with visual emphasis.
|
|
397
|
+
Example: { type: 'solid', solid: { hex: '#fafafa' } }`,
|
|
398
|
+
schema: backgroundSchema,
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
border: {
|
|
402
|
+
ai: {
|
|
403
|
+
instructions: `Border styling for the grid container.
|
|
404
|
+
Example: { style: 'solid', width: 1, color: { hex: '#e5e7eb' }, radius: 16, sides: { top: true, right: true, bottom: true, left: true } }`,
|
|
405
|
+
schema: borderSchema,
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
customPadding: {
|
|
409
|
+
ai: {
|
|
410
|
+
instructions: `Padding inside the grid container.
|
|
411
|
+
Example: { xs: { top: 24, right: 24, bottom: 24, left: 24, unit: 'px', linked: true } }`,
|
|
412
|
+
schema: responsivePaddingSchema,
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
margin: {
|
|
416
|
+
ai: {
|
|
417
|
+
instructions: `Margin outside the grid container.
|
|
418
|
+
Example: { xs: { top: 0, right: 0, bottom: 24, left: 0, unit: 'px', linked: false } }`,
|
|
419
|
+
schema: responsivePaddingSchema,
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
dimensions: {
|
|
423
|
+
ai: {
|
|
424
|
+
instructions: `Width/height constraints for the grid container.
|
|
425
|
+
Example: { xs: { mode: 'contained', maxWidth: { value: 1000, unit: 'px', enabled: true }, alignment: 'center' } }`,
|
|
426
|
+
schema: responsiveDimensionsSchema,
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
animation: {
|
|
430
|
+
ai: {
|
|
431
|
+
instructions: `Entrance animation for the grid container. Use for key content groups.
|
|
432
|
+
Example: { mode: 'preset', entrance: 'fade-up', entranceDuration: 500, triggerOnScroll: true, triggerOnce: true }`,
|
|
433
|
+
schema: animationSchema,
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
visibility: {
|
|
437
|
+
ai: {
|
|
438
|
+
instructions: `Show/hide at different breakpoints.
|
|
439
|
+
Example: { xs: true, sm: true, md: true, lg: true, xl: true }`,
|
|
440
|
+
schema: visibilitySchema,
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
Spacer: {
|
|
446
|
+
ai: {
|
|
447
|
+
instructions: `Spacer component for adding vertical/horizontal space.
|
|
448
|
+
|
|
449
|
+
PURPOSE:
|
|
450
|
+
- Add breathing room between components
|
|
451
|
+
- Create visual separation without borders
|
|
452
|
+
- Fine-tune spacing beyond component margins
|
|
453
|
+
|
|
454
|
+
USAGE GUIDELINES:
|
|
455
|
+
- Use sparingly - prefer component margin/padding when possible
|
|
456
|
+
- Good for adding extra space between sections or within sections
|
|
457
|
+
- Available sizes: 8, 16, 24, 32, 48, 64, 80, 96, 128 pixels
|
|
458
|
+
|
|
459
|
+
WHEN TO USE:
|
|
460
|
+
- Extra space between a heading and content
|
|
461
|
+
- Separation between distinct content groups
|
|
462
|
+
- When section padding alone isn't enough
|
|
463
|
+
|
|
464
|
+
WHEN NOT TO USE:
|
|
465
|
+
- Don't overuse - proper component spacing should suffice
|
|
466
|
+
- Not for separating sections (use Section padding instead)`,
|
|
467
|
+
},
|
|
468
|
+
fields: {
|
|
469
|
+
size: {
|
|
470
|
+
ai: {
|
|
471
|
+
instructions: 'Space in pixels: 8, 16, 24, 32 (small), 48, 64 (medium), 80, 96, 128 (large).',
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
direction: {
|
|
475
|
+
ai: {
|
|
476
|
+
instructions: "'vertical' (default), 'horizontal', or 'both'.",
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Layout component names for reference
|
|
484
|
+
*/
|
|
485
|
+
export const layoutComponents = ['Section', 'Container', 'Flex', 'Grid', 'Spacer'];
|
|
486
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../src/ai/presets/instructions/layout.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,cAAc,CAAA;AAErB;;;;;;;;GAQG;AAEH,MAA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E;YACF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;4DAmBwC;SACvD;QACD,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,EAAE,EAAE;oBACF,YAAY,EACV,+EAA+E;iBAClF;aACF;YACD,SAAS,EAAE;gBACT,EAAE,EAAE;oBACF,YAAY,EAAE,gDAAgD;iBAC/D;aACF;SACF;KACF;CACF,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentAiOverrides } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Comprehensive AI instructions for media components
|
|
4
|
+
*
|
|
5
|
+
* These instructions teach the AI:
|
|
6
|
+
* - Image and Template component usage
|
|
7
|
+
* - Limitations (AI cannot select from media library)
|
|
8
|
+
* - When and how to use these components
|
|
9
|
+
*/
|
|
10
|
+
export declare const mediaInstructions: ComponentAiOverrides;
|
|
11
|
+
/**
|
|
12
|
+
* Media component names for reference
|
|
13
|
+
*/
|
|
14
|
+
export declare const mediaComponents: readonly ["Image", "Template"];
|
|
15
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/ai/presets/instructions/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAG1D;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,oBA8H/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,gCAAiC,CAAA"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { alignmentSchema, transformSchema } from './schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* Comprehensive AI instructions for media components
|
|
4
|
+
*
|
|
5
|
+
* These instructions teach the AI:
|
|
6
|
+
* - Image and Template component usage
|
|
7
|
+
* - Limitations (AI cannot select from media library)
|
|
8
|
+
* - When and how to use these components
|
|
9
|
+
*/
|
|
10
|
+
export const mediaInstructions = {
|
|
11
|
+
Image: {
|
|
12
|
+
ai: {
|
|
13
|
+
instructions: `Image component for displaying images from the media library.
|
|
14
|
+
|
|
15
|
+
PURPOSE:
|
|
16
|
+
- Hero background images
|
|
17
|
+
- Feature illustrations
|
|
18
|
+
- Product photos
|
|
19
|
+
- Team member avatars
|
|
20
|
+
- Gallery images
|
|
21
|
+
|
|
22
|
+
IMPORTANT LIMITATION:
|
|
23
|
+
AI cannot select actual images from the media library. When generating pages:
|
|
24
|
+
- The Image component can be placed in the layout
|
|
25
|
+
- Users must manually select the image from the media library afterward
|
|
26
|
+
- AI can suggest appropriate alt text describing what image should be there
|
|
27
|
+
|
|
28
|
+
ASPECT RATIOS:
|
|
29
|
+
- 'auto': Original image proportions
|
|
30
|
+
- '1:1': Square (avatars, product thumbnails)
|
|
31
|
+
- '16:9': Widescreen (hero images, video thumbnails)
|
|
32
|
+
- '4:3': Traditional (photos, cards)
|
|
33
|
+
- '3:2': Photography standard
|
|
34
|
+
|
|
35
|
+
USAGE PATTERNS:
|
|
36
|
+
- Hero Image: 16:9 ratio, full width
|
|
37
|
+
- Team Avatar: 1:1 ratio, smaller dimensions
|
|
38
|
+
- Product Photo: 4:3 or 1:1 ratio
|
|
39
|
+
- Gallery Image: auto or 4:3 ratio
|
|
40
|
+
|
|
41
|
+
COMPOSITION:
|
|
42
|
+
- Section > Image (for full-width hero images)
|
|
43
|
+
- Card > Image (automatically uses card's image field)
|
|
44
|
+
- Grid > Image + Image + Image (for galleries)
|
|
45
|
+
- Flex (row) > Image + Content (for side-by-side layouts)`,
|
|
46
|
+
},
|
|
47
|
+
fields: {
|
|
48
|
+
image: {
|
|
49
|
+
ai: {
|
|
50
|
+
exclude: true,
|
|
51
|
+
instructions: 'AI cannot select images from media library. Leave this for users to fill in.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
alt: {
|
|
55
|
+
ai: {
|
|
56
|
+
instructions: 'Descriptive alt text for accessibility. Describe what the image should show, e.g., "Team members collaborating in modern office".',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
aspectRatio: {
|
|
60
|
+
ai: {
|
|
61
|
+
instructions: "'auto', '1:1' (square), '16:9' (widescreen), '4:3' (traditional), '3:2' (photo). Use '16:9' for hero images, '1:1' for avatars.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
link: {
|
|
65
|
+
ai: {
|
|
66
|
+
instructions: 'Optional URL to make image clickable.',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
openInNewTab: {
|
|
70
|
+
ai: {
|
|
71
|
+
instructions: "'yes' or 'no'. Only relevant if link is provided.",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
alignment: {
|
|
75
|
+
ai: {
|
|
76
|
+
instructions: "'left', 'center' (default), or 'right'.",
|
|
77
|
+
schema: alignmentSchema,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
transform: {
|
|
81
|
+
ai: {
|
|
82
|
+
instructions: `CSS transforms. Usually leave unset for images.`,
|
|
83
|
+
schema: transformSchema,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
Template: {
|
|
89
|
+
ai: {
|
|
90
|
+
instructions: `Template component for inserting saved page templates.
|
|
91
|
+
|
|
92
|
+
PURPOSE:
|
|
93
|
+
- Reuse common page sections across pages
|
|
94
|
+
- Insert pre-built layouts
|
|
95
|
+
- Maintain consistency across pages
|
|
96
|
+
|
|
97
|
+
IMPORTANT LIMITATION:
|
|
98
|
+
AI cannot select actual templates from the template library. When generating pages:
|
|
99
|
+
- The Template component can be placed in the layout
|
|
100
|
+
- Users must manually select the template afterward
|
|
101
|
+
- Consider building sections directly instead of using Template placeholders
|
|
102
|
+
|
|
103
|
+
WHEN TO USE:
|
|
104
|
+
- When a pre-built section exists that matches the need
|
|
105
|
+
- For complex layouts that have been saved as templates
|
|
106
|
+
- For maintaining brand consistency
|
|
107
|
+
|
|
108
|
+
WHEN NOT TO USE:
|
|
109
|
+
- When building a custom section is more appropriate
|
|
110
|
+
- When the needed layout doesn't exist as a template
|
|
111
|
+
- For simple sections that can be built quickly
|
|
112
|
+
|
|
113
|
+
RECOMMENDATION:
|
|
114
|
+
In most cases, build sections directly using Section, Flex, Grid, and other components
|
|
115
|
+
rather than relying on Template placeholders that users must configure later.`,
|
|
116
|
+
},
|
|
117
|
+
fields: {
|
|
118
|
+
templateId: {
|
|
119
|
+
ai: {
|
|
120
|
+
exclude: true,
|
|
121
|
+
instructions: 'AI cannot select templates from the library. Leave for users to fill in.',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
content: {
|
|
125
|
+
ai: {
|
|
126
|
+
instructions: 'Slot for template content. Usually auto-populated from selected template.',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Media component names for reference
|
|
134
|
+
*/
|
|
135
|
+
export const mediaComponents = ['Image', 'Template'];
|
|
136
|
+
//# sourceMappingURL=media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../../src/ai/presets/instructions/media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAyB;IACrD,KAAK,EAAE;QACL,EAAE,EAAE;YACF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAgCsC;SACrD;QACD,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,OAAO,EAAE,IAAI;oBACb,YAAY,EACV,8EAA8E;iBACjF;aACF;YACD,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