@exponential_app/eui-react 0.0.0-stage → 0.2.1

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.
Files changed (102) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +360 -2
  4. package/dist/chunks/index-5yzzfez5.js +126 -0
  5. package/dist/chunks/index-5yzzfez5.js.map +11 -0
  6. package/dist/exponential-ui-react.css +2 -0
  7. package/dist/index.js +7700 -0
  8. package/dist/index.js.map +46 -0
  9. package/dist/primitives/index.js +3154 -0
  10. package/dist/primitives/index.js.map +59 -0
  11. package/dist/types/context.d.ts +96 -0
  12. package/dist/types/extensions.d.ts +25 -0
  13. package/dist/types/form.d.ts +65 -0
  14. package/dist/types/host-surface.d.ts +32 -0
  15. package/dist/types/host.d.ts +37 -0
  16. package/dist/types/icons.d.ts +31 -0
  17. package/dist/types/index.d.ts +37 -0
  18. package/dist/types/inputs.d.ts +25 -0
  19. package/dist/types/list.d.ts +31 -0
  20. package/dist/types/live.d.ts +18 -0
  21. package/dist/types/markdown.d.ts +9 -0
  22. package/dist/types/media.d.ts +15 -0
  23. package/dist/types/natives/actions.d.ts +10 -0
  24. package/dist/types/natives/bound.d.ts +2 -0
  25. package/dist/types/natives/chart.d.ts +2 -0
  26. package/dist/types/natives/chips.d.ts +5 -0
  27. package/dist/types/natives/choice-tiles.d.ts +2 -0
  28. package/dist/types/natives/code.d.ts +2 -0
  29. package/dist/types/natives/dates.d.ts +29 -0
  30. package/dist/types/natives/feedback.d.ts +29 -0
  31. package/dist/types/natives/index.d.ts +4 -0
  32. package/dist/types/natives/inputs.d.ts +19 -0
  33. package/dist/types/natives/layout.d.ts +15 -0
  34. package/dist/types/natives/listbox.d.ts +15 -0
  35. package/dist/types/natives/media.d.ts +13 -0
  36. package/dist/types/natives/nav.d.ts +17 -0
  37. package/dist/types/natives/overlays.d.ts +17 -0
  38. package/dist/types/natives/qr.d.ts +3 -0
  39. package/dist/types/natives/resizable.d.ts +2 -0
  40. package/dist/types/natives/search.d.ts +46 -0
  41. package/dist/types/natives/select.d.ts +8 -0
  42. package/dist/types/natives/shared.d.ts +35 -0
  43. package/dist/types/natives/table.d.ts +5 -0
  44. package/dist/types/natives/text.d.ts +4 -0
  45. package/dist/types/node-view.d.ts +73 -0
  46. package/dist/types/platform.d.ts +12 -0
  47. package/dist/types/primitives/alert-dialog.d.ts +14 -0
  48. package/dist/types/primitives/alert.d.ts +7 -0
  49. package/dist/types/primitives/avatar-color.d.ts +1 -0
  50. package/dist/types/primitives/avatar.d.ts +8 -0
  51. package/dist/types/primitives/badge.d.ts +8 -0
  52. package/dist/types/primitives/breadcrumb.d.ts +11 -0
  53. package/dist/types/primitives/button.d.ts +7 -0
  54. package/dist/types/primitives/calendar.d.ts +8 -0
  55. package/dist/types/primitives/card.d.ts +9 -0
  56. package/dist/types/primitives/checkbox.d.ts +4 -0
  57. package/dist/types/primitives/choice-tiles.d.ts +60 -0
  58. package/dist/types/primitives/cn.d.ts +1 -0
  59. package/dist/types/primitives/code-block.d.ts +32 -0
  60. package/dist/types/primitives/collapsible.d.ts +6 -0
  61. package/dist/types/primitives/command.d.ts +49 -0
  62. package/dist/types/primitives/context-ring.d.ts +15 -0
  63. package/dist/types/primitives/dialog-arms.d.ts +2 -0
  64. package/dist/types/primitives/dialog.d.ts +32 -0
  65. package/dist/types/primitives/disclosure-header.d.ts +7 -0
  66. package/dist/types/primitives/dock-card.d.ts +43 -0
  67. package/dist/types/primitives/dropdown-menu.d.ts +26 -0
  68. package/dist/types/primitives/empty-state.d.ts +19 -0
  69. package/dist/types/primitives/glass-card.d.ts +3 -0
  70. package/dist/types/primitives/hover-card.d.ts +6 -0
  71. package/dist/types/primitives/icon-disc.d.ts +10 -0
  72. package/dist/types/primitives/index.d.ts +52 -0
  73. package/dist/types/primitives/input.d.ts +4 -0
  74. package/dist/types/primitives/kbd.d.ts +4 -0
  75. package/dist/types/primitives/label.d.ts +4 -0
  76. package/dist/types/primitives/menu-surface.d.ts +1 -0
  77. package/dist/types/primitives/meter.d.ts +10 -0
  78. package/dist/types/primitives/popover.d.ts +7 -0
  79. package/dist/types/primitives/progress-ring.d.ts +12 -0
  80. package/dist/types/primitives/progress.d.ts +4 -0
  81. package/dist/types/primitives/scroll-area.d.ts +5 -0
  82. package/dist/types/primitives/segmented-control.d.ts +25 -0
  83. package/dist/types/primitives/select.d.ts +15 -0
  84. package/dist/types/primitives/separator.d.ts +4 -0
  85. package/dist/types/primitives/sheet-chrome.d.ts +13 -0
  86. package/dist/types/primitives/sheet.d.ts +18 -0
  87. package/dist/types/primitives/skeleton.d.ts +3 -0
  88. package/dist/types/primitives/spinner.d.ts +8 -0
  89. package/dist/types/primitives/switch.d.ts +6 -0
  90. package/dist/types/primitives/table.d.ts +11 -0
  91. package/dist/types/primitives/tabs.d.ts +8 -0
  92. package/dist/types/primitives/textarea.d.ts +3 -0
  93. package/dist/types/primitives/toast.d.ts +16 -0
  94. package/dist/types/primitives/tooltip.d.ts +7 -0
  95. package/dist/types/primitives/truncate.d.ts +1 -0
  96. package/dist/types/primitives/use-media-query.d.ts +3 -0
  97. package/dist/types/primitives/use-mobile.d.ts +1 -0
  98. package/dist/types/primitives/use-sheet-drag.d.ts +20 -0
  99. package/dist/types/primitives/voice-wave.d.ts +22 -0
  100. package/dist/types/surface.d.ts +117 -0
  101. package/dist/types/use-surface.d.ts +57 -0
  102. package/package.json +60 -4
