pkg:clod/com.clodhub/table-layout 0.11.0 Seats around an oval table on every screen size, plus a television layout, as a pure function of the seat count and the area. `table-layout` puts people around a table. Given a seat count (2 to 9) and an area it returns where each seat, its hidden cards, its open cards and its stake go, where the deck, burn pile, five board cards and pot go, and how big the cards are, for three screen classes: a phone-shaped portrait table box (positions placed so nothing overlaps at any count), a wide landscape table whose seats sit at equal distances round an oval and are turned to face out, and a television layout with fixed upright seats. Seat 0 is always the viewer's, at the bottom, and the others follow clockwise. The geometry is pure and has no game words; seats and the middle show whatever the application passes in. Examples A six-seat game on a phone shows the portrait table with six seats around the oval; rotate the phone and the landscape table appears with seats turned to face outward; a television shows the same game upright with fixed spots and a banner; a two-seat game and a nine-seat game use the same code path. A viewer can spin a landscape table by passing `turn`. Package URL: pkg:clod/com.clodhub/table-layout@0.11.0 Class: Table layout (pkg:clod/com.clodhub/table-layout-class@1.1.0): Seat, card and stake positions around a table for any screen. Any component of this class can fill a recipe slot that asks for it. Category games/tables-and-seating; https://clodhub.com/classes/table-layout-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Ftable-layout-class Provides (1) - table-layout (com.clodhub/table-layout 1.0.0): Seats around an oval table on every screen size (portrait, landscape, television) as a pure function of the seat count and the area, plus views that place seats from it. Web: implementation/web/layout.ts, table-view.ts, placed-seats.ts and table-layout.css (reads the theme's --table and --table-edge). Apple: TableGeometry, Ring, OvalTable and TelevisionTable in SwiftUI. Android: TableGeometry, Ring and the Compose function OvalTable in package com.clodhub.tablelayout. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Ftable-layout Requires (2) - theme (com.clodhub/theme 1.0.0): Design tokens for colours, spacing, radii, type scale and an animated background, rendered to CSS variables, Swift constants and Kotlin constants. Web: implementation/web/tokens.ts and background.ts. Apple: ThemeTypes.swift, ThemeTokens.swift, BackgroundMath.swift, ThemeBackgroundView.swift. Android: package com.clodhub.theme. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Ftheme - controls (com.clodhub/controls 1.0.0): Buttons, icon buttons, toggles, panels, banners, dialogs and help pages that draw with the theme's tokens. Text is always supplied already translated. Web: implementation/web (DOM elements styled by controls.css from the theme CSS variables). Apple: SwiftUI views in implementation/apple/Sources. Android: Compose functions in package com.clodhub.controls. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fcontrols Settings (0) No installer settings. The application passes the seat count, the screen size, whether it is a television, and optionally a turn (a fraction of a lap) to spin a landscape table. Depends on components: none How to use in a recipe A recipe uses it through a slot of class Table layout (pkg:clod/com.clodhub/table-layout-class 1.1.0), naming pkg:clod/com.clodhub/table-layout as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (table-layout) to the slots that use it. It fills what the component needs (theme and controls) from slots whose components provide them. It has no settings. - as a slot in recipe.json components: {"id":"table-layout","class":{"name":"pkg:clod/com.clodhub/table-layout-class","version":"1.1.0","digest":"fedffd4e439a56db251d53b977a2f691bf00c2390d3da4cd89fb0a82d216355c"},"preferred":{"name":"pkg:clod/com.clodhub/table-layout","version":"0.11.0"}} - in place of another component of the class: clod fetch table-layout@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=table-layout@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot table-layout) For developers: how an application uses it Web: call `tableLayout` (or `tableFor`, which also chooses the class from the screen size) and `tableView` from `web/table-view.ts`, passing a function that returns the node for each seat and a centre node; link `web/table-layout.css` after the theme's CSS (it reads `--table` and `--table-edge`). `tvScreen` wraps a table with a title, the controls component's `banner` and an exit control. Use `relativeSeat` to turn a server seat number into a position relative to the viewer. Apple: compile `PlacedSeats.swift` and `TableLayout.swift` anywhere, and `TableView.swift` (`OvalTable`, `TelevisionTable`) in UIKit targets with the theme's Swift files. Android: add `PlacedSeats.kt`, `TableLayout.kt` and `OvalTable.kt` to a Compose module with the theme's Kotlin files. Betting controls, cards, chips and poker text are not here: seats and the centre are the caller's, usually built from `card-graphics`, `chip-graphics` and `controls`. Accounts and services None. Pure geometry and local drawing; no accounts, network or deployment. How it is checked Node tests check, for every seat count from 2 to 9 on portrait, landscape and television areas, that there is one seat per player, all seat, card and stake points lie inside the area, seat 0 is at the bottom and the others go clockwise, left and right are mirror images, no two seats share a spot, landscape and television plates never overlap (turned bounding boxes), portrait positions equal the recipe's placed data, landscape seats are evenly spaced along the oval's arc length, the middle row runs in order, and screen class, clamping, relative seats, box sizing and clockwise light targets, that the stored native fixtures (`tests/fixtures/layouts.json`, `tests/android/Expected.kt`) match the TypeScript layouts to 1e-9, and that the OpenRPC interface's layout shape and seat limits match the code and every method it lists is an exported web function. The page builders are tested against a stand-in page. The Apple check compiles and runs `tests/apple/main.swift` for macOS, comparing all 25 fixture layouts (137 seat spots) with the TypeScript output to 1e-9, then type-checks all Swift with the theme's against the iOS simulator SDK. The Android check compiles the pure Kotlin and compares the same layouts in `tests/android/Expected.kt`; kotlinc was not available where this was written, so it has not been run, and `OvalTable.kt` (Compose) is only compiled by the application's Gradle build. Nothing is checked pixel by pixel. - `node --test tests/web.test.ts` (web, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4, xcrun 72) - `python3 tests/native.py android` (android, platform; tools: python3 3.12, kotlinc 2.2, java 26.0) Updates Patch updates replace files only. The component keeps no data; removal deletes its files and the application's imports of them. Tags: games, layout, table, tables-and-seating Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/table-layout release v0.11.0; digest sha256:d2772c5177e4311a83f667e002f748c28af532859af4f93fb5049c49b62d763d Release: features Line 0.11: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/table-layout/0.11.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Images (4): https://clodhub.com/images/6886e83559de4269844a52b6194104679cb42c959f389c3853cf1ef2b2177e94.png (web, Nine seats around a landscape table on a computer screen, night look); https://clodhub.com/images/1a45e3718c6b59f51da9ab0d75e0a8ca0dda8b348474c83f699225fe2a2f3552.png (web, Six seats on a computer screen in the lounge look); https://clodhub.com/images/92acfc6e78c4d7a9254cb94976e5e98680723b945bc3c5b1d48c2d7e4548d1ea.png (web, Six seats on a portrait phone, the viewer at the bottom); https://clodhub.com/images/d24d3a9f6b8c6c3b005c54437a73c97ce3365b4ceb1e27c507e25919ed6c4eaf.png (web, The television screen: title, banner and the table filling the rest) Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/table-layout/0.11.0 Bundle download: GET https://clodhub.com/api/components/table-layout/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/table-layout-class@1.1.0 fedffd4e439a56db251d53b977a2f691bf00c2390d3da4cd89fb0a82d216355c com.clodhub/table-layout 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, tvos apple/Sources, web web/index.ts, windows web/index.ts shared behaviour suites: shared Platforms: android, ios, macos, tvos, web, windows Toolchains: android >=8.0.0, ios >=17.0.0, java >=17.0.0 <27.0.0, kotlin =2.4.21, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: android-ui: androidx.compose.ui =1.10.0 Styles: scope global; 32 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 2 exact dependencies, 48 files (listed on the details page) Suitable for jobs: table-layout profile any: cost none; load none; regions any; compliance none Notes: Pure library; no provider limits apply. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/table-layout/issues; updates https://github.com/clodhub/table-layout/releases (manual) What you download table-layout-0.11.0.tar, from release v0.11.0 of clodhub/table-layout: 48 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (11): android/ (3), apple/ (3), web/ (5) - Tests (12): android/ (2), apple/ (5), fake-dom.ts, fixtures/ (1), make-fixtures.ts, native.py, ... - Interface documents (3): required-controls.json, required-theme.json, table-layout.json - Class files: the class's interfaces and shared checks (3): table-layout-class/ (3) - Examples (2): consumer.ts, images.ts - Images of it as built (4): computer-6-seats-lounge.png, computer-9-seats.png, phone-portrait.png, television.png - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 11 of them into the application under components/table-layout/: android 3, apple 3, web 5 Not included: the components that provide what it requires (com.clodhub/theme, com.clodhub/controls), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.11.0 features (2026-11-26T11:33:03.423Z) sha256:d2772c5177e4311a83f667e002f748c28af532859af4f93fb5049c49b62d763d Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/table-layout/details.txt?version=0.11.0 Page: https://clodhub.com/components/table-layout; JSON: https://clodhub.com/api/components/table-layout/0.11.0; connections diagram: https://clodhub.com/api/components/table-layout/0.11.0/connections.svg Copyright Level N Ltd 2026