@lotics/ui 38.0.0 → 38.1.0

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/AGENTS.md CHANGED
@@ -118,9 +118,10 @@ CURRENT major only — upgrading an app across majors is `MIGRATION.md`.
118
118
  anyway. Use `FileRow` / `FileRows`, where the full name is the row and a second line can
119
119
  carry a date, a size, a status, a diff. Photos, scans and drawings are identified by their
120
120
  CONTENT — the filename is `IMG_4471.jpg` and tells nobody anything — so use
121
- `FileThumbnailGrid`, where the picture is the identity and many fit on one screen. A mixed
122
- set follows its majority; an app whose attachments are overwhelmingly paperwork should not
123
- pay a grid's wasted space for the occasional photo.
121
+ `FileThumbnailGrid`, where the picture is the identity and many fit on one screen. **A mixed
122
+ set follows its MAJORITY, and that one surface holds the whole set — never split a pile by
123
+ file type** the cost lands on the minority by design, not on the reader, who would otherwise
124
+ get two places to look for one thing.
124
125
  → [catalog.md](./docs/catalog.md).
125
126
  - **A reference to another record is a FIELD** — it wears the inline editor's own resting
126
127
  surface and PEEKS its facts on press; EVERY verb lives in the peek's footer as a `Button`,
package/docs/catalog.md CHANGED
@@ -286,6 +286,21 @@ says the read succeeded and found nothing, a failed read knows neither.
286
286
 
287
287
  ### Files
288
288
 
289
+ **Pick the surface FIRST, and pick exactly one per set.** Documents get a LIST (`FileRows`),
290
+ images get a GRID (`FileThumbnailGrid`) — the discriminator is what identifies the file to the
291
+ person hunting for it: a PDF's thumbnail is a grey page identical to every other grey page, so
292
+ its NAME is the identity; a photo's filename is `IMG_4471.jpg` and tells nobody anything, so its
293
+ CONTENT is. **A mixed pile follows its majority and stays whole.** Sorting one pile by mime type
294
+ into a list *and* a grid is the mistake — it gives the reader two places to look for the same
295
+ thing. The minority is not stranded by this: a non-image tile in a grid renders a `DocumentCard`
296
+ printing its filename, and a photo in a list keeps its full name plus a meta line and is ONE tap
297
+ from the picture, because a `FileRows` row press opens the built-in gallery. (The badge is
298
+ MIME-driven, so that row shows a generic image mark, not the shot itself — which is the cost the
299
+ majority already decided to pay.) A screen showing BOTH surfaces (`tpl_record`) does
300
+ so because it holds two distinct SETS the reader asks different questions of — the paperwork
301
+ that arrived on the record, and the hand-over photos taken against it — not because one set was
302
+ split by type.
303
+
289
304
  `FilesEditor` (THE attachment surface: an upload-aware grid whose bar you COMPOSE — the root
290
305
  owns selection + gallery + confirmed remove, the bar pieces and any HOST verb go below it via
291
306
  `useFilesEditorSelection`),
@@ -2683,7 +2683,7 @@ export function TplRecord({ chrome = "page", code = "RC-2026-0418", openSection
2683
2683
  </Section>
2684
2684
  </View>
2685
2685
 
2686
- {/* PHOTOS — the same collection, the other SURFACE.
2686
+ {/* PHOTOS — a second SET, and therefore the other SURFACE.
2687
2687
 
2688
2688
  Files above is a row LIST because a shipping document is identified by
2689
2689
  its NAME: a PDF thumbnail is a grey page identical to every other grey
@@ -2693,6 +2693,17 @@ export function TplRecord({ chrome = "page", code = "RC-2026-0418", openSection
2693
2693
  same verbs, different surface, decided by what the reader recognises.
2694
2694
  (AGENTS.md: documents get a LIST, images get a GRID.)
2695
2695
 
2696
+ READ THIS BEFORE COPYING THE SHAPE. Two sections here does NOT mean
2697
+ "sort one pile by mime type into a list and a grid". This record holds
2698
+ two distinct SETS — the paperwork that arrived on it, and the hand-over
2699
+ photos taken against it — which the reader asks different questions of.
2700
+ A SINGLE pile picks ONE surface by its majority and keeps it: the odd
2701
+ .docx among forty phone photos stays in the grid, where it renders a
2702
+ `DocumentCard` printing its filename, and the odd photo among forty
2703
+ PDFs stays in the list, where its row carries the full name and a press
2704
+ opens the gallery. Splitting one set by type would give the reader two
2705
+ places to look for the same thing.
2706
+
2696
2707
  The ADD rides the heading row, right edge, exactly as it does on Files
2697
2708
  and Fees — a section's add sits in the same spot whether the section
2698
2709
  holds nought or forty. Note it is a plain `Button` + `pickFiles`, not
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/ui",
3
- "version": "38.0.0",
3
+ "version": "38.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./vite": {