@exponential-at/ui-solid 0.0.0-stage → 0.1.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.
Files changed (127) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +135 -2
  4. package/dist/chunks/image-loading-status-DZOoj4RQ.js +1724 -0
  5. package/dist/chunks/image-loading-status-DZOoj4RQ.js.map +1 -0
  6. package/dist/exponential-ui-solid.css +2 -0
  7. package/dist/index.js +12305 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/primitives.js +8439 -0
  10. package/dist/primitives.js.map +1 -0
  11. package/dist/types/behaviors/bubble-input.d.ts +35 -0
  12. package/dist/types/behaviors/collapsible.d.ts +15 -0
  13. package/dist/types/behaviors/dialog.d.ts +116 -0
  14. package/dist/types/behaviors/dismissable-layer.d.ts +48 -0
  15. package/dist/types/behaviors/drag-to-dismiss.d.ts +10 -0
  16. package/dist/types/behaviors/element-size.d.ts +7 -0
  17. package/dist/types/behaviors/focus-guards.d.ts +4 -0
  18. package/dist/types/behaviors/focus-scope.d.ts +20 -0
  19. package/dist/types/behaviors/grace-area.d.ts +10 -0
  20. package/dist/types/behaviors/image-loading-status.d.ts +4 -0
  21. package/dist/types/behaviors/index.d.ts +23 -0
  22. package/dist/types/behaviors/listbox.d.ts +44 -0
  23. package/dist/types/behaviors/menu.d.ts +95 -0
  24. package/dist/types/behaviors/modal.d.ts +3 -0
  25. package/dist/types/behaviors/picker-popover.d.ts +22 -0
  26. package/dist/types/behaviors/popper.d.ts +49 -0
  27. package/dist/types/behaviors/portal.d.ts +11 -0
  28. package/dist/types/behaviors/presence.d.ts +7 -0
  29. package/dist/types/behaviors/roving-focus.d.ts +30 -0
  30. package/dist/types/behaviors/scroll-lock.d.ts +4 -0
  31. package/dist/types/behaviors/search-match.d.ts +6 -0
  32. package/dist/types/behaviors/slider.d.ts +8 -0
  33. package/dist/types/behaviors/style-writer.d.ts +8 -0
  34. package/dist/types/behaviors/typeahead.d.ts +11 -0
  35. package/dist/types/behaviors/visually-hidden.d.ts +6 -0
  36. package/dist/types/bind-attrs.d.ts +4 -0
  37. package/dist/types/context.d.ts +74 -0
  38. package/dist/types/create-surface.d.ts +58 -0
  39. package/dist/types/extensions.d.ts +25 -0
  40. package/dist/types/form.d.ts +63 -0
  41. package/dist/types/host-surface.d.ts +33 -0
  42. package/dist/types/host.d.ts +37 -0
  43. package/dist/types/icons.d.ts +56 -0
  44. package/dist/types/index.d.ts +39 -0
  45. package/dist/types/inputs.d.ts +27 -0
  46. package/dist/types/list.d.ts +33 -0
  47. package/dist/types/markdown.d.ts +10 -0
  48. package/dist/types/media.d.ts +16 -0
  49. package/dist/types/natives/actions.d.ts +13 -0
  50. package/dist/types/natives/bound.d.ts +3 -0
  51. package/dist/types/natives/chart.d.ts +4 -0
  52. package/dist/types/natives/chips.d.ts +7 -0
  53. package/dist/types/natives/choice-tiles.d.ts +4 -0
  54. package/dist/types/natives/code.d.ts +4 -0
  55. package/dist/types/natives/dates.d.ts +30 -0
  56. package/dist/types/natives/feedback.d.ts +19 -0
  57. package/dist/types/natives/index.d.ts +6 -0
  58. package/dist/types/natives/inputs.d.ts +20 -0
  59. package/dist/types/natives/layout.d.ts +12 -0
  60. package/dist/types/natives/media.d.ts +14 -0
  61. package/dist/types/natives/nav.d.ts +14 -0
  62. package/dist/types/natives/overlays.d.ts +19 -0
  63. package/dist/types/natives/owners.d.ts +2 -0
  64. package/dist/types/natives/pending.d.ts +3 -0
  65. package/dist/types/natives/resizable.d.ts +4 -0
  66. package/dist/types/natives/search.d.ts +45 -0
  67. package/dist/types/natives/select.d.ts +10 -0
  68. package/dist/types/natives/shared.d.ts +50 -0
  69. package/dist/types/natives/table.d.ts +7 -0
  70. package/dist/types/natives/text.d.ts +5 -0
  71. package/dist/types/node-view.d.ts +83 -0
  72. package/dist/types/platform.d.ts +12 -0
  73. package/dist/types/primitives/alert-dialog.d.ts +24 -0
  74. package/dist/types/primitives/alert.d.ts +6 -0
  75. package/dist/types/primitives/avatar-color.d.ts +1 -0
  76. package/dist/types/primitives/avatar.d.ts +12 -0
  77. package/dist/types/primitives/badge.d.ts +8 -0
  78. package/dist/types/primitives/breadcrumb.d.ts +12 -0
  79. package/dist/types/primitives/button.d.ts +12 -0
  80. package/dist/types/primitives/calendar.d.ts +188 -0
  81. package/dist/types/primitives/card.d.ts +9 -0
  82. package/dist/types/primitives/checkbox.d.ts +14 -0
  83. package/dist/types/primitives/choice-tiles.d.ts +59 -0
  84. package/dist/types/primitives/cn.d.ts +1 -0
  85. package/dist/types/primitives/code-block.d.ts +34 -0
  86. package/dist/types/primitives/collapsible.d.ts +15 -0
  87. package/dist/types/primitives/command.d.ts +51 -0
  88. package/dist/types/primitives/context-ring.d.ts +14 -0
  89. package/dist/types/primitives/dialog-arms.d.ts +2 -0
  90. package/dist/types/primitives/dialog.d.ts +34 -0
  91. package/dist/types/primitives/disclosure-header.d.ts +7 -0
  92. package/dist/types/primitives/dock-card.d.ts +41 -0
  93. package/dist/types/primitives/dropdown-menu.d.ts +73 -0
  94. package/dist/types/primitives/empty-state.d.ts +19 -0
  95. package/dist/types/primitives/glass-card.d.ts +3 -0
  96. package/dist/types/primitives/hover-card.d.ts +28 -0
  97. package/dist/types/primitives/icon-disc.d.ts +11 -0
  98. package/dist/types/primitives/index.d.ts +51 -0
  99. package/dist/types/primitives/input.d.ts +6 -0
  100. package/dist/types/primitives/kbd.d.ts +4 -0
  101. package/dist/types/primitives/label.d.ts +3 -0
  102. package/dist/types/primitives/menu-surface.d.ts +1 -0
  103. package/dist/types/primitives/meter.d.ts +8 -0
  104. package/dist/types/primitives/popover.d.ts +31 -0
  105. package/dist/types/primitives/progress-ring.d.ts +12 -0
  106. package/dist/types/primitives/progress.d.ts +9 -0
  107. package/dist/types/primitives/scroll-area.d.ts +19 -0
  108. package/dist/types/primitives/segmented-control.d.ts +23 -0
  109. package/dist/types/primitives/select.d.ts +51 -0
  110. package/dist/types/primitives/separator.d.ts +6 -0
  111. package/dist/types/primitives/sheet-chrome.d.ts +11 -0
  112. package/dist/types/primitives/sheet.d.ts +21 -0
  113. package/dist/types/primitives/skeleton.d.ts +3 -0
  114. package/dist/types/primitives/spinner.d.ts +9 -0
  115. package/dist/types/primitives/switch.d.ts +14 -0
  116. package/dist/types/primitives/table.d.ts +11 -0
  117. package/dist/types/primitives/tabs.d.ts +29 -0
  118. package/dist/types/primitives/textarea.d.ts +5 -0
  119. package/dist/types/primitives/toast.d.ts +16 -0
  120. package/dist/types/primitives/tooltip.d.ts +34 -0
  121. package/dist/types/primitives/truncate.d.ts +1 -0
  122. package/dist/types/primitives/use-media-query.d.ts +4 -0
  123. package/dist/types/primitives/use-mobile.d.ts +4 -0
  124. package/dist/types/primitives/use-sheet-drag.d.ts +20 -0
  125. package/dist/types/style.d.ts +6 -0
  126. package/dist/types/surface.d.ts +99 -0
  127. package/package.json +55 -4
