@morphika/andami 0.5.1 → 0.5.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.
Files changed (117) hide show
  1. package/app/admin/assets/page.tsx +6 -6
  2. package/app/admin/database/page.tsx +302 -302
  3. package/app/admin/error.tsx +53 -53
  4. package/app/admin/layout.tsx +320 -320
  5. package/app/admin/navigation/page.tsx +255 -255
  6. package/app/admin/pages/[slug]/page.tsx +6 -6
  7. package/app/admin/pages/page.tsx +11 -11
  8. package/app/admin/projects/page.tsx +14 -14
  9. package/app/admin/setup/page.tsx +1 -1
  10. package/app/admin/styles/page.tsx +1 -1
  11. package/components/admin/MetadataEditor.tsx +6 -6
  12. package/components/admin/nav-builder/NavBuilder.tsx +1 -1
  13. package/components/admin/nav-builder/NavBuilderGrid.tsx +3 -3
  14. package/components/admin/nav-builder/NavGridCell.tsx +48 -48
  15. package/components/admin/nav-builder/NavGridItem.tsx +4 -4
  16. package/components/admin/nav-builder/NavItemSettings.tsx +331 -331
  17. package/components/admin/nav-builder/NavItemTypePicker.tsx +102 -102
  18. package/components/admin/nav-builder/NavLivePreview.tsx +1 -1
  19. package/components/admin/nav-builder/NavMobileLivePreview.tsx +226 -226
  20. package/components/admin/nav-builder/NavMobileSettings.tsx +242 -242
  21. package/components/admin/nav-builder/NavSettingsFields.tsx +514 -514
  22. package/components/admin/setup-wizard/BrandingStep.tsx +3 -3
  23. package/components/admin/setup-wizard/DatabaseStep.tsx +2 -2
  24. package/components/admin/setup-wizard/DoneStep.tsx +1 -1
  25. package/components/admin/setup-wizard/SetupWizard.tsx +4 -4
  26. package/components/admin/setup-wizard/StorageStep.tsx +2 -2
  27. package/components/admin/setup-wizard/WelcomeStep.tsx +2 -2
  28. package/components/admin/styles/ColorsEditor.tsx +2 -2
  29. package/components/admin/styles/FontsEditor.tsx +6 -6
  30. package/components/admin/styles/GridLayoutEditor.tsx +9 -9
  31. package/components/admin/styles/LinksButtonsEditor.tsx +5 -5
  32. package/components/admin/styles/TypographyEditor.tsx +6 -6
  33. package/components/admin/styles/shared.tsx +68 -68
  34. package/components/blocks/AudioBlockRenderer.tsx +286 -286
  35. package/components/blocks/MarqueeBlockRenderer.tsx +316 -0
  36. package/components/blocks/ProjectCarouselBlockRenderer.tsx +1 -1
  37. package/components/builder/BlockCardIcons.tsx +316 -316
  38. package/components/builder/BlockTypePicker.tsx +1 -1
  39. package/components/builder/BubbleIcons.tsx +90 -0
  40. package/components/builder/BuilderCanvas.tsx +2 -0
  41. package/components/builder/CanvasMinimap.tsx +2 -2
  42. package/components/builder/CoverSectionCanvas.tsx +363 -363
  43. package/components/builder/DeviceFrame.tsx +1 -1
  44. package/components/builder/DndWrapper.tsx +3 -3
  45. package/components/builder/InsertionLines.tsx +1 -1
  46. package/components/builder/SectionCardIcons.tsx +421 -320
  47. package/components/builder/SectionEditorBar.tsx +1 -1
  48. package/components/builder/SectionTypePicker.tsx +4 -4
  49. package/components/builder/SectionV2Canvas.tsx +1 -1
  50. package/components/builder/SectionV2Column.tsx +69 -67
  51. package/components/builder/SortableBlock.tsx +93 -73
  52. package/components/builder/SortableRow.tsx +27 -26
  53. package/components/builder/VirtualAssetGrid.tsx +2 -2
  54. package/components/builder/asset-browser/R2BrowserContent.tsx +11 -11
  55. package/components/builder/blockStyles.tsx +192 -185
  56. package/components/builder/color-picker/AlphaSlider.tsx +141 -141
  57. package/components/builder/color-picker/ColorInputs.tsx +105 -105
  58. package/components/builder/color-picker/EyedropperButton.tsx +74 -74
  59. package/components/builder/color-picker/HueSlider.tsx +124 -124
  60. package/components/builder/color-picker/SaturationCanvas.tsx +142 -142
  61. package/components/builder/color-picker/SwatchBar.tsx +93 -93
  62. package/components/builder/editors/AudioBlockEditor.tsx +242 -242
  63. package/components/builder/editors/BeforeAfterBlockEditor.tsx +360 -360
  64. package/components/builder/editors/ButtonBlockEditor.tsx +4 -4
  65. package/components/builder/editors/EnterAnimationPicker.tsx +2 -2
  66. package/components/builder/editors/HoverEffectPicker.tsx +2 -2
  67. package/components/builder/editors/ImageBlockEditor.tsx +2 -2
  68. package/components/builder/editors/ImageGridBlockEditor.tsx +4 -4
  69. package/components/builder/editors/MarqueeBlockEditor.tsx +621 -0
  70. package/components/builder/editors/ProjectCarouselBlockEditor.tsx +443 -443
  71. package/components/builder/editors/ProjectGridEditor.tsx +9 -9
  72. package/components/builder/editors/SpacerBlockEditor.tsx +5 -5
  73. package/components/builder/editors/StaggerSettings.tsx +109 -109
  74. package/components/builder/editors/TextBlockEditor.tsx +3 -3
  75. package/components/builder/editors/TextStylePicker.tsx +1 -1
  76. package/components/builder/editors/VideoBlockEditor.tsx +2 -2
  77. package/components/builder/editors/index.ts +11 -10
  78. package/components/builder/editors/shared.tsx +6 -6
  79. package/components/builder/live-preview/LiveAudioPreview.tsx +120 -120
  80. package/components/builder/live-preview/LiveBeforeAfterPreview.tsx +1 -1
  81. package/components/builder/live-preview/LiveImageGridPreview.tsx +10 -2
  82. package/components/builder/live-preview/LiveImagePreview.tsx +1 -1
  83. package/components/builder/live-preview/LiveMarqueePreview.tsx +39 -0
  84. package/components/builder/live-preview/LiveProjectCarouselPreview.tsx +1 -1
  85. package/components/builder/live-preview/LiveVideoPreview.tsx +1 -1
  86. package/components/builder/live-preview/ProjectCardWrapper.tsx +291 -291
  87. package/components/builder/settings-panel/AnimationTab.tsx +138 -138
  88. package/components/builder/settings-panel/BlockLayoutTab.tsx +7 -7
  89. package/components/builder/settings-panel/CardEntranceSection.tsx +114 -114
  90. package/components/builder/settings-panel/ColumnV2Settings.tsx +5 -5
  91. package/components/builder/settings-panel/CoverSectionLayoutTab.tsx +71 -71
  92. package/components/builder/settings-panel/CoverSectionSettings.tsx +335 -335
  93. package/components/builder/settings-panel/PageSettings.tsx +3 -3
  94. package/components/builder/settings-panel/ParallaxSlideSettings.tsx +2 -2
  95. package/components/builder/settings-panel/SectionV2AnimationTab.tsx +4 -4
  96. package/components/builder/settings-panel/SectionV2LayoutTab.tsx +356 -356
  97. package/components/builder/settings-panel/SectionV2Settings.tsx +14 -14
  98. package/components/builder/settings-panel/TRBLInputs.tsx +1 -1
  99. package/lib/animation/enter-types.ts +1 -0
  100. package/lib/animation/hover-effect-presets.ts +210 -210
  101. package/lib/animation/hover-effect-types.ts +1 -0
  102. package/lib/builder/block-registrations.ts +468 -417
  103. package/lib/builder/constants.ts +111 -111
  104. package/lib/builder/store-sections.ts +2 -2
  105. package/lib/builder/types-slices.ts +414 -414
  106. package/lib/builder/types.ts +4 -1
  107. package/lib/config/index.ts +27 -27
  108. package/lib/sanity/types.ts +98 -1
  109. package/lib/version.ts +1 -1
  110. package/package.json +1 -1
  111. package/sanity/schemas/blocks/audioBlock.ts +69 -69
  112. package/sanity/schemas/blocks/index.ts +12 -11
  113. package/sanity/schemas/blocks/marqueeBlock.ts +292 -0
  114. package/sanity/schemas/index.ts +120 -117
  115. package/styles/admin.css +85 -85
  116. package/styles/animations.css +237 -237
  117. package/styles/base.css +114 -114
