@usableapp/cardds 0.7.149 → 0.7.150
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.
- package/CHANGELOG.md +9 -0
- package/css/forms.css +17 -0
- package/dist/cardds.css +17 -0
- package/dist/catalog.json +1 -1
- package/dist/forms/Composer.d.ts +8 -3
- package/dist/forms/Composer.js +15 -3
- package/dist/forms/MessageBar.d.ts +10 -3
- package/dist/forms/MessageBar.js +13 -4
- package/dist/forms/mention.d.ts +22 -0
- package/dist/forms/mention.js +82 -0
- package/dist/index.d.ts +1 -0
- package/docs/reference.md +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
> For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
|
|
4
4
|
|
|
5
|
+
## 0.7.150 — 2026-10-26
|
|
6
|
+
|
|
7
|
+
Name a neighbour with `@` in a comment or a post: `MessageBar` and `Composer` take `people` + `onMention`.
|
|
8
|
+
|
|
9
|
+
Components: MessageBar, Composer
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`people` + `onMention` on `MessageBar` and `Composer`** (the timebank neighbourhood feed: a comment that names a neighbour). Before → after: `@` was a letter; an app that wanted mentions laid a row of `ChipPick`s under the box that added `@name` by hand → with `people={[{ id, name, src? }]}` typing `@` and letters right before the caret lists the people whose name holds them (above a MessageBar's box, under a Composer's words; an inline `.menu`, 48px rows with an `Avatar sm`); a pick writes `@name ` in their place (the usual `onValueChange` / `onChange` comes first) and hands the person to `onMention(person)`. A written name is one piece: a soft mark under it (knob `--mention-bg`, default `--accent-soft`) and one backspace right after it takes the whole name. The words stay plain text with `@name` in them; who to notify is the app's. New type export `MentionPerson`. Without `people`, nothing changes. Stories `MessageBar · Mentions`, `Composer · Mentions`.
|
|
13
|
+
|
|
5
14
|
## 0.7.149 — 2026-10-26
|
|
6
15
|
|
|
7
16
|
A frameless stamp's teeth read on any tone: a thin paper rim parts its colour from the shadow.
|
package/css/forms.css
CHANGED
|
@@ -133,6 +133,23 @@
|
|
|
133
133
|
caret-color: currentColor;
|
|
134
134
|
}
|
|
135
135
|
.message-bar__input::placeholder { color: inherit; opacity: var(--fade-hint); }
|
|
136
|
+
/* ---- naming with @ (MessageBar / Composer `people`): the list of matching people, and the marks under the words ----
|
|
137
|
+
<div class="menu mention-list" role="listbox"><button class="menu__item" role="option"><span class="avatar avatar--sm">N</span>Noi</button>…</div>
|
|
138
|
+
The list is an inline .menu (layover.css) in the flow: above a MessageBar's row, under a Composer's words — never a popover, so
|
|
139
|
+
it rides with the bar above the keyboard. A written name is one piece: .mention-under is a copy of the words in the textarea's
|
|
140
|
+
own cell and class (same font, padding, wrap), its ink clear, drawn BEHIND the transparent textarea; only the names' marks show. */
|
|
141
|
+
.mention-list { flex: 0 0 100%; order: -1; max-height: calc(var(--tap) * 4.5); /* the fifth name shows half: the list scrolls */ }
|
|
142
|
+
.message-bar:has(> .mention-list) { flex-wrap: wrap; }
|
|
143
|
+
.mention-box { display: grid; }
|
|
144
|
+
.mention-box > * { grid-area: 1 / 1; }
|
|
145
|
+
.mention-under {
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
color: transparent;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
white-space: pre-wrap;
|
|
150
|
+
overflow-wrap: anywhere;
|
|
151
|
+
}
|
|
152
|
+
.mention-under__name { border-radius: var(--r-badge); background: var(--mention-bg, var(--accent-soft)); color: transparent; }
|
|
136
153
|
/* the Screen's BOTTOM: in a .screen--fill a layer over the content's foot, as the .action-bar is (actions.css) — Screen measures it
|
|
137
154
|
into --bottom-h, so a Page's last words scroll clear; on a scrolling screen its sticky last row. Both ride above the keyboard (--kb) */
|
|
138
155
|
.screen--fill > .message-bar { position: absolute; inset-inline: 0; bottom: var(--kb, 0rem); z-index: var(--z-bar); }
|
package/dist/cardds.css
CHANGED
|
@@ -2672,6 +2672,23 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2672
2672
|
caret-color: currentColor;
|
|
2673
2673
|
}
|
|
2674
2674
|
.message-bar__input::placeholder { color: inherit; opacity: var(--fade-hint); }
|
|
2675
|
+
/* ---- naming with @ (MessageBar / Composer `people`): the list of matching people, and the marks under the words ----
|
|
2676
|
+
<div class="menu mention-list" role="listbox"><button class="menu__item" role="option"><span class="avatar avatar--sm">N</span>Noi</button>…</div>
|
|
2677
|
+
The list is an inline .menu (layover.css) in the flow: above a MessageBar's row, under a Composer's words — never a popover, so
|
|
2678
|
+
it rides with the bar above the keyboard. A written name is one piece: .mention-under is a copy of the words in the textarea's
|
|
2679
|
+
own cell and class (same font, padding, wrap), its ink clear, drawn BEHIND the transparent textarea; only the names' marks show. */
|
|
2680
|
+
.mention-list { flex: 0 0 100%; order: -1; max-height: calc(var(--tap) * 4.5); /* the fifth name shows half: the list scrolls */ }
|
|
2681
|
+
.message-bar:has(> .mention-list) { flex-wrap: wrap; }
|
|
2682
|
+
.mention-box { display: grid; }
|
|
2683
|
+
.mention-box > * { grid-area: 1 / 1; }
|
|
2684
|
+
.mention-under {
|
|
2685
|
+
overflow: hidden;
|
|
2686
|
+
color: transparent;
|
|
2687
|
+
pointer-events: none;
|
|
2688
|
+
white-space: pre-wrap;
|
|
2689
|
+
overflow-wrap: anywhere;
|
|
2690
|
+
}
|
|
2691
|
+
.mention-under__name { border-radius: var(--r-badge); background: var(--mention-bg, var(--accent-soft)); color: transparent; }
|
|
2675
2692
|
/* the Screen's BOTTOM: in a .screen--fill a layer over the content's foot, as the .action-bar is (actions.css) — Screen measures it
|
|
2676
2693
|
into --bottom-h, so a Page's last words scroll clear; on a scrolling screen its sticky last row. Both ride above the keyboard (--kb) */
|
|
2677
2694
|
.screen--fill > .message-bar { position: absolute; inset-inline: 0; bottom: var(--kb, 0rem); z-index: var(--z-bar); }
|