pkg:clod/com.clodhub/chip-graphics 0.11.0 Chip stacks for an amount in the application's denominations, and bets moving to the pot, for web, Apple and Android. `chip-graphics` turns an amount into stacks of discs and moves them. A greedy breakdown picks the largest denominations first and starts another stack after twelve chips; discs are drawn with a dashed edge and the value of the top chip; the amount is written under the pile. It also plans motion: every bet moving from in front of its owner to the pot at once, winnings moving from the pot to each winner, a bet moving from a seat to its spot (an all in being slower and larger), with the position of a pile at any moment of a flight. The denominations and their colours are settings, so a game of tokens worth 100, 20, 5 and 1 uses the same code as a casino set. It draws no cards and knows no game rules. Examples A hand of 1,337 chips shows as one orange 1k chip, three black 100s, a green 25, two red 5s and two grey 1s; a call sends the caller's chips from their seat to the bet spot; at the end of a betting round every bet sweeps into the pot together; a winner's share flies from the pot to their stack; a game of tokens worth 100, 20, 5 and 1 shows blue 100 chips; a raise to everything is slower, larger and glows. Package URL: pkg:clod/com.clodhub/chip-graphics@0.11.0 Class: Chip graphics (pkg:clod/com.clodhub/chip-graphics-class@1.1.0): Chip stacks in denominations and chips flying between bets and the pot. Any component of this class can fill a recipe slot that asks for it. Category games/chips-and-scoring; https://clodhub.com/classes/chip-graphics-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fchip-graphics-class Provides (1) - chip-graphics (com.clodhub/chip-graphics 1.0.0): Chip piles for an amount in the application's denominations, and bets moving to the pot and winnings moving to winners. Web: implementation/web/chip-model.ts, chips.ts and chips.css (reads the theme's --primary). Apple: ChipModel and the SwiftUI views ChipPile and ChipFlightLayer. Android: ChipModel and the Compose functions ChipPile and ChipFlightLayer in package com.clodhub.chips. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fchip-graphics Requires (1) - 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 Settings (2) `denominations`: the chip values, written as an optional name then whole numbers separated by spaces, always including 1 so every amount can be made: `casino 5000 1000 500 100 25 5 1` (default) or `tokens 100 20 5 1`. A clod string setting may hold only letters, digits, spaces and hyphens, so the list cannot use commas; code may also pass an array. `chipColours`: the name of a colour set then optional `denomination-rrggbb` entries: `casino` (default) uses the casino colours, `mine 1000-e07b2a 25-2e8b57` overrides two; a denomination without an entry keeps its casino colour, or gets a spare colour if the casino set has none for it; ink is chosen to read on the disc. The amount label's border is the theme's primary colour. - denominations: string (label); optional, default "casino 5000 1000 500 100 25 5 1" - chipColours: string (label); optional, default "casino" Depends on components: none How to use in a recipe A recipe uses it through a slot of class Chip graphics (pkg:clod/com.clodhub/chip-graphics-class 1.1.0), naming pkg:clod/com.clodhub/chip-graphics as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (chip-graphics) to the slots that use it. It fills what the component needs (theme) from slots whose components provide it. The recipe sets denominations and chipColours; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"chip-graphics","class":{"name":"pkg:clod/com.clodhub/chip-graphics-class","version":"1.1.0","digest":"836c8a803d10169590ad0c8e771f36ce449b8f5f94daf2d46670819a61738d33"},"preferred":{"name":"pkg:clod/com.clodhub/chip-graphics","version":"0.11.0"}} - in place of another component of the class: clod fetch chip-graphics@0.11.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=chip-graphics@0.11.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot chip-graphics) For developers: how an application uses it Web: link `web/chips.css`; call `pileEl(amount, { settings: { denominations, chipColours }, size, label, format })`; plan motion with `sweepToPot`, `awardPot` and `betFlight` using spots from the `table-layout` component, and play it with `launchFlights(container, flights, { project })`, where `project` turns a spot (a fraction of the table) into pixels. Apple: compile `ChipModel.swift` anywhere and `ChipViews.swift` in UIKit targets with the theme's Swift files; `ChipStyle(denominations:chipColours:)` once near the root with `.chipStyle(...)`; use `ChipPile` and `ChipFlightLayer`. Android: add `ChipModel.kt` and `ChipViews.kt` to a Compose module with the theme's Kotlin files and provide `LocalChipStyle`. Seat positions, the pot spot, the decision of when to sweep and what the amounts mean are the application's. Accounts and services None. Local drawing only; no accounts, network or deployment. How it is checked Node tests check the breakdown (largest first, adding back to the amount for many amounts, twelve to a stack, other denomination sets and a missing 1 refused), the settings grammar, colours (casino, overrides, spare colours, readable ink), pile layout (stack spacing, lift, which chips carry a value), short value text, the DOM of `pileEl`, and flights (sweep, award, the rise of a bet, an all in being slower, easing, landing order) including launching real timed flights against a stand-in page and cancelling them, and that the OpenRPC interface's setting patterns accept and refuse what the parsers do, its limits and flight shape match the code, and every method it lists is an exported web function. The Apple check compiles and runs `tests/apple/main.swift` for macOS, comparing 36 breakdowns over three denomination sets, pile layouts, colours and flights with the TypeScript output, then type-checks all Swift with the theme's against the iOS simulator SDK. The Android check compares the same breakdowns and layouts (`tests/android/Expected.kt`); kotlinc was not available where this was written, so it has not been run, and `ChipViews.kt` (Compose) is only compiled by the application's Gradle build. Pixels are not compared. - `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: chip, chips-and-scoring, games, graphics Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/chip-graphics release v0.11.0; digest sha256:0f493ec114a4a4fa410a094b0b5fd84e2a1ff719b0b5b510204578a50618d302 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/chip-graphics/0.11.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Images (4): https://clodhub.com/images/74f8b4ecc1727631a58cbbd8830dae58fff81331d6428d921ee188bf3c1c9694.png (web, Piles for 25, 380, 2,450, 12,800 and 47,615 chips in casino denominations, night look); https://clodhub.com/images/ddc7acf8afae5c6ccfeb08dd4f383b44b03bccb361293a3071e46e9300cda59f.png (web, The same piles in the lounge look); https://clodhub.com/images/2dd7de25b7260f053168be85ed7d2fa01b9892058b8424546194b201e09e7f60.png (web, A token set of 100, 20, 5 and 1 with a blue 100, as a non-casino game would set it); https://clodhub.com/images/4cd7f5e9a557b2ee2f22843d24aad8a4dae669c3c436c679d5bb8d9456392e14.png (web, Four bets half way into the pot, at the positions the flight model gives) Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/chip-graphics/0.11.0 Bundle download: GET https://clodhub.com/api/components/chip-graphics/0.11.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/chip-graphics-class@1.1.0 836c8a803d10169590ad0c8e771f36ce449b8f5f94daf2d46670819a61738d33 com.clodhub/chip-graphics 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, 44 files (listed on the details page) Suitable for jobs: chip-graphics 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/chip-graphics/issues; updates https://github.com/clodhub/chip-graphics/releases (manual) What you download chip-graphics-0.11.0.tar, from release v0.11.0 of clodhub/chip-graphics: 44 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (8): android/ (2), apple/ (2), web/ (4) - Tests (12): android/ (2), apple/ (5), fake-dom.ts, fixtures/ (1), make-fixtures.ts, native.py, ... - Interface documents (2): chip-graphics.json, required-theme.json - Class files: the class's interfaces and shared checks (3): chip-graphics-class/ (3) - Examples (2): consumer.ts, images.ts - Images of it as built (4): piles-lounge.png, piles-night.png, sweep-to-pot.png, token-set.png - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 8 of them into the application under components/chip-graphics/: android 2, apple 2, web 4 Not included: the components that provide what it requires (com.clodhub/theme), 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:25:12.962Z) sha256:0f493ec114a4a4fa410a094b0b5fd84e2a1ff719b0b5b510204578a50618d302 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/chip-graphics/details.txt?version=0.11.0 Page: https://clodhub.com/components/chip-graphics; JSON: https://clodhub.com/api/components/chip-graphics/0.11.0; connections diagram: https://clodhub.com/api/components/chip-graphics/0.11.0/connections.svg Copyright Level N Ltd 2026