// A studio's MEMBERSHIP (Sharmila's boards, syz-membership, 23 Oct 2026):// the brand card in its// heading ink — the plan spaced small (`title`), the member large// (`subtitle`), the core's validity line (`next_charge`, said whole by the// package: "Valid till 12 Nov"), the big number of sessions with its words// (`count`: "148 sessions attended"), its facts under their labels (`facts`:// Last class), and the classes taken of the period as a coral ring (`used`// of `limit`) with the core's words for it (`period`) over the studio's// photograph (`photo`) where the card names one. No invented portrait: the// member's initials. Every word is the core's (`DeckCard`).importCottonPaperimportCottonValuesimportSwiftUI/// A membership: the brand's card in its heading ink, its words in the/// paper's colour, the studio's photograph at its foot under the ring.publicstructMembershipFace<Photo: View>: View {let card: DeckCardvar photo: Photo? @Environment(\.theme) privatevar themepublicinit(card: DeckCard, photo: Photo?) {self.card = cardself.photo = photo }publicvar body: someView {GeometryReader { sheet inlet corner = theme.scale.radius(for: sheet.size) ZStack(alignment: .bottom) { theme.colors.ink.coloriflet photo, card.text("photo") != nil {MembershipPhoto(photo: photo, height: sheet.size.height * StudioFaceKnobs.photoShare) .facePart(.picture) }MembershipWords(card: card) .padding(StudioFaceKnobs.inset) .frame(width: sheet.size.width, height: sheet.size.height, alignment: .topLeading) } .foregroundStyle(theme.colors.paper.color) .clipShape(RoundedRectangle(cornerRadius: corner, style: .continuous)) } }}/// The studio's photograph at the card's foot, fading up into its ink.privatestructMembershipPhoto<Photo: View>: View {let photo: Photolet height: CGFloat @Environment(\.theme) privatevar themevar body: someView { photo .frame(height: height) .frame(maxWidth: .infinity) .clipped() .overlay(LinearGradient(colors: [theme.colors.ink.color, theme.colors.ink.color.opacity(0.25)], startPoint: .top, endPoint: .bottom)) .accessibilityIdentifier("face-photo") }}/// The membership's words: head, figure, facts and ring.privatestructMembershipWords: View {let card: DeckCard @Environment(\.theme) privatevar themevar body: someView { VStack(alignment: .leading, spacing: 12) {MembershipHead(card: card)Rectangle().fill(theme.colors.paper.color.opacity(StudioFaceKnobs.ruleFaint)).frame(height: 1) HStack(alignment: .top, spacing: 8) {MembershipFigure(card: card)Spacer(minLength: 0)iflet seats = StudioReading.seats(card) {SessionsRing(taken: seats.taken, of: seats.of, words: card.text("period")) } }Spacer(minLength: 0) } }}/// The plan spaced small, the member large, the core's validity line; the/// member's initials beside them.privatestructMembershipHead: View {let card: DeckCard @Environment(\.theme) privatevar themevar body: someView { HStack(alignment: .top, spacing: 10) { VStack(alignment: .leading, spacing: 6) {iflet plan = card.text("title") {Text(plan) .font(theme.type.title(StudioFaceKnobs.planSize)) .tracking(StudioFaceKnobs.planTracking) .textCase(.uppercase) .lineLimit(2) .accessibilityIdentifier("deck-title") .facePart(.title) }iflet member = card.text("subtitle") {Text(member) .font(theme.type.display(StudioFaceKnobs.memberSize)) .lineLimit(2) .minimumScaleFactor(0.6) .accessibilityIdentifier("face-member") .facePart(.subtitle) }iflet valid = card.text("next_charge") {Text(valid) .font(theme.type.body(StudioFaceKnobs.factSize + 2)) .lineLimit(1) .accessibilityIdentifier("face-next_charge") } }Spacer(minLength: 0)iflet member = card.text("subtitle") {StudioMonogram(name: member, size: StudioFaceKnobs.monogram, inverse: true) } } }}/// The big number with its words, the state, and the card's facts under/// their labels (the last class).privatestructMembershipFigure: View {let card: DeckCard @Environment(\.theme) privatevar themevar body: someView { VStack(alignment: .leading, spacing: 10) {iflet count = StudioReading.figure(card.text("count")) { VStack(alignment: .leading, spacing: 0) {Text(count.figure) .font(theme.type.display(StudioFaceKnobs.figureSize)) .lineLimit(1) .minimumScaleFactor(0.5)iflet words = count.words {Text(words).font(theme.type.body(StudioFaceKnobs.factSize + 2)).lineLimit(1) } } .accessibilityElement(children: .combine) .accessibilityIdentifier("face-count") } elseiflet price = card.text("price") {Text(price).font(theme.type.title(StudioFaceKnobs.memberSize * 0.8)).lineLimit(1) }ForEach(Array(StudioReading.facts(card).prefix(2).enumerated()), id: \.offset) { _, fact in VStack(alignment: .leading, spacing: 2) {iflet label = fact.label {Text(label).font(theme.type.body(StudioFaceKnobs.factSize)).opacity(StudioFaceKnobs.labelFaint) }Text(fact.said).font(theme.type.title(StudioFaceKnobs.factSize + 3)).lineLimit(2) } .accessibilityElement(children: .combine) } } }}/// The membership face, and the cards it is reviewed in. A kit names it for/// its packs and offers (`sharmila.membership`), and the deck draws it/// straight from the registry; here it is drawn from its card alone.publicenumMembershipFaceCatalogue {publicstaticlet stock: FaceStock = .ownpublicstaticlet ground: FaceGround = .paperpublicstaticlet face = Face(id: "sharmila.membership", specimens: [Specimen("ten-classes", tenClasses)]) { card, picture, _ inMembershipFace(card: card, photo: picture) }publicstaticlet tenClasses = DeckCard(face: .subscription, fields: ["title": .text("Ten classes"), "subtitle": .text("Invented Member"), "used": .number(7), "limit": .number(10),"count": .text("148 sessions attended"),"facts": .list([ .object(["label": .text("Invented label"), "said": .text("Mon 9:15 AM")]), .object(["label": .text("Invented label"), "said": .text("Wed 11:30 AM")]), ]),"period": .text("classes this quarter"), "photo": .text("k"), ])}