SPB Git

Repository Public MIT

manifest.json 4.3 KB 76 lines json

1{2  "accessibility" : [3    "Every action has a title: it is the VoiceOver label, the tooltip on macOS and the menu title when the action overflows.",4    "With an accessibility text size on a compact width, a large title is shown inline so that it does not fill the screen, and only one trailing action stays in the bar.",5    "Bar buttons get the system's large content viewer at accessibility sizes.",6    "Keyboard shortcuts of the actions work whether the action is in the bar or in the menu."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      "id" : "glass-toolbar",32      "version" : "1.1.0"33    }34  ],35  "description" : "NavigationStack with a title, toolbar actions and the system back button.",36  "examples" : [37    {38      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassNavigationBarExample: GlassExample {\n    public static let componentID = \"glass-navigation-bar\"\n    @State private var notes = [\"Quarterly review\", \"Trip to Lisbon\", \"A much longer note title that has to wrap or truncate gracefully\"]\n    @State private var isFlagged = false\n\n    public init() {}\n\n    public var body: some View {\n        GlassNavigationBar(\n            \"Notes\",\n            subtitle: \"\\(notes.count) notes\",\n            titleDisplay: .large,\n            leading: [\n                GlassToolbarAction(id: \"sort\", title: \"Sort\", systemImage: \"arrow.up.arrow.down\") { notes.sort() },\n            ],\n            trailing: [\n                GlassToolbarAction(id: \"new\", title: \"New note\", systemImage: \"square.and.pencil\", shortcut: KeyboardShortcut(\"n\"), priority: .high) {\n                    notes.append(\"Untitled \\(notes.count + 1)\")\n                },\n                GlassToolbarAction(id: \"shuffle\", title: \"Shuffle\", systemImage: \"shuffle\") { notes.shuffle() },\n                GlassToolbarAction(id: \"clear\", title: \"Delete all\", systemImage: \"trash\", role: .destructive, isEnabled: !notes.isEmpty, priority: .low) {\n                    notes.removeAll()\n                },\n            ]\n        ) {\n            List(notes, id: \\.self) { note in\n                NavigationLink(note, value: note)\n            }\n            .overlay {\n                if notes.isEmpty { ContentUnavailableView(\"No notes\", systemImage: \"note.text\") }\n            }\n            .navigationDestination(for: String.self) { note in\n                ScrollView {\n                    Text(verbatim: note)\n                        .font(.title3)\n                        .frame(maxWidth: .infinity, alignment: .leading)\n                        .padding()\n                }\n                .glassNavigationBar(\n                    \"Note\",\n                    titleDisplay: .inline,\n                    trailing: [\n                        GlassToolbarAction(id: \"flag\", title: isFlagged ? \"Remove flag\" : \"Flag\", systemImage: isFlagged ? \"flag.fill\" : \"flag\") {\n                            isFlagged.toggle()\n                        },\n                    ]\n                )\n            }\n        }\n    }\n}\n\n#Preview(\"GlassNavigationBar\") { GlassNavigationBarExample().glassTheme(.ocean) }\n",39      "title" : "GlassNavigationBar example"40    }41  ],42  "files" : [43    {44      "bytes" : 9124,45      "path" : "Navigation/Navigation/GlassNavigationBar.swift",46      "sha256" : "b91d9639817a9e0e8c80d2161296ca2ca649d727d64817fa31761f6ef555f0fe"47    }48  ],49  "frameworks" : [5051  ],52  "id" : "glass-navigation-bar",53  "kind" : "native-wrapper",54  "license" : "MIT",55  "minimumOS" : {56    "iOS" : "26.0",57    "iPadOS" : "26.0",58    "macOS" : "26.0"59  },60  "name" : "GlassNavigationBar",61  "platforms" : [62    "iOS",63    "iPadOS",64    "macOS"65  ],66  "schemaVersion" : 1,67  "sha256" : "cf4168c78a40eb0de4c6676f02135794c809bba29425b3c89eef1c95eb243cdd",68  "symbols" : [69    "GlassNavigationTitleDisplay",70    "GlassNavigationBarConfiguration",71    "GlassNavigationBar",72    "GlassNavigationBarLayout"73  ],74  "version" : "1.1.0"75}76
Files main
Menu

Theme