@morphika/andami 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/admin/assets.ts +4 -0
- package/admin/database.ts +4 -0
- package/admin/index.ts +6 -0
- package/admin/login.ts +4 -0
- package/admin/navigation.ts +4 -0
- package/admin/pages-editor.ts +4 -0
- package/admin/pages.ts +4 -0
- package/admin/projects-editor.ts +4 -0
- package/admin/projects.ts +4 -0
- package/admin/settings.ts +4 -0
- package/admin/setup.ts +4 -0
- package/admin/storage.ts +4 -0
- package/admin/styles.ts +4 -0
- package/app/(site)/[slug]/loading.tsx +20 -0
- package/app/(site)/[slug]/page.tsx +83 -0
- package/app/(site)/error.tsx +32 -0
- package/app/(site)/layout.tsx +53 -0
- package/app/(site)/loading.tsx +20 -0
- package/app/(site)/not-found.tsx +41 -0
- package/app/(site)/page.tsx +43 -0
- package/app/(site)/preview/page.tsx +99 -0
- package/app/(site)/work/[slug]/loading.tsx +23 -0
- package/app/(site)/work/[slug]/page.tsx +84 -0
- package/app/admin/assets/page.tsx +573 -0
- package/app/admin/database/page.tsx +302 -0
- package/app/admin/error.tsx +53 -0
- package/app/admin/layout.tsx +273 -0
- package/app/admin/login/page.tsx +88 -0
- package/app/admin/navigation/page.tsx +157 -0
- package/app/admin/page.tsx +17 -0
- package/app/admin/pages/[slug]/page.tsx +849 -0
- package/app/admin/pages/page.tsx +588 -0
- package/app/admin/projects/[slug]/page.tsx +3 -0
- package/app/admin/projects/page.tsx +669 -0
- package/app/admin/settings/page.tsx +132 -0
- package/app/admin/setup/page.tsx +64 -0
- package/app/admin/storage/page.tsx +518 -0
- package/app/admin/styles/page.tsx +243 -0
- package/app/api/admin/assets/file/route.ts +81 -0
- package/app/api/admin/assets/health/route.ts +170 -0
- package/app/api/admin/assets/register/route.ts +163 -0
- package/app/api/admin/assets/registry/route.ts +98 -0
- package/app/api/admin/assets/relink/confirm/route.ts +242 -0
- package/app/api/admin/assets/relink/route.ts +202 -0
- package/app/api/admin/assets/scan/route.ts +271 -0
- package/app/api/admin/auth/route.ts +160 -0
- package/app/api/admin/custom-sections/[slug]/route.ts +159 -0
- package/app/api/admin/custom-sections/route.ts +127 -0
- package/app/api/admin/database/route.ts +53 -0
- package/app/api/admin/pages/[slug]/duplicate/route.ts +91 -0
- package/app/api/admin/pages/[slug]/route.ts +617 -0
- package/app/api/admin/pages/[slug]/set-home/route.ts +76 -0
- package/app/api/admin/pages/route.ts +129 -0
- package/app/api/admin/preview/route.ts +53 -0
- package/app/api/admin/r2/connect/route.ts +181 -0
- package/app/api/admin/r2/delete/route.ts +198 -0
- package/app/api/admin/r2/disconnect/route.ts +42 -0
- package/app/api/admin/r2/rename/route.ts +265 -0
- package/app/api/admin/r2/status/route.ts +106 -0
- package/app/api/admin/r2/upload-url/route.ts +148 -0
- package/app/api/admin/revalidate/route.ts +55 -0
- package/app/api/admin/settings/route.ts +279 -0
- package/app/api/admin/setup/complete/route.ts +51 -0
- package/app/api/admin/setup/route.ts +118 -0
- package/app/api/admin/storage/switch/route.ts +117 -0
- package/app/api/admin/styles/fonts/route.ts +97 -0
- package/app/api/admin/styles/route.ts +304 -0
- package/app/api/assets/[...path]/route.ts +98 -0
- package/app/api/custom-sections/[id]/route.ts +43 -0
- package/app/api/draft-mode/disable/route.ts +10 -0
- package/app/api/draft-mode/enable/route.ts +26 -0
- package/app/api/projects/route.ts +42 -0
- package/app/api/styles/route.ts +88 -0
- package/app/favicon.ico +0 -0
- package/app/globals.css +7 -0
- package/app/layout.tsx +53 -0
- package/app/robots.ts +17 -0
- package/app/sitemap.ts +48 -0
- package/app/studio/[[...index]]/page.tsx +8 -0
- package/components/admin/MetadataEditor.tsx +173 -0
- package/components/admin/PublishToggle.tsx +130 -0
- package/components/admin/icons.tsx +40 -0
- package/components/admin/nav-builder/NavBuilder.tsx +182 -0
- package/components/admin/nav-builder/NavBuilderGrid.tsx +326 -0
- package/components/admin/nav-builder/NavGeneralSettings.tsx +275 -0
- package/components/admin/nav-builder/NavGridCell.tsx +48 -0
- package/components/admin/nav-builder/NavGridItem.tsx +189 -0
- package/components/admin/nav-builder/NavItemSettings.tsx +288 -0
- package/components/admin/nav-builder/NavItemTypePicker.tsx +102 -0
- package/components/admin/nav-builder/NavLivePreview.tsx +125 -0
- package/components/admin/nav-builder/NavSettingsFields.tsx +248 -0
- package/components/admin/nav-builder/NavSettingsPanel.tsx +127 -0
- package/components/admin/nav-builder/index.ts +10 -0
- package/components/admin/nav-builder/nav-builder-utils.ts +238 -0
- package/components/admin/setup-wizard/BrandingStep.tsx +218 -0
- package/components/admin/setup-wizard/DatabaseStep.tsx +331 -0
- package/components/admin/setup-wizard/DoneStep.tsx +187 -0
- package/components/admin/setup-wizard/SetupWizard.tsx +166 -0
- package/components/admin/setup-wizard/StorageStep.tsx +308 -0
- package/components/admin/setup-wizard/WelcomeStep.tsx +96 -0
- package/components/admin/setup-wizard/index.ts +9 -0
- package/components/admin/styles/ColorsEditor.tsx +214 -0
- package/components/admin/styles/FontsEditor.tsx +258 -0
- package/components/admin/styles/GridLayoutEditor.tsx +292 -0
- package/components/admin/styles/LinksButtonsEditor.tsx +120 -0
- package/components/admin/styles/TypographyEditor.tsx +266 -0
- package/components/admin/styles/index.ts +9 -0
- package/components/admin/styles/shared.tsx +68 -0
- package/components/blocks/BlockRenderer.tsx +404 -0
- package/components/blocks/ButtonBlockRenderer.tsx +52 -0
- package/components/blocks/CoverBlockRenderer.tsx +239 -0
- package/components/blocks/CustomSectionInstanceRenderer.tsx +82 -0
- package/components/blocks/EnterAnimationWrapper.tsx +140 -0
- package/components/blocks/HoverAnimationWrapper.tsx +308 -0
- package/components/blocks/ImageBlockRenderer.tsx +61 -0
- package/components/blocks/ImageGridBlockRenderer.tsx +545 -0
- package/components/blocks/PageBackground.tsx +28 -0
- package/components/blocks/PageNavAnimation.tsx +35 -0
- package/components/blocks/PageNavColor.tsx +24 -0
- package/components/blocks/PageRenderer.tsx +142 -0
- package/components/blocks/ParallaxGroupRenderer.tsx +448 -0
- package/components/blocks/ParallaxSlideRenderer.tsx +175 -0
- package/components/blocks/ProjectGridBlockRenderer.tsx +556 -0
- package/components/blocks/SectionRenderer.tsx +170 -0
- package/components/blocks/SectionV2Renderer.tsx +330 -0
- package/components/blocks/ShaderCanvas.tsx +392 -0
- package/components/blocks/SpacerBlockRenderer.tsx +17 -0
- package/components/blocks/TextBlockRenderer.tsx +87 -0
- package/components/blocks/TypewriterRichText.tsx +464 -0
- package/components/blocks/TypewriterWrapper.tsx +149 -0
- package/components/blocks/VideoBlockRenderer.tsx +304 -0
- package/components/blocks/index.ts +2 -0
- package/components/builder/AssetBrowser.tsx +2 -0
- package/components/builder/BlockLivePreview.tsx +101 -0
- package/components/builder/BlockTypePicker.tsx +178 -0
- package/components/builder/BuilderCanvas.tsx +354 -0
- package/components/builder/CanvasMinimap.tsx +200 -0
- package/components/builder/CanvasToolbar.tsx +202 -0
- package/components/builder/ColorPicker.tsx +243 -0
- package/components/builder/ColorSwatchPicker.tsx +274 -0
- package/components/builder/ColumnDragContext.tsx +51 -0
- package/components/builder/ColumnDragOverlay.tsx +110 -0
- package/components/builder/CustomSectionInstanceCard.tsx +97 -0
- package/components/builder/DeviceFrame.tsx +123 -0
- package/components/builder/DndWrapper.tsx +337 -0
- package/components/builder/InsertionLines.tsx +186 -0
- package/components/builder/ParallaxGroupCanvas.tsx +228 -0
- package/components/builder/ParallaxSlideHeader.tsx +113 -0
- package/components/builder/ReadOnlyFrame.tsx +417 -0
- package/components/builder/SectionEditorBar.tsx +288 -0
- package/components/builder/SectionTypePicker.tsx +422 -0
- package/components/builder/SectionV2Canvas.tsx +297 -0
- package/components/builder/SectionV2Column.tsx +488 -0
- package/components/builder/SettingsPanel.tsx +911 -0
- package/components/builder/SortableBlock.tsx +230 -0
- package/components/builder/SortableRow.tsx +362 -0
- package/components/builder/VirtualAssetGrid.tsx +397 -0
- package/components/builder/asset-browser/AssetBrowser.tsx +178 -0
- package/components/builder/asset-browser/FileLightbox.tsx +116 -0
- package/components/builder/asset-browser/FolderTreeItem.tsx +55 -0
- package/components/builder/asset-browser/R2BrowserContent.tsx +436 -0
- package/components/builder/asset-browser/R2ContextMenu.tsx +98 -0
- package/components/builder/asset-browser/VideoThumbnail.tsx +63 -0
- package/components/builder/asset-browser/helpers.ts +88 -0
- package/components/builder/asset-browser/index.ts +1 -0
- package/components/builder/asset-browser/types.ts +49 -0
- package/components/builder/asset-browser/useAssetBrowser.ts +344 -0
- package/components/builder/asset-browser/useR2DragDrop.ts +116 -0
- package/components/builder/asset-browser/useR2Operations.ts +189 -0
- package/components/builder/blockStyles.tsx +295 -0
- package/components/builder/editors/ButtonBlockEditor.tsx +184 -0
- package/components/builder/editors/CoverBlockEditor.tsx +488 -0
- package/components/builder/editors/EnterAnimationPicker.tsx +297 -0
- package/components/builder/editors/HoverEffectPicker.tsx +209 -0
- package/components/builder/editors/ImageBlockEditor.tsx +206 -0
- package/components/builder/editors/ImageGridBlockEditor.tsx +386 -0
- package/components/builder/editors/ProjectGridEditor.tsx +648 -0
- package/components/builder/editors/SpacerBlockEditor.tsx +167 -0
- package/components/builder/editors/StaggerSettings.tsx +108 -0
- package/components/builder/editors/TextAlignmentIcons.tsx +39 -0
- package/components/builder/editors/TextBlockEditor.tsx +462 -0
- package/components/builder/editors/TextStylePicker.tsx +183 -0
- package/components/builder/editors/VideoBlockEditor.tsx +278 -0
- package/components/builder/editors/index.ts +10 -0
- package/components/builder/editors/shared.tsx +345 -0
- package/components/builder/hooks/useColumnDrag.ts +472 -0
- package/components/builder/hooks/useColumnResize.ts +221 -0
- package/components/builder/index.ts +12 -0
- package/components/builder/live-preview/LiveButtonPreview.tsx +38 -0
- package/components/builder/live-preview/LiveCoverPreview.tsx +146 -0
- package/components/builder/live-preview/LiveImageGridPreview.tsx +123 -0
- package/components/builder/live-preview/LiveImagePreview.tsx +107 -0
- package/components/builder/live-preview/LiveProjectGridPreview.tsx +1010 -0
- package/components/builder/live-preview/LiveSpacerPreview.tsx +9 -0
- package/components/builder/live-preview/LiveTextEditor.tsx +198 -0
- package/components/builder/live-preview/LiveVideoPreview.tsx +98 -0
- package/components/builder/live-preview/index.ts +10 -0
- package/components/builder/live-preview/shared.tsx +153 -0
- package/components/builder/settings-panel/BlockLayoutTab.tsx +532 -0
- package/components/builder/settings-panel/BlockSettings.tsx +94 -0
- package/components/builder/settings-panel/ColumnV2Settings.tsx +160 -0
- package/components/builder/settings-panel/LayoutTab.tsx +310 -0
- package/components/builder/settings-panel/PageSettings.tsx +200 -0
- package/components/builder/settings-panel/ParallaxGroupSettings.tsx +118 -0
- package/components/builder/settings-panel/ParallaxSlideSettings.tsx +178 -0
- package/components/builder/settings-panel/SectionV2AnimationTab.tsx +103 -0
- package/components/builder/settings-panel/SectionV2LayoutTab.tsx +312 -0
- package/components/builder/settings-panel/SectionV2Settings.tsx +323 -0
- package/components/builder/settings-panel/TRBLInputs.tsx +51 -0
- package/components/builder/settings-panel/index.ts +19 -0
- package/components/builder/settings-panel/responsive-helpers.ts +524 -0
- package/components/ui/CustomCursor.tsx +118 -0
- package/components/ui/NavContentLightbox.tsx +152 -0
- package/components/ui/Navbar.tsx +582 -0
- package/components/ui/PortfolioTracker.tsx +87 -0
- package/components/ui/ScrollToTop.tsx +47 -0
- package/lib/animation/enter-presets.ts +147 -0
- package/lib/animation/enter-resolve.ts +90 -0
- package/lib/animation/enter-types.ts +128 -0
- package/lib/animation/hover-effect-presets.ts +210 -0
- package/lib/animation/hover-effect-types.ts +126 -0
- package/lib/asset-retry.ts +111 -0
- package/lib/assets.ts +92 -0
- package/lib/audit.ts +35 -0
- package/lib/auth-token.ts +94 -0
- package/lib/auth.ts +13 -0
- package/lib/builder/cascade-helpers.ts +51 -0
- package/lib/builder/cascade.ts +533 -0
- package/lib/builder/constants.ts +103 -0
- package/lib/builder/defaults.ts +182 -0
- package/lib/builder/history.ts +48 -0
- package/lib/builder/index.ts +21 -0
- package/lib/builder/layout-styles.ts +344 -0
- package/lib/builder/masonry.ts +166 -0
- package/lib/builder/responsive.ts +156 -0
- package/lib/builder/serializer.ts +845 -0
- package/lib/builder/store-blocks.ts +193 -0
- package/lib/builder/store-canvas.ts +319 -0
- package/lib/builder/store-helpers.ts +490 -0
- package/lib/builder/store-sections.ts +709 -0
- package/lib/builder/store.ts +333 -0
- package/lib/builder/templates.ts +297 -0
- package/lib/builder/types.ts +374 -0
- package/lib/builder/utils.ts +37 -0
- package/lib/color-utils.ts +116 -0
- package/lib/config/index.ts +57 -0
- package/lib/config/types.ts +122 -0
- package/lib/contexts/AssetContext.tsx +79 -0
- package/lib/contexts/NavAnimationContext.tsx +44 -0
- package/lib/contexts/NavColorContext.tsx +38 -0
- package/lib/contexts/PageExitContext.tsx +194 -0
- package/lib/contexts/ThumbStatusContext.tsx +83 -0
- package/lib/csrf-client.ts +34 -0
- package/lib/csrf.ts +68 -0
- package/lib/format-utils.ts +24 -0
- package/lib/hooks/useViewport.ts +42 -0
- package/lib/logger.ts +81 -0
- package/lib/revalidate.ts +23 -0
- package/lib/sanitize.ts +91 -0
- package/lib/sanity/client.ts +8 -0
- package/lib/sanity/queries.ts +486 -0
- package/lib/sanity/types.ts +869 -0
- package/lib/sanity/writeClient.ts +24 -0
- package/lib/security.ts +402 -0
- package/lib/setup/detect.ts +156 -0
- package/lib/shader/glsl/index.ts +27 -0
- package/lib/shader/glsl/pixelate.ts +51 -0
- package/lib/shader/glsl/rgb-shift.ts +45 -0
- package/lib/shader/glsl/ripple.ts +46 -0
- package/lib/shader/glsl/vertex.ts +14 -0
- package/lib/storage/index.ts +211 -0
- package/lib/storage/r2-adapter.ts +286 -0
- package/lib/storage/types.ts +125 -0
- package/lib/styles/provider.tsx +267 -0
- package/lib/thumbnails/generate.ts +151 -0
- package/lib/utils.ts +6 -0
- package/package.json +212 -0
- package/sanity/compose.ts +65 -0
- package/sanity/sanity.config.ts +126 -0
- package/sanity/schemas/assetRegistry.ts +301 -0
- package/sanity/schemas/blocks/blockLayout.ts +90 -0
- package/sanity/schemas/blocks/buttonBlock.ts +82 -0
- package/sanity/schemas/blocks/coverBlock.ts +229 -0
- package/sanity/schemas/blocks/imageBlock.ts +58 -0
- package/sanity/schemas/blocks/imageGridBlock.ts +112 -0
- package/sanity/schemas/blocks/index.ts +9 -0
- package/sanity/schemas/blocks/projectGridBlock.ts +251 -0
- package/sanity/schemas/blocks/spacerBlock.ts +41 -0
- package/sanity/schemas/blocks/textBlock.ts +139 -0
- package/sanity/schemas/blocks/videoBlock.ts +80 -0
- package/sanity/schemas/customSection.ts +69 -0
- package/sanity/schemas/customSectionInstance.ts +163 -0
- package/sanity/schemas/index.ts +111 -0
- package/sanity/schemas/objects/enterAnimationConfig.ts +72 -0
- package/sanity/schemas/objects/hoverEffectConfig.ts +90 -0
- package/sanity/schemas/objects/parallaxGroup.ts +66 -0
- package/sanity/schemas/objects/parallaxSlide.ts +217 -0
- package/sanity/schemas/objects/typewriterConfig.ts +38 -0
- package/sanity/schemas/page.ts +162 -0
- package/sanity/schemas/pageSection.ts +157 -0
- package/sanity/schemas/pageSectionV2.ts +269 -0
- package/sanity/schemas/siteSettings.ts +256 -0
- package/sanity/schemas/siteStyles.ts +212 -0
- package/site/error.ts +4 -0
- package/site/index.ts +8 -0
- package/site/not-found.ts +4 -0
- package/site/page.ts +4 -0
- package/site/preview.ts +4 -0
- package/site/robots.ts +4 -0
- package/site/sitemap.ts +4 -0
- package/site/work.ts +4 -0
- package/studio/index.ts +4 -0
- package/styles/admin.css +85 -0
- package/styles/animations.css +237 -0
- package/styles/base.css +148 -0
- package/styles/globals.css +10 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { defineType, defineField } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Asset Registry — singleton document that holds the inventory
|
|
5
|
+
* of all known assets, their statuses, and relink history.
|
|
6
|
+
*
|
|
7
|
+
* The registry lives in Sanity so it's accessible from anywhere
|
|
8
|
+
* (local dev, Vercel production, etc.).
|
|
9
|
+
*/
|
|
10
|
+
export default defineType({
|
|
11
|
+
name: "assetRegistry",
|
|
12
|
+
title: "Asset Registry",
|
|
13
|
+
type: "document",
|
|
14
|
+
|
|
15
|
+
fields: [
|
|
16
|
+
// === STORAGE PROVIDER ===
|
|
17
|
+
|
|
18
|
+
defineField({
|
|
19
|
+
name: "storage_provider",
|
|
20
|
+
title: "Active Storage Provider",
|
|
21
|
+
type: "string",
|
|
22
|
+
options: { list: ["r2"] },
|
|
23
|
+
initialValue: "r2",
|
|
24
|
+
description: "Which storage backend serves assets on the public site",
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
// === R2 CONFIGURATION ===
|
|
28
|
+
|
|
29
|
+
defineField({
|
|
30
|
+
name: "r2_bucket_url",
|
|
31
|
+
title: "R2 Public Bucket URL",
|
|
32
|
+
type: "string",
|
|
33
|
+
hidden: true,
|
|
34
|
+
description:
|
|
35
|
+
"Public bucket URL (e.g., https://assets.example.com or https://pub-xxx.r2.dev)",
|
|
36
|
+
}),
|
|
37
|
+
|
|
38
|
+
defineField({
|
|
39
|
+
name: "r2_access_key_id",
|
|
40
|
+
title: "R2 Access Key ID",
|
|
41
|
+
type: "string",
|
|
42
|
+
hidden: true,
|
|
43
|
+
description: "Encrypted S3-compatible access key",
|
|
44
|
+
}),
|
|
45
|
+
|
|
46
|
+
defineField({
|
|
47
|
+
name: "r2_secret_access_key",
|
|
48
|
+
title: "R2 Secret Access Key",
|
|
49
|
+
type: "string",
|
|
50
|
+
hidden: true,
|
|
51
|
+
description: "Encrypted S3-compatible secret key",
|
|
52
|
+
}),
|
|
53
|
+
|
|
54
|
+
defineField({
|
|
55
|
+
name: "r2_endpoint",
|
|
56
|
+
title: "R2 S3 Endpoint",
|
|
57
|
+
type: "string",
|
|
58
|
+
hidden: true,
|
|
59
|
+
description:
|
|
60
|
+
"S3-compatible endpoint (e.g., https://<account-id>.r2.cloudflarestorage.com)",
|
|
61
|
+
}),
|
|
62
|
+
|
|
63
|
+
defineField({
|
|
64
|
+
name: "r2_bucket_name",
|
|
65
|
+
title: "R2 Bucket Name",
|
|
66
|
+
type: "string",
|
|
67
|
+
hidden: true,
|
|
68
|
+
description: "Bucket name for API calls (e.g., my-assets)",
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
defineField({
|
|
72
|
+
name: "r2_connected_at",
|
|
73
|
+
title: "R2 Connected At",
|
|
74
|
+
type: "datetime",
|
|
75
|
+
hidden: true,
|
|
76
|
+
}),
|
|
77
|
+
|
|
78
|
+
// === SEED CONFIGURATION ===
|
|
79
|
+
|
|
80
|
+
defineField({
|
|
81
|
+
name: "seed_url",
|
|
82
|
+
title: "Current Seed URL",
|
|
83
|
+
type: "string",
|
|
84
|
+
description:
|
|
85
|
+
"Base URL for asset resolution",
|
|
86
|
+
validation: (Rule) =>
|
|
87
|
+
Rule.custom((value) => {
|
|
88
|
+
if (!value) return true; // Allow empty
|
|
89
|
+
try {
|
|
90
|
+
new URL(value);
|
|
91
|
+
return true;
|
|
92
|
+
} catch {
|
|
93
|
+
return "Must be a valid URL";
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
}),
|
|
97
|
+
|
|
98
|
+
defineField({
|
|
99
|
+
name: "scan_status",
|
|
100
|
+
title: "Scan Status",
|
|
101
|
+
type: "string",
|
|
102
|
+
options: {
|
|
103
|
+
list: [
|
|
104
|
+
{ title: "Ready", value: "ready" },
|
|
105
|
+
{ title: "Scanning", value: "scanning" },
|
|
106
|
+
{ title: "Error", value: "error" },
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
initialValue: "ready",
|
|
110
|
+
}),
|
|
111
|
+
|
|
112
|
+
defineField({
|
|
113
|
+
name: "last_scanned_at",
|
|
114
|
+
title: "Last Scanned At",
|
|
115
|
+
type: "datetime",
|
|
116
|
+
}),
|
|
117
|
+
|
|
118
|
+
defineField({
|
|
119
|
+
name: "scan_error",
|
|
120
|
+
title: "Last Scan Error",
|
|
121
|
+
type: "string",
|
|
122
|
+
hidden: true,
|
|
123
|
+
}),
|
|
124
|
+
|
|
125
|
+
// === ASSET CATALOG ===
|
|
126
|
+
|
|
127
|
+
defineField({
|
|
128
|
+
name: "assets",
|
|
129
|
+
title: "Registered Assets",
|
|
130
|
+
type: "array",
|
|
131
|
+
of: [
|
|
132
|
+
{
|
|
133
|
+
type: "object",
|
|
134
|
+
name: "registeredAsset",
|
|
135
|
+
fields: [
|
|
136
|
+
defineField({
|
|
137
|
+
name: "path",
|
|
138
|
+
title: "Relative Path",
|
|
139
|
+
type: "string",
|
|
140
|
+
description: 'e.g., "projects/house-of-delights/hero.jpg"',
|
|
141
|
+
}),
|
|
142
|
+
defineField({
|
|
143
|
+
name: "filename",
|
|
144
|
+
title: "File Name",
|
|
145
|
+
type: "string",
|
|
146
|
+
}),
|
|
147
|
+
defineField({
|
|
148
|
+
name: "extension",
|
|
149
|
+
title: "Extension",
|
|
150
|
+
type: "string",
|
|
151
|
+
}),
|
|
152
|
+
defineField({
|
|
153
|
+
name: "file_size",
|
|
154
|
+
title: "File Size (bytes)",
|
|
155
|
+
type: "number",
|
|
156
|
+
}),
|
|
157
|
+
defineField({
|
|
158
|
+
name: "mime_type",
|
|
159
|
+
title: "MIME Type",
|
|
160
|
+
type: "string",
|
|
161
|
+
}),
|
|
162
|
+
defineField({
|
|
163
|
+
name: "width",
|
|
164
|
+
title: "Image Width",
|
|
165
|
+
type: "number",
|
|
166
|
+
hidden: true,
|
|
167
|
+
}),
|
|
168
|
+
defineField({
|
|
169
|
+
name: "height",
|
|
170
|
+
title: "Image Height",
|
|
171
|
+
type: "number",
|
|
172
|
+
hidden: true,
|
|
173
|
+
}),
|
|
174
|
+
defineField({
|
|
175
|
+
name: "file_hash",
|
|
176
|
+
title: "Content Hash",
|
|
177
|
+
type: "string",
|
|
178
|
+
hidden: true,
|
|
179
|
+
description: "For detecting file moves across seed changes",
|
|
180
|
+
}),
|
|
181
|
+
defineField({
|
|
182
|
+
name: "status",
|
|
183
|
+
title: "Status",
|
|
184
|
+
type: "string",
|
|
185
|
+
options: {
|
|
186
|
+
list: [
|
|
187
|
+
{ title: "Active", value: "active" },
|
|
188
|
+
{ title: "Missing", value: "missing" },
|
|
189
|
+
{ title: "Moved", value: "moved" },
|
|
190
|
+
{ title: "New", value: "new" },
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
initialValue: "active",
|
|
194
|
+
}),
|
|
195
|
+
defineField({
|
|
196
|
+
name: "last_checked_at",
|
|
197
|
+
title: "Last Checked",
|
|
198
|
+
type: "datetime",
|
|
199
|
+
}),
|
|
200
|
+
defineField({
|
|
201
|
+
name: "used_in",
|
|
202
|
+
title: "Used In",
|
|
203
|
+
type: "array",
|
|
204
|
+
of: [{ type: "string" }],
|
|
205
|
+
hidden: true,
|
|
206
|
+
description: "Sanity document IDs referencing this asset",
|
|
207
|
+
}),
|
|
208
|
+
defineField({
|
|
209
|
+
name: "has_thumbnail",
|
|
210
|
+
title: "Has Thumbnail",
|
|
211
|
+
type: "boolean",
|
|
212
|
+
description: "Whether a _thumbs/ equivalent exists for this image",
|
|
213
|
+
initialValue: false,
|
|
214
|
+
hidden: true,
|
|
215
|
+
}),
|
|
216
|
+
defineField({
|
|
217
|
+
name: "previous_paths",
|
|
218
|
+
title: "Previous Paths",
|
|
219
|
+
type: "array",
|
|
220
|
+
of: [{ type: "string" }],
|
|
221
|
+
hidden: true,
|
|
222
|
+
}),
|
|
223
|
+
],
|
|
224
|
+
preview: {
|
|
225
|
+
select: {
|
|
226
|
+
path: "path",
|
|
227
|
+
status: "status",
|
|
228
|
+
size: "file_size",
|
|
229
|
+
},
|
|
230
|
+
prepare({ path, status, size }: { path?: string; status?: string; size?: number }) {
|
|
231
|
+
const statusIcons: Record<string, string> = {
|
|
232
|
+
active: "✅",
|
|
233
|
+
missing: "❌",
|
|
234
|
+
moved: "➡️",
|
|
235
|
+
new: "🆕",
|
|
236
|
+
};
|
|
237
|
+
const sizeStr = size
|
|
238
|
+
? size > 1048576
|
|
239
|
+
? `${(size / 1048576).toFixed(1)} MB`
|
|
240
|
+
: `${(size / 1024).toFixed(0)} KB`
|
|
241
|
+
: "";
|
|
242
|
+
return {
|
|
243
|
+
title: `${statusIcons[status || "active"] || ""} ${path || "Unknown"}`,
|
|
244
|
+
subtitle: sizeStr,
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
}),
|
|
251
|
+
|
|
252
|
+
// === RELINK HISTORY ===
|
|
253
|
+
|
|
254
|
+
defineField({
|
|
255
|
+
name: "relink_log",
|
|
256
|
+
title: "Relink History",
|
|
257
|
+
type: "array",
|
|
258
|
+
of: [
|
|
259
|
+
{
|
|
260
|
+
type: "object",
|
|
261
|
+
name: "relinkEntry",
|
|
262
|
+
fields: [
|
|
263
|
+
defineField({ name: "date", title: "Date", type: "datetime" }),
|
|
264
|
+
defineField({ name: "old_seed", title: "Old Seed URL", type: "string" }),
|
|
265
|
+
defineField({ name: "new_seed", title: "New Seed URL", type: "string" }),
|
|
266
|
+
defineField({ name: "assets_relinked", title: "Relinked", type: "number" }),
|
|
267
|
+
defineField({ name: "assets_missing", title: "Missing", type: "number" }),
|
|
268
|
+
defineField({ name: "details", title: "Details", type: "text" }),
|
|
269
|
+
],
|
|
270
|
+
preview: {
|
|
271
|
+
select: {
|
|
272
|
+
date: "date",
|
|
273
|
+
relinked: "assets_relinked",
|
|
274
|
+
missing: "assets_missing",
|
|
275
|
+
},
|
|
276
|
+
prepare({ date, relinked, missing }: { date?: string; relinked?: number; missing?: number }) {
|
|
277
|
+
return {
|
|
278
|
+
title: `Relink — ${relinked || 0} matched, ${missing || 0} missing`,
|
|
279
|
+
subtitle: date ? new Date(date).toLocaleDateString() : "",
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
}),
|
|
286
|
+
|
|
287
|
+
],
|
|
288
|
+
|
|
289
|
+
preview: {
|
|
290
|
+
select: {
|
|
291
|
+
seed: "seed_url",
|
|
292
|
+
status: "scan_status",
|
|
293
|
+
},
|
|
294
|
+
prepare({ seed, status }: { seed?: string; status?: string }) {
|
|
295
|
+
return {
|
|
296
|
+
title: "Asset Registry",
|
|
297
|
+
subtitle: `${status || "ready"} | Seed: ${seed ? new URL(seed).hostname : "not set"}`,
|
|
298
|
+
};
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared block layout field — Semplice-style module styling.
|
|
3
|
+
* Added to every block type via `defineField({ ...blockLayoutField })`.
|
|
4
|
+
*
|
|
5
|
+
* Contains: Spacing (padding TRBL), Background, Offset (margin TRBL), Border.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { defineField } from "sanity";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Block animation fields — scroll and hover animation overrides.
|
|
12
|
+
* Legacy animation/animationOverrides fields removed in Session 79 (BUG-024).
|
|
13
|
+
*/
|
|
14
|
+
export const blockAnimationFields = [
|
|
15
|
+
defineField({
|
|
16
|
+
name: "enter_animation",
|
|
17
|
+
title: "Enter Animation",
|
|
18
|
+
type: "enterAnimationConfig",
|
|
19
|
+
}),
|
|
20
|
+
defineField({
|
|
21
|
+
name: "hover_effect",
|
|
22
|
+
title: "Hover Effect",
|
|
23
|
+
type: "hoverEffectConfig",
|
|
24
|
+
}),
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export const blockLayoutField = defineField({
|
|
28
|
+
name: "layout",
|
|
29
|
+
title: "Layout",
|
|
30
|
+
type: "object",
|
|
31
|
+
hidden: true, // Managed by the visual builder, not Sanity Studio
|
|
32
|
+
fields: [
|
|
33
|
+
// Alignment
|
|
34
|
+
defineField({
|
|
35
|
+
name: "align_h",
|
|
36
|
+
title: "Horizontal Alignment",
|
|
37
|
+
type: "string",
|
|
38
|
+
options: { list: ["left", "center", "right"] },
|
|
39
|
+
}),
|
|
40
|
+
defineField({
|
|
41
|
+
name: "align_v",
|
|
42
|
+
title: "Vertical Alignment",
|
|
43
|
+
type: "string",
|
|
44
|
+
options: { list: ["top", "center", "bottom"] },
|
|
45
|
+
}),
|
|
46
|
+
// Spacing (padding TRBL)
|
|
47
|
+
defineField({ name: "spacing_top", title: "Spacing Top", type: "string" }),
|
|
48
|
+
defineField({ name: "spacing_right", title: "Spacing Right", type: "string" }),
|
|
49
|
+
defineField({ name: "spacing_bottom", title: "Spacing Bottom", type: "string" }),
|
|
50
|
+
defineField({ name: "spacing_left", title: "Spacing Left", type: "string" }),
|
|
51
|
+
// Background
|
|
52
|
+
defineField({ name: "background_color", title: "Background Color", type: "string" }),
|
|
53
|
+
defineField({ name: "background_opacity", title: "Background Opacity", type: "number" }),
|
|
54
|
+
defineField({ name: "background_image", title: "Background Image", type: "string" }),
|
|
55
|
+
defineField({
|
|
56
|
+
name: "background_size",
|
|
57
|
+
title: "Background Size",
|
|
58
|
+
type: "string",
|
|
59
|
+
options: { list: ["cover", "contain", "auto"] },
|
|
60
|
+
}),
|
|
61
|
+
defineField({ name: "background_position", title: "Background Position", type: "string" }),
|
|
62
|
+
defineField({
|
|
63
|
+
name: "background_repeat",
|
|
64
|
+
title: "Background Repeat",
|
|
65
|
+
type: "string",
|
|
66
|
+
options: { list: ["no-repeat", "repeat", "repeat-x", "repeat-y"] },
|
|
67
|
+
}),
|
|
68
|
+
// Offset (margin TRBL)
|
|
69
|
+
defineField({ name: "offset_top", title: "Offset Top", type: "string" }),
|
|
70
|
+
defineField({ name: "offset_right", title: "Offset Right", type: "string" }),
|
|
71
|
+
defineField({ name: "offset_bottom", title: "Offset Bottom", type: "string" }),
|
|
72
|
+
defineField({ name: "offset_left", title: "Offset Left", type: "string" }),
|
|
73
|
+
// Border
|
|
74
|
+
defineField({ name: "border_color", title: "Border Color", type: "string" }),
|
|
75
|
+
defineField({ name: "border_width", title: "Border Width", type: "string" }),
|
|
76
|
+
defineField({
|
|
77
|
+
name: "border_style",
|
|
78
|
+
title: "Border Style",
|
|
79
|
+
type: "string",
|
|
80
|
+
options: { list: ["none", "solid", "dashed", "dotted"] },
|
|
81
|
+
}),
|
|
82
|
+
defineField({
|
|
83
|
+
name: "border_sides",
|
|
84
|
+
title: "Border Sides",
|
|
85
|
+
type: "string",
|
|
86
|
+
options: { list: ["all", "top", "right", "bottom", "left", "top-bottom", "left-right"] },
|
|
87
|
+
}),
|
|
88
|
+
defineField({ name: "border_radius", title: "Border Radius", type: "string" }),
|
|
89
|
+
],
|
|
90
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineField, defineType } from "sanity";
|
|
2
|
+
import { blockLayoutField, blockAnimationFields } from "./blockLayout";
|
|
3
|
+
|
|
4
|
+
export const buttonBlock = defineType({
|
|
5
|
+
name: "buttonBlock",
|
|
6
|
+
title: "Button Block",
|
|
7
|
+
type: "object",
|
|
8
|
+
fields: [
|
|
9
|
+
defineField({
|
|
10
|
+
name: "text",
|
|
11
|
+
title: "Button Text",
|
|
12
|
+
type: "string",
|
|
13
|
+
validation: (Rule) => Rule.required(),
|
|
14
|
+
}),
|
|
15
|
+
defineField({
|
|
16
|
+
name: "url",
|
|
17
|
+
title: "URL",
|
|
18
|
+
type: "string",
|
|
19
|
+
validation: (Rule) => Rule.required(),
|
|
20
|
+
}),
|
|
21
|
+
defineField({
|
|
22
|
+
name: "style",
|
|
23
|
+
title: "Style",
|
|
24
|
+
type: "string",
|
|
25
|
+
options: {
|
|
26
|
+
list: [
|
|
27
|
+
{ title: "Primary", value: "primary" },
|
|
28
|
+
{ title: "Secondary", value: "secondary" },
|
|
29
|
+
{ title: "Outline", value: "outline" },
|
|
30
|
+
{ title: "Text", value: "text" },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
initialValue: "primary",
|
|
34
|
+
}),
|
|
35
|
+
defineField({
|
|
36
|
+
name: "size",
|
|
37
|
+
title: "Size",
|
|
38
|
+
type: "string",
|
|
39
|
+
options: {
|
|
40
|
+
list: [
|
|
41
|
+
{ title: "Small", value: "small" },
|
|
42
|
+
{ title: "Medium", value: "medium" },
|
|
43
|
+
{ title: "Large", value: "large" },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
initialValue: "medium",
|
|
47
|
+
}),
|
|
48
|
+
defineField({
|
|
49
|
+
name: "target",
|
|
50
|
+
title: "Open in New Tab",
|
|
51
|
+
type: "boolean",
|
|
52
|
+
initialValue: false,
|
|
53
|
+
}),
|
|
54
|
+
defineField({
|
|
55
|
+
name: "full_width",
|
|
56
|
+
title: "Full Width",
|
|
57
|
+
type: "boolean",
|
|
58
|
+
initialValue: false,
|
|
59
|
+
}),
|
|
60
|
+
defineField({
|
|
61
|
+
name: "alignment",
|
|
62
|
+
title: "Alignment",
|
|
63
|
+
type: "string",
|
|
64
|
+
options: {
|
|
65
|
+
list: [
|
|
66
|
+
{ title: "Left", value: "left" },
|
|
67
|
+
{ title: "Center", value: "center" },
|
|
68
|
+
{ title: "Right", value: "right" },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
initialValue: "left",
|
|
72
|
+
}),
|
|
73
|
+
...blockAnimationFields,
|
|
74
|
+
blockLayoutField,
|
|
75
|
+
],
|
|
76
|
+
preview: {
|
|
77
|
+
select: { text: "text", style: "style" },
|
|
78
|
+
prepare({ text, style }) {
|
|
79
|
+
return { title: `Button: ${text || "Untitled"} (${style || "primary"})` };
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { defineField, defineType } from "sanity";
|
|
2
|
+
import { blockLayoutField, blockAnimationFields } from "./blockLayout";
|
|
3
|
+
|
|
4
|
+
export const coverBlock = defineType({
|
|
5
|
+
name: "coverBlock",
|
|
6
|
+
title: "Cover Block",
|
|
7
|
+
type: "object",
|
|
8
|
+
fields: [
|
|
9
|
+
// --- Content ---
|
|
10
|
+
defineField({ name: "headline", title: "Headline", type: "string" }),
|
|
11
|
+
defineField({ name: "subheadline", title: "Subheadline", type: "string" }),
|
|
12
|
+
defineField({
|
|
13
|
+
name: "cta_button",
|
|
14
|
+
title: "CTA Button",
|
|
15
|
+
type: "object",
|
|
16
|
+
fields: [
|
|
17
|
+
defineField({ name: "text", title: "Text", type: "string" }),
|
|
18
|
+
defineField({ name: "url", title: "URL", type: "string" }),
|
|
19
|
+
defineField({
|
|
20
|
+
name: "target_blank",
|
|
21
|
+
title: "Open in New Tab",
|
|
22
|
+
type: "boolean",
|
|
23
|
+
initialValue: false,
|
|
24
|
+
}),
|
|
25
|
+
defineField({
|
|
26
|
+
name: "style",
|
|
27
|
+
title: "Button Style",
|
|
28
|
+
type: "string",
|
|
29
|
+
options: {
|
|
30
|
+
list: [
|
|
31
|
+
{ title: "Primary", value: "primary" },
|
|
32
|
+
{ title: "Secondary", value: "secondary" },
|
|
33
|
+
{ title: "Outline", value: "outline" },
|
|
34
|
+
{ title: "Text", value: "text" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
initialValue: "primary",
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
}),
|
|
41
|
+
|
|
42
|
+
// --- Media Background ---
|
|
43
|
+
defineField({
|
|
44
|
+
name: "media_type",
|
|
45
|
+
title: "Media Type",
|
|
46
|
+
type: "string",
|
|
47
|
+
options: {
|
|
48
|
+
list: [
|
|
49
|
+
{ title: "Image", value: "image" },
|
|
50
|
+
{ title: "Video", value: "video" },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
initialValue: "image",
|
|
54
|
+
}),
|
|
55
|
+
defineField({
|
|
56
|
+
name: "media_path",
|
|
57
|
+
title: "Media Path",
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Relative asset path for image or MP4 video",
|
|
60
|
+
}),
|
|
61
|
+
defineField({
|
|
62
|
+
name: "video_poster",
|
|
63
|
+
title: "Video Poster",
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Fallback image shown while video loads",
|
|
66
|
+
}),
|
|
67
|
+
defineField({
|
|
68
|
+
name: "background_size",
|
|
69
|
+
title: "Background Size",
|
|
70
|
+
type: "string",
|
|
71
|
+
options: {
|
|
72
|
+
list: [
|
|
73
|
+
{ title: "Cover", value: "cover" },
|
|
74
|
+
{ title: "Contain", value: "contain" },
|
|
75
|
+
{ title: "No Scale", value: "none" },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
initialValue: "cover",
|
|
79
|
+
}),
|
|
80
|
+
defineField({
|
|
81
|
+
name: "background_position",
|
|
82
|
+
title: "Background Position",
|
|
83
|
+
type: "string",
|
|
84
|
+
options: {
|
|
85
|
+
list: [
|
|
86
|
+
{ title: "Top Left", value: "top left" },
|
|
87
|
+
{ title: "Top Center", value: "top center" },
|
|
88
|
+
{ title: "Top Right", value: "top right" },
|
|
89
|
+
{ title: "Middle Left", value: "center left" },
|
|
90
|
+
{ title: "Middle Center", value: "center center" },
|
|
91
|
+
{ title: "Middle Right", value: "center right" },
|
|
92
|
+
{ title: "Bottom Left", value: "bottom left" },
|
|
93
|
+
{ title: "Bottom Center", value: "bottom center" },
|
|
94
|
+
{ title: "Bottom Right", value: "bottom right" },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
initialValue: "center center",
|
|
98
|
+
}),
|
|
99
|
+
defineField({
|
|
100
|
+
name: "background_repeat",
|
|
101
|
+
title: "Background Repeat",
|
|
102
|
+
type: "string",
|
|
103
|
+
options: {
|
|
104
|
+
list: [
|
|
105
|
+
{ title: "No Repeat", value: "no-repeat" },
|
|
106
|
+
{ title: "Repeat", value: "repeat" },
|
|
107
|
+
{ title: "Repeat X", value: "repeat-x" },
|
|
108
|
+
{ title: "Repeat Y", value: "repeat-y" },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
initialValue: "no-repeat",
|
|
112
|
+
}),
|
|
113
|
+
|
|
114
|
+
// --- Overlay ---
|
|
115
|
+
defineField({
|
|
116
|
+
name: "overlay",
|
|
117
|
+
title: "Overlay",
|
|
118
|
+
type: "string",
|
|
119
|
+
options: {
|
|
120
|
+
list: [
|
|
121
|
+
{ title: "None", value: "none" },
|
|
122
|
+
{ title: "Dark", value: "dark" },
|
|
123
|
+
{ title: "Light", value: "light" },
|
|
124
|
+
{ title: "Gradient (Bottom)", value: "gradient-bottom" },
|
|
125
|
+
{ title: "Gradient (Top)", value: "gradient-top" },
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
initialValue: "dark",
|
|
129
|
+
}),
|
|
130
|
+
defineField({
|
|
131
|
+
name: "overlay_opacity",
|
|
132
|
+
title: "Overlay Opacity",
|
|
133
|
+
type: "number",
|
|
134
|
+
validation: (Rule) => Rule.min(0).max(100),
|
|
135
|
+
initialValue: 50,
|
|
136
|
+
}),
|
|
137
|
+
|
|
138
|
+
// --- Layout ---
|
|
139
|
+
defineField({
|
|
140
|
+
name: "content_align_h",
|
|
141
|
+
title: "Content Horizontal Alignment",
|
|
142
|
+
type: "string",
|
|
143
|
+
options: {
|
|
144
|
+
list: [
|
|
145
|
+
{ title: "Left", value: "left" },
|
|
146
|
+
{ title: "Center", value: "center" },
|
|
147
|
+
{ title: "Right", value: "right" },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
initialValue: "center",
|
|
151
|
+
}),
|
|
152
|
+
defineField({
|
|
153
|
+
name: "content_align_v",
|
|
154
|
+
title: "Content Vertical Alignment",
|
|
155
|
+
type: "string",
|
|
156
|
+
options: {
|
|
157
|
+
list: [
|
|
158
|
+
{ title: "Top", value: "top" },
|
|
159
|
+
{ title: "Center", value: "center" },
|
|
160
|
+
{ title: "Bottom", value: "bottom" },
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
initialValue: "center",
|
|
164
|
+
}),
|
|
165
|
+
defineField({
|
|
166
|
+
name: "content_max_width",
|
|
167
|
+
title: "Content Max Width",
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Max width for text container (e.g. 600px, 800px, 100%)",
|
|
170
|
+
initialValue: "800px",
|
|
171
|
+
}),
|
|
172
|
+
defineField({
|
|
173
|
+
name: "height",
|
|
174
|
+
title: "Height",
|
|
175
|
+
type: "string",
|
|
176
|
+
options: {
|
|
177
|
+
list: [
|
|
178
|
+
{ title: "Full Screen (100vh)", value: "100vh" },
|
|
179
|
+
{ title: "Large (80vh)", value: "80vh" },
|
|
180
|
+
{ title: "Medium (60vh)", value: "60vh" },
|
|
181
|
+
{ title: "Small (40vh)", value: "40vh" },
|
|
182
|
+
{ title: "Custom", value: "custom" },
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
initialValue: "100vh",
|
|
186
|
+
}),
|
|
187
|
+
defineField({
|
|
188
|
+
name: "custom_height",
|
|
189
|
+
title: "Custom Height",
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "CSS value (e.g. 500px, 70vh)",
|
|
192
|
+
}),
|
|
193
|
+
defineField({
|
|
194
|
+
name: "mobile_height",
|
|
195
|
+
title: "Mobile Height",
|
|
196
|
+
type: "string",
|
|
197
|
+
options: {
|
|
198
|
+
list: [
|
|
199
|
+
{ title: "Same as desktop", value: "same" },
|
|
200
|
+
{ title: "Full Screen (100vh)", value: "100vh" },
|
|
201
|
+
{ title: "80vh", value: "80vh" },
|
|
202
|
+
{ title: "60vh", value: "60vh" },
|
|
203
|
+
{ title: "500px", value: "500px" },
|
|
204
|
+
{ title: "400px", value: "400px" },
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
initialValue: "same",
|
|
208
|
+
}),
|
|
209
|
+
|
|
210
|
+
// --- Appearance ---
|
|
211
|
+
defineField({ name: "text_color", title: "Text Color", type: "string" }),
|
|
212
|
+
|
|
213
|
+
// --- Scroll Indicator ---
|
|
214
|
+
defineField({
|
|
215
|
+
name: "show_scroll_indicator",
|
|
216
|
+
title: "Show Scroll Down Arrow",
|
|
217
|
+
type: "boolean",
|
|
218
|
+
initialValue: false,
|
|
219
|
+
}),
|
|
220
|
+
...blockAnimationFields,
|
|
221
|
+
blockLayoutField,
|
|
222
|
+
],
|
|
223
|
+
preview: {
|
|
224
|
+
select: { title: "headline" },
|
|
225
|
+
prepare({ title }) {
|
|
226
|
+
return { title: title || "Cover" };
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
});
|