SPB Git

Repository Public License

design-system.md 6.0 KB 120 lines markdown

1<!--2ORIX Camera3File: docs/design/design-system.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->78# Design System910ORIX Camera uses two layers of tokens.1112| Layer | File | Scope |13|---|---|---|14| `ORIXDesign` | `Packages/ORIXCameraKit/Sources/ORIXDesign/` | the ORIX family system: adaptive light and dark palette, spacing, radii, type, motion, haptics, shared components |15| `Instrument` | `App/Sources/DesignSystem/CameraTheme.swift` | the camera's instrument surfaces, always dark around the viewfinder |1617The camera screen forces a dark colour scheme: a viewfinder must not be surrounded by a bright interface. The library and Settings follow the system appearance (`systemAppearance()`); the editor's canvas is dark, as in most photo editors.1819## Colour2021### Instrument (camera screen, editor)2223| Token | Hex | Use |24|---|---|---|25| `body` | `#05070E` | the camera's body, behind everything |26| `panel` | `#10131F` | sheets of controls, cards |27| `panelRaised` | `#1A1E2E` | selected chips, pills |28| `hairline` | white 10 % | borders |29| `text` / `textDim` / `textFaint` | `#F2F4FB` / `#A3AAC2` / `#6F7690` | three levels of text |30| `accent` | `#A78BFA` | violet: selection, brand |31| `manual` | `#FBBF24` | amber: anything under manual control |32| `record` | `#FF453A` | recording, failure |33| `good` / `warn` / `bad` | `#34D399` / `#FBBF24` / `#FF6B76` | level, warnings |3435### ORIX palette (library, settings)3637Adaptive pairs (light / dark): canvas `#F4F5FA` / `#0A0D18`, surface `#FFFFFF` / `#141828`, raised surface `#EEF0F7` / `#1D2236`, hairline, three text levels, success, warning, danger. The camera's accent pair is violet `#7C3AED` / `#A78BFA` with amber `#D97706` / `#FBBF24`.3839### The amber rule4041> **Amber means the user is in control. Violet means selection.**4243- A readout chip is white while the camera decides the value and **amber** once the user has set it (manual ISO or shutter, a non-zero EV, manual focus, locked white balance, zoom above 1×).44- The dial's needle is amber. The selected mode is amber. An active top-bar button is amber.45- A RAW format name in the top bar is amber.46- Violet marks selection inside option groups and the brand.4748Colour is never the only signal: a manual parameter also changes its label or value (AF → MF, AUTO → 3200K).4950## Type5152| Style | Definition | Use |53|---|---|---|54| `Instrument.readout` | system rounded, semibold, **monospaced digits**, built on a text style | technical values that change continuously (they must not jitter) |55| `Instrument.label` | caption 2, rounded, bold | chip labels, pills, badges |56| `Font.orixDisplay … orixMono` | Dynamic Type styles | library, settings, sheets |5758Most text is built on Dynamic Type styles. A few viewfinder elements use fixed sizes (lens labels, the ruler's tick labels, badge icons): 13 occurrences, listed as a gap in the accessibility document.5960## Space, radius, motion6162| Token | Values |63|---|---|64| `ORIX.Space` | 4, 8, 12, 16, 20, 28, 40 |65| `ORIX.Radius` | chip 10, control 14, card 20, hero 28 |66| `ORIX.Motion` | quick (snappy 0.22 s), standard (smooth 0.35 s), expressive (spring) |67| Minimum touch target | 44 points |6869Camera rules for motion:7071- **Nothing animated may delay a capture.** The shutter flash is a 0.22 s overlay that runs after the capture has been requested.72- State changes use `snappy` between 0.2 and 0.25 s.73- The level and the audio meter use short linear animations so they follow the signal instead of easing behind it.74- The histogram is not animated by SwiftUI: its temporal smoothing is part of the data path.7576## Haptics7778`ORIXHaptics`, used only when Settings → Haptics is on.7980| Call | When |81|---|---|82| `tick` | each stop of a dial, a mode or tool change, a toggle |83| `press` | shutter, start of a recording or multi-frame capture |84| `success` | a capture saved, a sequence finished |85| `warning` | a recoverable problem (dropped frames, Photos refused) |86| `failure` | a capture or save failed |8788## Components8990### Camera (`CameraTheme.swift`, `CameraControls.swift`, `MonitorOverlays.swift`)9192| Component | Role |93|---|---|94| `ReadoutChip` | label over value; amber when manual; outlined when its dial is open; dimmed when the camera lacks the capability |95| `RulerDial` | horizontal ruler over discrete stops, 13 points per stop, a haptic tick per stop, fading ticks toward the edges; adjustable for VoiceOver |96| `ShutterButton` | photo, record, recording, stop and busy looks; progress ring for timed captures; press-and-hold for burst |97| `ModeSelector` | horizontal, centred on the selection; disabled while capturing |98| `LensSelector` | one round button per physical lens with its computed magnification |99| `InstrumentIconButton`, `PillButton` | 44-point icon and capsule buttons |100| `MonitorBadge` | status on the picture: REC, frames, heat, stabilisation, SIMULATOR |101| `HistogramView`, `LevelView`, `FocusReticle`, `GridOverlayView`, `AspectMaskView`, `SafeFramingView`, `HintChips`, `AudioMeter` | overlays laid out on the picture rectangle |102| `StateCard` | permission denied, start failure, interruption |103104### Shared (`ORIXDesign/Components.swift`)105106`orixCard`, `orixLift`, primary / secondary / tile button styles, `ORIXGlyph`, `ORIXSectionHeader`, `ORIXChip`, `ORIXEmptyState`, `ORIXBanner`, `ORIXProgressBar`, and `ORIXMark` (the camera mark drawn in code, used on the welcome screen).107108## Layout109110- **Portrait (iPhone, iPad portrait):** top bar, picture, then the deck: analysis panel or creative tools, the open dial, the parameter strip, the mode selector, the shutter row. The shutter, the library and the camera switch stay within thumb reach.111- **Wide (iPad landscape, width above 1.15 × height):** the picture on the left, the same controls in a side column at most 400 points wide.112- **Auto mode** replaces the parameter strip with a single exposure-compensation slider.113- Overlays are positioned from `MonitorRenderer.imageRect`, so they follow the picture through any aspect ratio.114115The iPhone interface is portrait-only; the iPad supports all four orientations.116117## Icon and brand118119See [icon-design.md](icon-design.md) and [brand-guidelines.md](brand-guidelines.md).120
Files main
Menu

Theme