@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,69 @@
|
|
|
1
|
+
import { defineField, defineType } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* customSection — Reusable V2 section designed in-place via the builder.
|
|
5
|
+
*
|
|
6
|
+
* A custom section wraps a full `pageSectionV2` and can be inserted into
|
|
7
|
+
* any page as a linked instance. The user creates and edits custom sections
|
|
8
|
+
* within the builder canvas using a scoped "section editor" mode.
|
|
9
|
+
*
|
|
10
|
+
* Session 107: Custom Sections System — Phase 1 (Data Layer).
|
|
11
|
+
* Session 129: Removed is_footer singleton — footers are now regular custom sections.
|
|
12
|
+
*/
|
|
13
|
+
export default defineType({
|
|
14
|
+
name: "customSection",
|
|
15
|
+
title: "Custom Section",
|
|
16
|
+
type: "document",
|
|
17
|
+
fields: [
|
|
18
|
+
defineField({
|
|
19
|
+
name: "title",
|
|
20
|
+
title: "Title",
|
|
21
|
+
type: "string",
|
|
22
|
+
validation: (Rule) => Rule.required().max(200),
|
|
23
|
+
}),
|
|
24
|
+
|
|
25
|
+
defineField({
|
|
26
|
+
name: "slug",
|
|
27
|
+
title: "Slug",
|
|
28
|
+
type: "slug",
|
|
29
|
+
options: { source: "title", maxLength: 200 },
|
|
30
|
+
validation: (Rule) => Rule.required(),
|
|
31
|
+
}),
|
|
32
|
+
|
|
33
|
+
defineField({
|
|
34
|
+
name: "description",
|
|
35
|
+
title: "Description",
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Optional description shown in the section picker",
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
// ★ Reuses existing V2 section schema — same columns, blocks, settings, responsive
|
|
41
|
+
defineField({
|
|
42
|
+
name: "section",
|
|
43
|
+
title: "Section Content",
|
|
44
|
+
type: "pageSectionV2",
|
|
45
|
+
}),
|
|
46
|
+
|
|
47
|
+
defineField({
|
|
48
|
+
name: "thumbnail_path",
|
|
49
|
+
title: "Thumbnail",
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Optional preview image path for the section picker",
|
|
52
|
+
}),
|
|
53
|
+
|
|
54
|
+
defineField({
|
|
55
|
+
name: "updated_at",
|
|
56
|
+
title: "Updated At",
|
|
57
|
+
type: "datetime",
|
|
58
|
+
}),
|
|
59
|
+
],
|
|
60
|
+
preview: {
|
|
61
|
+
select: { title: "title" },
|
|
62
|
+
prepare({ title }) {
|
|
63
|
+
return {
|
|
64
|
+
title: title || "Untitled Section",
|
|
65
|
+
subtitle: "Custom Section",
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineField, defineType } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* customSectionInstance — A reference to a reusable custom section placed on a page.
|
|
5
|
+
*
|
|
6
|
+
* Content (columns/blocks) is shared via the referenced `customSection` document.
|
|
7
|
+
* Layout and animation settings can be overridden per-instance via `settings_overrides`
|
|
8
|
+
* and `responsive_overrides`.
|
|
9
|
+
*
|
|
10
|
+
* Session 133: Created as a proper Sanity object type so that `settings_overrides` and
|
|
11
|
+
* `responsive_overrides` are persisted correctly. Previously these fields were stripped
|
|
12
|
+
* by Sanity because `customSectionInstance` was not declared in the page schema's
|
|
13
|
+
* `content_rows` array `of` types.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// Shared section settings fields — reused in settings_overrides and responsive viewport objects
|
|
17
|
+
const sectionSettingsFields = [
|
|
18
|
+
// Grid
|
|
19
|
+
defineField({ name: "preset", title: "Layout Preset", type: "string" }),
|
|
20
|
+
defineField({ name: "grid_columns", title: "Grid Columns", type: "number" }),
|
|
21
|
+
defineField({ name: "col_gap", title: "Column Gap", type: "number" }),
|
|
22
|
+
defineField({ name: "row_gap", title: "Row Gap", type: "number" }),
|
|
23
|
+
// Spacing (padding TRBL)
|
|
24
|
+
defineField({ name: "spacing_top", title: "Spacing Top", type: "string" }),
|
|
25
|
+
defineField({ name: "spacing_right", title: "Spacing Right", type: "string" }),
|
|
26
|
+
defineField({ name: "spacing_bottom", title: "Spacing Bottom", type: "string" }),
|
|
27
|
+
defineField({ name: "spacing_left", title: "Spacing Left", type: "string" }),
|
|
28
|
+
// Offset (margin TRBL)
|
|
29
|
+
defineField({ name: "offset_top", title: "Offset Top", type: "string" }),
|
|
30
|
+
defineField({ name: "offset_right", title: "Offset Right", type: "string" }),
|
|
31
|
+
defineField({ name: "offset_bottom", title: "Offset Bottom", type: "string" }),
|
|
32
|
+
defineField({ name: "offset_left", title: "Offset Left", type: "string" }),
|
|
33
|
+
// Background
|
|
34
|
+
defineField({ name: "background_color", title: "Background Color", type: "string" }),
|
|
35
|
+
defineField({ name: "background_opacity", title: "Background Opacity", type: "number" }),
|
|
36
|
+
defineField({ name: "background_image", title: "Background Image", type: "string" }),
|
|
37
|
+
defineField({ name: "background_size", title: "Background Size", type: "string" }),
|
|
38
|
+
defineField({ name: "background_position", title: "Background Position", type: "string" }),
|
|
39
|
+
defineField({ name: "background_repeat", title: "Background Repeat", type: "string" }),
|
|
40
|
+
// Border
|
|
41
|
+
defineField({ name: "border_color", title: "Border Color", type: "string" }),
|
|
42
|
+
defineField({ name: "border_width", title: "Border Width", type: "string" }),
|
|
43
|
+
defineField({ name: "border_style", title: "Border Style", type: "string" }),
|
|
44
|
+
defineField({ name: "border_sides", title: "Border Sides", type: "string" }),
|
|
45
|
+
defineField({ name: "border_radius", title: "Border Radius", type: "string" }),
|
|
46
|
+
// Animation
|
|
47
|
+
defineField({ name: "enter_animation", title: "Enter Animation", type: "enterAnimationConfig" }),
|
|
48
|
+
// Stagger
|
|
49
|
+
defineField({
|
|
50
|
+
name: "stagger",
|
|
51
|
+
title: "Stagger",
|
|
52
|
+
type: "object",
|
|
53
|
+
fields: [
|
|
54
|
+
defineField({ name: "enabled", title: "Enabled", type: "boolean" }),
|
|
55
|
+
defineField({ name: "delayPerChild", title: "Delay Per Child", type: "number" }),
|
|
56
|
+
defineField({ name: "direction", title: "Direction", type: "string" }),
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
// Responsive viewport override fields (subset used per viewport)
|
|
62
|
+
const responsiveViewportFields = [
|
|
63
|
+
defineField({
|
|
64
|
+
name: "columns",
|
|
65
|
+
title: "Column Overrides",
|
|
66
|
+
type: "array",
|
|
67
|
+
of: [
|
|
68
|
+
{
|
|
69
|
+
type: "object",
|
|
70
|
+
name: "columnOverride",
|
|
71
|
+
fields: [
|
|
72
|
+
defineField({ name: "grid_column", title: "Grid Column", type: "number" }),
|
|
73
|
+
defineField({ name: "grid_row", title: "Grid Row", type: "number" }),
|
|
74
|
+
defineField({ name: "span", title: "Span", type: "number" }),
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
}),
|
|
79
|
+
defineField({ name: "col_gap", title: "Column Gap", type: "number" }),
|
|
80
|
+
defineField({ name: "row_gap", title: "Row Gap", type: "number" }),
|
|
81
|
+
defineField({ name: "spacing_top", type: "string", title: "Spacing Top" }),
|
|
82
|
+
defineField({ name: "spacing_right", type: "string", title: "Spacing Right" }),
|
|
83
|
+
defineField({ name: "spacing_bottom", type: "string", title: "Spacing Bottom" }),
|
|
84
|
+
defineField({ name: "spacing_left", type: "string", title: "Spacing Left" }),
|
|
85
|
+
defineField({ name: "offset_top", type: "string", title: "Offset Top" }),
|
|
86
|
+
defineField({ name: "offset_right", type: "string", title: "Offset Right" }),
|
|
87
|
+
defineField({ name: "offset_bottom", type: "string", title: "Offset Bottom" }),
|
|
88
|
+
defineField({ name: "offset_left", type: "string", title: "Offset Left" }),
|
|
89
|
+
defineField({ name: "background_color", type: "string", title: "Background Color" }),
|
|
90
|
+
defineField({ name: "background_opacity", type: "number", title: "Background Opacity" }),
|
|
91
|
+
defineField({ name: "border_color", type: "string", title: "Border Color" }),
|
|
92
|
+
defineField({ name: "border_width", type: "string", title: "Border Width" }),
|
|
93
|
+
defineField({ name: "border_style", type: "string", title: "Border Style" }),
|
|
94
|
+
defineField({ name: "border_sides", type: "string", title: "Border Sides" }),
|
|
95
|
+
defineField({ name: "border_radius", type: "string", title: "Border Radius" }),
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
export default defineType({
|
|
99
|
+
name: "customSectionInstance",
|
|
100
|
+
title: "Custom Section Instance",
|
|
101
|
+
type: "object",
|
|
102
|
+
fields: [
|
|
103
|
+
// Reference to the custom section document
|
|
104
|
+
defineField({
|
|
105
|
+
name: "custom_section_id",
|
|
106
|
+
title: "Custom Section ID",
|
|
107
|
+
type: "string",
|
|
108
|
+
description: "Sanity document ID of the referenced custom section",
|
|
109
|
+
validation: (Rule) => Rule.required(),
|
|
110
|
+
}),
|
|
111
|
+
defineField({
|
|
112
|
+
name: "custom_section_slug",
|
|
113
|
+
title: "Custom Section Slug",
|
|
114
|
+
type: "string",
|
|
115
|
+
}),
|
|
116
|
+
defineField({
|
|
117
|
+
name: "custom_section_title",
|
|
118
|
+
title: "Custom Section Title",
|
|
119
|
+
type: "string",
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
// Per-instance layout/animation overrides (same shape as pageSectionV2.settings)
|
|
123
|
+
defineField({
|
|
124
|
+
name: "settings_overrides",
|
|
125
|
+
title: "Settings Overrides",
|
|
126
|
+
type: "object",
|
|
127
|
+
hidden: true, // Managed by the visual builder
|
|
128
|
+
fields: sectionSettingsFields,
|
|
129
|
+
}),
|
|
130
|
+
|
|
131
|
+
// Per-instance responsive overrides (same shape as pageSectionV2.responsive)
|
|
132
|
+
defineField({
|
|
133
|
+
name: "responsive_overrides",
|
|
134
|
+
title: "Responsive Overrides",
|
|
135
|
+
type: "object",
|
|
136
|
+
hidden: true, // Managed by the visual builder
|
|
137
|
+
fields: [
|
|
138
|
+
defineField({
|
|
139
|
+
name: "tablet",
|
|
140
|
+
title: "Tablet",
|
|
141
|
+
type: "object",
|
|
142
|
+
fields: [
|
|
143
|
+
defineField({ name: "settings", title: "Settings", type: "object", fields: responsiveViewportFields }),
|
|
144
|
+
],
|
|
145
|
+
}),
|
|
146
|
+
defineField({
|
|
147
|
+
name: "phone",
|
|
148
|
+
title: "Phone",
|
|
149
|
+
type: "object",
|
|
150
|
+
fields: [
|
|
151
|
+
defineField({ name: "settings", title: "Settings", type: "object", fields: responsiveViewportFields }),
|
|
152
|
+
],
|
|
153
|
+
}),
|
|
154
|
+
],
|
|
155
|
+
}),
|
|
156
|
+
],
|
|
157
|
+
preview: {
|
|
158
|
+
select: { title: "custom_section_title" },
|
|
159
|
+
prepare({ title }) {
|
|
160
|
+
return { title: title || "Custom Section" };
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import page from "./page";
|
|
2
|
+
import pageSection from "./pageSection";
|
|
3
|
+
import pageSectionV2 from "./pageSectionV2";
|
|
4
|
+
import customSection from "./customSection";
|
|
5
|
+
import customSectionInstance from "./customSectionInstance";
|
|
6
|
+
import siteSettings from "./siteSettings";
|
|
7
|
+
import siteStyles from "./siteStyles";
|
|
8
|
+
import assetRegistry from "./assetRegistry";
|
|
9
|
+
import enterAnimationConfig from "./objects/enterAnimationConfig";
|
|
10
|
+
import hoverEffectConfig from "./objects/hoverEffectConfig";
|
|
11
|
+
import typewriterConfig from "./objects/typewriterConfig";
|
|
12
|
+
import parallaxSlide from "./objects/parallaxSlide";
|
|
13
|
+
import parallaxGroup from "./objects/parallaxGroup";
|
|
14
|
+
import {
|
|
15
|
+
textBlock,
|
|
16
|
+
imageBlock,
|
|
17
|
+
imageGridBlock,
|
|
18
|
+
videoBlock,
|
|
19
|
+
spacerBlock,
|
|
20
|
+
buttonBlock,
|
|
21
|
+
coverBlock,
|
|
22
|
+
projectGridBlock,
|
|
23
|
+
} from "./blocks";
|
|
24
|
+
|
|
25
|
+
// Re-export individual schemas for granular use by instances
|
|
26
|
+
export {
|
|
27
|
+
default as page,
|
|
28
|
+
} from "./page";
|
|
29
|
+
export {
|
|
30
|
+
default as siteSettings,
|
|
31
|
+
} from "./siteSettings";
|
|
32
|
+
export {
|
|
33
|
+
default as siteStyles,
|
|
34
|
+
} from "./siteStyles";
|
|
35
|
+
export {
|
|
36
|
+
default as assetRegistry,
|
|
37
|
+
} from "./assetRegistry";
|
|
38
|
+
export {
|
|
39
|
+
default as pageSection,
|
|
40
|
+
} from "./pageSection";
|
|
41
|
+
export {
|
|
42
|
+
default as pageSectionV2,
|
|
43
|
+
} from "./pageSectionV2";
|
|
44
|
+
export {
|
|
45
|
+
default as customSection,
|
|
46
|
+
} from "./customSection";
|
|
47
|
+
export {
|
|
48
|
+
default as customSectionInstance,
|
|
49
|
+
} from "./customSectionInstance";
|
|
50
|
+
export {
|
|
51
|
+
default as enterAnimationConfig,
|
|
52
|
+
} from "./objects/enterAnimationConfig";
|
|
53
|
+
export {
|
|
54
|
+
default as hoverEffectConfig,
|
|
55
|
+
} from "./objects/hoverEffectConfig";
|
|
56
|
+
export {
|
|
57
|
+
default as typewriterConfig,
|
|
58
|
+
} from "./objects/typewriterConfig";
|
|
59
|
+
export {
|
|
60
|
+
default as parallaxSlide,
|
|
61
|
+
} from "./objects/parallaxSlide";
|
|
62
|
+
export {
|
|
63
|
+
default as parallaxGroup,
|
|
64
|
+
} from "./objects/parallaxGroup";
|
|
65
|
+
export {
|
|
66
|
+
textBlock,
|
|
67
|
+
imageBlock,
|
|
68
|
+
imageGridBlock,
|
|
69
|
+
videoBlock,
|
|
70
|
+
spacerBlock,
|
|
71
|
+
buttonBlock,
|
|
72
|
+
coverBlock,
|
|
73
|
+
projectGridBlock,
|
|
74
|
+
} from "./blocks";
|
|
75
|
+
|
|
76
|
+
export const schemaTypes = [
|
|
77
|
+
// Documents
|
|
78
|
+
page,
|
|
79
|
+
siteSettings,
|
|
80
|
+
siteStyles,
|
|
81
|
+
assetRegistry,
|
|
82
|
+
|
|
83
|
+
// Structural objects
|
|
84
|
+
pageSection,
|
|
85
|
+
pageSectionV2,
|
|
86
|
+
customSection,
|
|
87
|
+
customSectionInstance,
|
|
88
|
+
|
|
89
|
+
// Reusable objects
|
|
90
|
+
enterAnimationConfig, // Enter animation system (Session 117)
|
|
91
|
+
hoverEffectConfig, // Unified hover effect system (Session 117)
|
|
92
|
+
typewriterConfig, // Typewriter config for textBlock (Session 117)
|
|
93
|
+
parallaxSlide, // Parallax V2 slide (Session 123)
|
|
94
|
+
parallaxGroup, // Parallax V2 group (Session 123)
|
|
95
|
+
|
|
96
|
+
// Blocks (8)
|
|
97
|
+
textBlock,
|
|
98
|
+
imageBlock,
|
|
99
|
+
imageGridBlock,
|
|
100
|
+
videoBlock,
|
|
101
|
+
spacerBlock,
|
|
102
|
+
buttonBlock,
|
|
103
|
+
coverBlock,
|
|
104
|
+
projectGridBlock,
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Named alias for instance consumption.
|
|
109
|
+
* Instances import this and pass to composeSchemas().
|
|
110
|
+
*/
|
|
111
|
+
export const coreSchemas = schemaTypes;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineType, defineField } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enter animation config — unified "enter" animation (replaces scroll/enter/load triggers).
|
|
5
|
+
*
|
|
6
|
+
* IntersectionObserver-based: above-the-fold elements play immediately,
|
|
7
|
+
* below-the-fold elements play once when they scroll into view.
|
|
8
|
+
*
|
|
9
|
+
* Used at page, section, column, and block levels.
|
|
10
|
+
*
|
|
11
|
+
* Session 117 — Animation UX Refactor.
|
|
12
|
+
*/
|
|
13
|
+
const enterAnimationConfig = defineType({
|
|
14
|
+
name: "enterAnimationConfig",
|
|
15
|
+
title: "Enter Animation",
|
|
16
|
+
type: "object",
|
|
17
|
+
fields: [
|
|
18
|
+
defineField({
|
|
19
|
+
name: "preset",
|
|
20
|
+
title: "Preset",
|
|
21
|
+
type: "string",
|
|
22
|
+
options: {
|
|
23
|
+
list: [
|
|
24
|
+
{ title: "None", value: "none" },
|
|
25
|
+
{ title: "Fade", value: "fade" },
|
|
26
|
+
{ title: "Slide Up", value: "slide-up" },
|
|
27
|
+
{ title: "Slide Down", value: "slide-down" },
|
|
28
|
+
{ title: "Scale", value: "scale" },
|
|
29
|
+
{ title: "Blur", value: "blur" },
|
|
30
|
+
{ title: "Reveal", value: "reveal" },
|
|
31
|
+
// Block-specific presets (also valid in schema for flexibility):
|
|
32
|
+
{ title: "Typewriter", value: "typewriter" },
|
|
33
|
+
{ title: "Blur In", value: "blur-in" },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
initialValue: "none",
|
|
37
|
+
}),
|
|
38
|
+
defineField({
|
|
39
|
+
name: "duration",
|
|
40
|
+
title: "Duration (ms)",
|
|
41
|
+
type: "number",
|
|
42
|
+
description: "Animation duration in milliseconds",
|
|
43
|
+
initialValue: 600,
|
|
44
|
+
validation: (Rule) => Rule.min(100).max(5000),
|
|
45
|
+
}),
|
|
46
|
+
defineField({
|
|
47
|
+
name: "delay",
|
|
48
|
+
title: "Delay (ms)",
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "Delay before animation starts",
|
|
51
|
+
initialValue: 0,
|
|
52
|
+
validation: (Rule) => Rule.min(0).max(5000),
|
|
53
|
+
}),
|
|
54
|
+
defineField({
|
|
55
|
+
name: "easing",
|
|
56
|
+
title: "Easing",
|
|
57
|
+
type: "string",
|
|
58
|
+
options: {
|
|
59
|
+
list: [
|
|
60
|
+
{ title: "Ease Out", value: "ease-out" },
|
|
61
|
+
{ title: "Ease", value: "ease" },
|
|
62
|
+
{ title: "Ease In", value: "ease-in" },
|
|
63
|
+
{ title: "Ease In Out", value: "ease-in-out" },
|
|
64
|
+
{ title: "Linear", value: "linear" },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
initialValue: "ease-out",
|
|
68
|
+
}),
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export default enterAnimationConfig;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineType, defineField } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hover effect config — unified hover effects (CSS + shader).
|
|
5
|
+
*
|
|
6
|
+
* Replaces both HoverAnimationConfig and ShaderEffectConfig.
|
|
7
|
+
* Block-level only — no cascade.
|
|
8
|
+
*
|
|
9
|
+
* Shader-specific fields (shader_speed, shader_smoothness) are only
|
|
10
|
+
* relevant when preset is "ripple", "rgb-shift", or "pixelate".
|
|
11
|
+
*
|
|
12
|
+
* Session 117 — Animation UX Refactor.
|
|
13
|
+
*/
|
|
14
|
+
const hoverEffectConfig = defineType({
|
|
15
|
+
name: "hoverEffectConfig",
|
|
16
|
+
title: "Hover Effect",
|
|
17
|
+
type: "object",
|
|
18
|
+
fields: [
|
|
19
|
+
defineField({
|
|
20
|
+
name: "preset",
|
|
21
|
+
title: "Preset",
|
|
22
|
+
type: "string",
|
|
23
|
+
options: {
|
|
24
|
+
list: [
|
|
25
|
+
{ title: "None", value: "none" },
|
|
26
|
+
// CSS-based hovers
|
|
27
|
+
{ title: "Scale Up", value: "scale-up" },
|
|
28
|
+
{ title: "Scale Down", value: "scale-down" },
|
|
29
|
+
{ title: "Lift", value: "lift" },
|
|
30
|
+
{ title: "Tilt 3D", value: "tilt-3d" },
|
|
31
|
+
{ title: "Color Shift", value: "color-shift" },
|
|
32
|
+
{ title: "Blur Reveal", value: "blur-reveal" },
|
|
33
|
+
{ title: "Border Glow", value: "border-glow" },
|
|
34
|
+
// Shader-based hovers
|
|
35
|
+
{ title: "Ripple", value: "ripple" },
|
|
36
|
+
{ title: "RGB Shift", value: "rgb-shift" },
|
|
37
|
+
{ title: "Pixelate", value: "pixelate" },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
initialValue: "none",
|
|
41
|
+
}),
|
|
42
|
+
defineField({
|
|
43
|
+
name: "duration",
|
|
44
|
+
title: "Duration (ms)",
|
|
45
|
+
type: "number",
|
|
46
|
+
description: "Transition duration in milliseconds",
|
|
47
|
+
initialValue: 300,
|
|
48
|
+
validation: (Rule) => Rule.min(50).max(5000),
|
|
49
|
+
}),
|
|
50
|
+
defineField({
|
|
51
|
+
name: "easing",
|
|
52
|
+
title: "Easing",
|
|
53
|
+
type: "string",
|
|
54
|
+
options: {
|
|
55
|
+
list: [
|
|
56
|
+
{ title: "Ease Out", value: "ease-out" },
|
|
57
|
+
{ title: "Ease", value: "ease" },
|
|
58
|
+
{ title: "Ease In", value: "ease-in" },
|
|
59
|
+
{ title: "Ease In Out", value: "ease-in-out" },
|
|
60
|
+
{ title: "Linear", value: "linear" },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
initialValue: "ease-out",
|
|
64
|
+
}),
|
|
65
|
+
defineField({
|
|
66
|
+
name: "shader_speed",
|
|
67
|
+
title: "Shader Speed",
|
|
68
|
+
type: "number",
|
|
69
|
+
description: "Animation speed multiplier for shader effects (0.5–3.0)",
|
|
70
|
+
initialValue: 1.0,
|
|
71
|
+
validation: (Rule) => Rule.min(0.5).max(3.0),
|
|
72
|
+
}),
|
|
73
|
+
defineField({
|
|
74
|
+
name: "shader_smoothness",
|
|
75
|
+
title: "Shader Smoothness",
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "Lerp smoothness for shader effects",
|
|
78
|
+
options: {
|
|
79
|
+
list: [
|
|
80
|
+
{ title: "Snappy", value: "snappy" },
|
|
81
|
+
{ title: "Normal", value: "normal" },
|
|
82
|
+
{ title: "Smooth", value: "smooth" },
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
initialValue: "normal",
|
|
86
|
+
}),
|
|
87
|
+
],
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default hoverEffectConfig;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineField, defineType } from "sanity";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* parallaxGroup — A group of full-screen parallax slides.
|
|
5
|
+
*
|
|
6
|
+
* Lives inline in a page's content_rows alongside PageSection,
|
|
7
|
+
* PageSectionV2, and CustomSectionInstance. Each slide is a
|
|
8
|
+
* full V2 section with background image/video and 100vh height.
|
|
9
|
+
*
|
|
10
|
+
* Session 123: Parallax V2 rewrite.
|
|
11
|
+
*/
|
|
12
|
+
export default defineType({
|
|
13
|
+
name: "parallaxGroup",
|
|
14
|
+
title: "Parallax Group",
|
|
15
|
+
type: "object",
|
|
16
|
+
fields: [
|
|
17
|
+
// ---- Slides ----
|
|
18
|
+
defineField({
|
|
19
|
+
name: "slides",
|
|
20
|
+
title: "Slides",
|
|
21
|
+
type: "array",
|
|
22
|
+
of: [{ type: "parallaxSlide" }],
|
|
23
|
+
validation: (Rule) => Rule.min(1),
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
// ---- Group Settings ----
|
|
27
|
+
defineField({
|
|
28
|
+
name: "transition_effect",
|
|
29
|
+
title: "Transition Effect",
|
|
30
|
+
type: "string",
|
|
31
|
+
options: {
|
|
32
|
+
list: [
|
|
33
|
+
{ title: "Parallax", value: "parallax" },
|
|
34
|
+
{ title: "Crossfade", value: "crossfade" },
|
|
35
|
+
{ title: "Reveal", value: "reveal" },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
initialValue: "parallax",
|
|
39
|
+
}),
|
|
40
|
+
defineField({
|
|
41
|
+
name: "snap_enabled",
|
|
42
|
+
title: "Snap Enabled",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
initialValue: true,
|
|
45
|
+
}),
|
|
46
|
+
defineField({
|
|
47
|
+
name: "parallax_intensity",
|
|
48
|
+
title: "Parallax Intensity",
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "Background scroll speed factor (0.2–0.6)",
|
|
51
|
+
initialValue: 0.4,
|
|
52
|
+
validation: (Rule) => Rule.min(0.2).max(0.6),
|
|
53
|
+
hidden: true, // Hardcoded, not exposed in UI
|
|
54
|
+
}),
|
|
55
|
+
],
|
|
56
|
+
preview: {
|
|
57
|
+
select: { slides: "slides" },
|
|
58
|
+
prepare({ slides }) {
|
|
59
|
+
const count = Array.isArray(slides) ? slides.length : 0;
|
|
60
|
+
return {
|
|
61
|
+
title: "Parallax Showcase",
|
|
62
|
+
subtitle: `${count} slide${count !== 1 ? "s" : ""}`,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|