@@ -0,0 +1,74 @@
1
+ import { type Accessor } from "solid-js";
2
+ import type { ExtensionDef, Formatter, ModeName, ResolvedTheme, ScrollAlign, TemplateBudget, UiNode } from "@exponential-at/ui";
3
+ import type { ClientFunction, CompiledTheme, DataModel, ResolveContext } from "@exponential-at/ui/web";
4
+ import type { HostPlugin } from "./host.js";
5
+ import type { SolidExtension } from "./extensions.js";
6
+ export interface SurfaceContextValue {
7
+ readonly surfaceId: string;
8
+ readonly compiled: CompiledTheme;
9
+ /** The theme the surface runs with (density + contrast applied). */
10
+ readonly theme: ResolvedTheme;
11
+ /** The RESOLVED mode (`system` already followed). */
12
+ readonly mode: ModeName;
13
+ readonly host: HostPlugin;
14
+ readonly extensions: readonly SolidExtension[];
15
+ readonly extensionDefs: readonly ExtensionDef[];
16
+ readonly data: DataModel;
17
+ readonly setData: (pointer: string, value: unknown) => void;
18
+ /** A template component id → its node (the reducer's LIFTED `templates`). */
19
+ readonly templateNode: (componentId: string) => UiNode | undefined;
20
+ /** VAPP-152: node `id`'s current node, a signal of its own (undefined =
21
+ * not in the surface's tree). */
22
+ readonly nodeCell?: (id: string) => (() => UiNode | undefined) | undefined;
23
+ /** VAPP-103: the template items counted against `maxTemplateItems`. */
24
+ readonly templateBudget?: TemplateBudget;
25
+ /** Interaction states forced on every node (the recipe sheet). */
26
+ readonly states: readonly string[];
27
+ /** Geometry mode: every leaf becomes a fixed box of this size. */
28
+ readonly measure?: (node: UiNode) => {
29
+ w: number;
30
+ h: number;
31
+ } | null;
32
+ /** Where overlays portal: the overlay LAYER inside the `xui` container. */
33
+ readonly portal: HTMLElement | null;
34
+ /** The toast layer (above dialogs). */
35
+ readonly toastLayer: HTMLElement | null;
36
+ /** The direction of the node being painted (round 2 §2). */
37
+ readonly direction: `ltr` | `rtl`;
38
+ readonly functions: Record<string, ClientFunction>;
39
+ readonly openUrl: (url: string) => void;
40
+ readonly locale: string;
41
+ readonly formatter: Formatter;
42
+ /** The surface clock; ticks once a minute while the tree uses it. */
43
+ readonly now: () => number;
44
+ readonly registerScroller: (id: string, scroll: (index: number, align?: ScrollAlign) => void) => () => void;
45
+ readonly paintFailures?: Map<string, string>;
46
+ readonly strings: Readonly<Record<string, string>>;
47
+ readonly t: (id: string, params?: Record<string, unknown>) => string;
48
+ /** `activeBreakpoint(surface width, theme.tokens.breakpoint)`; null = base. */
49
+ readonly breakpoint: string | null;
50
+ /** The matching JS-evaluated conditions (`data-xq` tokens). */
51
+ readonly xq?: string;
52
+ readonly reducedMotion: boolean;
53
+ readonly hover: boolean;
54
+ readonly announce: (text: string, live?: `polite` | `assertive`) => void;
55
+ }
56
+ export declare const SurfaceContext: import("solid-js").Context<SurfaceContextValue | undefined>;
57
+ export declare function useSurfaceContext(): SurfaceContextValue;
58
+ /** A copy of `ctx` with some fields re-pointed (each override = a getter
59
+ * body), every other field still following the original. */
60
+ export declare function deriveContext(ctx: SurfaceContextValue, overrides: {
61
+ [K in keyof SurfaceContextValue]?: () => SurfaceContextValue[K];
62
+ }): SurfaceContextValue;
63
+ /** The data scope of a template item (relative paths resolve here): an
64
+ * ACCESSOR, since a keyed item's index (and so its path) moves. */
65
+ export declare const ScopeContext: import("solid-js").Context<Accessor<string>>;
66
+ /** The INSTANCE suffix of a template item (`.0`, `.alice`): appended to the
67
+ * ids of the nodes it renders (`data-xui-id`) while their CSS class stays
68
+ * the template node's own. */
69
+ export declare const InstanceContext: import("solid-js").Context<Accessor<string>>;
70
+ export declare const useScope: () => Accessor<string>;
71
+ export declare const useInstance: () => Accessor<string>;
72
+ /** The resolve context of one evaluation (bindings + calls + `$string`):
73
+ * getters over the surface's, read (and tracked) where they are used. */
74
+ export declare function resolveContextOf(ctx: SurfaceContextValue, scope: string): ResolveContext;
@@ -0,0 +1,58 @@
1
+ import type { ExtensionDef, FlatComponent, NestedNode, ReduceIssue, ResolvedTheme, UiNode } from "@exponential-at/ui";
2
+ import type { DataModel } from "@exponential-at/ui/web";
3
+ export interface A2uiMessage {
4
+ version?: string;
5
+ createSurface?: {
6
+ surfaceId: string;
7
+ catalogId: string;
8
+ theme?: unknown;
9
+ sendDataModel?: boolean;
10
+ };
11
+ updateComponents?: {
12
+ surfaceId: string;
13
+ components: FlatComponent[];
14
+ };
15
+ updateDataModel?: {
16
+ surfaceId: string;
17
+ path?: string;
18
+ value?: unknown;
19
+ };
20
+ deleteSurface?: {
21
+ surfaceId: string;
22
+ };
23
+ }
24
+ export interface CreateSurfaceOptions {
25
+ /** The surface id messages must carry; default `main`. */
26
+ surfaceId?: string;
27
+ catalogId?: string;
28
+ extensions?: readonly ExtensionDef[];
29
+ /** A nested tree to start from (fixtures, static screens). */
30
+ initial?: NestedNode;
31
+ /** The initial data model. */
32
+ data?: DataModel;
33
+ }
34
+ /** React's name for the options. */
35
+ export type UseSurfaceOptions = CreateSurfaceOptions;
36
+ /** The surface state (every field a live getter on the object
37
+ * `createSurface` returns; never destructure it). */
38
+ export interface SurfaceState {
39
+ readonly surfaceId: string;
40
+ readonly catalogId: string;
41
+ readonly root: UiNode | null;
42
+ readonly issues: ReduceIssue[];
43
+ /** Round 2: the nodes a data `template` renders per item, by component id. */
44
+ readonly templates?: Readonly<Record<string, UiNode>>;
45
+ /** The server's `createSurface.theme`, resolved (a host surface). */
46
+ readonly theme?: ResolvedTheme;
47
+ readonly data: DataModel;
48
+ /** True after `deleteSurface`. */
49
+ readonly deleted: boolean;
50
+ readonly components: readonly FlatComponent[];
51
+ readonly extensions: readonly ExtensionDef[];
52
+ apply: (message: A2uiMessage) => void;
53
+ setData: (pointer: string, value: unknown) => void;
54
+ /** Replace the tree with a nested authoring tree. */
55
+ setNested: (tree: NestedNode) => void;
56
+ reset: () => void;
57
+ }
58
+ export declare function createSurface(options?: CreateSurfaceOptions): SurfaceState;
@@ -0,0 +1,25 @@
1
+ import { type Component } from "solid-js";
2
+ import type { ExtensionDef } from "@exponential-at/ui";
3
+ import type { ExtensionComponentProps } from "./host.js";
4
+ export type ExtensionComponent = Component<ExtensionComponentProps>;
5
+ export interface SolidExtension {
6
+ /** The extension catalog (validated). `null` for a pure painter override. */
7
+ catalog: ExtensionDef | null;
8
+ components: Record<string, ExtensionComponent>;
9
+ }
10
+ export interface RegisterExtensionOptions {
11
+ catalog?: ExtensionDef;
12
+ components?: Record<string, ExtensionComponent>;
13
+ }
14
+ /** Register an extension for every surface on the page (last wins).
15
+ * Returns an unregister function. */
16
+ export declare function registerExtension(options: RegisterExtensionOptions): () => void;
17
+ /** A per-surface extension (the `extensions` prop), validated once. */
18
+ export declare function defineSolidExtension(options: RegisterExtensionOptions): SolidExtension;
19
+ /** The registered extensions (a reactive read). */
20
+ export declare function registeredExtensions(): readonly SolidExtension[];
21
+ export declare function subscribeExtensions(listener: () => void): () => void;
22
+ /** The catalog defs of a list of extensions (for the reducer). */
23
+ export declare function extensionCatalogs(extensions: readonly SolidExtension[]): ExtensionDef[];
24
+ export declare function extensionMacroNames(extensions: readonly SolidExtension[]): Set<string>;
25
+ export declare function extensionComponent(extensions: readonly SolidExtension[], component: string): ExtensionComponent | undefined;
@@ -0,0 +1,63 @@
1
+ import { type Accessor, type JSX } from "solid-js";
2
+ import { joinIds } from "@exponential-at/ui/web";
3
+ import type { UiNode } from "@exponential-at/ui";
4
+ import type { NativeProps } from "./node-view.js";
5
+ import { type PartFn } from "./natives/shared.js";
6
+ export interface FieldHandle {
7
+ name: string;
8
+ domId: string;
9
+ value: () => unknown;
10
+ errors: () => string[];
11
+ focus: () => void;
12
+ element: () => HTMLElement | null;
13
+ }
14
+ /** The nearest Form (live getters for its state). */
15
+ export interface FormContextValue {
16
+ register: (field: FieldHandle) => () => void;
17
+ /** Run the checks and fire `submit` or `invalid`. */
18
+ submit: () => void;
19
+ /** A field's value changed (Form `change {name, value}`). */
20
+ changed: (name: string, value: unknown) => void;
21
+ readonly disabled: boolean;
22
+ readonly busy: boolean;
23
+ /** Bumps on every refused submit: every field shows its errors. */
24
+ readonly attempts: number;
25
+ }
26
+ export declare const FormContext: import("solid-js").Context<FormContextValue | null>;
27
+ /** Round 4 (`submitClosesOverlay`): the NEAREST overlay around a Form
28
+ * decides; a dismissible Dialog or Drawer provides its close, every other
29
+ * overlay provides null. */
30
+ export declare const CloseOnSubmitContext: import("solid-js").Context<(() => void) | null>;
31
+ export declare function useForm(): FormContextValue | null;
32
+ export declare function FormNative(props: NativeProps): JSX.Element;
33
+ export interface FieldOptions {
34
+ node: Accessor<UiNode>;
35
+ domId: Accessor<string>;
36
+ props: Accessor<Record<string, unknown>>;
37
+ /** The field's current (local) value. */
38
+ value: Accessor<unknown>;
39
+ /** The element focus moves to when the field is the first invalid one. */
40
+ focusEl: () => HTMLElement | null | undefined;
41
+ }
42
+ /** A field's validation state (live getters). */
43
+ export interface FieldState {
44
+ /** The messages to SHOW now. */
45
+ readonly errors: string[];
46
+ readonly invalid: boolean;
47
+ /** `<field id>.error` — put it in the control's aria-describedby. */
48
+ readonly errorId: string;
49
+ readonly describedBy: string | undefined;
50
+ touch: () => void;
51
+ change: (value: unknown) => void;
52
+ submit: () => void;
53
+ readonly form: FormContextValue | null;
54
+ }
55
+ /** React's `useField`: a named control's validation + its registration
56
+ * with the nearest Form. */
57
+ export declare function createField(options: FieldOptions): FieldState;
58
+ /** Every failing message under a field, linked by `errorId`. */
59
+ export declare function FieldErrors(props: {
60
+ part: PartFn;
61
+ field: FieldState;
62
+ }): JSX.Element;
63
+ export { joinIds };
@@ -0,0 +1,33 @@
1
+ import { type Accessor, type JSX } from "solid-js";
2
+ import type { ExponentialHost, TransportStatus } from "@exponential-at/ui";
3
+ import type { HostPlugin } from "./host.js";
4
+ import type { SurfaceState } from "./create-surface.js";
5
+ import { type ExponentialSurfaceProps } from "./surface.js";
6
+ /** The renderer callbacks that route through the host (React's
7
+ * `hostPlugin`, identical). */
8
+ export declare function hostPlugin(host: ExponentialHost, base?: HostPlugin): HostPlugin;
9
+ /** The ids of the host's surfaces, live (React's `useHostSurfaceIds`). */
10
+ export declare function createHostSurfaceIds(host: ExponentialHost): Accessor<string[]>;
11
+ /** The host's transport state and the catalog it could not render, as live
12
+ * getters (React's `useHostStatus`). */
13
+ export declare function createHostStatus(host: ExponentialHost): {
14
+ readonly status: TransportStatus;
15
+ readonly detail?: string;
16
+ readonly unsupportedCatalog?: string;
17
+ };
18
+ /** React's name. */
19
+ export declare const useHostStatus: typeof createHostStatus;
20
+ /** One host surface as the `SurfaceState` `<ExponentialSurface>` paints
21
+ * (React's `useHostSurface`); null while the host has none. */
22
+ export declare function createHostSurface(host: ExponentialHost, surfaceId: string): Accessor<SurfaceState | null>;
23
+ export interface HostSurfaceProps extends Omit<ExponentialSurfaceProps, `surface` | `root` | `data` | `host`> {
24
+ host: ExponentialHost;
25
+ surfaceId: string;
26
+ /** Icons, markdown, input observers… (actions, functions, urls and media
27
+ * route through the host). */
28
+ plugin?: HostPlugin;
29
+ /** Shown while the host has no surface with this id. */
30
+ fallback?: JSX.Element;
31
+ }
32
+ /** A surface the host's transport feeds. */
33
+ export declare function HostSurface(props: HostSurfaceProps): JSX.Element;
@@ -0,0 +1,37 @@
1
+ import type { Component, JSX } from "solid-js";
2
+ import type { LucideProps } from "lucide-solid";
3
+ import type { UiNode, ResolvedTheme, ModeName } from "@exponential-at/ui";
4
+ import type { HostPlugin as WebHostPlugin, IconMap as WebIconMap } from "@exponential-at/ui/web";
5
+ export type { SurfaceActionEvent, SurfaceInputEvent, PaintError, SourceOption } from "@exponential-at/ui/web";
6
+ /** An icon component the host maps a registry name to (`lucide-solid`'s
7
+ * icon shape). */
8
+ export type IconComponent = (props: LucideProps) => JSX.Element;
9
+ export type IconMap = WebIconMap<IconComponent>;
10
+ /** The host plugin on Solid: icons are Solid components, `Markdown` a Solid
11
+ * component taking `{text, class}`. */
12
+ export type HostPlugin = WebHostPlugin<IconComponent, Component<{
13
+ text: string;
14
+ class?: string;
15
+ }>>;
16
+ /** What an extension component receives (React's `ExtensionComponentProps`
17
+ * as a Solid props object: every field is a live getter, never destructure
18
+ * it): the node, its props resolved, the theme and mode, the rendered
19
+ * children, and an emitter for its events. */
20
+ export interface ExtensionComponentProps {
21
+ readonly node: UiNode;
22
+ readonly props: Record<string, unknown>;
23
+ readonly theme: ResolvedTheme;
24
+ readonly mode: ModeName;
25
+ readonly tokens: ResolvedTheme[`tokens`];
26
+ /** The node's children: read ONCE (each read paints them again). */
27
+ readonly children?: JSX.Element;
28
+ /** Rendered slots by name: read each ONCE. */
29
+ readonly slots: Record<string, JSX.Element>;
30
+ /** Fire one of the node's `on` handlers. `own` = what the component just
31
+ * WROTE, by prop (round 4 own write). */
32
+ readonly emit: (event: string, payload?: Record<string, unknown>, own?: Record<string, unknown>) => Promise<void> | void;
33
+ /** The element attributes the renderer wants on the root (`class`,
34
+ * `data-xui-id`, `data-xui-c`, recipe `data-r-*`/`data-m-*`, `data-xs`,
35
+ * aria, `dir`, `style` in Solid's kebab-case form). */
36
+ readonly rootProps: Record<string, unknown>;
37
+ }
@@ -0,0 +1,56 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { IconComponent, IconMap } from "./host.js";
3
+ /** The renderer's own chrome glyphs that are NOT catalog part glyphs. */
4
+ export declare const CHROME: {
5
+ readonly check: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
6
+ readonly chevronDown: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
7
+ readonly chevronUp: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
8
+ readonly chevronLeft: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
9
+ readonly chevronRight: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
10
+ readonly close: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
11
+ readonly search: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
12
+ readonly calendar: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
13
+ readonly send: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
14
+ readonly stop: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
15
+ readonly play: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
16
+ readonly attach: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
17
+ readonly spinner: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
18
+ readonly placeholder: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
19
+ };
20
+ /** icons.json concept / registry names → the Lucide glyph icons.json gives
21
+ * them, for every name the catalog's `builtinIcons` and the core macros
22
+ * draw (React's table, name for name). */
23
+ export declare const FALLBACK_ICONS: Record<string, IconComponent>;
24
+ export declare function resolveIcon(icons: IconMap | undefined, name: string): IconComponent | undefined;
25
+ /** A probed Lucide glyph: its class tokens (lucide-react's: `lucide-<name>`
26
+ * twice, deduplicated) and its children. */
27
+ interface LucideShape {
28
+ classes: string[];
29
+ nodes: [string, Record<string, string>][];
30
+ }
31
+ export type LucideSvgProps = JSX.SvgSVGAttributes<SVGSVGElement> & {
32
+ shape: LucideShape;
33
+ size?: number | string;
34
+ class?: string;
35
+ "data-icon"?: string;
36
+ "data-icon-missing"?: string;
37
+ "data-slot"?: string;
38
+ };
39
+ /** One icon as lucide-react paints it (a Lucide glyph through `LucideSvg`,
40
+ * any other host component as it is). */
41
+ export declare function PaintIcon(props: {
42
+ icon: IconComponent;
43
+ } & JSX.SvgSVGAttributes<SVGSVGElement> & {
44
+ size?: number | string;
45
+ class?: string;
46
+ [data: `data-${string}`]: string | undefined;
47
+ }): JSX.Element;
48
+ export declare function IconGlyph(props: {
49
+ icons?: IconMap;
50
+ name: string;
51
+ size?: number;
52
+ class?: string;
53
+ } & JSX.SvgSVGAttributes<SVGSVGElement> & {
54
+ [data: `data-${string}`]: string | undefined;
55
+ }): JSX.Element;
56
+ export {};
@@ -0,0 +1,39 @@
1
+ export { ExponentialSurface, resolveThemeInput, surfaceTheme } from "./surface.js";
2
+ export type { ExponentialSurfaceProps, ThemeInput, SurfaceHandle } from "./surface.js";
3
+ export { createSurface } from "./create-surface.js";
4
+ export type { A2uiMessage, SurfaceState, CreateSurfaceOptions, UseSurfaceOptions } from "./create-surface.js";
5
+ export { registerExtension, defineSolidExtension, registeredExtensions, extensionCatalogs, extensionComponent } from "./extensions.js";
6
+ export type { SolidExtension, 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-at/ui/web";
9
+ export type { CompiledTheme } from "@exponential-at/ui/web";
10
+ export { nodeSheet, compileNodeSheet, dynamicStyleEntries, queryToken, nodeClass, surfaceClass, walkNodes } from "@exponential-at/ui/web";
11
+ export type { NodeSheet, DynamicStyleEntry } from "@exponential-at/ui/web";
12
+ export { BASE_CSS } from "@exponential-at/ui/web";
13
+ export { getPointer, setPointer, absolutePath, resolveValue, resolveProps, resolveNodeProps, resolveVisible, bindTree, boundPath, isBinding, isCall, hasDynamic, memoFormatter, CLIENT_FUNCTIONS } from "@exponential-at/ui/web";
14
+ export type { DataModel, DataBinding, FunctionCall, ClientFunction, ResolveContext } from "@exponential-at/ui/web";
15
+ export { createHostOwnedValue, 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, NodeList, TemplateItems, TemplateItemView, createRootProps, createEmitter, runNodeAction, templateItems, itemInstance, mergeStyle, withClass, forced } 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, deriveContext, SurfaceContext, ScopeContext, InstanceContext, useScope, useInstance } from "./context.js";
23
+ export type { SurfaceContextValue } from "./context.js";
24
+ export { IconGlyph, PaintIcon, resolveIcon, FALLBACK_ICONS, CHROME } from "./icons.js";
25
+ export { BuiltinMarkdown, renderMarkdown } from "./markdown.js";
26
+ export { parts, useParts, str, num, bool, arr, BuiltinIcon, builtinIconName, failingChecks, TextPart } from "./natives/shared.js";
27
+ export type { PartFn, Attrs } from "./natives/shared.js";
28
+ export { createBoundState } from "./natives/bound.js";
29
+ export { css, px } from "./style.js";
30
+ export type { StyleInput, SolidStyle } from "./style.js";
31
+ export { FormContext, CloseOnSubmitContext, useForm, createField, FieldErrors } from "./form.js";
32
+ export type { FieldHandle, FormContextValue, FieldState, FieldOptions } from "./form.js";
33
+ export { createMediaQuery, createElementSize } from "./platform.js";
34
+ export type { BoxSize } from "./platform.js";
35
+ export { sortRows, parseLocaleNumber, acceptsFile, monthGrid } from "@exponential-at/ui/web";
36
+ export { HostSurface, hostPlugin, createHostSurface, createHostSurfaceIds, createHostStatus, useHostStatus } from "./host-surface.js";
37
+ export type { HostSurfaceProps } from "./host-surface.js";
38
+ export { createMediaSource, createMediaSrc, clearMediaCache, mediaCacheStats, fetchLimited, MEDIA_CACHE_IDLE_MAX } from "./media.js";
39
+ export { linkHref, mediaRequestOf, urlPolicyOf } from "@exponential-at/ui/web";
@@ -0,0 +1,27 @@
1
+ import { type Accessor } from "solid-js";
2
+ import { DEBOUNCE_MS } from "@exponential-at/ui/web";
3
+ export { DEBOUNCE_MS };
4
+ export interface HostOwnedOptions<T> {
5
+ /** The value the host currently holds (resolved prop or data model). */
6
+ external: Accessor<T>;
7
+ /** Sends an edit; a returned promise acknowledges the revision on settle.
8
+ * Read at call time (a getter on the options object is followed). */
9
+ send: (value: T, revision: number, kind: `change` | `commit`) => void | Promise<void>;
10
+ /** Optional local write-through (the bound data model path). */
11
+ writeLocal?: (value: T) => void;
12
+ debounceMs?: number;
13
+ }
14
+ export interface HostOwnedValue<T> {
15
+ readonly value: T;
16
+ readonly revision: number;
17
+ /** True while a revision the host has not acknowledged exists. */
18
+ readonly pending: boolean;
19
+ readonly focused: boolean;
20
+ onFocus: () => void;
21
+ onBlur: () => void;
22
+ /** A local edit. */
23
+ edit: (next: T) => void;
24
+ /** Flush the debounce and send a `commit`. */
25
+ commit: () => void;
26
+ }
27
+ export declare function createHostOwnedValue<T>(options: HostOwnedOptions<T>): HostOwnedValue<T>;
@@ -0,0 +1,33 @@
1
+ import { type Accessor, type JSX } from "solid-js";
2
+ import { type ScrollAlign } from "@exponential-at/ui";
3
+ import { scrollParent, type ListAxis } from "@exponential-at/ui/web";
4
+ export type { ListAxis };
5
+ export { scrollParent };
6
+ export interface WindowedListProps {
7
+ count: number;
8
+ itemKey: (index: number) => string;
9
+ /** The row's content; `index` follows the row (keyed by `itemKey`). */
10
+ renderItem: (index: Accessor<number>) => JSX.Element;
11
+ /** The extent (px on the axis) of a row before it is measured. */
12
+ estimatedItemHeight?: number | ((index: number) => number);
13
+ overscan?: number;
14
+ class?: string;
15
+ axis?: ListAxis;
16
+ direction?: `ltr` | `rtl`;
17
+ /** Space between rows on the axis (px). */
18
+ gap?: number;
19
+ /** A divider drawn centred in the gap BEFORE row `index` (null = none). */
20
+ divider?: (index: number) => JSX.Element | null;
21
+ /** Flat indices of the header rows that pin (ascending). */
22
+ stickyRows?: readonly number[];
23
+ /** Extra attributes of row `index`'s wrapper (role, aria-setsize…). */
24
+ itemProps?: (index: number) => Record<string, unknown>;
25
+ /** Receives the list's handle (React's forwarded ref). */
26
+ ref?: (handle: WindowedListHandle) => void;
27
+ }
28
+ export interface WindowedListHandle {
29
+ /** Scroll row `index` into view (default nearest), the pinned header's
30
+ * extent subtracted. */
31
+ scrollToIndex: (index: number, align?: ScrollAlign) => void;
32
+ }
33
+ export declare function WindowedList(props: WindowedListProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { HostPlugin } from "./host.js";
3
+ export { MAX_LINK_NESTING, MAX_LINK_DEST, MAX_BLOCK_NESTING, linkAt, wholeImage, parseList } from "@exponential-at/ui/web";
4
+ /** The markdown tree of `text` as Solid elements. */
5
+ export declare function renderMarkdown(text: string, host?: HostPlugin): JSX.Element[];
6
+ export declare function BuiltinMarkdown(props: {
7
+ text: string;
8
+ class?: string;
9
+ host?: HostPlugin;
10
+ }): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type Accessor } from "solid-js";
2
+ import { type MediaKind } from "@exponential-at/ui/web";
3
+ import type { HostPlugin } from "./host.js";
4
+ export { clearMediaCache, fetchLimited, fetchStream, mediaCacheStats, MEDIA_CACHE_IDLE_MAX } from "@exponential-at/ui/web";
5
+ export type { MediaKind } from "@exponential-at/ui/web";
6
+ export interface MediaSourceState {
7
+ url: string | undefined;
8
+ error: boolean;
9
+ }
10
+ /** A media source's state, live: the url to use (undefined while a fetched
11
+ * one loads or after it failed) and whether the fetch failed. A src the
12
+ * media policy denies has no url and `error`. */
13
+ export declare function createMediaSource(host: Accessor<HostPlugin>, src: Accessor<string>, kind?: MediaKind): Accessor<MediaSourceState>;
14
+ /** The src an element should use, or undefined while a fetched one loads
15
+ * (or after it failed). */
16
+ export declare function createMediaSrc(host: Accessor<HostPlugin>, src: Accessor<string>, kind?: MediaKind): Accessor<string | undefined>;
@@ -0,0 +1,13 @@
1
+ import { type Accessor, type Component, type JSX } from "solid-js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ /** React's `usePending`: `pending` while the last tracked promise runs. */
4
+ export declare function createPending(): {
5
+ pending: Accessor<boolean>;
6
+ track: (result: void | Promise<void>) => void;
7
+ };
8
+ /** `loading` held for `PENDING_DELAY_MS` (false again at once when it ends). */
9
+ export declare function createPendingShown(loading: Accessor<boolean>): Accessor<boolean>;
10
+ export declare function ButtonNative(props: NativeProps): JSX.Element;
11
+ export declare function LinkNative(props: NativeProps): JSX.Element;
12
+ export declare function ToggleNative(props: NativeProps): JSX.Element;
13
+ export declare const NATIVES_ACTIONS: Record<string, Component<NativeProps>>;
@@ -0,0 +1,3 @@
1
+ import { type Accessor } from "solid-js";
2
+ import type { UiNode } from "@exponential-at/ui";
3
+ export declare function createBoundState<T>(node: Accessor<UiNode>, scope: Accessor<string>, prop: string, external: Accessor<T>, key?: (v: T) => string): [Accessor<T>, (next: T, written?: unknown) => void, Accessor<string | undefined>];
@@ -0,0 +1,4 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import { type NativeProps } from "../node-view.js";
3
+ export declare function ChartNative(props: NativeProps): JSX.Element;
4
+ export declare const NATIVES_CHART: Record<string, Component<NativeProps>>;
@@ -0,0 +1,7 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import { acceptsFile } from "@exponential-at/ui/web";
3
+ import type { NativeProps } from "../node-view.js";
4
+ export { acceptsFile };
5
+ export declare function ChipInputNative(props: NativeProps): JSX.Element;
6
+ export declare function FileUploadNative(props: NativeProps): JSX.Element;
7
+ export declare const NATIVES_CHIPS: Record<string, Component<NativeProps>>;
@@ -0,0 +1,4 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ export declare function ChoiceTilesNative(props: NativeProps): JSX.Element;
4
+ export declare const NATIVES_CHOICE_TILES: Record<string, Component<NativeProps>>;
@@ -0,0 +1,4 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ export declare function CodeBlockNative(props: NativeProps): JSX.Element;
4
+ export declare const NATIVES_CODE: Record<string, Component<NativeProps>>;
@@ -0,0 +1,30 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ import type { Formatter } from "@exponential-at/ui";
3
+ import { calendarStop, isoDate, monthGrid, parseIsoDate } from "@exponential-at/ui/web";
4
+ import type { NativeProps } from "../node-view.js";
5
+ import { type PartFn } from "./shared.js";
6
+ export { calendarStop, isoDate, monthGrid, parseIsoDate };
7
+ interface CalendarProps {
8
+ part: PartFn;
9
+ dayPart: `day`;
10
+ locale: string;
11
+ /** The surface Formatter: month and weekday names, day labels. */
12
+ formatter: Formatter;
13
+ firstDay: number;
14
+ min: Date | null;
15
+ max: Date | null;
16
+ /** Days drawn selected. */
17
+ isSelected: (d: Date) => boolean;
18
+ /** Days drawn inside a range (DateRangePicker). */
19
+ inRange?: (d: Date) => boolean;
20
+ initial: Date;
21
+ onPick: (d: Date) => void;
22
+ t: (id: string) => string;
23
+ /** The SURFACE direction: ArrowLeft/Right mirror in RTL. */
24
+ direction?: `ltr` | `rtl`;
25
+ }
26
+ export declare function CalendarGrid(props: CalendarProps): JSX.Element;
27
+ export declare function DatePickerNative(props: NativeProps): JSX.Element;
28
+ export declare function DateRangePickerNative(props: NativeProps): JSX.Element;
29
+ export declare function TimePickerNative(props: NativeProps): JSX.Element;
30
+ export declare const NATIVES_DATES: Record<string, Component<NativeProps>>;
@@ -0,0 +1,19 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { Component } from "solid-js";
3
+ import { type NativeProps } from "../node-view.js";
4
+ export declare function RingNative(props: NativeProps): JSX.Element;
5
+ export declare function SpinnerNative(props: NativeProps): JSX.Element;
6
+ /** Skeleton: one pulsing block, or (EXP-1259, feedback-states.json
7
+ * `placeholder`) `rows` placeholder rows in the row geometry: each a `dot`
8
+ * (unless `dot: false`) and two `bar`s, hairline-divided; the root paints
9
+ * nothing itself, the pieces pulse (base CSS). */
10
+ export declare function SkeletonNative(props: NativeProps): JSX.Element;
11
+ /** TreeGuides (round 3, a Row's `guides` part the CORE fills: `elbowAt`,
12
+ * `tee`, `passThrough` arrive computed): `depth` columns of
13
+ * `TREE_GUIDE_COLUMN` (14) px; column i's line sits at its centre. The
14
+ * elbow = ONE element whose left + bottom borders are the vertical and the
15
+ * stub, the corner rounded by `TREE_GUIDE_RADIUS`; `tee` and pass-through
16
+ * columns = full-height verticals from the same bridge. Stroke width +
17
+ * colour = the `TreeGuides/line` recipe. Physical x (never mirrored). */
18
+ export declare function TreeGuidesNative(props: NativeProps): JSX.Element;
19
+ export declare const NATIVES_FEEDBACK: Record<string, Component<NativeProps>>;
@@ -0,0 +1,6 @@
1
+ import type { Component } from "solid-js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ export declare const NATIVES: Record<string, Component<NativeProps>>;
4
+ export declare const NATIVE_NAMES: readonly string[];
5
+ /** The natives still painted by `Pending` (empty once the fan-out landed). */
6
+ export declare const PENDING_NATIVES: readonly string[];
@@ -0,0 +1,20 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { NativeProps } from "../node-view.js";
3
+ /** React's `useInputSender`: the host `onInput` sender of a host-owned
4
+ * field and its local write-through (the bound data path). */
5
+ export declare function createInputSender(props: NativeProps, prop: string): {
6
+ send: (value: unknown, revision: number, kind: `change` | `commit`) => void | Promise<void> | undefined;
7
+ writeLocal: (value: unknown) => void;
8
+ path: import("solid-js").Accessor<string | undefined>;
9
+ name: () => string;
10
+ };
11
+ export declare function InputNative(p: NativeProps): JSX.Element;
12
+ export declare function TextareaNative(p: NativeProps): JSX.Element;
13
+ export declare function NumberFieldNative(props: NativeProps): JSX.Element;
14
+ export declare function CheckboxNative(props: NativeProps): JSX.Element;
15
+ export declare function SwitchNative(props: NativeProps): JSX.Element;
16
+ export declare function RadioNative(props: NativeProps): JSX.Element;
17
+ /** Radix's single-thumb horizontal Slider. */
18
+ export declare function SliderNative(props: NativeProps): JSX.Element;
19
+ export declare function ComposerNative(props: NativeProps): JSX.Element;
20
+ export declare const NATIVES_INPUTS: Record<string, (props: NativeProps) => JSX.Element>;
@@ -0,0 +1,12 @@
1
+ import { type JSX } from "solid-js";
2
+ import { type NativeProps } from "../node-view.js";
3
+ export declare function BoxNative(props: NativeProps): JSX.Element;
4
+ /** Past this many items a List windows. The catalog's number. */
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; past
8
+ * `WINDOW_THRESHOLD` items, or with `stickyHeaders`, the list WINDOWS.
9
+ * Every item is a listitem with its position in the whole list;
10
+ * `scrollToIndex` (the host command) takes the data index. */
11
+ export declare function ListNative(props: NativeProps): JSX.Element;
12
+ export declare function UnknownNative(props: NativeProps): JSX.Element;