Repository Public MIT
1// =============================================================================2// SP BOUCHER | SOFTWARE & RESEARCH3// ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4// =============================================================================5//6// Project : SP GlassKit7// File : Examples/Gallery/GlassExampleCatalog.swift8// Module : Examples9// Repository : https://git.spboucher.ai/sp-glasskit10// Project Website : https://glass.spboucher.ai11// Created : 2026-12-0212// Last Modified : 2026-12-0213//14// Author : Simon-Pierre Boucher15// Position : Professor of Finance16// Institution : Université du Québec en Outaouais (UQO)17// Organization : SP Boucher18// Website : https://spboucher.ai19// Git : https://git.spboucher.ai20//21// Preferred Contact: contact@spboucher.ai22// Development : dev@spboucher.ai23// Support : support@spboucher.ai24// Security/Admin : admin@spboucher.ai25//26// Copyright (c) 202627// Simon-Pierre Boucher28// All rights reserved where applicable. This file is governed by the29// applicable project license, copyright notices and relevant law.30// Existing third-party rights and notices remain unaffected.31//32// License : MIT33//34// Do not embed credentials, private keys, access tokens,35// certificates or confidential personal information.36//37// =============================================================================38// END OF SP BOUCHER SOURCE HEADER39// =============================================================================4041import SwiftUI42import SPGlassKit4344/// Every compiled example, by catalogue identifier. The Studio, the tests and the documentation read this list.45@MainActor46public enum GlassExampleCatalog {47 public struct Entry: Identifiable {48 public let id: String49 public let typeName: String50 public let make: @MainActor () -> AnyView51 }5253 private static func entry<Example: GlassExample>(_ type: Example.Type) -> Entry {54 Entry(id: type.componentID, typeName: String(describing: type)) { AnyView(type.init()) }55 }5657 public static let all: [Entry] = [58 entry(GlassAccordionExample.self),59 entry(GlassAgentPanelExample.self),60 entry(GlassAlertExample.self),61 entry(GlassAudioPlayerExample.self),62 entry(GlassBadgeExample.self),63 entry(GlassBannerExample.self),64 entry(GlassBreadcrumbExample.self),65 entry(GlassButtonExample.self),66 entry(GlassButtonGroupExample.self),67 entry(GlassCardExample.self),68 entry(GlassChartExample.self),69 entry(GlassChatBubbleExample.self),70 entry(GlassCompassExample.self),71 entry(GlassDataGridExample.self),72 entry(GlassFloatingButtonExample.self),73 entry(GlassGalleryExample.self),74 entry(GlassIconButtonExample.self),75 entry(GlassLocationButtonExample.self),76 entry(GlassMapControlsExample.self),77 entry(GlassMapPanelExample.self),78 entry(GlassMapPinExample.self),79 entry(GlassMetricCardExample.self),80 entry(GlassModelPickerExample.self),81 entry(GlassNavigationBarExample.self),82 entry(GlassOTPFieldExample.self),83 entry(GlassPanelExample.self),84 entry(GlassPickerExample.self),85 entry(GlassPopoverExample.self),86 entry(GlassProgressExample.self),87 entry(GlassPromptBarExample.self),88 entry(GlassSearchFieldExample.self),89 entry(GlassSecureFieldExample.self),90 entry(GlassSegmentedControlExample.self),91 entry(GlassSheetExample.self),92 entry(GlassSidebarExample.self),93 entry(GlassSliderExample.self),94 entry(GlassSplitButtonExample.self),95 entry(GlassStepperExample.self),96 entry(GlassTabBarExample.self),97 entry(GlassTableExample.self),98 entry(GlassTextAreaExample.self),99 entry(GlassTextFieldExample.self),100 entry(GlassThinkingIndicatorExample.self),101 entry(GlassTimelineExample.self),102 entry(GlassToastExample.self),103 entry(GlassToggleExample.self),104 entry(GlassToolbarExample.self),105 entry(GlassVideoPlayerExample.self),106 entry(GlassVolumeControlExample.self),107 entry(GlassWaveformExample.self),108 ]109110 public static func example(for componentID: String) -> Entry? {111 all.first { $0.id == componentID }112 }113}114