@exponential_app/eui-react 0.11.0 → 0.12.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.
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties, type ReactNode, type Ref } from "react";
2
- import type { ModeName, ResolvedTheme, ScrollAlign, ThemeIssue, ThemeSource, UiNode, SurfaceCommand } from "@exponential_app/eui";
2
+ import type { FormFactor, ModeName, ResolvedTheme, ScrollAlign, ThemeIssue, ThemeSource, UiNode, SurfaceCommand } from "@exponential_app/eui";
3
3
  import { type DataModel } from "@exponential_app/eui/web";
4
4
  import { type ReactExtension } from "./extensions.js";
5
5
  import type { HostPlugin } from "./host.js";
@@ -73,6 +73,10 @@ export interface ExponentialSurfaceProps {
73
73
  * not feed back into its own measurement). The gpui host passes 0 (=
74
74
  * unknown) today, so the default keeps web and desktop identical. */
75
75
  viewportHeight?: number;
76
+ /** VAPP-218: the HOST's form factor, what `@media (form-factor: …)`
77
+ * matches (an editor preview's phone frame, a phone). Default: derived
78
+ * from the surface width (`phone` below the theme's `$breakpoint.md`). */
79
+ formFactor?: FormFactor;
76
80
  /** An explicit id (defaults to React's `useId`); must be unique per page. */
77
81
  id?: string;
78
82
  /** Host → surface commands (focus, announce, scrollIntoView). */
@@ -108,6 +112,8 @@ export interface LayoutInputs {
108
112
  breakpoints: Record<string, number>;
109
113
  queries: readonly string[];
110
114
  viewportHeight: number | undefined;
115
+ /** Unset = derived from the width against `breakpoints.md`. */
116
+ formFactor?: FormFactor;
111
117
  hover: boolean;
112
118
  reducedMotion: boolean;
113
119
  }
@@ -122,4 +128,4 @@ export declare function surfaceLayout(box: SurfaceBox, inputs: LayoutInputs): {
122
128
  * inline `data={{ items, filter }}` with stable values costs one pass over
123
129
  * its top-level keys). */
124
130
  export declare function sameData(a: unknown, b: unknown): boolean;
125
- export declare function ExponentialSurface({ surface, root: rootProp, templates: templatesProp, data: dataProp, theme: themeProp, mode: modeSetting, density, contrast, locale, timeZone, strings: stringOverrides, readOnly, host, extensions: extensionsProp, states, measure, inlineOverlays, direction: directionProp, width, viewportHeight, id: idProp, handleRef, className, style, children, }: ExponentialSurfaceProps): import("react/jsx-runtime").JSX.Element;
131
+ export declare function ExponentialSurface({ surface, root: rootProp, templates: templatesProp, data: dataProp, theme: themeProp, mode: modeSetting, density, contrast, locale, timeZone, strings: stringOverrides, readOnly, host, extensions: extensionsProp, states, measure, inlineOverlays, direction: directionProp, width, viewportHeight, formFactor, id: idProp, handleRef, className, style, children, }: ExponentialSurfaceProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exponential_app/eui-react",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Exponential UI for React: the reference renderer of the core A2UI catalog on Radix with real CSS, runtime themes, extensions, and the shadcn primitive set the Exponential app shares.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://exponential.at/ui/",
@@ -42,7 +42,7 @@
42
42
  "*.css"
43
43
  ],
44
44
  "dependencies": {
45
- "@exponential_app/eui": "^0.11.0",
45
+ "@exponential_app/eui": "^0.12.0",
46
46
  "class-variance-authority": "^0.7.1",
47
47
  "clsx": "^2.1.1",
48
48
  "lucide-react": "^0.544.0",