@usableapp/cardds 0.7.145 → 0.7.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,8 +13,8 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
13
13
  bare?: boolean;
14
14
  /** the inline size: a stamp beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one `Chip xs` tall (`--stamp-xs-size`). Always bare and flat: only the thin contact shadow every stamp has. Several, lapped with a "+8": `AvatarStack more` */
15
15
  xs?: boolean;
16
- /** the paper's edge: `'perforated'` (default) the punched teeth, `'plain'` a smooth rectangle of paper with no teeth — the same 4:5 size and shadow, at every size and in every holder */
17
- edge?: 'perforated' | 'plain';
16
+ /** the white paper frame between the teeth and the picture: `true` (default) the paper's band round the picture, `false` none — the tone fills the paper right out to the teeth. The teeth, the 4:5 size, the shadow, the pictures and the words stay, at every size and in every holder */
17
+ frame?: boolean;
18
18
  /** kept back: the stamp keeps its box and draws nothing, hidden from screen readers too — until the app is ready to show it; when this turns false it appears in the same box, so nothing beside it moves */
19
19
  held?: boolean;
20
20
  /** in a `Head`: the words keep no room for the stamp — they run the head's whole width and lie OVER it, the stamp in its place and size at the right under them (a long title that would wrap in the column beside it). Never hides a word */
@@ -29,7 +29,7 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
29
29
  onArrived?: () => void;
30
30
  }
31
31
  /**
32
- * Stamp — a paper stamp, 4:5, perforated (or `edge="plain"`): the pictures fill the inner frame on a tone, the words sit on the picture's foot.
32
+ * Stamp — a paper stamp, 4:5, always perforated: the pictures fill the inner frame on a tone (`frame={false}`: no white frame, the tone runs out to the teeth), the words sit on the picture's foot.
33
33
  * Every stamp is ONE size wherever it stands (`--stamp-size`, two taps wide: 96 × 120) — what holds it only places it; a holder narrower than that shows it whole, smaller.
34
34
  * The one small stamp is a stamp stuck on something (`StampOn`); `xs` is the inline one, beside a status line's words. Every inner length follows the stamp's width.
35
35
  * The outer box holds the size and the shadow; the paper inside is the one whose edge is punched (a mask would cut the shadow too).
@@ -38,7 +38,7 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
38
38
  * the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
39
39
  * a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
40
40
  */
41
- export declare function Stamp({ pictures, tone, name, words, bare, xs, edge, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
41
+ export declare function Stamp({ pictures, tone, name, words, bare, xs, frame, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
42
42
  export interface StampPlaceProps extends Omit<ComponentProps<'span'>, 'onClick'> {
43
43
  /** a gap nobody is asked to fill: a paler edge (an album's free places) */
44
44
  faint?: boolean;
@@ -3,7 +3,7 @@ import { cx } from '../cx.js';
3
3
  import { pressable } from '../pressable.js';
4
4
  import { useStrike } from './useStrike.js';
5
5
  /**
6
- * Stamp — a paper stamp, 4:5, perforated (or `edge="plain"`): the pictures fill the inner frame on a tone, the words sit on the picture's foot.
6
+ * Stamp — a paper stamp, 4:5, always perforated: the pictures fill the inner frame on a tone (`frame={false}`: no white frame, the tone runs out to the teeth), the words sit on the picture's foot.
7
7
  * Every stamp is ONE size wherever it stands (`--stamp-size`, two taps wide: 96 × 120) — what holds it only places it; a holder narrower than that shows it whole, smaller.
8
8
  * The one small stamp is a stamp stuck on something (`StampOn`); `xs` is the inline one, beside a status line's words. Every inner length follows the stamp's width.
9
9
  * The outer box holds the size and the shadow; the paper inside is the one whose edge is punched (a mask would cut the shadow too).
@@ -12,11 +12,11 @@ import { useStrike } from './useStrike.js';
12
12
  * the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
13
13
  * a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
14
14
  */
15
- export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, edge, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
15
+ export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, frame = true, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
16
16
  const shown = pictures.slice(0, 4);
17
17
  const { struck } = useStrike(arrive, onArrived, onAnimationEnd);
18
18
  const { tap, Box, boxProps } = pressable(onClick, 'span', rest);
19
- return (_jsx(Box, { className: cx('stamp', `stamp--${shown.length}`, bare && 'stamp--bare', xs && 'stamp--xs', edge === 'plain' && 'stamp--plain', held && 'stamp--held', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, "aria-hidden": held || undefined, ...boxProps, children: _jsx("span", { className: "stamp__paper", children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) }) }));
19
+ return (_jsx(Box, { className: cx('stamp', `stamp--${shown.length}`, bare && 'stamp--bare', xs && 'stamp--xs', !frame && 'stamp--frameless', held && 'stamp--held', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, "aria-hidden": held || undefined, ...boxProps, children: _jsx("span", { className: cx('stamp__paper', !frame && `sticky--${tone}`), children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) }) }));
20
20
  }
21
21
  /**
22
22
  * StampPlace — an empty place for a stamp: a 4:5 frame of round dots the size a Stamp is (`--stamp-size`), a word or an Icon inside.
package/docs/reference.md CHANGED
@@ -844,7 +844,7 @@ ground of my own stamp.
844
844
  A stamp is a small paper picture a member keeps and sticks on a note or a postcard for a neighbour. Sending never uses
845
845
  it up. cardds draws the paper; the pictures, their words and which stamp a member owns are the app's.
846
846
 
847
- - **`Stamp`** — a perforated 4:5 stamp; `edge="plain"` is a smooth rectangle of paper with no teeth, the same size and shadow, wherever a stamp goes (`xs`, `tilt`, `arrive`, `onClick`, a `StampOn`, a `StampBook`, an `AvatarStack`). `pictures` is one to four nodes, the app's own art (an svg, an img), in placement
847
+ - **`Stamp`** — a perforated 4:5 stamp, always with teeth; `frame={false}` drops the white paper frame round the picture, so the tone runs out to the teeth (the same size, shadow and words), wherever a stamp goes (`xs`, `tilt`, `arrive`, `onClick`, a `StampOn`, a `StampBook`, an `AvatarStack`). `pictures` is one to four nodes, the app's own art (an svg, an img), in placement
848
848
  order: the stamp places, sizes and turns them by how many there are. `tone` is the ground, one of `STICKY_TONES` (the
849
849
  same list and the same `--sticky-<tone>-bg` knobs as a note's paper). `name` is the big line on the picture's foot,
850
850
  `words` the small line above it. `tilt` turns it, `onClick` makes the whole stamp a button. Every inner length follows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.145",
3
+ "version": "0.7.146",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev).",