@starci/eslint-grammar-core 0.51.1 → 0.52.1
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.52.1 - 2026-11-21
|
|
4
|
+
|
|
5
|
+
- Changed: cut with @starci/hfs 6.17.0 and the Grammar family 0.52.1; requires @starci/hfs ~6.17.0 (no rule change).
|
|
6
|
+
|
|
7
|
+
## 0.52.0 - 2026-11-20
|
|
8
|
+
|
|
9
|
+
- Changed: cut with @starci/hfs 6.16.0; requires @starci/hfs ~6.16.0.
|
|
10
|
+
- Changed (`message-surfaces`): the messages and the bundled MESSAGE-SURFACES law say others' messages are outlined with no fill (Grammar 0.52.0, DNA-COMMON-CHAT-INCOMING-OUTLINE), not the flat `--surface`. What the rule flags is unchanged. Requires @starci/hfs ~6.14.0.
|
|
11
|
+
|
|
3
12
|
## 0.51.1 - 2026-11-20
|
|
4
13
|
|
|
5
14
|
- Changed: cut with @starci/hfs 6.15.0; requires @starci/hfs ~6.15.0. The specs follow the template renames of hfs 6.15.0 (no lint rule change).
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ rules (nested control variants, panel-list alignment, layout-only CSS) stay in t
|
|
|
26
26
|
`surface-card-list` (0.43.0, LIST-ONE-LOOK: a list is `Section kind="list"` of `ListRow`s, flat rows aligned with the title, never `SurfaceCard kind="list"`; `docs/surface-card-list.md`).
|
|
27
27
|
`card-is-object` (0.45.0, CARD-OBJECT: a card is one object; a card whose only content is a table, a list, facts, disclosures, a form, a field, an empty notice, markdown or a chart is refused, the message names the flat `Section` form; `docs/card-is-object.md`).
|
|
28
28
|
`data-table-surface` (0.45.0: a `DataTable` has one flat look, its `surface` prop is refused and removed by the fix; `docs/data-table-surface.md`).
|
|
29
|
-
`message-surfaces` (0.37.31: every chat draws Grammar's faces, the thread `--background`, others' messages
|
|
29
|
+
`message-surfaces` (0.37.31: every chat draws Grammar's faces, the thread `--background`, others' messages outlined with no fill (0.52.0), your own `--accent`; no class or style on `MessageBubble`/`MessageCard`, no class string reaching a message part, no `tone: "surface"` on a `role: "log"` thread; `docs/message-surfaces.md`).
|
|
30
30
|
The proximity and composition laws of 2026-11-09 each have a doc: `gap-proximity` (a layout element stands at least one gap step closer than its layout parent), `field-label` (a control is labelled by its own `label` prop), `surface-in-surface` (a hand-made divided row list in a surface is `Section kind="list"`) `card-is-object` (a card is one object, never a lone collection) and `page-breadcrumbs` (a console `Page` header states `breadcrumbs`, or `"root"`).
|
|
31
31
|
|
|
32
32
|
## Migrating from @starci/eslint-canon-fe 8.x
|
package/dist/lib/why.js
CHANGED
|
@@ -272,7 +272,7 @@ export const why = {
|
|
|
272
272
|
"message-surfaces": {
|
|
273
273
|
code: "FE_MESSAGE_SURFACES",
|
|
274
274
|
en: "`<file>` restyles a chat face: a class or style on MessageBubble or MessageCard, a class string reaching into a Grammar message part, a chat thread asked for the surface tone, or a chat frame (`Pane content=\"chat\"`, a Pane holding a log thread) given `surface`.",
|
|
275
|
-
fix: "Remove the override: the chat frame (head, thread, composer) is `--background` (`Pane content=\"chat\"`, no `surface`, DNA-COMMON-CHAT-FRAME), others' messages the
|
|
275
|
+
fix: "Remove the override: the chat frame (head, thread, composer) is `--background` (`Pane content=\"chat\"`, no `surface`, DNA-COMMON-CHAT-FRAME), others' messages outlined (the 1px `--border` edge, no fill), your own `--accent` (DNA-COMMON-CHAT-SURFACES); a message card's replies are `Section kind=\"list\" layout=\"suggestions\"`.",
|
|
276
276
|
},
|
|
277
277
|
"suggestion-buttons": {
|
|
278
278
|
code: "FE_SUGGESTION_BUTTONS",
|
package/dist/message-surfaces.js
CHANGED
|
@@ -3,8 +3,8 @@ import { defineFamilyRules, defineRule } from "./lib/rule-contract.js";
|
|
|
3
3
|
import { attributeOf, elementOf, grammarBindings, keyName, propertyOf } from "./lib/row-context.js";
|
|
4
4
|
/**
|
|
5
5
|
* The chat surfaces law (`FE_MESSAGE_SURFACES`, Grammar 0.37.31, DNA-COMMON-CHAT-SURFACES): every chat draws the same three faces, and they are Grammar's
|
|
6
|
-
* alone. The thread is the page tone (`--background`), a message of someone else (`MessageBubble` incoming, `MessageCard`) is
|
|
7
|
-
* no shadow), the reader's own message is `--accent` with `--accent-foreground`. An app never restyles them. The law flags, in cheap static shapes only:
|
|
6
|
+
* alone. The thread is the page tone (`--background`), a message of someone else (`MessageBubble` incoming, `MessageCard`) is one outlined look (0.52.0: the
|
|
7
|
+
* 1px `--border` edge, no fill, no shadow), the reader's own message is `--accent` with `--accent-foreground`. An app never restyles them. The law flags, in cheap static shapes only:
|
|
8
8
|
* - a `className`, `class`, `style` or `UNSAFE_className` attribute on a Grammar `MessageBubble` or `MessageCard` (their props carry none; a cast or a
|
|
9
9
|
* spread that smuggles one past the type is still a restyle);
|
|
10
10
|
* - a static class string or a style key in product source that names a Grammar message part (`starci-core-message-bubble…`, `starci-core-message-card…`):
|
|
@@ -64,7 +64,7 @@ export const messageSurfaces = defineRule({
|
|
|
64
64
|
docs: { description: "FE_MESSAGE_SURFACES: chat bubbles, message cards and the thread ground are Grammar's faces; an app never restyles them." },
|
|
65
65
|
schema: [],
|
|
66
66
|
messages: {
|
|
67
|
-
attribute: "`{{component}}` takes no `{{attribute}}`: every chat draws the same faces (the thread on `--background`, others' messages
|
|
67
|
+
attribute: "`{{component}}` takes no `{{attribute}}`: every chat draws the same faces (the thread on `--background`, others' messages outlined with no fill, your own `--accent`). Remove it.",
|
|
68
68
|
part: "This class or style reaches into a Grammar message part (`{{part}}`). Chat faces are Grammar's (DNA-COMMON-CHAT-SURFACES); remove the override.",
|
|
69
69
|
tone: "A chat thread (`scroll.role: \"log\"`) is always the page tone; `tone: \"surface\"` is ignored. Remove `tone`.",
|
|
70
70
|
frame: "A chat frame (`Pane content=\"chat\"`, or a Pane that holds a `scroll.role: \"log\"` thread) is `--background` wherever it stands (DNA-COMMON-CHAT-FRAME); `surface` is ignored there. Remove `surface` and give the pane `content=\"chat\"`.",
|
package/docs/message-surfaces.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Law module: `message-surfaces.ts`. Finding code: `FE_MESSAGE_SURFACES`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#MESSAGE-SURFACES`. Grammar laws: `DNA-COMMON-CHAT-SURFACES` (0.37.31), `DNA-COMMON-CHAT-FRAME` (0.37.33).
|
|
4
4
|
|
|
5
|
-
Every chat (team chat, an agent's chat, an inbox thread, the assistant) draws the same three faces, and they belong to the Grammar: the thread is the page tone (`--background`; a `PaneSection scroll role="log"` paints it whatever `tone` says), a message of someone else (`MessageBubble` incoming, `MessageCard`) is the
|
|
5
|
+
Every chat (team chat, an agent's chat, an inbox thread, the assistant) draws the same three faces, and they belong to the Grammar: the thread is the page tone (`--background`; a `PaneSection scroll role="log"` paints it whatever `tone` says), a message of someone else (`MessageBubble` incoming, `MessageCard`) is one outlined look on every host (0.52.0: the 1px `--border` edge, no fill, no shadow), and the reader's own message is `--accent` with `--accent-foreground`. The replies a message card offers are `Section kind="list" layout="suggestions"` (one flat list, a pressable plain-text row per reply with a chevron); the pills by the composer stay `Button size="sm"` (`suggestion-buttons`).
|
|
6
6
|
|
|
7
|
-
A chat is one frame on any page (0.37.33): its head, its thread and its composer footer are `--background`, whether it stands in a white pane, the aside, a drawer, a dialog or a popover; the rest of the page keeps its own rule. The frame is a `Pane content="chat"` (a pane whose own stack holds a thread is drawn as one too); the app gives it no tone, and a message in it
|
|
7
|
+
A chat is one frame on any page (0.37.33): its head, its thread and its composer footer are `--background`, whether it stands in a white pane, the aside, a drawer, a dialog or a popover; the rest of the page keeps its own rule. The frame is a `Pane content="chat"` (a pane whose own stack holds a thread is drawn as one too); the app gives it no tone, and a message of someone else in it keeps its one outlined look.
|
|
8
8
|
|
|
9
9
|
The rule is an error in `coreGrammarConfig`; it cannot be switched off or suppressed inline.
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-grammar-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.1",
|
|
4
4
|
"description": "ESLint rules for the core Grammar's component, token and composition contracts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@starci/eslint-canon-fe": "~9.21.0",
|
|
45
|
-
"@starci/hfs": "~6.
|
|
45
|
+
"@starci/hfs": "~6.17.0",
|
|
46
46
|
"eslint": ">=9",
|
|
47
47
|
"typescript": ">=5.9"
|
|
48
48
|
},
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
69
69
|
"typescript": "^6.0.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
72
|
-
"starciSource": "
|
|
71
|
+
"gitHead": "7238a48b7e3a97e748e41d1c955bb7d3f87d8550",
|
|
72
|
+
"starciSource": "4439851bb3e94c38fe0b0aa7cb899ee7b97cbfa0db8d91a7f3bbdaba9e0a3d21"
|
|
73
73
|
}
|
|
@@ -95,7 +95,7 @@ rules:
|
|
|
95
95
|
when: A chat thread with messages is drawn (team chat, an agent's chat, an inbox thread, the assistant)
|
|
96
96
|
assert: |-
|
|
97
97
|
The thread is a `PaneSection scroll role="log"` on the page tone `--background`; a message of someone else
|
|
98
|
-
(`MessageBubble` incoming, `MessageCard`) is the
|
|
98
|
+
(`MessageBubble` incoming, `MessageCard`) is one outlined look, the 1px `--border` edge with no fill and no shadow; the reader's own
|
|
99
99
|
message is `--accent` with `--accent-foreground`. No class or style reaches a bubble, a card or the thread ground.
|
|
100
100
|
- id: case-2
|
|
101
101
|
when: A message card offers replies to send
|