SPB Git

Repository Public MIT

manifest.json 3.6 KB 63 lines json

1{2  "accessibility" : [3    "Symbol and text form one element with the \"updates frequently\" trait; the symbol is decorative.",4    "A change of label is announced with `AccessibilityNotification.Announcement` at low priority, so it never interrupts speech in progress. Blank and unchanged labels are not announced.",5    "The pulse is a symbol effect that is disabled with Reduce Motion (real or simulated)."6  ],7  "category" : "ai",8  "changelog" : [9    {10      "changes" : [11        "Initial release."12      ],13      "date" : "2026-12-02",14      "version" : "1.0.0"15    }16  ],17  "dependencies" : [18    {19      "id" : "glass-foundation",20      "version" : "1.0.0"21    }22  ],23  "description" : "Explicit activity indicator with a reduced-motion form; it never shows presumed reasoning.",24  "examples" : [25    {26      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassThinkingIndicatorExample: GlassExample {\n    public static let componentID = \"glass-thinking-indicator\"\n\n    /// Fictitious activity labels, written by the host — never text coming from a model.\n    private let stages: [(kind: GlassActivityKind, label: String)] = [\n        (.thinking, \"Preparing the sample answer\"),\n        (.searching, \"Searching the sample library\"),\n        (.reading, \"Reading 3 sample documents\"),\n        (.writing, \"Writing the summary\"),\n        (.waiting, \"Waiting for your confirmation\"),\n    ]\n    @State private var stage = 0\n\n    public init() {}\n\n    public var body: some View {\n        VStack(alignment: .leading, spacing: 16) {\n            Text(\"Sample data · simulated activity\")\n                .font(.caption)\n                .foregroundStyle(.secondary)\n\n            GlassThinkingIndicator(stages[stage].kind, label: stages[stage].label)\n            GlassButton(\"Next activity\", systemImage: \"forward.end\") {\n                stage = (stage + 1) % stages.count\n            }\n\n            Divider()\n            ForEach(stages.indices, id: \\.self) { index in\n                GlassThinkingIndicator(stages[index].kind, label: stages[index].label, announcesChanges: false)\n            }\n            GlassThinkingIndicator(.custom(systemImage: \"arrow.down.circle\"), label: \"Downloading the sample model, which has a long label that wraps on narrow screens\", announcesChanges: false)\n            GlassThinkingIndicator(announcesChanges: false)\n\n            Divider()\n            Text(\"Reduce Motion (simulated): static symbol\")\n                .font(.caption)\n            GlassThinkingIndicator(.searching, label: \"Searching the sample library\", announcesChanges: false)\n                .glassSimulatedAccessibility(reduceMotion: true)\n        }\n        .padding()\n    }\n}\n\n#Preview(\"GlassThinkingIndicator\") { GlassThinkingIndicatorExample().glassTheme(.crystal) }\n",27      "title" : "GlassThinkingIndicator example"28    }29  ],30  "files" : [31    {32      "bytes" : 5570,33      "path" : "AI/AI/GlassThinkingIndicator.swift",34      "sha256" : "5314210843b40fbd7d0664f5cb98e8689033bbca2ab7668bbb003d94312c7a0a"35    }36  ],37  "frameworks" : [3839  ],40  "id" : "glass-thinking-indicator",41  "kind" : "content-component",42  "license" : "MIT",43  "minimumOS" : {44    "iOS" : "26.0",45    "iPadOS" : "26.0",46    "macOS" : "26.0"47  },48  "name" : "GlassThinkingIndicator",49  "platforms" : [50    "iOS",51    "iPadOS",52    "macOS"53  ],54  "schemaVersion" : 1,55  "sha256" : "73b6c0312174707c119683dd52a7edd216a6f1cc1f611aa477b3391953410938",56  "symbols" : [57    "GlassActivityKind",58    "GlassActivityAnnouncement",59    "GlassThinkingIndicator"60  ],61  "version" : "1.0.0"62}63
Files main
Menu

Theme