managarten/packages/shared-branding/src/index.ts
Till JS 1198d01263 feat(onboarding): M4 — Screen 3 (Templates) + finish handler
- packages/shared-branding/onboarding-templates.ts:
  * 7 templates: Alltag / Arbeit / Health / Sport / Lernen / Entdecken
    / Erinnern — each with a phosphor icon name, German name/desc and
    an ordered moduleIds list
  * resolveModulesForTemplates() — deduplicates the union of selected
    templates' modules (priority-ordered) and caps at 8 (2×4 grid)
- packages/shared-branding/onboarding-templates.spec.ts: 10 tests
  covering order preservation, dedup-across-templates, cap honouring,
  unknown-id tolerance
- /onboarding/templates/+page.svelte:
  * Multi-select grid of 7 tiles (checkmark + primary border when on)
  * Finish handler: runs resolveModulesForTemplates → creates a new
    "Zuhause" scene with those apps → onboardingStatus.markComplete()
    → navigates to /
  * Skip still marks complete (no scene — user lands on DEFAULT_HOME_APPS)
  * Prefills selection from onboardingFlow store so back-nav is stable

With this, the 3-screen flow runs end-to-end for a new user:
signup → /onboarding/name → /look → /templates → / with a curated
home scene.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:03:00 +02:00

94 lines
2.1 KiB
TypeScript

/**
* Shared branding components and configuration for the Mana ecosystem
*
* This package provides:
* - App logos (AppLogo, AppLogoWithName)
* - Pre-configured app logos (MemoroLogo, ManaLogo, etc.)
* - Mana icon (ManaIcon)
* - Branding configuration (colors, names, taglines)
*/
// Generic Components
export { default as AppLogo } from './AppLogo.svelte';
export { default as AppLogoWithName } from './AppLogoWithName.svelte';
export { default as ManaIcon } from './ManaIcon.svelte';
// Pre-configured App Logos
export {
MemoroLogo,
ManaLogo,
CardsLogo,
UloadLogo,
ChatLogo,
PresiLogo,
FoodLogo,
QuotesLogo,
ContactsLogo,
CalendarLogo,
StorageLogo,
TodoLogo,
MailLogo,
MoodlitLogo,
InventoryLogo,
ClockLogo,
QuestionsLogo,
SkillTreeLogo,
PlantsLogo,
LightWriteLogo,
MusicLogo,
ContextLogo,
CitycornersLogo,
} from './logos';
// Configuration
export { APP_BRANDING, getAppBranding, getAllAppBrandings } from './config';
// App Icons (SVG data URLs)
export { APP_ICONS, type AppIconId } from './app-icons';
// Mana Apps Configuration
export {
MANA_APPS,
getManaApp,
getManaAppsByStatus,
getAvailableManaApps,
getActiveManaApps,
getAccessibleManaApps,
hasAppAccess,
getTierLevel,
APP_STATUS_LABELS,
APP_SLIDER_LABELS,
APP_URLS,
ACCESS_TIER_LABELS,
getPillAppItems,
type ManaApp,
type AppStatus,
type AccessTier,
type PillAppItemConfig,
} from './mana-apps';
// Types
export type { AppId, AppBranding, LogoProps, AppLogoWithNameProps } from './types';
// Spaces (multi-tenancy primitive — see docs/plans/spaces-foundation.md)
// Canonical types live in @mana/shared-types; branding adds only UI strings.
export {
SPACE_TYPES,
SPACE_TYPE_LABELS,
SPACE_TYPE_DESCRIPTIONS,
SPACE_MODULE_ALLOWLIST,
isModuleAllowedInSpace,
isSpaceType,
parseSpaceMetadata,
type SpaceType,
type SpaceModuleId,
type SpaceMetadata,
} from './spaces';
// Onboarding templates (see docs/plans/onboarding-flow.md)
export {
ONBOARDING_TEMPLATES,
resolveModulesForTemplates,
type OnboardingTemplate,
type OnboardingTemplateId,
} from './onboarding-templates';