@@ -0,0 +1,65 @@
1
+ import { type ReactNode } from "react";
2
+ import { joinIds } from "@exponential_app/eui/web";
3
+ import type { NativeProps } from "./node-view.js";
4
+ import { type PartFn } from "./natives/shared.js";
5
+ export interface FieldHandle {
6
+ name: string;
7
+ domId: string;
8
+ value: () => unknown;
9
+ errors: () => string[];
10
+ focus: () => void;
11
+ element: () => HTMLElement | null;
12
+ }
13
+ export interface FormContextValue {
14
+ register: (field: FieldHandle) => () => void;
15
+ /** Run the checks and fire `submit` or `invalid`. */
16
+ submit: () => void;
17
+ /** A field's value changed (Form `change {name, value}`). */
18
+ changed: (name: string, value: unknown) => void;
19
+ disabled: boolean;
20
+ busy: boolean;
21
+ /** Bumps on every refused submit: every field shows its errors. */
22
+ attempts: number;
23
+ }
24
+ export declare const FormContext: import("react").Context<FormContextValue | null>;
25
+ /** Round 4 (VAPP-103, `submitClosesOverlay`): the NEAREST overlay around a
26
+ * Form decides — a dismissible Dialog or Drawer provides its close, every
27
+ * other overlay (a Popover, a non-dismissible Dialog = AlertDialog)
28
+ * provides null; a valid Form submit beneath calls it right after
29
+ * `submit` (the author never resets the bound `open` flag). */
30
+ export declare const CloseOnSubmitContext: import("react").Context<(() => void) | null>;
31
+ export declare function useForm(): FormContextValue | null;
32
+ export declare function FormNative({ node, props, rootProps, emit, children }: NativeProps): import("react/jsx-runtime").JSX.Element;
33
+ export interface FieldOptions {
34
+ node: NativeProps[`node`];
35
+ domId: string;
36
+ props: Record<string, unknown>;
37
+ /** The field's current (local) value. */
38
+ value: unknown;
39
+ /** The element focus moves to when the field is the first invalid one. */
40
+ focusRef: {
41
+ readonly current: HTMLElement | null;
42
+ };
43
+ }
44
+ export interface FieldState {
45
+ /** The messages to SHOW now (all failing checks once validation shows). */
46
+ errors: string[];
47
+ invalid: boolean;
48
+ /** `<field id>.error` — put it in the control's aria-describedby. */
49
+ errorId: string;
50
+ describedBy: string | undefined;
51
+ /** Report a blur / a change / an Enter submit. */
52
+ touch: () => void;
53
+ change: (value: unknown) => void;
54
+ submit: () => void;
55
+ form: FormContextValue | null;
56
+ }
57
+ /** A named control's validation + its registration with the nearest Form. */
58
+ export declare function useField({ node, domId, props, value, focusRef }: FieldOptions): FieldState;
59
+ /** Every failing message under a field, linked by `errorId`. */
60
+ export declare function FieldErrors({ part, field }: {
61
+ part: PartFn;
62
+ field: FieldState;
63
+ }): import("react/jsx-runtime").JSX.Element | null;
64
+ export { joinIds };
65
+ export type { ReactNode };
@@ -0,0 +1,32 @@
1
+ import type { ExponentialHost, TransportStatus } from "@exponential_app/eui";
2
+ import type { HostPlugin } from "./host.js";
3
+ import type { SurfaceState } from "./use-surface.js";
4
+ import { type ExponentialSurfaceProps } from "./surface.js";
5
+ /** The renderer callbacks that route through the host: actions become A2UI
6
+ * client messages on its transport, host functions pass its policy gate,
7
+ * every href its URL policy, every src its media policy + loader, paint
8
+ * failures become `RENDER_FAILED` errors. `base` adds the rest (icons,
9
+ * markdown, onInput…) and may observe actions first. */
10
+ export declare function hostPlugin(host: ExponentialHost, base?: HostPlugin): HostPlugin;
11
+ /** The ids of the host's surfaces, re-rendered as surfaces come and go. */
12
+ export declare function useHostSurfaceIds(host: ExponentialHost): string[];
13
+ /** The host's transport state (`host_offline` when not `open`) and the
14
+ * catalog it could not render (the catalog-update banner). */
15
+ export declare function useHostStatus(host: ExponentialHost): {
16
+ status: TransportStatus;
17
+ detail?: string;
18
+ unsupportedCatalog?: string;
19
+ };
20
+ /** One host surface as the `SurfaceState` `<ExponentialSurface>` paints. */
21
+ export declare function useHostSurface(host: ExponentialHost, surfaceId: string): SurfaceState | null;
22
+ export interface HostSurfaceProps extends Omit<ExponentialSurfaceProps, `surface` | `root` | `data` | `host`> {
23
+ host: ExponentialHost;
24
+ surfaceId: string;
25
+ /** Icons, markdown, input observers… (actions, functions, urls and media
26
+ * route through the host). */
27
+ plugin?: HostPlugin;
28
+ /** Shown while the host has no surface with this id. */
29
+ fallback?: React.ReactNode;
30
+ }
31
+ /** A surface the host's transport feeds. */
32
+ export declare function HostSurface({ host, surfaceId, plugin, fallback, ...rest }: HostSurfaceProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import type { ComponentType, SVGProps } from "react";
2
+ import type { UiNode, ResolvedTheme, ModeName } from "@exponential_app/eui";
3
+ import type { HostPlugin as WebHostPlugin, IconMap as WebIconMap } from "@exponential_app/eui/web";
4
+ export type { SurfaceActionEvent, SurfaceInputEvent, PaintError, SourceOption } from "@exponential_app/eui/web";
5
+ /** An icon component the host maps a registry name to (`lucide-react`'s
6
+ * `LucideIcon` shape fits). */
7
+ export type IconComponent = ComponentType<SVGProps<SVGSVGElement> & {
8
+ size?: number | string;
9
+ className?: string;
10
+ }>;
11
+ export type IconMap = WebIconMap<IconComponent>;
12
+ /** The host plugin on React: icons are React components, `Markdown` a
13
+ * React component taking `{text, className}`. */
14
+ export type HostPlugin = WebHostPlugin<IconComponent, ComponentType<{
15
+ text: string;
16
+ className?: string;
17
+ }>>;
18
+ /** What an extension component receives: the node, its props resolved, the
19
+ * theme and mode, the rendered children, and an emitter for its events. */
20
+ export interface ExtensionComponentProps {
21
+ node: UiNode;
22
+ props: Record<string, unknown>;
23
+ theme: ResolvedTheme;
24
+ mode: ModeName;
25
+ tokens: ResolvedTheme[`tokens`];
26
+ /** The node's children, already rendered. */
27
+ children?: React.ReactNode;
28
+ /** Rendered slots by name. */
29
+ slots: Record<string, React.ReactNode>;
30
+ /** Fire one of the node's `on` handlers. `own` = what the component
31
+ * just WROTE, by prop (`{value: "ship"}`): the action resolves against
32
+ * the data with it applied (round 4 own write), never inferred from the
33
+ * payload. */
34
+ emit: (event: string, payload?: Record<string, unknown>, own?: Record<string, unknown>) => void;
35
+ /** The element attributes the renderer wants on the root (classes, data). */
36
+ rootProps: Record<string, unknown>;
37
+ }
@@ -0,0 +1,31 @@
1
+ import type { SVGProps } from "react";
2
+ import type { IconComponent, IconMap } from "./host.js";
3
+ /** The renderer's own chrome glyphs that are NOT catalog part glyphs (the
4
+ * busy spinner, media play, the field and picker adornments). */
5
+ export declare const CHROME: {
6
+ readonly check: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
+ readonly chevronDown: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
+ readonly chevronUp: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
+ readonly chevronLeft: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
+ readonly chevronRight: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ readonly close: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ readonly search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
+ readonly calendar: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ readonly send: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ readonly stop: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ readonly play: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
+ readonly attach: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
18
+ readonly spinner: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
+ readonly placeholder: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
20
+ };
21
+ /** icons.json concept / registry names → the Lucide glyph icons.json gives
22
+ * them (`semantic`), for every name the catalog's `builtinIcons` and the
23
+ * core macros draw. */
24
+ export declare const FALLBACK_ICONS: Record<string, IconComponent>;
25
+ export declare function resolveIcon(icons: IconMap | undefined, name: string): IconComponent | undefined;
26
+ export declare function IconGlyph({ icons, name, size, className, ...rest }: {
27
+ icons?: IconMap;
28
+ name: string;
29
+ size?: number;
30
+ className?: string;
31
+ } & SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ export { ExponentialSurface, resolveThemeInput, surfaceTheme } from "./surface.js";
2
+ export type { ExponentialSurfaceProps, ThemeInput, SurfaceHandle } from "./surface.js";
3
+ export { useSurface } from "./use-surface.js";
4
+ export type { A2uiMessage, SurfaceState, UseSurfaceOptions } from "./use-surface.js";
5
+ export { registerExtension, defineReactExtension, registeredExtensions, extensionCatalogs } from "./extensions.js";
6
+ export type { ReactExtension, ExtensionComponent, RegisterExtensionOptions } from "./extensions.js";
7
+ export type { HostPlugin, IconComponent, IconMap, PaintError, SurfaceActionEvent, SurfaceInputEvent, ExtensionComponentProps, SourceOption } from "./host.js";
8
+ export { compileTheme, compiledTheme, themeScope, partClass, propAttribute, tokenVar, tokenVarName, cssValue, declarations, ruleSelectors, STATE_SELECTORS, LAYERS } from "@exponential_app/eui/web";
9
+ export type { CompiledTheme } from "@exponential_app/eui/web";
10
+ export { nodeSheet, compileNodeSheet, dynamicStyleEntries, queryToken, nodeClass, surfaceClass, walkNodes } from "@exponential_app/eui/web";
11
+ export type { NodeSheet, DynamicStyleEntry } from "@exponential_app/eui/web";
12
+ export { BASE_CSS } from "@exponential_app/eui/web";
13
+ export { getPointer, setPointer, absolutePath, resolveValue, resolveProps, resolveNodeProps, resolveVisible, bindTree, boundPath, isBinding, isCall, hasDynamic, memoFormatter, CLIENT_FUNCTIONS } from "@exponential_app/eui/web";
14
+ export type { DataModel, DataBinding, FunctionCall, ClientFunction, ResolveContext } from "@exponential_app/eui/web";
15
+ export { useHostOwnedValue, DEBOUNCE_MS } from "./inputs.js";
16
+ export type { HostOwnedOptions, HostOwnedValue } from "./inputs.js";
17
+ export { WindowedList } from "./list.js";
18
+ export type { WindowedListProps, WindowedListHandle } from "./list.js";
19
+ export { NodeView, useRootProps, useEmitter, runNodeAction, templateItems, itemInstance, mergeStyle } from "./node-view.js";
20
+ export type { NativeProps, TemplateItem } from "./node-view.js";
21
+ export { NATIVES, NATIVE_NAMES } from "./natives/index.js";
22
+ export { useSurfaceContext, SurfaceContext, ScopeContext, InstanceContext } from "./context.js";
23
+ export type { SurfaceContextValue } from "./context.js";
24
+ export { IconGlyph, resolveIcon, FALLBACK_ICONS } from "./icons.js";
25
+ export { BuiltinMarkdown, renderMarkdown } from "./markdown.js";
26
+ export { useParts, str, num, bool, arr, BuiltinIcon, builtinIconName, failingChecks } from "./natives/shared.js";
27
+ export { FormContext, useForm, useField } from "./form.js";
28
+ export type { FieldHandle, FormContextValue, FieldState } from "./form.js";
29
+ export { useMediaQuery, useElementSize } from "./platform.js";
30
+ export { sortRows } from "./natives/table.js";
31
+ export { parseLocaleNumber } from "./natives/inputs.js";
32
+ export { acceptsFile } from "./natives/chips.js";
33
+ export { monthGrid } from "./natives/dates.js";
34
+ export { HostSurface, hostPlugin, useHostSurface, useHostSurfaceIds, useHostStatus } from "./host-surface.js";
35
+ export type { HostSurfaceProps } from "./host-surface.js";
36
+ export { useMediaSource, useMediaSrc, clearMediaCache, mediaCacheStats, fetchLimited, MEDIA_CACHE_IDLE_MAX } from "./media.js";
37
+ export { linkHref, mediaRequestOf, urlPolicyOf } from "@exponential_app/eui/web";
@@ -0,0 +1,25 @@
1
+ import { DEBOUNCE_MS } from "@exponential_app/eui/web";
2
+ export { DEBOUNCE_MS };
3
+ export interface HostOwnedOptions<T> {
4
+ /** The value the host currently holds (resolved prop or data model). */
5
+ external: T;
6
+ /** Sends an edit; a returned promise acknowledges the revision on settle. */
7
+ send: (value: T, revision: number, kind: `change` | `commit`) => void | Promise<void>;
8
+ /** Optional local write-through (the bound data model path). */
9
+ writeLocal?: (value: T) => void;
10
+ debounceMs?: number;
11
+ }
12
+ export interface HostOwnedValue<T> {
13
+ value: T;
14
+ revision: number;
15
+ /** True while a revision the host has not acknowledged exists. */
16
+ pending: boolean;
17
+ focused: boolean;
18
+ onFocus: () => void;
19
+ onBlur: () => void;
20
+ /** A local edit. */
21
+ edit: (next: T) => void;
22
+ /** Flush the debounce and send a `commit`. */
23
+ commit: () => void;
24
+ }
25
+ export declare function useHostOwnedValue<T>({ external, send, writeLocal, debounceMs }: HostOwnedOptions<T>): HostOwnedValue<T>;
@@ -0,0 +1,31 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ScrollAlign } from "@exponential_app/eui";
3
+ import { scrollParent, type ListAxis } from "@exponential_app/eui/web";
4
+ export type { ListAxis };
5
+ export interface WindowedListProps {
6
+ count: number;
7
+ itemKey: (index: number) => string;
8
+ renderItem: (index: number) => ReactNode;
9
+ /** The extent (px on the axis) of a row before it is measured. */
10
+ estimatedItemHeight?: number | ((index: number) => number);
11
+ overscan?: number;
12
+ className?: string;
13
+ axis?: ListAxis;
14
+ /** Inline direction (a horizontal list starts at the right in rtl). */
15
+ direction?: `ltr` | `rtl`;
16
+ /** Space between rows on the axis (px; a divided list adds the hairline). */
17
+ gap?: number;
18
+ /** A divider drawn centred in the gap BEFORE row `index` (null = none). */
19
+ divider?: (index: number) => ReactNode | null;
20
+ /** Flat indices of the header rows that pin (ascending). */
21
+ stickyRows?: readonly number[];
22
+ /** Extra attributes of row `index`'s wrapper (role, aria-setsize…). */
23
+ itemProps?: (index: number) => Record<string, unknown>;
24
+ }
25
+ export interface WindowedListHandle {
26
+ /** Scroll row `index` into view (`start` | `center` | `end` | `nearest`,
27
+ * default nearest), the pinned header's extent subtracted. */
28
+ scrollToIndex: (index: number, align?: ScrollAlign) => void;
29
+ }
30
+ export { scrollParent };
31
+ export declare const WindowedList: import("react").ForwardRefExoticComponent<WindowedListProps & import("react").RefAttributes<WindowedListHandle>>;
@@ -0,0 +1,18 @@
1
+ import type { ExtensionDef, UiNode } from "@exponential_app/eui";
2
+ import type { SurfaceContextValue } from "./context.js";
3
+ export interface NodeDeps {
4
+ paths: string[];
5
+ /** `paths` as pointer tokens (read on every change of every node). */
6
+ tokens: string[][];
7
+ /** Re-render on any data change. */
8
+ all: boolean;
9
+ breakpoint: boolean;
10
+ xq: boolean;
11
+ mode: boolean;
12
+ }
13
+ /** The props of a component marked `responsive: true` in the catalog. */
14
+ export declare function responsiveProps(component: string, extensions: readonly ExtensionDef[]): string[];
15
+ export declare function nodeDeps(node: UiNode, scope: string, ctx: SurfaceContextValue): NodeDeps;
16
+ /** The live values a node reads, as one array that keeps its identity
17
+ * until one of them changes (the node's re-render key). */
18
+ export declare function useLive(ctx: SurfaceContextValue, node: UiNode, scope: string): readonly unknown[];
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from "react";
2
+ import type { HostPlugin } from "./host.js";
3
+ export { MAX_LINK_NESTING, MAX_LINK_DEST, MAX_BLOCK_NESTING, linkAt, wholeImage, parseList } from "@exponential_app/eui/web";
4
+ export declare function renderMarkdown(text: string, host?: HostPlugin): ReactNode[];
5
+ export declare function BuiltinMarkdown({ text, className, host }: {
6
+ text: string;
7
+ className?: string;
8
+ host?: HostPlugin;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type MediaKind } from "@exponential_app/eui/web";
2
+ import type { HostPlugin } from "./host.js";
3
+ export { clearMediaCache, fetchLimited, fetchStream, mediaCacheStats, MEDIA_CACHE_IDLE_MAX } from "@exponential_app/eui/web";
4
+ export type { MediaKind } from "@exponential_app/eui/web";
5
+ /** A media source's state: the url to use (undefined while a fetched one
6
+ * loads or after it failed) and whether the fetch failed (so an Image can
7
+ * show its fallback; an <img> never sees a failed fetch). A src the media
8
+ * policy denies has no url and `error`. */
9
+ export declare function useMediaSource(host: HostPlugin, src: string, kind?: MediaKind): {
10
+ url: string | undefined;
11
+ error: boolean;
12
+ };
13
+ /** The src an element should use, or undefined while a fetched one loads
14
+ * (or after it failed). */
15
+ export declare function useMediaSrc(host: HostPlugin, src: string, kind?: MediaKind): string | undefined;
@@ -0,0 +1,10 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function usePending(): {
3
+ pending: boolean;
4
+ track: (result: void | Promise<void>) => void;
5
+ };
6
+ export declare function ButtonNative({ node, props, rootProps, emit, children }: NativeProps): import("react/jsx-runtime").JSX.Element;
7
+ /** `loading` held for `PENDING_DELAY_MS` (false again at once when it ends). */
8
+ export declare function usePendingShown(loading: boolean): boolean;
9
+ export declare function LinkNative({ props, rootProps, emit }: NativeProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ToggleNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function useBoundState<T>(node: NativeProps[`node`], scope: string, prop: string, external: T, key?: (v: T) => string): [T, (next: T, written?: unknown) => void, string | undefined];
@@ -0,0 +1,2 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function ChartNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ import { acceptsFile } from "@exponential_app/eui/web";
3
+ export { acceptsFile };
4
+ export declare function ChipInputNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function FileUploadNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function ChoiceTilesNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function CodeBlockNative({ node, props, rootProps, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import type { Formatter } from "@exponential_app/eui";
2
+ import type { NativeProps } from "../node-view.js";
3
+ import { type PartFn } from "./shared.js";
4
+ import { calendarStop, isoDate, monthGrid, parseIsoDate } from "@exponential_app/eui/web";
5
+ export { calendarStop, isoDate, monthGrid, parseIsoDate };
6
+ interface CalendarProps {
7
+ part: PartFn;
8
+ dayPart: `day`;
9
+ locale: string;
10
+ /** The surface Formatter: month and weekday names, day labels (round 2 §3). */
11
+ formatter: Formatter;
12
+ firstDay: number;
13
+ min: Date | null;
14
+ max: Date | null;
15
+ /** Days drawn selected. */
16
+ isSelected: (d: Date) => boolean;
17
+ /** Days drawn inside a range (DateRangePicker). */
18
+ inRange?: (d: Date) => boolean;
19
+ initial: Date;
20
+ onPick: (d: Date) => void;
21
+ t: (id: string) => string;
22
+ /** The SURFACE direction (never the document's): ArrowLeft/Right mirror in
23
+ * RTL, like the grid. */
24
+ direction?: `ltr` | `rtl`;
25
+ }
26
+ export declare function CalendarGrid({ part, dayPart, formatter, firstDay, min, max, isSelected, inRange, initial, onPick, t, direction }: CalendarProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function DatePickerNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function DateRangePickerNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function TimePickerNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function RingNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function SpinnerNative({ props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
4
+ /** Skeleton: one pulsing block, or (EXP-1259, feedback-states.json
5
+ * `placeholder`) `rows` placeholder rows in the row geometry: each a `dot`
6
+ * (unless `dot: false`) and two `bar`s, hairline-divided; the root paints
7
+ * nothing itself, the pieces pulse (base CSS). */
8
+ export declare function SkeletonNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
9
+ /** TreeGuides (round 3, a Row's `guides` part the CORE fills: `elbowAt`,
10
+ * `tee`, `passThrough` arrive computed): `depth` columns of
11
+ * `TREE_GUIDE_COLUMN` (14) px; column i's line sits at its centre
12
+ * (x = i·14 + 7). The elbow = ONE element whose left + bottom borders are
13
+ * the vertical (from `TREE_GUIDE_BRIDGE` px above the row's top to its
14
+ * centre) and the stub (to the column's right edge), the corner rounded by
15
+ * `TREE_GUIDE_RADIUS`; `tee` and pass-through columns = full-height
16
+ * verticals from the same bridge (paint only: the overshoot covers a
17
+ * Section's hairline divider, never layout). Stroke width + colour = the
18
+ * `TreeGuides/line` recipe. Physical x (the gutter is not mirrored). */
19
+ export declare function TreeGuidesNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
20
+ /** NEW-77: VoiceWave (catalog/style.json `voiceWave`): one SVG of three
21
+ * closed waves, the core's `voiceWave` per frame, each ring filled and
22
+ * stroked in its part's recipe colour at the ring's alphas; the root
23
+ * recipe sizes the box and sets the opacity (CSS); the ONE child sits
24
+ * centred at its own size, drawn scaled about the centre by
25
+ * `voiceWaveChildBox` (never up; at `sm` kept but unpainted). While
26
+ * listening, thinking or speaking (and not under reduced motion) the
27
+ * frames write the paths' `d` directly, never a re-render; the elapsed
28
+ * seconds count from the moment the wave started moving. */
29
+ export declare function VoiceWaveNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ import type { NativeProps } from "../node-view.js";
3
+ export declare const NATIVES: Record<string, ComponentType<NativeProps>>;
4
+ export declare const NATIVE_NAMES: readonly string[];
@@ -0,0 +1,19 @@
1
+ import { CHROME } from "../icons.js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ import { mergeStyle } from "../node-view.js";
4
+ import { parseLocaleNumber } from "@exponential_app/eui/web";
5
+ export declare function useInputSender(node: NativeProps[`node`], scope: string, prop: string, domId?: string): {
6
+ send: (value: unknown, revision: number, kind: `change` | `commit`) => void | Promise<void> | undefined;
7
+ writeLocal: ((value: unknown) => void) | undefined;
8
+ path: string | undefined;
9
+ name: string;
10
+ };
11
+ export declare function InputNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function TextareaNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function NumberFieldNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function CheckboxNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function SwitchNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function RadioNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function SliderNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ComposerNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
19
+ export { CHROME, mergeStyle, parseLocaleNumber };
@@ -0,0 +1,15 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function BoxNative({ node, props, rootProps, emit, children }: NativeProps): import("react/jsx-runtime").JSX.Element;
3
+ /** Past this many items a List windows (fewer render flat, so fixtures
4
+ * snapshot every row). The catalog's number (`layout.json`). */
5
+ export declare const WINDOW_THRESHOLD: number;
6
+ /** List (round 2 §5): children then the data template's items; `sectionBy`
7
+ * groups consecutive template items under a `section` header (the slot,
8
+ * bound once per section with the literal scope `{value, count, index}`,
9
+ * else the value); past `WINDOW_THRESHOLD` items, or with `stickyHeaders`,
10
+ * the list WINDOWS on its axis (vertical or horizontal) against its own
11
+ * scroll, the nearest scroller or the viewport. Every item is a listitem
12
+ * with its position in the whole list; `scrollToIndex` (the host command)
13
+ * takes the data index. */
14
+ export declare function ListNative({ node, props, rootProps, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function UnknownNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type KeyboardEvent } from "react";
2
+ export interface ListNavOptions {
3
+ count: number;
4
+ isDisabled?: (index: number) => boolean;
5
+ labelOf?: (index: number) => string;
6
+ onPick: (index: number) => void;
7
+ /** Type-ahead (off when a search field owns the keys). */
8
+ typeahead?: boolean;
9
+ initial?: number;
10
+ }
11
+ export declare function useListNavigation({ count, isDisabled, labelOf, onPick, typeahead, initial }: ListNavOptions): {
12
+ active: number;
13
+ setActive: import("react").Dispatch<import("react").SetStateAction<number>>;
14
+ onKeyDown: (e: KeyboardEvent) => void;
15
+ };
@@ -0,0 +1,13 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ /** Image (contract §3): `loading` lazy|eager, `focalX/focalY` (0..1, the
3
+ * point kept when the picture is cropped → `object-position`), and the
4
+ * `fallback` icon (default `builtinIcons["Image.fallback"]`) on error or
5
+ * without a src; `data-state` = loading | loaded | error | empty. */
6
+ export declare function ImageNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function VideoNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function AudioPlayerNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
9
+ /** A stable hue for a seed (the app's avatar palette is host-side; the SDK
10
+ * tints with one hue so two avatars of one person always match). */
11
+ export declare function seedHue(seed: string): number;
12
+ export declare function AvatarNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function CarouselNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function TabsNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
3
+ /** Segmented (round 3): ONE row of segments.
4
+ * `segmented` (default, the pill track) / `toggles` (bare) / `outline`
5
+ * (joined) = a Radix ToggleGroup (radiogroup single, toolbar of toggle
6
+ * buttons multiple; roving tab stop, arrows wrap, Home/End). `bar` = the
7
+ * full-width bottom destinations: role navigation, each item a column
8
+ * button (icon above a caption label), the selected one
9
+ * `aria-current="page"`, the same roving keys. Parts: root, item, icon,
10
+ * label (the selected state rides every part of the selected item).
11
+ * VAPP-162 (round-5 contract §3): `orientation: vertical` stacks every
12
+ * variant top to bottom (ArrowUp/ArrowDown move focus); a vertical `bar`
13
+ * is THE navigation rail (72 px items). A `bar` item's `count` paints the
14
+ * `badge` at its icon's top-end corner (`99+` above 99, none at 0) and
15
+ * reads after the label (`Chats, 3`). */
16
+ export declare function SegmentedNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function AccordionNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function DialogNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function DrawerNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function PopoverNative({ node, props, rootProps, emit, children, slots, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
5
+ /** Tooltip: shows on hover AND keyboard focus (a11y.json), Escape hides. */
6
+ export declare function TooltipNative({ node, props, rootProps, children }: NativeProps): import("react/jsx-runtime").JSX.Element;
7
+ /** Menu: `openOn: press` (default) = a Radix DropdownMenu, its ONE child the
8
+ * trigger (no child = the default outline Button from label/icon, no
9
+ * chevron), anchored bottom-start; `openOn: contextmenu` = a Radix
10
+ * ContextMenu over the child (right-click / long-press / Shift+F10 / the
11
+ * Menu key), opened at the pointer (the child's corner from the keyboard). */
12
+ export declare function MenuNative(p: NativeProps): import("react/jsx-runtime").JSX.Element;
13
+ /** Toast (contract §3): in the TOAST layer, newest nearest the edge, at most
14
+ * 3 visible (base CSS). The renderer runs `duration` (0 = sticky), PAUSED
15
+ * while hovered or focused, then writes `open: false` and fires `dismiss`
16
+ * + `change`. `error` is assertive, the rest polite; never takes focus. */
17
+ export declare function ToastNative({ node, props, rootProps, emit, scope }: NativeProps): import("react").ReactPortal | null;
@@ -0,0 +1,3 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function QrCodeNative({ node, props, rootProps }: NativeProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function QrScannerNative({ node, props, rootProps, emit }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export declare function ResizableNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { type ReactNode } from "react";
2
+ import type { NativeProps } from "../node-view.js";
3
+ import { type PartFn } from "./shared.js";
4
+ export interface SearchItem {
5
+ label: string;
6
+ value: string;
7
+ icon?: string;
8
+ identifier?: string;
9
+ disabled?: boolean;
10
+ }
11
+ /** Does a row match the query (case-insensitive, label or identifier)?
12
+ * The core's `search_matches`. */
13
+ export declare function searchMatches(item: Pick<SearchItem, `label` | `identifier`>, query: string): boolean;
14
+ export interface SearchBodyProps {
15
+ part: PartFn;
16
+ /** Whose body this is (a SearchList, or a Menu's searchable submenu). */
17
+ owner: `SearchList` | `Menu`;
18
+ /** `""` for a SearchList, `.<i>` for submenu `i` (the core's suffix). */
19
+ suffix: string;
20
+ /** The rows ALREADY filtered, each with its index in the full list. */
21
+ rows: {
22
+ index: number;
23
+ item: SearchItem;
24
+ }[];
25
+ query: string;
26
+ onQuery: (query: string) => void;
27
+ placeholder: string;
28
+ emptyText: string;
29
+ maxRows: number;
30
+ showCount: boolean;
31
+ picked?: string;
32
+ onPick: (item: SearchItem) => void;
33
+ autoFocus?: boolean;
34
+ /** ← with the caret at the start leaves the field's key to the menu (a
35
+ * searchable submenu closes back to its row). */
36
+ leaveBubbles?: boolean;
37
+ /** The rows' recipe part (`item`) and the row id prefix. */
38
+ rowPart?: (item: SearchItem, index: number, active: boolean) => Record<string, string>;
39
+ renderRow?: (item: SearchItem, index: number) => ReactNode;
40
+ }
41
+ export declare function SearchBody({ part, owner, suffix, rows, query, onQuery, placeholder, emptyText, maxRows, showCount, picked, onPick, autoFocus, leaveBubbles, rowPart, renderRow }: SearchBodyProps): import("react/jsx-runtime").JSX.Element;
42
+ /** SearchList: the field filters the rows locally (label or identifier)
43
+ * unless the host searches itself (`on.search`, its rows arrive through
44
+ * the bound `items`); `search {query}` fires 150 ms after the last
45
+ * keystroke; a pick writes the bound `value` and fires `select {value}`. */
46
+ export declare function SearchListNative({ node, props, rootProps, emit, scope }: NativeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { NativeProps } from "../node-view.js";
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ icon?: string;
6
+ disabled?: boolean;
7
+ }
8
+ export declare function SelectNative({ node, props, rootProps, emit, scope, domId }: NativeProps): import("react/jsx-runtime").JSX.Element;