···11+import { env } from '$env/dynamic/public';
22+33+/**
44+ * Controls whether the section management UI is exposed to users.
55+ * When false, users can only edit the default grid section — no adding,
66+ * reordering, or deleting sections (or hero/other section types).
77+ *
88+ * Set PUBLIC_SECTIONS_ENABLED=true in the environment to enable.
99+ */
1010+export const SECTIONS_EDITING_ENABLED = env.PUBLIC_SECTIONS_ENABLED === 'true';
+13
src/lib/sections/index.ts
···11+import type { SectionDefinition } from './types';
22+import { GridSectionDefinition } from './GridSection';
33+import { HeroSectionDefinition } from './HeroSection';
44+55+export const AllSectionDefinitions = [GridSectionDefinition, HeroSectionDefinition] as const;
66+77+export const SectionDefinitionsByType = AllSectionDefinitions.reduce(
88+ (acc, def) => {
99+ acc[def.type] = def;
1010+ return acc;
1111+ },
1212+ {} as Record<string, SectionDefinition>
1313+);