@devcabs/folio-engine 0.0.0-stage → 0.1.0

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 (180) hide show
  1. package/dist/App.d.ts +7 -0
  2. package/dist/components/canvas/CanvasAddBar.d.ts +28 -0
  3. package/dist/components/canvas/CanvasAddModal.d.ts +38 -0
  4. package/dist/components/canvas/CanvasChart.d.ts +23 -0
  5. package/dist/components/canvas/CanvasDeleteConfirmModal.d.ts +21 -0
  6. package/dist/components/canvas/CanvasGallery.d.ts +20 -0
  7. package/dist/components/canvas/CanvasItemControls.d.ts +33 -0
  8. package/dist/components/canvas/CanvasPhoto.d.ts +28 -0
  9. package/dist/components/canvas/CanvasSection.d.ts +27 -0
  10. package/dist/components/canvas/CanvasSubsection.d.ts +23 -0
  11. package/dist/components/canvas/CanvasText.d.ts +23 -0
  12. package/dist/components/canvas/DocumentCanvas.d.ts +20 -0
  13. package/dist/components/canvas/HeroPhoto.d.ts +17 -0
  14. package/dist/components/canvas/NodeCanvas.d.ts +2 -0
  15. package/dist/components/canvas/index.d.ts +17 -0
  16. package/dist/components/chart/BarChart.d.ts +23 -0
  17. package/dist/components/chart/ChartCard.d.ts +33 -0
  18. package/dist/components/chart/ChartConfigDrawer.d.ts +16 -0
  19. package/dist/components/chart/ChartGhostWireframe.d.ts +16 -0
  20. package/dist/components/chart/ChartLegend.d.ts +14 -0
  21. package/dist/components/chart/ChartRouter.d.ts +8 -0
  22. package/dist/components/chart/ChartSortingControls.d.ts +15 -0
  23. package/dist/components/chart/ChartTableModal.d.ts +26 -0
  24. package/dist/components/chart/ChartTooltip.d.ts +12 -0
  25. package/dist/components/chart/DataPendingCard.d.ts +28 -0
  26. package/dist/components/chart/DonutChart.d.ts +16 -0
  27. package/dist/components/chart/HistogramChart.d.ts +23 -0
  28. package/dist/components/chart/LineChart.d.ts +22 -0
  29. package/dist/components/chart/RangePreviewMatrix.d.ts +19 -0
  30. package/dist/components/chart/ScatterPlot.d.ts +21 -0
  31. package/dist/components/chart/drawer/controls/BarVisualControls.d.ts +9 -0
  32. package/dist/components/chart/drawer/controls/ChartTitlesSection.d.ts +15 -0
  33. package/dist/components/chart/drawer/controls/DonutVisualControls.d.ts +7 -0
  34. package/dist/components/chart/drawer/controls/HistogramVisualControls.d.ts +13 -0
  35. package/dist/components/chart/drawer/controls/LineVisualControls.d.ts +14 -0
  36. package/dist/components/chart/drawer/controls/ScatterDataControls.d.ts +17 -0
  37. package/dist/components/chart/drawer/controls/ScatterVisualControls.d.ts +23 -0
  38. package/dist/components/chart/drawer/controls/SortingAndOrderControls.d.ts +18 -0
  39. package/dist/components/chart/drawer/controls/StandardDataControls.d.ts +31 -0
  40. package/dist/components/chart/drawer/hooks/useChartConfigForm.d.ts +156 -0
  41. package/dist/components/chart/drawer/hooks/useLiveMatrixSync.d.ts +21 -0
  42. package/dist/components/chart/drawer/hooks/useSheetVerification.d.ts +26 -0
  43. package/dist/components/chart/drawer/index.d.ts +17 -0
  44. package/dist/components/chart/drawer/panels/Step1Source.d.ts +18 -0
  45. package/dist/components/chart/drawer/panels/Step1SourceRange.d.ts +32 -0
  46. package/dist/components/chart/drawer/panels/Step2DataRange.d.ts +15 -0
  47. package/dist/components/chart/drawer/panels/Step3ChartSetup.d.ts +17 -0
  48. package/dist/components/chart/drawer/panels/Step4Review.d.ts +11 -0
  49. package/dist/components/chart/index.d.ts +22 -0
  50. package/dist/components/dev/DevActionAffordance.d.ts +4 -0
  51. package/dist/components/dev/DevExitConfirmModal.d.ts +14 -0
  52. package/dist/components/dev/DevLockBlockedModal.d.ts +3 -0
  53. package/dist/components/dev/DevModeBadge.d.ts +3 -0
  54. package/dist/components/dev/DevPinModal.d.ts +3 -0
  55. package/dist/components/dev/DevPublishModal.d.ts +9 -0
  56. package/dist/components/dev/UniversalEditModal.d.ts +40 -0
  57. package/dist/components/dev/index.d.ts +8 -0
  58. package/dist/components/feedback/EmptyState.d.ts +13 -0
  59. package/dist/components/feedback/PageNotFound.d.ts +15 -0
  60. package/dist/components/feedback/Toast.d.ts +25 -0
  61. package/dist/components/feedback/index.d.ts +2 -0
  62. package/dist/components/history/HistoryHubModal.d.ts +44 -0
  63. package/dist/components/history/index.d.ts +1 -0
  64. package/dist/components/layout/AppFooter.d.ts +10 -0
  65. package/dist/components/layout/AppHeader.d.ts +21 -0
  66. package/dist/components/layout/EditorialSection.d.ts +27 -0
  67. package/dist/components/layout/EditorialSidebar.d.ts +34 -0
  68. package/dist/components/layout/HeroSection.d.ts +2 -0
  69. package/dist/components/layout/HeroWelcome.d.ts +11 -0
  70. package/dist/components/layout/SearchField.d.ts +9 -0
  71. package/dist/components/layout/StatusPill.d.ts +2 -0
  72. package/dist/components/layout/index.d.ts +8 -0
  73. package/dist/components/roadmap/RoadmapNode.d.ts +30 -0
  74. package/dist/components/roadmap/RoadmapSection.d.ts +27 -0
  75. package/dist/components/roadmap/RoadmapTrack.d.ts +25 -0
  76. package/dist/components/roadmap/serpentine-generator.d.ts +60 -0
  77. package/dist/components/roadmap/use-roadmap-scroll.d.ts +19 -0
  78. package/dist/components/source/EditPhotoModal.d.ts +22 -0
  79. package/dist/components/source/LightboxPhotoStrip.d.ts +23 -0
  80. package/dist/components/source/LinkFolderModal.d.ts +24 -0
  81. package/dist/components/source/SourceCard.d.ts +31 -0
  82. package/dist/components/source/SourceFolderAttachment.d.ts +25 -0
  83. package/dist/components/source/SourceGallery.d.ts +26 -0
  84. package/dist/components/source/SourceImage.d.ts +26 -0
  85. package/dist/components/source/SourceLightbox.d.ts +28 -0
  86. package/dist/components/source/index.d.ts +9 -0
  87. package/dist/components/ui/AccordionSection.d.ts +21 -0
  88. package/dist/components/ui/Breadcrumb.d.ts +29 -0
  89. package/dist/components/ui/Button.d.ts +31 -0
  90. package/dist/components/ui/ColumnSelect.d.ts +17 -0
  91. package/dist/components/ui/ColumnTypeBadge.d.ts +6 -0
  92. package/dist/components/ui/DevHelpTooltip.d.ts +11 -0
  93. package/dist/components/ui/DraggableRows.d.ts +21 -0
  94. package/dist/components/ui/Drawer.d.ts +50 -0
  95. package/dist/components/ui/DrawerTier.d.ts +8 -0
  96. package/dist/components/ui/EditableText.d.ts +48 -0
  97. package/dist/components/ui/FAB.d.ts +24 -0
  98. package/dist/components/ui/Modal.d.ts +24 -0
  99. package/dist/components/ui/PageTitle.d.ts +33 -0
  100. package/dist/components/ui/ParametricShape.d.ts +57 -0
  101. package/dist/components/ui/RevolvingButton.d.ts +5 -0
  102. package/dist/components/ui/SectionTitle.d.ts +42 -0
  103. package/dist/components/ui/SeriesSelectToolbar.d.ts +10 -0
  104. package/dist/components/ui/StatusPill.d.ts +21 -0
  105. package/dist/components/ui/TieredSlider.d.ts +19 -0
  106. package/dist/components/ui/Toast.d.ts +1 -0
  107. package/dist/components/ui/ValueLabelToggle.d.ts +10 -0
  108. package/dist/components/ui/index.d.ts +21 -0
  109. package/dist/config/engine.config.d.ts +31 -0
  110. package/dist/context/DeveloperModeContext.d.ts +11 -0
  111. package/dist/context/UndoRedoContext.d.ts +20 -0
  112. package/dist/folio.js +24996 -0
  113. package/dist/folio.umd.cjs +42 -0
  114. package/dist/hooks/use-auto-toc.d.ts +31 -0
  115. package/dist/hooks/use-discrete-step-navigation.d.ts +26 -0
  116. package/dist/hooks/use-dynamic-section-numbers.d.ts +30 -0
  117. package/dist/hooks/use-hash-route.d.ts +36 -0
  118. package/dist/hooks/use-scroll.d.ts +22 -0
  119. package/dist/hooks/use-scrollspy.d.ts +19 -0
  120. package/dist/hooks/useChartTooltip.d.ts +25 -0
  121. package/dist/hooks/useContent.d.ts +36 -0
  122. package/dist/hooks/useDeveloperMode.d.ts +1 -0
  123. package/dist/hooks/useDocumentCanvas.d.ts +53 -0
  124. package/dist/hooks/useDrivePhotoSync.d.ts +15 -0
  125. package/dist/hooks/useImageLoader.d.ts +12 -0
  126. package/dist/hooks/useLightboxHistory.d.ts +14 -0
  127. package/dist/hooks/useNodeCanvas.d.ts +2 -0
  128. package/dist/hooks/useSheetChartData.d.ts +30 -0
  129. package/dist/hooks/useSourcePoint.d.ts +35 -0
  130. package/dist/hooks/useSwipeGesture.d.ts +30 -0
  131. package/dist/hooks/useUndoRedo.d.ts +9 -0
  132. package/dist/hooks/useUnsavedChangesPrompt.d.ts +18 -0
  133. package/dist/index.d.ts +52 -0
  134. package/dist/main.d.ts +1 -0
  135. package/dist/services/canvasLayoutService.d.ts +158 -0
  136. package/dist/services/chartSourceService.d.ts +128 -0
  137. package/dist/services/devLockService.d.ts +76 -0
  138. package/dist/services/draftService.d.ts +129 -0
  139. package/dist/services/drivePhotoSyncService.d.ts +60 -0
  140. package/dist/services/driveVerificationService.d.ts +41 -0
  141. package/dist/services/edgePreBakeService.d.ts +81 -0
  142. package/dist/services/historyService.d.ts +215 -0
  143. package/dist/services/historyStorage.d.ts +17 -0
  144. package/dist/services/mediaService.d.ts +25 -0
  145. package/dist/services/sheetsDataService.d.ts +59 -0
  146. package/dist/services/sheetsVerificationService.d.ts +87 -0
  147. package/dist/services/sourceService.d.ts +43 -0
  148. package/dist/services/undoRedoService.d.ts +63 -0
  149. package/dist/services/unsavedChangesService.d.ts +32 -0
  150. package/dist/style.css +1 -0
  151. package/dist/types/canvas.d.ts +115 -0
  152. package/dist/types/chart.d.ts +117 -0
  153. package/dist/types/developer.d.ts +144 -0
  154. package/dist/types/draft.d.ts +21 -0
  155. package/dist/types/edge.d.ts +232 -0
  156. package/dist/types/history.d.ts +81 -0
  157. package/dist/types/media.d.ts +16 -0
  158. package/dist/types/navigation.d.ts +19 -0
  159. package/dist/types/node.d.ts +51 -0
  160. package/dist/types/source.d.ts +88 -0
  161. package/dist/utils/canvasDefaults.d.ts +43 -0
  162. package/dist/utils/chartColors.d.ts +48 -0
  163. package/dist/utils/chartDimensions.d.ts +50 -0
  164. package/dist/utils/chartMath.d.ts +142 -0
  165. package/dist/utils/chartSanitizer.d.ts +84 -0
  166. package/dist/utils/contentDb.d.ts +86 -0
  167. package/dist/utils/devSecurity.d.ts +84 -0
  168. package/dist/utils/mediaUrl.d.ts +32 -0
  169. package/dist/utils/modalActions.d.ts +32 -0
  170. package/dist/utils/node-sections.d.ts +15 -0
  171. package/dist/utils/page-sections.d.ts +1 -0
  172. package/dist/utils/runtime-env.d.ts +21 -0
  173. package/dist/utils/scrollLock.d.ts +10 -0
  174. package/dist/utils/smooth-scroll.d.ts +24 -0
  175. package/dist/utils/source.d.ts +25 -0
  176. package/dist/utils/storage.d.ts +13 -0
  177. package/dist/utils/supabase-config.d.ts +29 -0
  178. package/dist/utils/supabase-write-guard.d.ts +15 -0
  179. package/package.json +56 -4
  180. package/README.md +0 -3
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface PageNotFoundProps {
3
+ onReturn?: () => void;
4
+ title?: string;
5
+ description?: string;
6
+ errorCode?: string;
7
+ returnLabel?: string;
8
+ className?: string;
9
+ }
10
+ /**
11
+ * PageNotFound Component
12
+ * Dignified 404 Fallback View adhering to the Modern Academic Editorial design.
13
+ */
14
+ export declare const PageNotFound: React.FC<PageNotFoundProps>;
15
+ export default PageNotFound;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ export interface ToastProps {
3
+ message: string;
4
+ type?: 'success' | 'info' | 'error';
5
+ durationMs?: number;
6
+ onDismiss: () => void;
7
+ actionLabel?: string;
8
+ onAction?: () => void;
9
+ playAudio?: boolean;
10
+ }
11
+ /**
12
+ * Toast Component
13
+ * Folio Engine — Subtask 5.4: Link Folder Modal & URL Validation Pipeline
14
+ *
15
+ * Lightweight, accessible floating feedback capsule:
16
+ * - Positioned at upper-left of viewport with responsive safe-area insets
17
+ * - Native Web Audio API subtle chime feedback
18
+ * - Dedicated color variants for success, error, and info
19
+ * - Rendered in document.body via createPortal
20
+ * - ARIA role="status" and aria-live="polite"
21
+ * - Auto-dismisses with timer teardown
22
+ * - Adheres strictly to Universal Zero Outline Policy
23
+ */
24
+ export declare const Toast: React.FC<ToastProps>;
25
+ export default Toast;
@@ -0,0 +1,2 @@
1
+ export { Toast } from './Toast';
2
+ export type { ToastProps } from './Toast';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Folio Engine - History Hub Drawer
3
+ * Location: src/components/history/HistoryHubModal.tsx
4
+ * Specification: docs/tasks/plan_history_drawer_redesign.md
5
+ * Aligned with: docs/00_WORKFLOW.md, docs/05_VISUAL_SPEC.md, docs/07_CODING_STANDARDS.md
6
+ *
7
+ * Implements:
8
+ * 1. Canonical Drawer slide-out container (right position, size="md").
9
+ * 2. Relative elapsed time format (4h, 3h, 5mo, 2d, 1y) paired with full timestamp.
10
+ * 3. Canonical Button component for "Restore to Draft" and footer actions.
11
+ * 4. User changelog description promoted to primary main text.
12
+ * 5. Elimination of generic "Published Revision" placeholder text.
13
+ * 6. Stripping parentheses such as "(Default)" from displayed titles.
14
+ * 7. Removal of verbose baseline description ("Original baseline...").
15
+ * 8. Confirmation modals for draft restore and factory baseline reset safeguards.
16
+ * 9. Universal Zero Outline Policy and 100% design token purity.
17
+ */
18
+ import React from 'react';
19
+ import type { PublishedSnapshot, UnifiedPortalSnapshot } from '../../types/history';
20
+ export interface HistoryHubModalProps {
21
+ isOpen: boolean;
22
+ onClose: () => void;
23
+ onRestored?: (title: string) => void;
24
+ }
25
+ export type HistoryHubDrawerProps = HistoryHubModalProps;
26
+ /**
27
+ * Strips parentheses and their enclosed content from text (e.g. "(Default)" -> "").
28
+ */
29
+ export declare function stripParentheses(text?: string | null): string;
30
+ /**
31
+ * Compact elapsed time formatter: 4h, 3h, 5mo, 2d, 1y.
32
+ */
33
+ export declare function formatTimeElapsed(isoDate: string): string;
34
+ /**
35
+ * Full accessible date/time string.
36
+ */
37
+ export declare function formatFullTimestamp(isoDate: string): string;
38
+ /**
39
+ * Extracts the user-meaningful primary text for an item, stripping parentheses and placeholder labels.
40
+ */
41
+ export declare function getItemPrimaryText(snapshot: PublishedSnapshot | UnifiedPortalSnapshot): string;
42
+ export declare const HistoryHubDrawer: React.FC<HistoryHubDrawerProps>;
43
+ export declare const HistoryHubModal: React.FC<HistoryHubModalProps>;
44
+ export default HistoryHubDrawer;
@@ -0,0 +1 @@
1
+ export { HistoryHubModal } from './HistoryHubModal';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { NodeCode } from '../../types/node';
3
+ export interface AppFooterProps {
4
+ orgName?: string;
5
+ onRoadmapClick?: (e?: React.MouseEvent) => void;
6
+ onOverviewClick?: (e?: React.MouseEvent) => void;
7
+ onNodeClick?: (nodeCode: NodeCode, e?: React.MouseEvent) => void;
8
+ }
9
+ export declare const AppFooter: React.FC<AppFooterProps>;
10
+ export default AppFooter;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { NavItem } from '../../types/navigation';
3
+ export type { NavItem };
4
+ export interface AppHeaderProps {
5
+ brandTitle?: string;
6
+ brandSubtitle?: string;
7
+ brandLetter?: string;
8
+ navItems?: NavItem[];
9
+ mobileOnlyNav?: boolean;
10
+ onRoadmapClick?: (e?: React.MouseEvent) => void;
11
+ onOverviewClick?: (e?: React.MouseEvent) => void;
12
+ onBrandClick?: (e?: React.MouseEvent) => void;
13
+ ctaLabel?: string;
14
+ ctaHref?: string;
15
+ isCtaVisible?: boolean;
16
+ isCtaRevolving?: boolean;
17
+ isCtaPulsing?: boolean;
18
+ onCtaClick?: (e?: React.MouseEvent) => void;
19
+ }
20
+ export declare const AppHeader: React.FC<AppHeaderProps>;
21
+ export default AppHeader;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export interface EditorialSectionProps {
3
+ /** Required unique anchor element ID */
4
+ id: string;
5
+ /** Section title displayed in Table of Contents */
6
+ title?: string;
7
+ /** Section number displayed in Table of Contents */
8
+ number?: string | number;
9
+ /** Custom semantic element tag (default: 'section') */
10
+ as?: 'section' | 'article' | 'div';
11
+ /** Optional custom CSS class */
12
+ className?: string;
13
+ /** Optional inline style */
14
+ style?: React.CSSProperties;
15
+ /** Children content */
16
+ children?: React.ReactNode;
17
+ }
18
+ /**
19
+ * EditorialSection Component (Canonical Layout Primitive)
20
+ *
21
+ * Semantic wrapper for editorial content sections:
22
+ * - Emits data-toc-title and data-toc-number for automated discovery by useAutoTableOfContents
23
+ * - Enforces zero horizontal borders and spatial breathing room
24
+ * - Accessible aria-label integration
25
+ */
26
+ export declare const EditorialSection: React.FC<EditorialSectionProps>;
27
+ export default EditorialSection;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import type { NavItem } from '../../types/navigation';
3
+ export interface EditorialSidebarProps {
4
+ /** Optional section heading (defaults to "Contents") */
5
+ title?: string;
6
+ /** Navigation anchor items */
7
+ items?: NavItem[];
8
+ /** Controlled active item ID (if not provided, automatically computed via useScrollspy) */
9
+ activeId?: string;
10
+ /** Accent color for the active indicator bar (defaults to var(--folio-primary)) */
11
+ accentColor?: string;
12
+ /** Callback fired when an item is selected */
13
+ onItemClick?: (item: NavItem) => void;
14
+ /** Optional CSS class name override */
15
+ className?: string;
16
+ /** Breadcrumb properties for sticky sidebar integration */
17
+ nodeNumber?: number;
18
+ nodeTitle?: string;
19
+ onBack?: () => void;
20
+ }
21
+ /**
22
+ * EditorialSidebar Component (Canonical Layout Primitive)
23
+ *
24
+ * Reusable side rail navigation for long-form editorial views:
25
+ * - Sticky position pinned below the AppHeader capsule
26
+ * - Outermost last branch breadcrumb on top of the sidebar in sticky mode
27
+ * - Automatic document-order reading-line scrollspy tracking
28
+ * - Smooth scroll with top navigation offset calculation
29
+ * - Active state indicator using calm surface tint (zero outline/left highlight)
30
+ * - Collapses automatically on mobile (< 1024px)
31
+ * - Universal Zero Outline Policy compliant
32
+ */
33
+ export declare const EditorialSidebar: React.FC<EditorialSidebarProps>;
34
+ export default EditorialSidebar;
@@ -0,0 +1,2 @@
1
+ export { HeroWelcome as HeroSection, type HeroWelcomeProps as HeroSectionProps } from './HeroWelcome';
2
+ export * from './HeroWelcome';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface HeroWelcomeProps {
3
+ kickerText?: React.ReactNode;
4
+ title?: React.ReactNode;
5
+ subtitle?: React.ReactNode;
6
+ onStartJourney?: () => void;
7
+ heroCtaRef?: React.RefObject<HTMLDivElement | null>;
8
+ heroSlotRef?: React.RefObject<HTMLDivElement | null>;
9
+ }
10
+ export declare const HeroWelcome: React.FC<HeroWelcomeProps>;
11
+ export default HeroWelcome;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface SearchFieldProps {
3
+ placeholder?: string;
4
+ mobilePlaceholder?: string;
5
+ onSearch?: (query: string) => void;
6
+ className?: string;
7
+ }
8
+ export declare const SearchField: React.FC<SearchFieldProps>;
9
+ export default SearchField;
@@ -0,0 +1,2 @@
1
+ export * from '../ui/StatusPill';
2
+ export { default } from '../ui/StatusPill';
@@ -0,0 +1,8 @@
1
+ export * from './AppHeader';
2
+ export * from './AppFooter';
3
+ export * from './HeroWelcome';
4
+ export * from './SearchField';
5
+ export * from './EditorialSection';
6
+ export * from './EditorialSidebar';
7
+ export * from './StatusPill';
8
+ export { HeroWelcome as HeroSection, type HeroWelcomeProps as HeroSectionProps } from './HeroWelcome';
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import type { NodeItem } from "../../types/node";
3
+ export declare const PHOTO_STACKED_BREAKPOINT = 1024;
4
+ export interface RoadmapNodeProps {
5
+ page: NodeItem;
6
+ x: number;
7
+ y: number;
8
+ trackWidth?: number;
9
+ flank: "left" | "right" | "center";
10
+ isActive: boolean;
11
+ isSelected?: boolean;
12
+ isConnected?: boolean;
13
+ onExplore: (pageId: string) => void;
14
+ onSelectStage?: (stage: number) => void;
15
+ }
16
+ /**
17
+ * RoadmapNode Component (Phase 4 Subtask 4.2.3)
18
+ *
19
+ * Implements Direct Canvas Milestone Stations (Tactile Gateway Nodes):
20
+ * - Anti-AI-Slop Direct Canvas Editorial Typesetting: Zero rectangular card boxes
21
+ * - 72px Tactile Portal Ring: Physical milestone anchor with seal color
22
+ * - Benchmark Monospace Badge: JetBrains Mono tracking
23
+ * - Layperson Display Title: Plus Jakarta Sans 800 weight with tight tracking
24
+ * - Source-Bound Community Story Hook: Single-Sentence authentic narrative
25
+ * - Refined Editorial Action Link: Hairline underline accent with smooth navigation
26
+ * - Real-time Line Connection Highlighting: Seamless synchronization with serpentine ink
27
+ * - Universal Zero Outline Policy: outline: none across all states
28
+ * - ACTIVE, SELECTED Mode: Solid jewel fill highlighting with crisp white numeral text
29
+ */
30
+ export declare const RoadmapNode: React.NamedExoticComponent<RoadmapNodeProps>;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { type RoadmapScrollZone } from "./use-roadmap-scroll";
3
+ import type { NodeItem } from "../../types/node";
4
+ import type { SerpentineGeneratorOptions } from "./serpentine-generator";
5
+ export type { RoadmapScrollZone };
6
+ export interface RoadmapSectionHandle {
7
+ scrollToStage: (stage: number, onComplete?: () => void) => void;
8
+ nextStage: (onComplete?: () => void) => void;
9
+ prevStage?: (onComplete?: () => void) => void;
10
+ }
11
+ export interface RoadmapSectionProps {
12
+ nodes?: NodeItem[];
13
+ options?: SerpentineGeneratorOptions;
14
+ onStageChange?: (activeStage: number, scrollZone: RoadmapScrollZone) => void;
15
+ onExploreNode?: (nodeId: string) => void;
16
+ /** Backwards compatibility alias */
17
+ onExplorePage?: (pageId: string) => void;
18
+ }
19
+ /**
20
+ * RoadmapSection Component (Phase 4 Subtask 4.2.1b: Discrete Step Roadmap Engine)
21
+ *
22
+ * Viewport stage coordination for the winding progression roadmap:
23
+ * - Direct milestone coordinate navigation via scrollToStage, nextStage, prevStage
24
+ * - Dynamic serpentine track and stepping stones rendering for arbitrary N nodes
25
+ * - Centralized keyboard and gesture locking handled via useDiscreteStepNavigation
26
+ */
27
+ export declare const RoadmapSection: React.ForwardRefExoticComponent<RoadmapSectionProps & React.RefAttributes<RoadmapSectionHandle>>;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { type SerpentineGeneratorOptions } from "./serpentine-generator";
3
+ import type { NodeItem } from "../../types/node";
4
+ export interface RoadmapTrackProps {
5
+ nodes?: NodeItem[];
6
+ activeStage: number;
7
+ subscribeProgress: (callback: (progress: number) => void) => () => void;
8
+ className?: string;
9
+ onNodeClick?: (stage: number) => void;
10
+ onExplore?: (pageId: string) => void;
11
+ options?: SerpentineGeneratorOptions;
12
+ }
13
+ /**
14
+ * RoadmapTrack Component (Phase 4 Subtask 4.2.1a: Natural Flow Engine)
15
+ *
16
+ * Implements a natural document flow serpentine track:
17
+ * - 1:1 Scale-locked vector canvas in natural page flow (zero sticky lock, zero cameraWrapper)
18
+ * - Layer 1: Foundation Ribbon (wide structural roadbed)
19
+ * - Layer 2: Institutional Spine (tactile dashed center line)
20
+ * - Layer 2.5: Golden Glow Aura (Sunburst Gold radiance)
21
+ * - Layer 3: Dynamic Active Ink (Primary)
22
+ * - Zero React re-renders during active scrolling (direct DOM mutation on stroke offsets and node data-connected)
23
+ * - Parameterized to render dynamic node counts N >= 1 without layout shifts or NaN
24
+ */
25
+ export declare const RoadmapTrack: React.NamedExoticComponent<RoadmapTrackProps>;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * serpentine-generator.ts
3
+ * Real-time mathematical generator for responsive serpentine progression track.
4
+ *
5
+ * Computes smooth S-curves and exact milestone coordinates dynamically
6
+ * based on viewport dimensions. Guaranteed 100% synchronized camera glide
7
+ * and precision ink touch at all screen sizes.
8
+ *
9
+ * Parameterized to support arbitrary sequence length N >= 1.
10
+ */
11
+ export interface GeneratedNodePoint {
12
+ stage: number;
13
+ id: string;
14
+ x: number;
15
+ y: number;
16
+ threshold: number;
17
+ accentColorVar: string;
18
+ label: string;
19
+ flank: "left" | "right" | "center";
20
+ }
21
+ export interface GeneratedRoadmap {
22
+ pathData: string;
23
+ totalLength: number;
24
+ cumLengths: number[];
25
+ points: GeneratedNodePoint[];
26
+ totalHeight: number;
27
+ y0: number;
28
+ travelY: number;
29
+ }
30
+ export interface SerpentineNodeConfig {
31
+ stage?: number;
32
+ id?: string;
33
+ threshold?: number;
34
+ accentColorVar?: string;
35
+ label?: string;
36
+ }
37
+ export interface SerpentineGeneratorOptions {
38
+ /** Lateral edge padding ratio (default: 0.06 = 6% of container width) */
39
+ paddingRatio?: number;
40
+ /** Minimum lateral padding in pixels (default: 48px to prevent node radius clipping) */
41
+ minPadding?: number;
42
+ /** Maximum lateral padding in pixels (default: 80px for expansive desktop layout) */
43
+ maxPadding?: number;
44
+ /** Corner fillet radius for boxy architectural conduit (default: 36px) */
45
+ cornerFilletRadius?: number;
46
+ /** Track style: "conduit" (boxy rounded architectural) | "curved" (classic S-curve) (default: "conduit") */
47
+ trackStyle?: "conduit" | "curved";
48
+ /** Number of sequence milestone nodes (default: 5 or nodes.length) */
49
+ nodeCount?: number;
50
+ /** Custom node configurations */
51
+ nodes?: SerpentineNodeConfig[];
52
+ }
53
+ /**
54
+ * Generates the complete serpentine roadmap layout for any viewport width, height, and sequence length N >= 1
55
+ */
56
+ export declare function generateSerpentineRoadmap(width: number, viewportHeight: number, options?: SerpentineGeneratorOptions): GeneratedRoadmap;
57
+ /**
58
+ * Interpolates drawn ink length from normalized scroll progress [0, 1] across N segments
59
+ */
60
+ export declare function progressToDrawnLength(progress: number, cumLengths: number[]): number;
@@ -0,0 +1,19 @@
1
+ export type RoadmapScrollZone = 'above' | 'inside' | 'below';
2
+ export interface RoadmapScrollState {
3
+ progressRef: React.RefObject<number>;
4
+ activeStage: number;
5
+ scrollZone: RoadmapScrollZone;
6
+ isEngineActive: boolean;
7
+ scrollToStage: (stage: number, onComplete?: () => void) => void;
8
+ subscribeProgress: (callback: (progress: number) => void) => () => void;
9
+ }
10
+ /**
11
+ * useRoadmapScroll (Subtask 4.2.1a: Natural Document Flow Engine)
12
+ *
13
+ * Replaces locked 500vh viewport camera with a clean, high-performance
14
+ * natural scroll observer. Progress is calculated relative to the user's
15
+ * eye-level reading focal line intersecting the milestone nodes.
16
+ *
17
+ * Direct DOM subscribers receive 60/120fps progress updates without React re-renders.
18
+ */
19
+ export declare const useRoadmapScroll: (containerRef: React.RefObject<HTMLElement | null>) => RoadmapScrollState;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { SourceItem } from '../../types/node';
3
+ export interface EditPhotoModalProps {
4
+ isOpen: boolean;
5
+ item?: SourceItem | null;
6
+ photoItem?: SourceItem | null;
7
+ onClose: () => void;
8
+ onSave: (photoId: string, newTitle: string, newDate?: string, newCaption?: string) => Promise<void> | void;
9
+ }
10
+ /**
11
+ * EditPhotoModal Component
12
+ *
13
+ * Editorial modal for coordinator in Developer Mode to edit the narrative
14
+ * title/caption of synced Google Drive MOV source photos.
15
+ *
16
+ * Requirements:
17
+ * - Consumes canonical Modal component
18
+ * - Checks useDeveloperMode and auto-closes if Developer Mode is deactivated
19
+ * - Enforces Universal Zero Outline Policy across all inputs and buttons
20
+ * - Emits onSave with photoId and cleaned title
21
+ */
22
+ export declare const EditPhotoModal: React.FC<EditPhotoModalProps>;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import type { SourceItem } from '../../types/node';
3
+ export interface LightboxPhotoStripProps {
4
+ items: SourceItem[];
5
+ currentIndex: number;
6
+ accentColor?: string;
7
+ onNavigate: (newIndex: number) => void;
8
+ }
9
+ /**
10
+ * LightboxPhotoStrip Component
11
+ *
12
+ * Renders a bottom thumbnail ribbon inside SourceLightbox allowing users to preview
13
+ * all available photographs in the collection, jump directly to any photograph, and
14
+ * maintain smooth scroll tracking with the active slide.
15
+ *
16
+ * Design Standards Enforced:
17
+ * - Editorial Restraint: Auto-hides when items.length <= 1 (single photo)
18
+ * - Universal Zero Outline Policy: outline: none across all states
19
+ * - Fluid Centering & Auto-Scroll: Active thumbnail smoothly centered on slide change
20
+ * - Full Screen Reader Accessibility: role="tablist" / role="tab" with descriptive labels
21
+ */
22
+ export declare const LightboxPhotoStrip: React.FC<LightboxPhotoStripProps>;
23
+ export default LightboxPhotoStrip;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ export interface LinkFolderModalProps {
3
+ isOpen: boolean;
4
+ pointId: string;
5
+ initialTitle?: string;
6
+ initialUrl?: string;
7
+ onClose: () => void;
8
+ onSuccess?: (updatedUrl: string, updatedTitle: string) => void;
9
+ }
10
+ /**
11
+ * LinkFolderModal Component
12
+ * Folio Engine — Subtask 5.4: Link Folder Modal & URL Validation Pipeline
13
+ *
14
+ * Quiet, restrained editorial dialog for coordinator to connect official Google Drive
15
+ * Means of Verification (MOV) folders:
16
+ * 1. Consumes canonical Modal: Reuses viewport portal, scroll locks, and keyboard handling.
17
+ * 2. Automated Save Verification Gate: Verifies folder existence & public access on Save.
18
+ * 3. Developer Mode Exit: Auto-closes immediately if developer mode is exited.
19
+ * 4. Editorial Restraint: Zero ornamental clutter, no meta-narrative, calm color contrast.
20
+ * 5. Preflight "Test Link": Clean anchor to inspect the folder before saving.
21
+ * 6. Universal Zero Outline Policy: Strict outline: none across all states.
22
+ */
23
+ export declare const LinkFolderModal: React.FC<LinkFolderModalProps>;
24
+ export default LinkFolderModal;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { SourceItem } from '../../types/node';
3
+ export interface SourceCardProps {
4
+ item: SourceItem;
5
+ accentColor?: string;
6
+ onClick?: (item: SourceItem) => void;
7
+ onEditTitle?: (item: SourceItem) => void;
8
+ onEditPhoto?: (item: SourceItem) => void;
9
+ disabled?: boolean;
10
+ className?: string;
11
+ overlayCount?: number;
12
+ aspectRatio?: 'landscape' | 'square' | 'auto';
13
+ hideCaption?: boolean;
14
+ }
15
+ /**
16
+ * SourceCard Component
17
+ *
18
+ * Canonical Means of Verification (MOV) Photo Presentation:
19
+ * - Standalone photo card with curved edges
20
+ * - Sourced from official Google Drive repository
21
+ * - Detached editorial caption below the photo (not encased inside the curved edges)
22
+ * - Uniform Administrative Edit Button Standard (strictly '✎ Edit' in Developer Mode)
23
+ * - Restrained typography: photo caption size
24
+ * - 4-State interactive matrix: Default, Hover, Active/Pressed, Focus-Visible, Disabled
25
+ * - Vercel React Best Practices: lazy loading, async decoding, CLS prevention
26
+ * - Universal Zero Outline Policy & zero horizontal divider lines
27
+ * - Optional frosted-glass darkened overlay for collage overflow (+N remaining)
28
+ * - Optional hideCaption to strip filenames/captions and render flush in collage
29
+ */
30
+ export declare const SourceCard: React.FC<SourceCardProps>;
31
+ export default SourceCard;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ export interface SourceFolderAttachmentProps {
3
+ /** Canonical point or node identifier (e.g. 'access', 'milestone-1') */
4
+ pointId: string;
5
+ /** Custom label override (defaults to live folderTitle or 'Official Google Drive Folder') */
6
+ label?: string;
7
+ /** Visual presentation variant */
8
+ variant?: 'compact' | 'editorial';
9
+ /** Accent color token or hex for seal tinting */
10
+ accentColor?: string;
11
+ /** Optional container class name */
12
+ className?: string;
13
+ }
14
+ /**
15
+ * SourceFolderAttachment Component
16
+ * Folio Engine — Subtask 5.3: Contextual Point Anchor & Integration
17
+ *
18
+ * Canonical, accessible Means of Verification (MOV) anchor component:
19
+ * - Direct 1-tap jump to official Google Drive archives supporting accreditation.
20
+ * - Public State: Calm, editorial badge opening in a new window with strict security.
21
+ * - Developer Mode: Discrete uniform '✎ Edit' button for inline folder reassignment.
22
+ * - Universal Zero Outline Policy: Strict enforcement of outline: none across all states.
23
+ * - Responsive Adaptability: Compact (pill) and Editorial (card callout) variants.
24
+ */
25
+ export declare const SourceFolderAttachment: React.FC<SourceFolderAttachmentProps>;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { SourceItem } from '../../types/node';
3
+ export interface SourceGalleryProps {
4
+ nodeId: string;
5
+ sourceItems: SourceItem[];
6
+ accentColor?: string;
7
+ className?: string;
8
+ editTriggerId?: string;
9
+ }
10
+ /**
11
+ * SourceGallery Component
12
+ * Task 4.5.5 / Task 5.3 / Task 6.3: Dynamic Evidence Gallery Integration & Coexistence Switch
13
+ *
14
+ * Primary visual showcase of Means of Verification (MOV) on the dedicated Node page:
15
+ * - Deterministic 5-State Coexistence Switch: Retains curated baseline photos during never_synced
16
+ * and sync_error; seamlessly renders live Google Drive photos when synced_success.
17
+ * - Confirmed Empty State Differentiation: Displays interactive EmptyState with direct
18
+ * Google Drive upload CTA when Drive explicitly returns 200 OK with 0 images (synced_empty).
19
+ * - Elevated Folder Header Presentation: Authentic folder title without generic 'Source' pill.
20
+ * - Developer Mode '↻ Sync Photos' Affordance: Manual tactile reconciliation trigger with Toast.
21
+ * - Responsive adaptive card grid (1 col mobile, 2 col tablet/desktop).
22
+ * - Full-screen photo inspection via SourceLightbox orchestration.
23
+ * - Universal Zero Outline Policy & zero horizontal dividing lines.
24
+ */
25
+ export declare const SourceGallery: React.FC<SourceGalleryProps>;
26
+ export default SourceGallery;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ export interface SourceImageProps {
3
+ src?: string;
4
+ fallbackSrc?: string;
5
+ srcSet?: string;
6
+ sizes?: string;
7
+ alt?: string;
8
+ className?: string;
9
+ imageClassName?: string;
10
+ aspectRatio?: string;
11
+ objectFit?: 'cover' | 'contain';
12
+ showRetry?: boolean;
13
+ loading?: 'lazy' | 'eager';
14
+ decoding?: 'async' | 'sync' | 'auto';
15
+ onLoad?: () => void;
16
+ onError?: () => void;
17
+ }
18
+ /**
19
+ * SourceImage Component
20
+ *
21
+ * Fault-tolerant image wrapper with shimmer skeleton placeholders,
22
+ * GPU-accelerated opacity decoding transition, and graceful retry error boundaries.
23
+ * Default performance optimization: loading="lazy", decoding="async", responsive srcSet/sizes.
24
+ */
25
+ export declare const SourceImage: React.FC<SourceImageProps>;
26
+ export default SourceImage;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { SourceItem } from '../../types/node';
3
+ export interface SourceLightboxProps {
4
+ isOpen: boolean;
5
+ items: SourceItem[];
6
+ currentIndex: number;
7
+ driveFolderUrl?: string;
8
+ accentColor?: string;
9
+ onClose: () => void;
10
+ onNavigate: (newIndex: number) => void;
11
+ onEditSource?: () => void;
12
+ onEditPhoto?: (item: SourceItem) => void;
13
+ }
14
+ /**
15
+ * SourceLightbox Component
16
+ *
17
+ * Canonical Means of Verification (MOV) Photo Lightbox Modal:
18
+ * - Browser & hardware Back button synchronization (returns to source page scroll position)
19
+ * - Native mobile gallery conventions: touch swipe left/right, pull-down dismiss
20
+ * - Double-click / double-tap zoom toggle (1.5x)
21
+ * - Single click chrome toggle for distraction-free inspection
22
+ * - Intrinsic aspect ratio preservation (object-fit: contain)
23
+ * - Scrollbar-compensated body scroll lock
24
+ * - ARIA live region announcing photo changes for screen readers
25
+ * - Universal Zero Outline Policy across all interactive states
26
+ */
27
+ export declare const SourceLightbox: React.FC<SourceLightboxProps>;
28
+ export default SourceLightbox;
@@ -0,0 +1,9 @@
1
+ export { SourceCard, type SourceCardProps } from './SourceCard';
2
+ export { SourceImage, type SourceImageProps } from './SourceImage';
3
+ export { SourceLightbox, type SourceLightboxProps } from './SourceLightbox';
4
+ export { LightboxPhotoStrip, type LightboxPhotoStripProps } from './LightboxPhotoStrip';
5
+ export { SourceGallery, type SourceGalleryProps } from './SourceGallery';
6
+ export { SourceFolderAttachment, type SourceFolderAttachmentProps } from './SourceFolderAttachment';
7
+ export { LinkFolderModal, type LinkFolderModalProps } from './LinkFolderModal';
8
+ export { EditPhotoModal, type EditPhotoModalProps } from './EditPhotoModal';
9
+ export { default } from './SourceGallery';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface AccordionSectionProps {
3
+ id?: string;
4
+ name?: string;
5
+ title: string;
6
+ defaultOpen?: boolean;
7
+ isOpen?: boolean;
8
+ onToggle?: (open: boolean) => void;
9
+ badge?: React.ReactNode;
10
+ caption?: string;
11
+ children: React.ReactNode;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * AccordionSection Component
16
+ * Canonical UI primitive for collapsible drawer sections with indented subordinate controls.
17
+ * Supports exclusive single-open groups via the `name` prop.
18
+ * Strictly adheres to tokens.css, Universal Zero Outline Policy, and Ban on Dividing Lines.
19
+ */
20
+ export declare const AccordionSection: React.FC<AccordionSectionProps>;
21
+ export default AccordionSection;