@mechane-ai/elements 0.28.1 → 0.30.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/README.md +18 -2
- package/dist/ai.js +246 -168
- package/dist/{categorical-values-DqoH9l1M.js → categorical-values-Dfe3nkBV.js} +2 -2
- package/dist/{chart-frame-CYdrUwvP.js → chart-frame-rL7_RAIc.js} +2 -2
- package/dist/{chart-input--Q3Jdono.js → chart-input-JIyGPusK.js} +1 -1
- package/dist/charts/cartesian.js +3 -3
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +2 -2
- package/dist/charts.js +1 -1
- package/dist/{code-block-DPeyW4sm.js → code-block-BX51BVe1.js} +20 -19
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +1 -1
- package/dist/content.js +1 -394
- package/dist/elements.css +8 -0
- package/dist/layout.js +221 -228
- package/dist/packages/ai/src/command-activity.d.ts +7 -0
- package/dist/packages/ai/src/command-details.d.ts +10 -0
- package/dist/packages/ai/src/index.d.ts +4 -0
- package/dist/packages/content/src/code/code-block.d.ts +2 -1
- package/dist/packages/content/src/log-viewer.d.ts +2 -1
- package/dist/packages/content/src/viewer-styles.d.ts +8 -0
- package/dist/packages/layout/src/index.d.ts +0 -2
- package/dist/{pierre-diff-C3U_qae6.js → pierre-diff-DOkqEUqx.js} +1 -1
- package/dist/src-DlNMCgVy.js +395 -0
- package/dist/{viewer-styles-CpHqp5Qv.js → viewer-styles-DsFYri4K.js} +10 -0
- package/package.json +1 -1
- package/dist/packages/layout/src/report-section.d.ts +0 -6
package/README.md
CHANGED
|
@@ -88,6 +88,12 @@ input limits, and readable fallbacks.
|
|
|
88
88
|
|
|
89
89
|
## Composition and themes
|
|
90
90
|
|
|
91
|
+
Choose the
|
|
92
|
+
[containing task and layout](https://github.com/mechane-ai/mechane/blob/main/workspaces/core/docs/visual-system.md#composition-decisions)
|
|
93
|
+
before adding a surface. Stack related page sections. `PageContent` insets content, `ReportContent` combines inset
|
|
94
|
+
content with full-width finite rows, and `CollectionLayout` gives a primary collection its available height. Dialogs,
|
|
95
|
+
inspectors and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
|
|
96
|
+
|
|
91
97
|
Use Base UI's `render` composition and named variants for appearance. Native attributes, events, and refs remain
|
|
92
98
|
available. Typed `xstyle` inputs permit placement styles compiled by the application's StyleX setup. Applications own
|
|
93
99
|
asynchronous work and pass its pending, success, or failure state to controls.
|
|
@@ -133,6 +139,12 @@ sizing. The table owns its cell insets, so an enclosing page should not add anot
|
|
|
133
139
|
`Timeline.Item` compose readable activity with supplied titles, icons, timestamps, metadata, and body content, without
|
|
134
140
|
interpreting domain events.
|
|
135
141
|
|
|
142
|
+
`CommandActivity` from `/ai` presents a collapsed Bash command with supplied execution state. Its `CommandDetails` body
|
|
143
|
+
is also available for an existing trace disclosure. Supply command and output text separately, with explicit omission
|
|
144
|
+
notices when a preview is shortened. Commands use Bash highlighting; output stays plain unless the application supplies
|
|
145
|
+
a known `outputLanguage`. The embedded code and log variants share compact frames and separate copy controls. Keep
|
|
146
|
+
overall `ReplyIndicator` progress below command activity.
|
|
147
|
+
|
|
136
148
|
`Message` reserves space for secondary actions and reveals them on hover and keyboard focus; touch devices keep them
|
|
137
149
|
visible. `MessageAction` supplies a named icon button and tooltip. Keep errors, decisions, and current activity outside
|
|
138
150
|
that action region. `MessageBoundary` groups expandable context between messages. `PromptInput` keeps its label
|
|
@@ -145,8 +157,9 @@ record and store named choices rather than catalog indexes. Identity palettes re
|
|
|
145
157
|
|
|
146
158
|
`MetricGrid layout="columns"` distributes supplied metrics by available container width. Its inline layout suits compact
|
|
147
159
|
record summaries. `Metric` offers `statistic` and `headline` variants, a concise `detail`, and a passive `trend` slot.
|
|
148
|
-
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data.
|
|
149
|
-
accept `report={{ meta, summary }}` to place period metrics between a
|
|
160
|
+
Use `isLoading` and `hasDetail` to reserve its value and qualification while the application loads data. For a
|
|
161
|
+
self-contained analytical report, full charts accept `report={{ meta, summary }}` to place period metrics between a
|
|
162
|
+
shared `SectionHeading` and the plot. An embedded chart can use the ordinary frame inside its containing region. Bar and
|
|
150
163
|
time-series charts also accept `report={{ meta, seriesValues }}`, a map of formatted period values keyed by series
|
|
151
164
|
identifier. It reuses their labels and colors as the legend. Undefined values reserve loading space. `SmallMultiples`
|
|
152
165
|
aligns date axes and inspection across panels, with one date axis at the bottom; its placeholder accepts the same report
|
|
@@ -159,6 +172,9 @@ keeps wide tables inside their scroll region, and `SettingsRow` aligns labels an
|
|
|
159
172
|
decorative row without a control ID; ready rows require a real `controlId` for their label. `FormActions` owns
|
|
160
173
|
submission rows and their internal spacing. The enclosing section owns the gap before and after the actions.
|
|
161
174
|
|
|
175
|
+
Elements 0.29 removes `ReportSection`. Move its metric summary into the explanatory chart's `report.summary` or
|
|
176
|
+
`report.seriesValues`. Use ordinary `Stack` composition when content already belongs to an existing region.
|
|
177
|
+
|
|
162
178
|
The default theme is light, with system fonts and a compact spacing scale. Import `themeProps` from
|
|
163
179
|
`@mechane-ai/elements/theme` and spread `themeProps.light` or `themeProps.dark` onto the document root. Portaled content
|
|
164
180
|
then inherits the same theme. The application owns the preference; no theme provider is required.
|