@rootnative/core 0.0.0-alpha.24 → 0.0.0-alpha.25

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.
@@ -1,4 +1,4 @@
1
- import { T as Theme } from '../types-CEs6uwKu.mjs';
1
+ import { T as Theme } from '../types-BQpoSlhx.mjs';
2
2
 
3
3
  /**
4
4
  * MD3 scheme variant. Each is a spec-defined recipe for deriving the palette
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as Theme, a as TopAppBarTokens, B as BaseTheme, M as Motion, S as Shape } from './types-CEs6uwKu.mjs';
2
- export { C as Colors, E as Elevation, b as ElevationLevel, F as FontWeight, c as MaterialTheme, d as MotionSpring, e as ShadowOffset, f as Spacing, g as StateLayer, h as Typography, i as TypographyToken } from './types-CEs6uwKu.mjs';
1
+ import { T as Theme, a as TopAppBarTokens, B as BaseTheme, M as Motion, S as Shape } from './types-BQpoSlhx.mjs';
2
+ export { C as Colors, E as Elevation, b as ElevationLevel, F as FontWeight, c as MaterialTheme, d as MotionSpring, e as ShadowOffset, f as Spacing, g as StateLayer, h as Typography, i as TypographyToken } from './types-BQpoSlhx.mjs';
3
3
  import { TransitionConfig, NamedTransitions } from '@rootnative/inertia';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as React from 'react';
@@ -156,16 +156,44 @@ interface Spacing {
156
156
  lg: number;
157
157
  xl: number;
158
158
  }
159
+ /**
160
+ * Layout tokens of the MD3 top app bar, in dp. `AppBar` follows the Compose
161
+ * `TopAppBarLayout` geometry: each side slot and the title carry
162
+ * `horizontalPadding`. So the title starts at
163
+ * `max(titleStartInset, horizontalPadding + leading width) + horizontalPadding`
164
+ * from the start edge (16 with no leading content, 56 after a 48dp navigation
165
+ * icon), and the last action ends `horizontalPadding` (4) from the end edge.
166
+ * No pair of values puts the title and the actions on one wider gutter. Pad
167
+ * the bar with `style` for that (AppBar docs, "Align with a Page Gutter").
168
+ */
159
169
  interface TopAppBarTokens {
170
+ /** Padding at each end of the top row, and on each side of the title. Default 4. */
160
171
  horizontalPadding: number;
172
+ /**
173
+ * Smallest start position of the title's own padding, used when the
174
+ * leading slot is narrower. With `horizontalPadding`, also the start inset
175
+ * of the title row of a `medium` or `large` bar. Default 12.
176
+ */
161
177
  titleStartInset: number;
178
+ /** Height of a `small` or `center-aligned` bar, and of a collapsed `medium` or `large` bar. Default 64. */
162
179
  smallContainerHeight: number;
180
+ /** Height of a `medium` bar with no subtitle. A subtitle adds 24. Default 112. */
163
181
  mediumContainerHeight: number;
182
+ /** Height of a `large` bar with no subtitle. A subtitle adds 32. Default 152. */
164
183
  largeContainerHeight: number;
184
+ /** Height of the row that holds the navigation icon and the actions. Default 64. */
165
185
  topRowHeight: number;
186
+ /** Smallest height of the leading and trailing slots. Default 48. */
166
187
  sideSlotMinHeight: number;
188
+ /**
189
+ * Width of the frame around the navigation icon, and the smallest width of
190
+ * custom slot content, so a 40dp `IconButton` takes the 48dp footprint of
191
+ * an MD3 icon button. Default 48.
192
+ */
167
193
  iconFrameSize: number;
194
+ /** Space under the title of a `medium` bar. Default 24. */
168
195
  mediumTitleBottomPadding: number;
196
+ /** Space under the title of a `large` bar. Default 28. */
169
197
  largeTitleBottomPadding: number;
170
198
  }
171
199
  /** Opacity values for interactive state feedback (press, hover, focus, drag, disabled). */
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @rootnative/core — Theme System for React Native
2
2
 
3
- > Version: 0.0.0-alpha.24
3
+ > Version: 0.0.0-alpha.25
4
4
  > Peer deps: react >=19.2.3 <20.0.0, react-native >=0.83.0 <0.87.0, @rootnative/inertia >=0.0.17 <0.1.0 (required — every animation runs on it)
5
5
  > createMaterialTheme needs no extra install — its color engine (@material/material-color-utilities) is bundled behind the create-theme subpath
6
6
 
@@ -291,10 +291,12 @@ BaseTheme {
291
291
  Theme extends BaseTheme {
292
292
  colors: Colors — 49 MD3 color roles
293
293
  typography: Typography — 30 type scale variants: 15 base (displayLarge..labelSmall) + 15 MD3 Expressive emphasized (displayLargeEmphasized..labelSmallEmphasized)
294
- topAppBar?: TopAppBarTokens
294
+ topAppBar?: TopAppBarTokens — horizontalPadding, titleStartInset, smallContainerHeight, mediumContainerHeight, largeContainerHeight, topRowHeight, sideSlotMinHeight, iconFrameSize, mediumTitleBottomPadding, largeTitleBottomPadding (AppBar geometry in dp)
295
295
  }
296
296
  ```
297
297
 
298
+ `TopAppBarTokens`: `AppBar` follows the Compose `TopAppBarLayout` geometry. The title starts at `max(titleStartInset, horizontalPadding + leading width) + horizontalPadding` from the start edge (16dp with no leading content, 56dp after a 48dp navigation icon), and the last action ends `horizontalPadding` (4dp) from the end edge. No pair of token values puts both on one wider gutter: keep the tokens and pad the bar with `style` (`paddingStart: gutter - horizontalPadding - titleStartInset`, `paddingEnd: gutter - horizontalPadding`).
299
+
298
300
  Colors: primary, onPrimary, primaryContainer, onPrimaryContainer, primaryFixed, onPrimaryFixed, primaryFixedDim, onPrimaryFixedVariant, secondary (same pattern), tertiary (same pattern), error, onError, errorContainer, onErrorContainer, background, onBackground, surface, surfaceDim, surfaceBright, surfaceContainerLowest, surfaceContainerLow, surfaceContainer, surfaceContainerHigh, surfaceContainerHighest, onSurface, surfaceVariant, onSurfaceVariant, outline, outlineVariant, surfaceTint, shadow, scrim, inverseSurface, inverseOnSurface, inversePrimary
299
301
 
300
302
  Typography variants: displayLarge, displayMedium, displaySmall, headlineLarge, headlineMedium, headlineSmall, titleLarge, titleMedium, titleSmall, bodyLarge, bodyMedium, bodySmall, labelLarge, labelMedium, labelSmall — each with fontFamily, fontSize, fontWeight, lineHeight, letterSpacing. Each also has an MD3 Expressive `<name>Emphasized` variant (same size/line height, weight one step heavier: 400→500, 500→700).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootnative/core",
3
- "version": "0.0.0-alpha.24",
3
+ "version": "0.0.0-alpha.25",
4
4
  "description": "Design-system agnostic theme engine for RootNative UI — a React Native component library. Ships with Material Design 3 out of the box.",
5
5
  "private": false,
6
6
  "sideEffects": false,