@@ -1,111 +1,111 @@
1
- /**
2
- * Shared constants for the builder and public site renderers.
3
- * Consolidates duplicated maps and utility functions.
4
- */
5
-
6
-
7
- // ============================================
8
- // Responsive Breakpoints
9
- // ============================================
10
- // Single source of truth for all media query breakpoints.
11
- // Import these instead of hardcoding numeric values.
12
-
13
- export const BREAKPOINTS = {
14
- /** Phone max-width breakpoint (640px) */
15
- phone: 640,
16
- /** Scroll animation disable breakpoint (768px) */
17
- mobileAnimation: 768,
18
- /** Tablet max-width breakpoint (1024px) */
19
- tablet: 1024,
20
- } as const;
21
-
22
- // ============================================
23
- // Default Grid Width
24
- // ============================================
25
- // The default page grid max-width in pixels.
26
-
27
- export const DEFAULT_GRID_WIDTH = "1445";
28
- export const DEFAULT_GRID_WIDTH_PX = `${DEFAULT_GRID_WIDTH}px`;
29
-
30
- // ============================================
31
- // Default Page Colors
32
- // ============================================
33
- // Default background and text colors for new pages.
34
-
35
- export const DEFAULT_BG_COLOR = "#ffffff";
36
- export const DEFAULT_TEXT_COLOR = "#000000";
37
-
38
- // ============================================
39
- // Admin UI Colors
40
- // ============================================
41
- // Accent colors used throughout the admin/builder interface.
42
- // These are also available as CSS custom properties:
43
- // --admin-accent, --admin-accent-dark
44
-
45
- export const ADMIN_ACCENT = "#076bff";
46
- export const ADMIN_ACCENT_DARK = "#0559d4";
47
- export const ADMIN_ACCENT_SHADOW = "rgba(7,107,255,0.06)";
48
- export const ADMIN_ERROR = "#ed3821";
49
- export const ADMIN_ERROR_DARK = "#d42f1a";
50
-
51
- // ============================================
52
- // Builder Semantic Color System
53
- // ============================================
54
- // Each UI entity in the builder has a dedicated color to provide
55
- // visual differentiation at a glance. This is a design rule that
56
- // MUST be followed across all builder components.
57
- //
58
- // BLUE (#4794e2) — Columns: outlines, resize handles, drag grip,
59
- // column selection/hover chrome.
60
- // BLUE (#4794e2) — Blocks: "+ Add Block" buttons, block toolbar
61
- // pill, block selection ring, block-level actions.
62
- // (Same hue as columns — a future pass may split
63
- // these into distinct hues if the shared blue is
64
- // causing ambiguity.)
65
- // VIOLET (#7500d5) — Sections: side pill, cover/parallax accent,
66
- // section outlines, hover/selection chrome.
67
- // Also used for Custom Sections card chrome.
68
- //
69
- // When adding new builder UI, pick the color that matches the entity
70
- // being represented, not the action being performed. For example, a
71
- // delete button on a column is BLUE (it belongs to the column chrome),
72
- // while the delete inside a block toolbar is BLUE too (inside the block
73
- // pill, on hover it flashes red as a destructive cue).
74
-
75
- export const BUILDER_BLUE = "#4794e2"; // Columns (softened was #076bff)
76
- export const BUILDER_BLOCK = "#4794e2"; // Blocks — same hue as columns for now
77
- export const BUILDER_VIOLET = "#7500d5"; // Sections (incl. Custom)
78
- export const BUILDER_GREEN = "#22c55e"; // Success / confirmation cues (e.g. R2 asset check)
79
-
80
- /**
81
- * @deprecated Use `BUILDER_BLOCK` instead. The legacy name survived multiple
82
- * colour migrations (orange → emerald → blue) and no longer reflects reality.
83
- * Kept as an alias so third-party code doesn't break at the import boundary.
84
- */
85
- export const BUILDER_ORANGE = BUILDER_BLOCK;
86
-
87
- /**
88
- * Padding map for Row settings (in pixels)
89
- * Used by builder (SortableRow, ReadOnlyFrame) and public site (RowRenderer)
90
- */
91
- export const PADDING_MAP: Record<string, string> = {
92
- none: "0",
93
- small: "16px",
94
- medium: "32px",
95
- large: "64px",
96
- xlarge: "96px",
97
- };
98
-
99
- /**
100
- * Padding map for Row settings (in Tailwind classes)
101
- * Used only by public site (RowRenderer) when using class-based padding
102
- */
103
- export const PADDING_CLASSES_MAP: Record<string, string> = {
104
- none: "py-0",
105
- small: "py-4",
106
- medium: "py-8",
107
- large: "py-16",
108
- xlarge: "py-24",
109
- };
110
-
111
-
1
+ /**
2
+ * Shared constants for the builder and public site renderers.
3
+ * Consolidates duplicated maps and utility functions.
4
+ */
5
+
6
+
7
+ // ============================================
8
+ // Responsive Breakpoints
9
+ // ============================================
10
+ // Single source of truth for all media query breakpoints.
11
+ // Import these instead of hardcoding numeric values.
12
+
13
+ export const BREAKPOINTS = {
14
+ /** Phone max-width breakpoint (640px) */
15
+ phone: 640,
16
+ /** Scroll animation disable breakpoint (768px) */
17
+ mobileAnimation: 768,
18
+ /** Tablet max-width breakpoint (1024px) */
19
+ tablet: 1024,
20
+ } as const;
21
+
22
+ // ============================================
23
+ // Default Grid Width
24
+ // ============================================
25
+ // The default page grid max-width in pixels.
26
+
27
+ export const DEFAULT_GRID_WIDTH = "1445";
28
+ export const DEFAULT_GRID_WIDTH_PX = `${DEFAULT_GRID_WIDTH}px`;
29
+
30
+ // ============================================
31
+ // Default Page Colors
32
+ // ============================================
33
+ // Default background and text colors for new pages.
34
+
35
+ export const DEFAULT_BG_COLOR = "#ffffff";
36
+ export const DEFAULT_TEXT_COLOR = "#000000";
37
+
38
+ // ============================================
39
+ // Admin UI Colors
40
+ // ============================================
41
+ // Accent colors used throughout the admin/builder interface.
42
+ // These are also available as CSS custom properties:
43
+ // --admin-accent, --admin-accent-dark
44
+
45
+ export const ADMIN_ACCENT = "#3580f9";
46
+ export const ADMIN_ACCENT_DARK = "#2d6dd4";
47
+ export const ADMIN_ACCENT_SHADOW = "rgba(53,128,249,0.06)";
48
+ export const ADMIN_ERROR = "#ed3821";
49
+ export const ADMIN_ERROR_DARK = "#d42f1a";
50
+
51
+ // ============================================
52
+ // Builder Semantic Color System
53
+ // ============================================
54
+ // Each UI entity in the builder has a dedicated color to provide
55
+ // visual differentiation at a glance. This is a design rule that
56
+ // MUST be followed across all builder components.
57
+ //
58
+ // BLUE (#3580f9) — Columns: outlines, resize handles, drag grip,
59
+ // column selection/hover chrome.
60
+ // BLUE (#3580f9) — Blocks: "+ Add Block" buttons, block toolbar
61
+ // pill, block selection ring, block-level actions.
62
+ // (Same hue as columns — a future pass may split
63
+ // these into distinct hues if the shared blue is
64
+ // causing ambiguity.)
65
+ // VIOLET (#7500d5) — Sections: side pill, cover/parallax accent,
66
+ // section outlines, hover/selection chrome.
67
+ // Also used for Custom Sections card chrome.
68
+ //
69
+ // When adding new builder UI, pick the color that matches the entity
70
+ // being represented, not the action being performed. For example, a
71
+ // delete button on a column is BLUE (it belongs to the column chrome),
72
+ // while the delete inside a block toolbar is BLUE too (inside the block
73
+ // pill, on hover it flashes red as a destructive cue).
74
+
75
+ export const BUILDER_BLUE = "#3580f9"; // Columns (unified strong blue)
76
+ export const BUILDER_BLOCK = "#3580f9"; // Blocks — same hue as columns
77
+ export const BUILDER_VIOLET = "#7500d5"; // Sections (incl. Custom)
78
+ export const BUILDER_GREEN = "#22c55e"; // Success / confirmation cues (e.g. R2 asset check)
79
+
80
+ /**
81
+ * @deprecated Use `BUILDER_BLOCK` instead. The legacy name survived multiple
82
+ * colour migrations (orange → emerald → blue) and no longer reflects reality.
83
+ * Kept as an alias so third-party code doesn't break at the import boundary.
84
+ */
85
+ export const BUILDER_ORANGE = BUILDER_BLOCK;
86
+
87
+ /**
88
+ * Padding map for Row settings (in pixels)
89
+ * Used by builder (SortableRow, ReadOnlyFrame) and public site (RowRenderer)
90
+ */
91
+ export const PADDING_MAP: Record<string, string> = {
92
+ none: "0",
93
+ small: "16px",
94
+ medium: "32px",
95
+ large: "64px",
96
+ xlarge: "96px",
97
+ };
98
+
99
+ /**
100
+ * Padding map for Row settings (in Tailwind classes)
101
+ * Used only by public site (RowRenderer) when using class-based padding
102
+ */
103
+ export const PADDING_CLASSES_MAP: Record<string, string> = {
104
+ none: "py-0",
105
+ small: "py-4",
106
+ medium: "py-8",
107
+ large: "py-16",
108
+ xlarge: "py-24",
109
+ };
110
+
111
+
@@ -1,4 +1,4 @@
1
- import type { BuilderStore, BuilderState, BlockType, SectionSliceActions } from "./types";
1
+ import type { BuilderStore, BuilderState, BlockType, SectionSliceActions, SectionBlockType } from "./types";
2
2
  import type {
3
3
  ContentBlock,
4
4
  ContentItem,
@@ -59,7 +59,7 @@ export function createSectionActions(set: StoreSet, get: StoreGet): SectionSlice
59
59
  * Existing V1 pages still work — V1 update/delete actions are kept until
60
60
  * the data migration in Session 165.
61
61
  */
62
- addSection: (blockType: "projectGridBlock" | "projectCarouselBlock", afterRowKey?: string | null): void => {
62
+ addSection: (blockType: SectionBlockType, afterRowKey?: string | null): void => {
63
63
  get()._pushSnapshot();
64
64
  const block = createDefaultBlock(blockType);
65
65
  const gridColumns = 12;