@mechane-ai/elements 0.38.1 → 0.39.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 CHANGED
@@ -99,9 +99,9 @@ input limits, and readable fallbacks.
99
99
 
100
100
  Choose the
101
101
  [containing task and layout](https://github.com/mechane-ai/mechane/blob/main/workspaces/core/docs/visual-system.md#composition-decisions)
102
- before adding a surface. Stack related page sections. `PageContent` insets content, `ReportContent` combines inset
103
- content with full-width finite rows, and `CollectionLayout` gives a primary collection its available height. Dialogs,
104
- inspectors and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
102
+ before adding a surface. Stack related page sections. `PageContent` insets content, `PageSection` combines inset content
103
+ with full-width finite rows, and `CollectionLayout` gives a primary collection its available height. Dialogs, inspectors
104
+ and structured message Cards retain their own containing width. `Panel` bounds an independent unit.
105
105
 
106
106
  Use Base UI's `render` composition and named variants for appearance. Native attributes, events, and refs remain
107
107
  available. Typed `xstyle` inputs permit placement styles compiled by the application's StyleX setup. Applications own
@@ -120,6 +120,13 @@ initials or photo trigger. Applications supply selection, URLs, native link hand
120
120
  rail for a sidebar that collapses to page icons. `SidebarFooter layout="navigation"` holds persistent controls in the
121
121
  contextual sidebar and reserves their intrinsic height while its pages scroll independently.
122
122
 
123
+ Use `PageLayout` for a screen. Give it the page title, actions, and optional `navigation` with the destination links,
124
+ selected ID, and view actions. The toolbar and navigation keep their natural height above the scrolling body. Wrap each
125
+ report section's heading and content together in a sibling `PageSection`. Its heading stays visible until the next
126
+ section arrives. On a short viewport the body prioritizes reading space. Use `RecordPage.Layout` for a record with a
127
+ back link and optional route navigation. A bounded table or workbench can fill the page body and scroll its own rows or
128
+ panes. Set `scrollRestorationId` when the router restores a named page body.
129
+
123
130
  `PageNavigation` uses real destination links; `Tabs` switches associated local panels with keyboard tab semantics. Both
124
131
  share the same typography, height, inset and selected indicator. Supply view controls through `PageNavigation.actions`
125
132
  so the links keep their own scroll region. Do not wrap page navigation in another padded collection toolbar. A
@@ -178,14 +185,14 @@ Use a chart's `report` input for a self-contained analytical report with a compa
178
185
  summary choices, scoped actions and matching placeholders, with links to the maintained examples. Embedded charts use
179
186
  their ordinary frame within the containing region. The application owns periods, aggregates, coverage and read state.
180
187
 
181
- Keep full-width tables outside `PageContent` so their cell insets remain the only gutter. `ReportContent` owns the inset
188
+ Keep full-width tables outside `PageContent` so their cell insets remain the only gutter. `PageSection` owns the inset
182
189
  for its optional `summary` and leaves its `breakdown` full width. Pass summary content directly; omit it when a section
183
190
  contains only rows. Absent, `null` and `false` summaries reserve no empty space. `ContentTabs` uses `defaultSelectedId`
184
- for an initial local choice or `navigation` for application-controlled links; the two modes are mutually exclusive.
185
- `SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and controls. Use
186
- `isPlaceholder` on a decorative row without a control ID; ready rows require a real `controlId` for their label.
187
- `FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap before and after the
188
- actions.
191
+ for an initial local choice. Give shareable views real links in the navigation slot on `PageLayout` or
192
+ `RecordPage.Layout`. `SettingsSection` keeps wide tables inside their scroll region, and `SettingsRow` aligns labels and
193
+ controls. Use `isPlaceholder` on a decorative row without a control ID; ready rows require a real `controlId` for their
194
+ label. `FormActions` owns submission rows and their internal spacing. The enclosing section owns the gap before and
195
+ after the actions.
189
196
 
190
197
  Elements 0.29 removes `ReportSection`. Move its metric summary into the explanatory chart's `report.summary` or
191
198
  `report.seriesValues`. Use ordinary `Stack` composition when content already belongs to an existing region.
package/dist/elements.css CHANGED
@@ -1066,6 +1066,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1066
1066
  container-name: inspector;
1067
1067
  }
1068
1068
 
1069
+ .x78161z {
1070
+ container-name: page-body;
1071
+ }
1072
+
1069
1073
  .x180ayaa {
1070
1074
  container-name: setting;
1071
1075
  }
@@ -1082,6 +1086,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1082
1086
  container-type: inline-size;
1083
1087
  }
1084
1088
 
1089
+ .xpqogu8 {
1090
+ container-type: size;
1091
+ }
1092
+
1085
1093
  .xsid9ct {
1086
1094
  cursor: crosshair;
1087
1095
  }
@@ -1342,6 +1350,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1342
1350
  grid-template-columns: var(--x1ud0cvw) minmax(0,1fr);
1343
1351
  }
1344
1352
 
1353
+ .x16p6thf {
1354
+ grid-template-rows: auto minmax(0, 1fr);
1355
+ }
1356
+
1345
1357
  .x1b86y6l {
1346
1358
  inset-inline-end: var(--x1xijsos);
1347
1359
  }
@@ -1582,6 +1594,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1582
1594
  position: relative;
1583
1595
  }
1584
1596
 
1597
+ .x1uhb9sk {
1598
+ position: static;
1599
+ }
1600
+
1585
1601
  .x7wzq59 {
1586
1602
  position: sticky;
1587
1603
  }
@@ -1606,6 +1622,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
1606
1622
  row-gap: var(--xxhyxt);
1607
1623
  }
1608
1624
 
1625
+ .xoka7y6 {
1626
+ scroll-padding-block-start: var(--x1m0ogk9);
1627
+ }
1628
+
1609
1629
  .x185mbhu {
1610
1630
  scrollbar-gutter: stable;
1611
1631
  }
@@ -2215,6 +2235,12 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2215
2235
  position: static;
2216
2236
  }
2217
2237
  }
2238
+
2239
+ @container page-body (height >= 260px) {
2240
+ .xsbffnv.xsbffnv {
2241
+ position: sticky;
2242
+ }
2243
+ }
2218
2244
  }
2219
2245
 
2220
2246
  @layer priority5 {
@@ -2398,10 +2424,6 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2398
2424
  height: auto;
2399
2425
  }
2400
2426
 
2401
- .x1r09gfs {
2402
- height: calc(100dvh - var(--x1m0ogk9));
2403
- }
2404
-
2405
2427
  .xw3im37 {
2406
2428
  height: 47px;
2407
2429
  }
@@ -2490,6 +2512,10 @@ html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start:-3px;--to
2490
2512
  margin-top: var(--xxhyxt);
2491
2513
  }
2492
2514
 
2515
+ .xmz0i5r {
2516
+ max-height: 100%;
2517
+ }
2518
+
2493
2519
  .xp8lc2p {
2494
2520
  max-height: 16lh;
2495
2521
  }