@starci/hfs 4.16.3 → 4.16.5
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,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.16.5 - 2026-11-01
|
|
4
|
+
|
|
5
|
+
- Added: R354 `FE_HEADING_ABOVE_CARD` (eslint-canon-fe `no-heading-above-card`).
|
|
6
|
+
- Added: R353 `FE_TAG_GROUP_SELECTION` (eslint-canon-fe `no-selectable-tag-group`).
|
|
7
|
+
- Added: R352 `FE_COMMAND_FILLS_HEADER` (eslint-canon-fe `no-fill-command-in-header`).
|
|
8
|
+
- Added: R351 `FE_TABLE_IN_CARD` (eslint-canon-fe `no-table-in-card`) in the bundled rule catalog; R61 states the status law as the owner's pair rule.
|
|
9
|
+
- Changed: the bundled canon pins name @starci/grammar 0.20.2, eslint-grammar-core and eslint-grammar-offset-pop 0.20.2, eslint-canon-be 3.11.6, eslint-canon-fe 9.8.5, stylelint-canon 2.4.0 and hfs 4.16.5 (RELEASE_VERSION_NOT_BUMPED: the previous versions are on npm). No behaviour change.
|
|
10
|
+
|
|
11
|
+
## 4.16.4 - 2026-11-01
|
|
12
|
+
|
|
13
|
+
- Fixed: the unused-symbol value resolver no longer overflows the call stack on a recursive function that spreads its own parameter (`{ ...term, op }` in a `reset(term)` that maps itself over `term.all`): the typed-property lookup carries the resolver's visited set instead of starting a fresh one, so the cycle ends at the first repeated node (`starci app check` crashed with "Maximum call stack size exceeded" in the hfs structure step).
|
|
14
|
+
- Changed: the bundled canon pins name @starci/grammar 0.20.1, eslint-grammar-core and eslint-grammar-offset-pop 0.20.1, eslint-canon-be 3.11.5, eslint-canon-fe 9.8.4 and hfs 4.16.4.
|
|
15
|
+
|
|
3
16
|
## 4.16.3 - 2026-11-01
|
|
4
17
|
|
|
5
18
|
- Changed: the bundled canon pins name hfs 4.16.3, @starci/grammar 0.20.0, eslint-canon-be 3.11.4, eslint-canon-fe 9.8.3 and eslint-grammar-core and eslint-grammar-offset-pop 0.20.0 (RELEASE_VERSION_NOT_BUMPED: 4.16.2 is on npm).
|
package/package.json
CHANGED
|
@@ -31,35 +31,35 @@ pins:
|
|
|
31
31
|
source: packages/event-stream/package.json
|
|
32
32
|
why: 'the one server-sent-events client of every front end (fe-stack event-stream, owner:event-stream-package): the transport client layer (modules/api/sse/clients) creates one instance for the app with the bearer token source and the stream operations follow on it; it carries Last-Event-ID resume, the capped doubling backoff, the heartbeat timeout, the single 401 renewal and the useSWRSubscription adapter, so no app keeps a hand-written reader.'
|
|
33
33
|
'@starci/grammar':
|
|
34
|
-
version: 0.20.
|
|
34
|
+
version: 0.20.2
|
|
35
35
|
group: starci
|
|
36
36
|
install: registry
|
|
37
37
|
side: fe
|
|
38
38
|
source: packages/grammar/package.json
|
|
39
39
|
why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
|
|
40
40
|
'@starci/eslint-canon-be':
|
|
41
|
-
version: 3.11.
|
|
41
|
+
version: 3.11.6
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: be
|
|
45
45
|
source: packages/eslint-canon-be/package.json
|
|
46
46
|
why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
|
|
47
47
|
'@starci/eslint-canon-fe':
|
|
48
|
-
version: 9.8.
|
|
48
|
+
version: 9.8.5
|
|
49
49
|
group: starci
|
|
50
50
|
install: registry
|
|
51
51
|
side: fe
|
|
52
52
|
source: packages/eslint-canon-fe/package.json
|
|
53
53
|
why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
|
|
54
54
|
'@starci/eslint-grammar-core':
|
|
55
|
-
version: 0.20.
|
|
55
|
+
version: 0.20.2
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: fe
|
|
59
59
|
source: packages/eslint-grammar-core/package.json
|
|
60
60
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
61
61
|
'@starci/eslint-grammar-offset-pop':
|
|
62
|
-
version: 0.20.
|
|
62
|
+
version: 0.20.2
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
@@ -106,7 +106,7 @@ pins:
|
|
|
106
106
|
source: packages/ai-router/package.json
|
|
107
107
|
why: 'the AI pool router of a back end: a NestJS module that routes OpenAI-compatible chat, stream and embeddings calls across keys, models and providers, with @starci/ai-router/testing for its specs; @starci/jest-preset compiles it as an ESM-only dependency.'
|
|
108
108
|
'@starci/hfs':
|
|
109
|
-
version: 4.16.
|
|
109
|
+
version: 4.16.5
|
|
110
110
|
group: starci
|
|
111
111
|
install: registry
|
|
112
112
|
side: both
|
|
@@ -1253,7 +1253,7 @@ rules:
|
|
|
1253
1253
|
- {path: packages/hfs/src/hfs-i18n-catalog-coverage.spec.mjs, editions: [lite, full]}
|
|
1254
1254
|
- id: R61
|
|
1255
1255
|
code: "FE_STYLE_TOKEN_ONLY"
|
|
1256
|
-
law: "Application CSS uses the selected Grammar tokens for layout and the declared brand owner for brand values; every source declaration resolves. Status foregrounds reach 3:1 against their tinted surface and page background in each theme, body text reaches 4.5:1, and
|
|
1256
|
+
law: "Application CSS uses the selected Grammar tokens for layout and the declared brand owner for brand values; every source declaration resolves. Status foregrounds reach 3:1 against their tinted surface and page background in each theme, body text reaches 4.5:1, content on a tone background uses the tone's soft pair and a mark with no background of the tone uses the tone itself. The selected Grammar owns the concrete token pairs, typography, scale and visual values."
|
|
1257
1257
|
docs: [knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP, packages/stylelint/README.md, packages/eslint/fe/docs/brand-values.md, docs/source-process.md#the-test-ladder, knowledge/hfs/rules.yaml#R225]
|
|
1258
1258
|
kinds: [lint, design]
|
|
1259
1259
|
gates: [pre-commit, settle, land, ci]
|
|
@@ -6208,3 +6208,95 @@ rules:
|
|
|
6208
6208
|
source: owner
|
|
6209
6209
|
quote: "hay full 3 bỏ 4 đi!!! thầy nghĩ nên v"
|
|
6210
6210
|
ruling: "One spacing scale with no 16; every container holds its content 12 in, and an app names relations through role props, never spacing utilities."
|
|
6211
|
+
- id: R351
|
|
6212
|
+
code: "FE_TABLE_IN_CARD"
|
|
6213
|
+
law: "A DataTable is not placed inside a SurfaceCard, on the page or in a pane: plain rows with a few facts are a SurfaceListCard with the label outside and the note in its footer, and a table that belongs to a card is an owner decision named in this rule. The rule reads the JSX of the file: a DataTable enclosed by a SurfaceCard element, or rendered by a component of the same file that a SurfaceCard encloses."
|
|
6214
|
+
kinds: [lint]
|
|
6215
|
+
gates: [pre-commit, settle, land, ci]
|
|
6216
|
+
failureCodes: ["FE_TABLE_IN_CARD"]
|
|
6217
|
+
enforcers:
|
|
6218
|
+
- {kind: eslint-fe, id: no-table-in-card}
|
|
6219
|
+
editions: [lite, full]
|
|
6220
|
+
docs: [contexts/ui/components/list-table.md]
|
|
6221
|
+
templateNa: "A template draws no table in a card; an app adds one with its list screens."
|
|
6222
|
+
proves:
|
|
6223
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TABLE_IN_CARD]}
|
|
6224
|
+
exemplifiedBy:
|
|
6225
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TABLE_IN_CARD]}
|
|
6226
|
+
witness:
|
|
6227
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TABLE_IN_CARD]}
|
|
6228
|
+
cases:
|
|
6229
|
+
- id: case-1
|
|
6230
|
+
date: "2026-11-01"
|
|
6231
|
+
source: owner
|
|
6232
|
+
quote: "quá phức tạp mới nhét bảng vào card"
|
|
6233
|
+
ruling: "Plain rows are a SurfaceListCard with a bottom note in its footer; a DataTable is not put in a SurfaceCard."
|
|
6234
|
+
- id: R352
|
|
6235
|
+
code: "FE_COMMAND_FILLS_HEADER"
|
|
6236
|
+
law: "A page or pane command hugs its label and sits at the end of its header row: a Grammar Button with width=\"fill\" in the actions of a PageHeader or the labelEnd of a SurfaceCard or SurfaceListCard is refused; width=\"fill\" is for a form submit, an auth panel and a phone action bar, which a file cannot show and the rule does not judge."
|
|
6237
|
+
kinds: [lint]
|
|
6238
|
+
gates: [pre-commit, settle, land, ci]
|
|
6239
|
+
failureCodes: ["FE_COMMAND_FILLS_HEADER"]
|
|
6240
|
+
enforcers:
|
|
6241
|
+
- {kind: eslint-fe, id: no-fill-command-in-header}
|
|
6242
|
+
editions: [lite, full]
|
|
6243
|
+
docs: [contexts/ui/components/button.md]
|
|
6244
|
+
templateNa: "A template draws no header command with a fill width."
|
|
6245
|
+
proves:
|
|
6246
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_COMMAND_FILLS_HEADER]}
|
|
6247
|
+
exemplifiedBy:
|
|
6248
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_COMMAND_FILLS_HEADER]}
|
|
6249
|
+
witness:
|
|
6250
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_COMMAND_FILLS_HEADER]}
|
|
6251
|
+
cases:
|
|
6252
|
+
- id: case-1
|
|
6253
|
+
date: "2026-11-01"
|
|
6254
|
+
source: owner
|
|
6255
|
+
quote: "(owner order relayed by the coordinator, 2026-11-01) a page or pane command hugs its label and sits at the end of its header row; Button width=fill is only for a form submit, an auth panel, or a phone action bar"
|
|
6256
|
+
ruling: "A header command is never width fill; fill is for a form submit, an auth panel and a phone action bar."
|
|
6257
|
+
- id: R353
|
|
6258
|
+
code: "FE_TAG_GROUP_SELECTION"
|
|
6259
|
+
law: "A TagGroup holds values the user entered, to remove or to order, and has no selection: selectionMode, selectedIds, defaultSelectedIds and onSelectionChange on it are refused. Peer values that filter a collection that stays in place are a FilterButtonGroup (sm toggle buttons on one row, the rest behind a +n search list)."
|
|
6260
|
+
kinds: [lint]
|
|
6261
|
+
gates: [pre-commit, settle, land, ci]
|
|
6262
|
+
failureCodes: ["FE_TAG_GROUP_SELECTION"]
|
|
6263
|
+
enforcers:
|
|
6264
|
+
- {kind: eslint-fe, id: no-selectable-tag-group}
|
|
6265
|
+
editions: [lite, full]
|
|
6266
|
+
docs: [contexts/ui/components/chip.md]
|
|
6267
|
+
templateNa: "A template draws no filter row."
|
|
6268
|
+
proves:
|
|
6269
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TAG_GROUP_SELECTION]}
|
|
6270
|
+
exemplifiedBy:
|
|
6271
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TAG_GROUP_SELECTION]}
|
|
6272
|
+
witness:
|
|
6273
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_TAG_GROUP_SELECTION]}
|
|
6274
|
+
cases:
|
|
6275
|
+
- id: case-1
|
|
6276
|
+
date: "2026-11-01"
|
|
6277
|
+
source: owner
|
|
6278
|
+
quote: "sao cái này không phải cụm button... button size xs kiểu nhóm button"
|
|
6279
|
+
ruling: "A filter over a collection is a FilterButtonGroup of sm toggle buttons; the TagGroup has no selection."
|
|
6280
|
+
- id: R354
|
|
6281
|
+
code: "FE_HEADING_ABOVE_CARD"
|
|
6282
|
+
law: "A card has a label by design, so a hand heading above it is wrong: a SectionHeader directly followed, in the same parent, by one SurfaceCard, SurfaceListCard or SurfaceAccordionCard, and a card whose ariaLabel is the header title, are refused; the title moves to the label, the count to fact, the action to labelEnd and the note to footer. Several cards under one header stay legal."
|
|
6283
|
+
kinds: [lint]
|
|
6284
|
+
gates: [pre-commit, settle, land, ci]
|
|
6285
|
+
failureCodes: ["FE_HEADING_ABOVE_CARD"]
|
|
6286
|
+
enforcers:
|
|
6287
|
+
- {kind: eslint-fe, id: no-heading-above-card}
|
|
6288
|
+
editions: [lite, full]
|
|
6289
|
+
docs: [contexts/ui/components/card.md]
|
|
6290
|
+
templateNa: "A template draws no section header above a card."
|
|
6291
|
+
proves:
|
|
6292
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_HEADING_ABOVE_CARD]}
|
|
6293
|
+
exemplifiedBy:
|
|
6294
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_HEADING_ABOVE_CARD]}
|
|
6295
|
+
witness:
|
|
6296
|
+
- {path: packages/eslint-canon-fe/src/surface-rules.spec.ts, editions: [lite, full], codes: [FE_HEADING_ABOVE_CARD]}
|
|
6297
|
+
cases:
|
|
6298
|
+
- id: case-1
|
|
6299
|
+
date: "2026-11-01"
|
|
6300
|
+
source: owner
|
|
6301
|
+
quote: "bản thân card đã có label, vốn là mục đích thiết kế"
|
|
6302
|
+
ruling: "A card carries its own title, count, action and note; a SectionHeader above a single card is refused."
|
|
@@ -225,7 +225,7 @@ const readonlyDeclaration = (ts, symbol, name) => {
|
|
|
225
225
|
* of that property in every object literal the program types by that declaration, in a typed table of constants. Any owner type that is not
|
|
226
226
|
* such a declaration, or a literal whose property comes from an unknown source, leaves the read unresolved.
|
|
227
227
|
*/
|
|
228
|
-
function typedPropertyValues(state, node) {
|
|
228
|
+
function typedPropertyValues(state, node, seen) {
|
|
229
229
|
const { ts, checker } = state;
|
|
230
230
|
const owner = checker.getNonNullableType(checker.getTypeAtLocation(node.expression));
|
|
231
231
|
const owners = owner.isUnion() ? owner.types : [owner];
|
|
@@ -236,7 +236,7 @@ function typedPropertyValues(state, node) {
|
|
|
236
236
|
if (!literals?.length || !readonlyDeclaration(ts, symbol, node.name.text))
|
|
237
237
|
return [];
|
|
238
238
|
for (const literal of literals) {
|
|
239
|
-
const property = ownerProperty(state, literal, node.name.text,
|
|
239
|
+
const property = ownerProperty(state, literal, node.name.text, seen, valuesOf);
|
|
240
240
|
if (property === null)
|
|
241
241
|
return [];
|
|
242
242
|
values.push(...property.values);
|
|
@@ -272,7 +272,7 @@ export function valuesOf(state, expression, visited = new Set()) {
|
|
|
272
272
|
// Reading a property of null or undefined throws, so a nullish branch of the owner holds no value of the property.
|
|
273
273
|
const owners = valuesOf(state, node.expression, seen).filter((owner) => !isNullish(ts, owner));
|
|
274
274
|
const known = resolveAll(state, propertiesOf(state, owners, node.name.text, seen, valuesOf), seen);
|
|
275
|
-
return narrowed(known.length ? known : resolveAll(state, typedPropertyValues(state, node), seen));
|
|
275
|
+
return narrowed(known.length ? known : resolveAll(state, typedPropertyValues(state, node, seen), seen));
|
|
276
276
|
}
|
|
277
277
|
if (ts.isElementAccessExpression(node))
|
|
278
278
|
return orLeaf(resolveAll(state, tableValues(state, node, seen), seen));
|