@astryxdesign/core 0.7.6-canary.0ef60dd → 0.7.6-canary.631ba02
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.7.6-canary.
|
|
3
|
+
"version": "0.7.6-canary.631ba02",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -847,9 +847,9 @@
|
|
|
847
847
|
"react-dom": ">=19.0.0"
|
|
848
848
|
},
|
|
849
849
|
"devDependencies": {
|
|
850
|
-
"@astryxdesign/a11y-spec": "0.7.6-canary.
|
|
851
|
-
"@astryxdesign/cli": "0.7.6-canary.
|
|
852
|
-
"@astryxdesign/interaction-harness": "0.7.6-canary.
|
|
850
|
+
"@astryxdesign/a11y-spec": "0.7.6-canary.631ba02",
|
|
851
|
+
"@astryxdesign/cli": "0.7.6-canary.631ba02",
|
|
852
|
+
"@astryxdesign/interaction-harness": "0.7.6-canary.631ba02",
|
|
853
853
|
"@babel/cli": "^7.29.7",
|
|
854
854
|
"@babel/core": "^7.29.7",
|
|
855
855
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
schema_version: 3
|
|
3
|
-
template_version:
|
|
3
|
+
template_version: 7
|
|
4
4
|
kind: component
|
|
5
5
|
id: component:ChatComposerTokenElement
|
|
6
|
-
authority:
|
|
6
|
+
authority: current
|
|
7
7
|
archive_reason: null
|
|
8
8
|
superseded_by: null
|
|
9
|
-
approved_by:
|
|
10
|
-
approved_at:
|
|
9
|
+
approved_by: cixzhang
|
|
10
|
+
approved_at: 2026-10-31
|
|
11
11
|
owners: [cixzhang]
|
|
12
12
|
review_triggers: [public-api, behavior, accessibility, theming, testing]
|
|
13
13
|
verified_by:
|
|
@@ -33,15 +33,15 @@ system_specs: [spec:AST-002, spec:AST-029]
|
|
|
33
33
|
|
|
34
34
|
## Contract at a glance
|
|
35
35
|
|
|
36
|
-
| Area | Contract
|
|
37
|
-
| ----------------------- |
|
|
38
|
-
| Public contract |
|
|
39
|
-
| Behavior | A structured token renders Badge content; a custom token renders caller content. Both retain the serialized value marker and stay non-editable when placed inside a contenteditable composer.
|
|
40
|
-
| End-user impact | Token labels and caller content remain visible without becoming editable text.
|
|
41
|
-
| Builder impact |
|
|
42
|
-
| Compatibility/readiness |
|
|
43
|
-
| Review checks | Reject a token wrapper that loses its serialized value, becomes editable, drops accepted span props, or changes the structured/custom rendering split.
|
|
44
|
-
| Governing rules | `architecture:public-component-api/INV1, INV5–INV6, INV8–INV9, INV12`; `architecture:component-test-sufficiency/INV1–INV8, INV10–INV11`; `spec:AST-029/FR3–FR5, FR7`.
|
|
36
|
+
| Area | Contract |
|
|
37
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| Public contract | `ChatComposerTokenElement` with a required `token`: structured, which is `value` plus Badge props, of which only `label`, `variant`, and `icon` render and the rest are accepted and ignored; or custom `{value, render}`, `ref`, `xstyle`, `className`, `style`, and neutral span props. |
|
|
39
|
+
| Behavior | A structured token renders Badge content; a custom token renders caller content. Both retain the serialized value marker and stay non-editable when placed inside a contenteditable composer. |
|
|
40
|
+
| End-user impact | Token labels and caller content remain visible without becoming editable text. |
|
|
41
|
+
| Builder impact | None. |
|
|
42
|
+
| Compatibility/readiness | Records shipped behavior; no public change. Evidence still pending for AR1 and parts of FR1, FR2, and FR4 (read from source; see the verification map). |
|
|
43
|
+
| Review checks | Reject a token wrapper that loses its serialized value, becomes editable, drops accepted span props, or changes the structured/custom rendering split. |
|
|
44
|
+
| Governing rules | `architecture:public-component-api/INV1, INV5–INV6, INV8–INV9, INV12`; `architecture:component-test-sufficiency/INV1–INV8, INV10–INV11`; `spec:AST-029/FR3–FR5, FR7`. |
|
|
45
45
|
|
|
46
46
|
This table is a review projection; the body below is authoritative.
|
|
47
47
|
|
|
@@ -54,11 +54,13 @@ their existing owners.
|
|
|
54
54
|
|
|
55
55
|
## Compatibility and migration
|
|
56
56
|
|
|
57
|
-
- Released default preserved: yes
|
|
58
|
-
- Compatibility class:
|
|
59
|
-
-
|
|
57
|
+
- Released default preserved: `yes`
|
|
58
|
+
- Compatibility class: records shipped behavior; no public change
|
|
59
|
+
- Controlled/uncontrolled behavior: not applicable
|
|
60
60
|
- Migration decision: none
|
|
61
61
|
|
|
62
|
+
Consumer migration instructions belong in consumer docs and release notes.
|
|
63
|
+
|
|
62
64
|
## Ownership boundary
|
|
63
65
|
|
|
64
66
|
**Owns**
|
|
@@ -85,12 +87,12 @@ their existing owners.
|
|
|
85
87
|
|
|
86
88
|
## Behavioral and layout contract
|
|
87
89
|
|
|
88
|
-
| ID |
|
|
89
|
-
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
90
|
-
| FR1 | The root MUST expose `data-astryx-token` and the exact supplied `token.value`, and MUST remain `contentEditable={false}`. |
|
|
91
|
-
| FR2 | Structured tokens MUST delegate label, variant, and icon rendering to Badge without changing the token value. | shipped implementation and public token type
|
|
92
|
-
| FR3 | Custom tokens MUST render the caller function result without adding component-owned semantics or interaction. | shipped implementation and public token type
|
|
93
|
-
| FR4 | Accepted ref, DOM/data/ARIA, className, style, and xstyle inputs MUST reach and compose on the root span while component-owned serialization attributes retain precedence. | `architecture:public-component-api/INV5–INV6, INV8`
|
|
90
|
+
| ID | Invariant | Basis |
|
|
91
|
+
| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
92
|
+
| FR1 | The root MUST expose `data-astryx-token` and the exact supplied `token.value`, and MUST remain `contentEditable={false}`. | Current source, docs, and tests |
|
|
93
|
+
| FR2 | Structured tokens MUST delegate label, variant, and icon rendering to Badge without changing the token value. | shipped implementation and public token type |
|
|
94
|
+
| FR3 | Custom tokens MUST render the caller function result without adding component-owned semantics or interaction. | shipped implementation and public token type |
|
|
95
|
+
| FR4 | Accepted ref, DOM/data/ARIA, className, style, and xstyle inputs MUST reach and compose on the root span while component-owned serialization attributes retain precedence. | `architecture:public-component-api/INV5–INV6, INV8` |
|
|
94
96
|
|
|
95
97
|
### Allowed variation
|
|
96
98
|
|
|
@@ -108,15 +110,18 @@ their existing owners.
|
|
|
108
110
|
|
|
109
111
|
## Accessibility contract
|
|
110
112
|
|
|
111
|
-
- The wrapper owns no interactive role or
|
|
112
|
-
|
|
113
|
-
-
|
|
113
|
+
- **AR1 — No owned semantics.** The wrapper owns no interactive role or
|
|
114
|
+
accessible name beyond accepted caller props.
|
|
115
|
+
- **AR2 — Visible content.** Structured Badge text remains visible content;
|
|
116
|
+
custom content semantics remain caller owned.
|
|
117
|
+
- **AR3 — Atomic token.** `contentEditable={false}` keeps the token atomically
|
|
118
|
+
non-editable when nested in an editor.
|
|
114
119
|
|
|
115
120
|
## Design relationships
|
|
116
121
|
|
|
117
122
|
| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
|
|
118
123
|
| ------------------ | ------------------------- | ------------------------ | -------------- | ------------------ |
|
|
119
|
-
| token wrapper | Inline alignment only |
|
|
124
|
+
| token wrapper | Inline alignment only | Current source | supporting | FR1, FR4 |
|
|
120
125
|
| structured content | Badge presentation | `component:Badge` | supporting | FR2 |
|
|
121
126
|
| custom content | caller-owned presentation | caller | supporting | FR3 |
|
|
122
127
|
|
|
@@ -128,19 +133,26 @@ target. Badge theming remains owned by Badge, and custom content remains caller
|
|
|
128
133
|
- `component:ChatComposerInput` owns insertion, serialization traversal, deletion, and selection behavior.
|
|
129
134
|
- `architecture:public-component-api` owns the public props type, ref, and BaseProps composition.
|
|
130
135
|
- `architecture:component-test-sufficiency` owns direct evidence for the established public serialization seam.
|
|
131
|
-
- `spec:AST-029` owns
|
|
136
|
+
- `spec:AST-029` owns the audit evidence inventory this record's verification map follows.
|
|
132
137
|
|
|
133
138
|
## Verification map
|
|
134
139
|
|
|
135
|
-
| Contract
|
|
136
|
-
|
|
|
137
|
-
| FR1–FR3
|
|
138
|
-
| FR4
|
|
139
|
-
| rendered states
|
|
140
|
+
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
|
|
141
|
+
| ---------------- | ------------------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
142
|
+
| FR1–FR3, AR2–AR3 | `ChatComposerTokenElement.test.tsx`; direct Storybook stories | structured and custom tokens | A marker/value disappears, the wrapper becomes editable, or the wrong rendering branch appears. | `audit:ChatComposerTokenElement/behavior` |
|
|
143
|
+
| FR4 | focused ref and DOM-passthrough test; public typecheck | ref, ARIA/data props, styling seams | An accepted input is dropped or an owned serialization marker is replaced. | `audit:ChatComposerTokenElement/api` |
|
|
144
|
+
| rendered states | direct Storybook stories | Badge and custom content in supported themes | An unreachable story fails the story checks. | `audit:ChatComposerTokenElement/rendered` |
|
|
145
|
+
|
|
146
|
+
Read from source, with no focused test yet:
|
|
147
|
+
|
|
148
|
+
- AR1: the wrapper adding no role or accessible name of its own.
|
|
149
|
+
- FR1: `contentEditable` staying `false` when a caller passes it.
|
|
150
|
+
- FR2: `variant` and `icon` reaching the Badge.
|
|
151
|
+
- FR4: `className`, `style`, and `xstyle` composing on the span.
|
|
140
152
|
|
|
141
153
|
## Decision log
|
|
142
154
|
|
|
143
|
-
No component-local
|
|
155
|
+
No component-local decision is recorded.
|
|
144
156
|
|
|
145
157
|
## Open questions
|
|
146
158
|
|