SPB Git

Repository Public MIT

manifest.json 4.0 KB 72 lines json

1{2  "accessibility" : [3    "Rows are system list rows: selection, headers and badges are announced by the system; the list is fully keyboard navigable.",4    "Symbols are decorative; the title is always present.",5    "Search ignores case, accents and character width, and matches every word of the query in any order.",6    "Row titles wrap at large text sizes."7  ],8  "category" : "navigation",9  "changelog" : [10    {11      "changes" : [12        "Release 1.1.0: see the project changelog."13      ],14      "date" : "2026-12-03",15      "version" : "1.1.0"16    },17    {18      "changes" : [19        "Initial release."20      ],21      "date" : "2026-12-02",22      "version" : "1.0.0"23    }24  ],25  "dependencies" : [26    {27      "id" : "glass-foundation",28      "version" : "1.1.0"29    }30  ],31  "description" : "NavigationSplitView sidebar with sections, selection, search and adaptive collapse.",32  "examples" : [33    {34      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassSidebarExample: GlassExample {\n    public static let componentID = \"glass-sidebar\"\n    @State private var selection: String? = \"inbox\"\n    @State private var columnVisibility: NavigationSplitViewVisibility = .automatic\n\n    public init() {}\n\n    private let sections: [GlassSidebarSection<String>] = [\n        GlassSidebarSection(id: \"mailboxes\", title: \"Mailboxes\", items: [\n            GlassSidebarItem(id: \"inbox\", title: \"Inbox\", systemImage: \"tray\", badge: 12, keywords: [\"unread\"]),\n            GlassSidebarItem(id: \"drafts\", title: \"Drafts\", systemImage: \"doc\", badge: 2),\n            GlassSidebarItem(id: \"sent\", title: \"Sent\", systemImage: \"paperplane\"),\n            GlassSidebarItem(id: \"archive\", title: \"Archive\", systemImage: \"archivebox\"),\n        ]),\n        GlassSidebarSection(id: \"labels\", title: \"Labels\", items: [\n            GlassSidebarItem(id: \"travel\", title: \"Voyages et séjours\", systemImage: \"airplane\", keywords: [\"travel\", \"trips\"]),\n            GlassSidebarItem(id: \"receipts\", title: \"Reçus\", systemImage: \"receipt\", keywords: [\"receipts\"]),\n            GlassSidebarItem(id: \"long\", title: \"A label with a deliberately long name to check wrapping\", systemImage: \"tag\"),\n        ]),\n    ]\n\n    public var body: some View {\n        GlassSidebar(\"Mail\", sections: sections, selection: $selection, columnVisibility: $columnVisibility, searchPrompt: \"Search mailboxes\") { id in\n            if let id {\n                VStack(spacing: 12) {\n                    Text(verbatim: title(of: id)).font(.title2)\n                    Button(columnVisibility == .detailOnly ? \"Show sidebar\" : \"Hide sidebar\") {\n                        columnVisibility = columnVisibility == .detailOnly ? .all : .detailOnly\n                    }\n                }\n                .padding()\n                .navigationTitle(Text(verbatim: title(of: id)))\n            } else {\n                ContentUnavailableView(\"Select a mailbox\", systemImage: \"sidebar.left\")\n            }\n        }\n    }\n\n    private func title(of id: String) -> String {\n        sections.flatMap(\\.items).first { $0.id == id }?.title ?? id\n    }\n}\n\n#Preview(\"GlassSidebar\") { GlassSidebarExample() }\n",35      "title" : "GlassSidebar example"36    }37  ],38  "files" : [39    {40      "bytes" : 9115,41      "path" : "Navigation/Navigation/GlassSidebar.swift",42      "sha256" : "292ee5b8ca3818f660ff7afd92acc74e006b77daf6e49337c94a51ffd25198c7"43    }44  ],45  "frameworks" : [4647  ],48  "id" : "glass-sidebar",49  "kind" : "native-wrapper",50  "license" : "MIT",51  "minimumOS" : {52    "iOS" : "26.0",53    "iPadOS" : "26.0",54    "macOS" : "26.0"55  },56  "name" : "GlassSidebar",57  "platforms" : [58    "iOS",59    "iPadOS",60    "macOS"61  ],62  "schemaVersion" : 1,63  "sha256" : "d766dec44c1b64aa2f3ebcd20c1655249df8b55daedbf825781309433841957a",64  "symbols" : [65    "GlassSidebarItem",66    "GlassSidebarSection",67    "GlassSidebarFilter",68    "GlassSidebar"69  ],70  "version" : "1.1.0"71}72
Files main
Menu

Theme