// Cotton Story's STORY CARD (`story.card`, contract 17 Nov 2026): one story on// the Stories deck. Its title large, its logline, and how far it has come// (scenes, pages); the language it is written in quietly at the top. The// current story wears the accent's rule along its top.//// Slots: `title`, `subtitle` (the logline), `note` (scenes and pages, in the// core's words: "12 scenes, 18 pages"), `tag` (its language), `state` (said// when it is the current story, in the core's words). Every word is the core's.importCottonPaperimportCottonValuesimportSwiftUIstructStoryCardFace: View {let card: DeckCardinit(card: DeckCard) {self.card = card }var body: someView { VStack(alignment: .leading, spacing: StoryCardKnobs.gap) { HStack(alignment: .firstTextBaseline) {iflet language = card.text("tag") {StoryQuietLine(text: language) .accessibilityIdentifier("story-language") }Spacer(minLength: 8)iflet current = card.text("state") {Text(verbatim: current) .font(StoryType.sans(.footnote, weight: .semibold)) .foregroundStyle(StoryMaterial.accent.colour) .accessibilityIdentifier("story-current") } }iflet title = card.text("title") {Text(verbatim: title) .font(StoryType.sans(.largeTitle, weight: .bold)) .foregroundStyle(StoryMaterial.ink.colour) .fixedSize(horizontal: false, vertical: true) .accessibilityIdentifier("deck-title") .facePart(.title) }iflet logline = card.text("subtitle") {Text(verbatim: logline) .font(StoryType.sans(.title3)) .foregroundStyle(StoryMaterial.ink.colour) .fixedSize(horizontal: false, vertical: true) .accessibilityIdentifier("story-logline") .facePart(.subtitle) }Spacer(minLength: 0)iflet figures = card.text("note") {StoryQuietLine(text: figures) .accessibilityIdentifier("story-figures") } } .padding(StoryCardKnobs.inset) .storySheet() .overlay(alignment: .top) {if card.text("state") != nil {Rectangle().fill(StoryMaterial.accent.colour).frame(height: 3) .clipShape(RoundedRectangle(cornerRadius: StoryCardKnobs.corner, style: .continuous)) } } .accessibilityElement(children: .contain) .accessibilityIdentifier("story-card") }}/// The story card, and the cards it is reviewed in.publicenumStoryCardFaceCatalogue {publicstaticlet stock: FaceStock = .ownpublicstaticlet ground: FaceGround = .blankpublicstaticlet face = Face(id: "story.card", specimens: [Specimen("current", current), Specimen("new", fresh), Specimen("translation", translation), ]) { card, _, _ inStoryCardFace(card: card) }publicstaticlet current = DeckCard(face: "story.card", corner: nil, pressing: false, pace: nil, plate: nil, fields: ["title": .text("The Keeper's Daughter"),"subtitle": .text("A woman comes home to a lighthouse to sell it, and finds her father has been hiding a boat."),"note": .text("14 scenes, 22 pages"),"tag": .text("English"),"state": .text("Writing now"), ])/// Just begun: a title and nothing else.publicstaticlet fresh = DeckCard(face: "story.card", corner: nil, pressing: false, pace: nil, plate: nil, fields: ["title": .text("Untitled ferry story"),"note": .text("No scenes yet"),"tag": .text("English"), ])publicstaticlet translation = DeckCard(face: "story.card", corner: nil, pressing: false, pace: nil, plate: nil, fields: ["title": .text("కాపరి కూతురు"),"subtitle": .text("లైట్హౌస్ అమ్మడానికి ఇంటికి వచ్చిన ఆమెకు తండ్రి దాచిన పడవ కనిపిస్తుంది."),"note": .text("14 scenes, 23 pages"),"tag": .text("Telugu"), ])}