@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Dennis Strähhuber
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,54 @@
1
+ Exponential
2
+ Copyright 2026 Dennis Strähhuber
3
+
4
+ This product includes software developed as part of the Exponential project,
5
+ licensed under the Apache License, Version 2.0 (see LICENSE at the repo root).
6
+
7
+ Third-party code vendored into this repository keeps its own NOTICE, next to
8
+ the vendored source:
9
+
10
+ apps/desktop/crates/ui/NOTICE
11
+ apps/desktop/crates/gpui-markdown-editor/NOTICE
12
+
13
+ This file records the attributions that travel with a distributed artifact.
14
+ It is not the per-client dependency inventory; that is generated separately.
15
+
16
+
17
+ ================================================================================
18
+ Feedback widget
19
+ ================================================================================
20
+
21
+ The feedback widget (packages/widget, emitted to
22
+ apps/web/public/widget/v1/loader.js and widget.js) is served cross-origin to
23
+ third-party websites, so its bundle redistributes the software below. Both
24
+ emitted files carry a short banner naming these packages and pointing here.
25
+
26
+ preact
27
+ Copyright (c) 2015-present Jason Miller
28
+ https://github.com/preactjs/preact
29
+ MIT License
30
+
31
+ @zumer/snapdom
32
+ Copyright (c) 2025 ZumerLab
33
+ https://github.com/zumerlab/snapdom
34
+ MIT License
35
+
36
+ Both are made available under the following terms:
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a
39
+ copy of this software and associated documentation files (the "Software"),
40
+ to deal in the Software without restriction, including without limitation
41
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
42
+ and/or sell copies of the Software, and to permit persons to whom the
43
+ Software is furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in
46
+ all copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
51
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
53
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
54
+ DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,136 @@
1
- # Temporary Holding Version
1
+ # `@exponential-at/ui-solid`: the Exponential UI SolidJS renderer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The SolidJS renderer of Exponential UI (FEED-128): an A2UI surface in the
4
+ core catalog (`@exponential-at/ui`) painted with the **identical DOM** of the
5
+ React renderer (`@exponential-at/ui-react`), with the same compiled stylesheet
6
+ and runtime themes. Overlays, menus, selects, tabs, accordions and the form
7
+ controls paint Radix's DOM on plain elements, on a headless layer
8
+ (`src/behaviors/`) that reproduces Radix's machinery: positioning on
9
+ `@floating-ui/dom`, modality on `aria-hidden`. It depends on
10
+ `@exponential-at/ui` (the shared web layer `@exponential-at/ui/web`),
11
+ `solid-js`, `@floating-ui/dom`, `aria-hidden` and `lucide-solid`. It imports
12
+ nothing from the React renderer and nothing from the Exponential app.
13
+
14
+ ## The invariant
15
+
16
+ For every surface the Solid painter produces exactly what React paints:
17
+
18
+ - the same elements and attribute set, with the same values: the `class`
19
+ strings in the same order, `data-xui-id`, `data-xui-part`, `data-xui-c`,
20
+ `data-r-*`/`data-m-*`, `data-xs`, aria-*;
21
+ - the same `<style data-xui-style="theme">` (`BASE_CSS` + the compiled
22
+ theme) and `<style data-xui-style="nodes">`;
23
+ - the same root (`.xui-surface <scope> xui-s-<id>`, `data-xui-mode`, `dir`,
24
+ `data-xq`) and the same overlay, toast and live-region layers.
25
+
26
+ `src/test/parity.ts` (`expectDomParity`) renders one tree in both renderers
27
+ in jsdom and compares the serialised DOM (attributes sorted, generated ids
28
+ renamed). Every native port adds its cases to `src/parity.test.ts`. A
29
+ browser-level web-parity suite also compares computed styles, frames and
30
+ pixels at zero tolerance.
31
+
32
+ ```tsx
33
+ import { ExponentialSurface, createSurface } from "@exponential-at/ui-solid"
34
+
35
+ function Chat(props: { messages: A2uiMessage[] }) {
36
+ const surface = createSurface({ surfaceId: "main" })
37
+ createEffect(() => props.messages.forEach(surface.apply)) // A2UI v0.9 server messages
38
+ return (
39
+ <ExponentialSurface
40
+ surface={surface}
41
+ theme="exponential" // or "neutral" | "playful" | "orange" | a theme JSON | a ResolvedTheme
42
+ mode="system" // light | dark | system
43
+ locale="de-AT" timeZone="Europe/Vienna"
44
+ host={{ icons, onAction, onInput }} // the host plugin (lucide-solid icons)
45
+ handleRef={(h) => (handle = h)} // handle.run({ focus: { id } } | { announce } | { scrollIntoView } | { scrollToIndex })
46
+ />
47
+ )
48
+ }
49
+ ```
50
+
51
+ The props are the same as React's `ExponentialSurfaceProps`, with these
52
+ differences:
53
+
54
+ - `class`/`style` take Solid's form (kebab-case style keys).
55
+ - `handleRef` is a callback that receives the `SurfaceHandle`.
56
+ - The React hooks have Solid names: `useSurface` is `createSurface`,
57
+ `useHostOwnedValue` is `createHostOwnedValue`, `useParts` is `parts`,
58
+ `useField` is `createField`, `useMediaSource` is `createMediaSource`,
59
+ `useHostSurface` is `createHostSurface`, and `defineReactExtension` is
60
+ `defineSolidExtension`.
61
+
62
+ ## Layout
63
+
64
+ | path | what |
65
+ |---|---|
66
+ | `src/surface.tsx` | `<ExponentialSurface>`: theme resolution, density/contrast, the measured box + breakpoints, the two `<style>`s, the container, layers, live regions, the handle |
67
+ | `src/create-surface.ts` | `createSurface`: the reducer as a Solid store (tree and data in two signals) |
68
+ | `src/node-view.tsx` | the bind pass as per-node memos, painter lookup through `<Dynamic>`, `NodeList` (children keyed by id) and `TemplateItems` (keyed by `template.key`), `runNodeAction`, the paint boundary |
69
+ | `src/context.ts` | the surface context (an object of getters; `deriveContext` re-points fields), scope + instance accessors |
70
+ | `src/natives/` | `shared.tsx` (`parts()`, the porting rules), `bound.ts`, the painters (`overlays.tsx`, `select.tsx`, `dates.tsx`, `nav.tsx`, `inputs.tsx`…), `index.ts` (the 48 keys) |
71
+ | `src/behaviors/` | the headless Radix machinery the natives and `src/primitives/` share, one concern per module: `portal`, `presence`, `dismissable-layer`, `focus-scope`, `focus-guards`, `scroll-lock`, `modal`, `popper`, `menu`, `roving-focus`, `listbox`, `typeahead`, `collapsible`, `picker-popover`, `bubble-input`, `slider`, `grace-area`, `visually-hidden`, `drag-to-dismiss`, `style-writer`, `element-size`, `image-loading-status`, `search-match` (`index.ts` names the Radix primitive each reproduces). Nothing in it reads the surface context; package-internal |
72
+ | `src/primitives/` | the React primitive set on Solid (FEED-131), one module per React module but the six app-specific ones, on the shared recipes of `@exponential-at/ui/web/primitives` and on `src/behaviors/`; `index.ts` = `./primitives`; `bun run build:css` → `dist/exponential-ui-solid.css` |
73
+ | `src/style.ts` | `css()`: React's inline-style semantics (camelCase, px for numbers, unitless list) |
74
+ | `src/icons.tsx` | the fallback glyphs on lucide-solid, painted with lucide-react's exact `<svg>` attributes |
75
+ | `src/form.tsx`, `list.tsx`, `markdown.tsx`, `media.ts`, `inputs.ts`, `platform.ts`, `extensions.ts`, `host*.ts*` | the React files' Solid twins |
76
+ | `harness/` | the same page protocol as React's harness (`dev:harness` serves on :4182, built with Vite + `vite-plugin-solid`) |
77
+
78
+ ## Primitives
79
+
80
+ `@exponential-at/ui-solid/primitives` is the Solid twin of
81
+ `@exponential-at/ui-react/primitives` (FEED-131): button, dialog, select,
82
+ tabs, table, command, toast, calendar and the rest, with the same DOM and
83
+ classes. The class strings come from ONE source, the recipes of
84
+ `@exponential-at/ui/web/primitives`; neither set holds a class literal.
85
+
86
+ ```tsx
87
+ import "@exponential-at/ui-solid/styles.css" // the compiled primitives sheet
88
+ import { globalsCss } from "@exponential-at/ui/web"
89
+ import { Button, Dialog, DialogContent, DialogTitle, DialogTrigger } from "@exponential-at/ui-solid/primitives"
90
+ ```
91
+
92
+ - `styles.css` is `dist/exponential-ui-solid.css`, compiled by
93
+ `bun run build:css` from the React package's `tailwind.css`: byte-identical
94
+ to `@exponential-at/ui-react/styles.css` (`src/primitives/styles.test.ts`).
95
+ - Inside a surface the primitives wear its theme. Outside one,
96
+ `globalsCss(theme)` writes the theme as shadcn variables (`:root` + `.dark`).
97
+ - The names follow Solid: `class` for `className`, `as` for `asChild` (the
98
+ element or component the part paints as), `create*` for the `use*` hooks.
99
+ - Six React modules are the Exponential app's own and stay React-only:
100
+ `glass-rows`, `typeahead`, `composer`, `trace`, `pill`, `segmented-bar`.
101
+ - The web-parity gate compares every specimen of
102
+ `@exponential-at/ui/fixtures/primitive-specimens.json` with React's over the
103
+ whole page body: `bun run --filter @exponential-at/ui-solid test:parity:primitives`.
104
+
105
+ ## State attributes: the porting rule
106
+
107
+ The theme CSS (`STATE_SELECTORS`) targets Radix's attribute names, so the
108
+ Solid painters write the Radix-named attributes on the parts themselves. The
109
+ package was first painted on Kobalte, which names the same states
110
+ differently; the dependency is gone, and the Kobalte column stays as the map
111
+ for porting code written against Kobalte (or any non-Radix library). The full
112
+ rules are in `src/natives/shared.tsx`.
113
+
114
+ | state | Radix (React, the theme CSS) | Kobalte (history) | the Solid painter writes |
115
+ |---|---|---|---|
116
+ | checked / unchecked | `data-state="checked\|unchecked"` | `data-checked` | `data-state` |
117
+ | open / closed | `data-state="open\|closed"` | `data-expanded`, `data-closed` | `data-state` |
118
+ | selected tab | `data-state="active\|inactive"` | `data-selected` | `data-state` |
119
+ | pressed toggle | `data-state="on\|off"` | `data-pressed` | `data-state` |
120
+ | placement | `data-side`, `data-align` | (none, style only) | `data-side`, `data-align` |
121
+ | highlighted item | `data-highlighted=""` | `data-highlighted` | `data-highlighted=""` |
122
+ | disabled | `data-disabled=""` | `data-disabled` | `data-disabled=""` |
123
+
124
+ ## Commands
125
+
126
+ ```bash
127
+ bun run --filter @exponential-at/ui-solid typecheck
128
+ bun run --filter @exponential-at/ui-solid test # jsdom: surface, natives × catalog, DOM parity with React
129
+ bun run --filter @exponential-at/ui-solid dev:harness # http://localhost:4182/?view=kitchen-sink&theme=orange
130
+ bun run --filter @exponential-at/ui-solid test:conformance # the shared web runner → .conformance/exponential-ui-solid.json
131
+ bun run --filter @exponential-at/ui-solid test:parity # web parity vs React → .conformance/exponential-ui-parity-react-solid.json
132
+ bun run --filter @exponential-at/ui-solid test:parity:primitives # the primitive specimens only (seconds)
133
+ bun run --filter @exponential-at/ui-solid test:browser # every headless-Chromium suite (overlays, inputs, tables…)
134
+ bun run --filter @exponential-at/ui-solid build:css # dist/exponential-ui-solid.css (after ui-react's build:css)
135
+ bun run --filter @exponential-at/ui-solid shots # the kitchen sink → /tmp/feed128/solid-shots/ (--theme, --mode, --out)
136
+ ```