@20baht/ui 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 (246) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +501 -2
  3. package/dist/components/baht-form.d.ts +191 -0
  4. package/dist/components/baht-form.js +614 -0
  5. package/dist/components/baht-workflow.d.ts +173 -0
  6. package/dist/components/baht-workflow.js +430 -0
  7. package/dist/components/base.d.ts +92 -0
  8. package/dist/components/base.js +138 -0
  9. package/dist/components/combobox-controller.d.ts +65 -0
  10. package/dist/components/combobox-controller.js +82 -0
  11. package/dist/components/define.d.ts +7 -0
  12. package/dist/components/define.js +16 -0
  13. package/dist/components/field-base.d.ts +84 -0
  14. package/dist/components/field-base.js +152 -0
  15. package/dist/components/floating.d.ts +84 -0
  16. package/dist/components/floating.js +182 -0
  17. package/dist/components/form-layout.d.ts +39 -0
  18. package/dist/components/form-layout.js +67 -0
  19. package/dist/components/form-options.d.ts +39 -0
  20. package/dist/components/form-options.js +65 -0
  21. package/dist/components/form-readonly.d.ts +20 -0
  22. package/dist/components/form-readonly.js +70 -0
  23. package/dist/components/layers.d.ts +4 -0
  24. package/dist/components/layers.js +15 -0
  25. package/dist/components/menu-controller.d.ts +65 -0
  26. package/dist/components/menu-controller.js +134 -0
  27. package/dist/components/motion.d.ts +9 -0
  28. package/dist/components/motion.js +16 -0
  29. package/dist/components/primitives/baht-accordion.d.ts +29 -0
  30. package/dist/components/primitives/baht-accordion.js +66 -0
  31. package/dist/components/primitives/baht-alert.d.ts +20 -0
  32. package/dist/components/primitives/baht-alert.js +62 -0
  33. package/dist/components/primitives/baht-app-shell.d.ts +81 -0
  34. package/dist/components/primitives/baht-app-shell.js +161 -0
  35. package/dist/components/primitives/baht-approval-chain.d.ts +59 -0
  36. package/dist/components/primitives/baht-approval-chain.js +80 -0
  37. package/dist/components/primitives/baht-avatar.d.ts +19 -0
  38. package/dist/components/primitives/baht-avatar.js +43 -0
  39. package/dist/components/primitives/baht-badge.d.ts +24 -0
  40. package/dist/components/primitives/baht-badge.js +41 -0
  41. package/dist/components/primitives/baht-bar-chart.d.ts +78 -0
  42. package/dist/components/primitives/baht-bar-chart.js +361 -0
  43. package/dist/components/primitives/baht-breadcrumbs.d.ts +23 -0
  44. package/dist/components/primitives/baht-breadcrumbs.js +45 -0
  45. package/dist/components/primitives/baht-button.d.ts +89 -0
  46. package/dist/components/primitives/baht-button.js +146 -0
  47. package/dist/components/primitives/baht-calendar.d.ts +96 -0
  48. package/dist/components/primitives/baht-calendar.js +398 -0
  49. package/dist/components/primitives/baht-card.d.ts +34 -0
  50. package/dist/components/primitives/baht-card.js +70 -0
  51. package/dist/components/primitives/baht-catalog-card.d.ts +52 -0
  52. package/dist/components/primitives/baht-catalog-card.js +90 -0
  53. package/dist/components/primitives/baht-checkbox.d.ts +7 -0
  54. package/dist/components/primitives/baht-checkbox.js +40 -0
  55. package/dist/components/primitives/baht-choice-group.d.ts +52 -0
  56. package/dist/components/primitives/baht-choice-group.js +71 -0
  57. package/dist/components/primitives/baht-code.d.ts +18 -0
  58. package/dist/components/primitives/baht-code.js +33 -0
  59. package/dist/components/primitives/baht-column-picker.d.ts +69 -0
  60. package/dist/components/primitives/baht-column-picker.js +234 -0
  61. package/dist/components/primitives/baht-comments.d.ts +38 -0
  62. package/dist/components/primitives/baht-comments.js +102 -0
  63. package/dist/components/primitives/baht-currency.d.ts +13 -0
  64. package/dist/components/primitives/baht-currency.js +69 -0
  65. package/dist/components/primitives/baht-datepicker.d.ts +77 -0
  66. package/dist/components/primitives/baht-datepicker.js +235 -0
  67. package/dist/components/primitives/baht-donut-chart.d.ts +24 -0
  68. package/dist/components/primitives/baht-donut-chart.js +88 -0
  69. package/dist/components/primitives/baht-edit-table.d.ts +45 -0
  70. package/dist/components/primitives/baht-edit-table.js +176 -0
  71. package/dist/components/primitives/baht-empty-state.d.ts +26 -0
  72. package/dist/components/primitives/baht-empty-state.js +51 -0
  73. package/dist/components/primitives/baht-error-state.d.ts +21 -0
  74. package/dist/components/primitives/baht-error-state.js +44 -0
  75. package/dist/components/primitives/baht-facts.d.ts +42 -0
  76. package/dist/components/primitives/baht-facts.js +49 -0
  77. package/dist/components/primitives/baht-fieldset.d.ts +19 -0
  78. package/dist/components/primitives/baht-fieldset.js +42 -0
  79. package/dist/components/primitives/baht-file.d.ts +27 -0
  80. package/dist/components/primitives/baht-file.js +158 -0
  81. package/dist/components/primitives/baht-filter-builder.d.ts +39 -0
  82. package/dist/components/primitives/baht-filter-builder.js +201 -0
  83. package/dist/components/primitives/baht-filter.d.ts +36 -0
  84. package/dist/components/primitives/baht-filter.js +64 -0
  85. package/dist/components/primitives/baht-heatmap.d.ts +49 -0
  86. package/dist/components/primitives/baht-heatmap.js +168 -0
  87. package/dist/components/primitives/baht-input.d.ts +10 -0
  88. package/dist/components/primitives/baht-input.js +44 -0
  89. package/dist/components/primitives/baht-keyvalue-editor.d.ts +28 -0
  90. package/dist/components/primitives/baht-keyvalue-editor.js +106 -0
  91. package/dist/components/primitives/baht-line-chart.d.ts +45 -0
  92. package/dist/components/primitives/baht-line-chart.js +183 -0
  93. package/dist/components/primitives/baht-link.d.ts +26 -0
  94. package/dist/components/primitives/baht-link.js +48 -0
  95. package/dist/components/primitives/baht-list.d.ts +29 -0
  96. package/dist/components/primitives/baht-list.js +79 -0
  97. package/dist/components/primitives/baht-loading-overlay.d.ts +15 -0
  98. package/dist/components/primitives/baht-loading-overlay.js +33 -0
  99. package/dist/components/primitives/baht-markdown-view.d.ts +17 -0
  100. package/dist/components/primitives/baht-markdown-view.js +39 -0
  101. package/dist/components/primitives/baht-markdown.d.ts +34 -0
  102. package/dist/components/primitives/baht-markdown.js +177 -0
  103. package/dist/components/primitives/baht-menu.d.ts +53 -0
  104. package/dist/components/primitives/baht-menu.js +100 -0
  105. package/dist/components/primitives/baht-meter.d.ts +67 -0
  106. package/dist/components/primitives/baht-meter.js +107 -0
  107. package/dist/components/primitives/baht-modal.d.ts +71 -0
  108. package/dist/components/primitives/baht-modal.js +164 -0
  109. package/dist/components/primitives/baht-multiselect.d.ts +8 -0
  110. package/dist/components/primitives/baht-multiselect.js +47 -0
  111. package/dist/components/primitives/baht-notification-bell.d.ts +54 -0
  112. package/dist/components/primitives/baht-notification-bell.js +143 -0
  113. package/dist/components/primitives/baht-number.d.ts +5 -0
  114. package/dist/components/primitives/baht-number.js +39 -0
  115. package/dist/components/primitives/baht-order-box.d.ts +24 -0
  116. package/dist/components/primitives/baht-order-box.js +50 -0
  117. package/dist/components/primitives/baht-otp.d.ts +49 -0
  118. package/dist/components/primitives/baht-otp.js +109 -0
  119. package/dist/components/primitives/baht-page-header.d.ts +43 -0
  120. package/dist/components/primitives/baht-page-header.js +78 -0
  121. package/dist/components/primitives/baht-pagination.d.ts +33 -0
  122. package/dist/components/primitives/baht-pagination.js +86 -0
  123. package/dist/components/primitives/baht-popover.d.ts +45 -0
  124. package/dist/components/primitives/baht-popover.js +112 -0
  125. package/dist/components/primitives/baht-progress-ring.d.ts +22 -0
  126. package/dist/components/primitives/baht-progress-ring.js +62 -0
  127. package/dist/components/primitives/baht-progress.d.ts +17 -0
  128. package/dist/components/primitives/baht-progress.js +48 -0
  129. package/dist/components/primitives/baht-radio.d.ts +7 -0
  130. package/dist/components/primitives/baht-radio.js +74 -0
  131. package/dist/components/primitives/baht-range.d.ts +38 -0
  132. package/dist/components/primitives/baht-range.js +88 -0
  133. package/dist/components/primitives/baht-rating.d.ts +40 -0
  134. package/dist/components/primitives/baht-rating.js +107 -0
  135. package/dist/components/primitives/baht-record-bar.d.ts +30 -0
  136. package/dist/components/primitives/baht-record-bar.js +60 -0
  137. package/dist/components/primitives/baht-reference-dialog.d.ts +87 -0
  138. package/dist/components/primitives/baht-reference-dialog.js +418 -0
  139. package/dist/components/primitives/baht-reference-picker.d.ts +110 -0
  140. package/dist/components/primitives/baht-reference-picker.js +321 -0
  141. package/dist/components/primitives/baht-repeater.d.ts +59 -0
  142. package/dist/components/primitives/baht-repeater.js +315 -0
  143. package/dist/components/primitives/baht-rule-builder.d.ts +24 -0
  144. package/dist/components/primitives/baht-rule-builder.js +177 -0
  145. package/dist/components/primitives/baht-saved-filters.d.ts +41 -0
  146. package/dist/components/primitives/baht-saved-filters.js +126 -0
  147. package/dist/components/primitives/baht-search.d.ts +34 -0
  148. package/dist/components/primitives/baht-search.js +71 -0
  149. package/dist/components/primitives/baht-section-header.d.ts +28 -0
  150. package/dist/components/primitives/baht-section-header.js +48 -0
  151. package/dist/components/primitives/baht-section.d.ts +23 -0
  152. package/dist/components/primitives/baht-section.js +49 -0
  153. package/dist/components/primitives/baht-select.d.ts +49 -0
  154. package/dist/components/primitives/baht-select.js +197 -0
  155. package/dist/components/primitives/baht-skeleton.d.ts +16 -0
  156. package/dist/components/primitives/baht-skeleton.js +37 -0
  157. package/dist/components/primitives/baht-sparkline.d.ts +23 -0
  158. package/dist/components/primitives/baht-sparkline.js +56 -0
  159. package/dist/components/primitives/baht-spinner.d.ts +13 -0
  160. package/dist/components/primitives/baht-spinner.js +30 -0
  161. package/dist/components/primitives/baht-split-button.d.ts +43 -0
  162. package/dist/components/primitives/baht-split-button.js +87 -0
  163. package/dist/components/primitives/baht-stat-chart.d.ts +14 -0
  164. package/dist/components/primitives/baht-stat-chart.js +38 -0
  165. package/dist/components/primitives/baht-stat.d.ts +56 -0
  166. package/dist/components/primitives/baht-stat.js +117 -0
  167. package/dist/components/primitives/baht-steps.d.ts +33 -0
  168. package/dist/components/primitives/baht-steps.js +60 -0
  169. package/dist/components/primitives/baht-swipe-row.d.ts +64 -0
  170. package/dist/components/primitives/baht-swipe-row.js +178 -0
  171. package/dist/components/primitives/baht-table.d.ts +315 -0
  172. package/dist/components/primitives/baht-table.js +640 -0
  173. package/dist/components/primitives/baht-tabs.d.ts +54 -0
  174. package/dist/components/primitives/baht-tabs.js +128 -0
  175. package/dist/components/primitives/baht-tags.d.ts +96 -0
  176. package/dist/components/primitives/baht-tags.js +323 -0
  177. package/dist/components/primitives/baht-text.d.ts +10 -0
  178. package/dist/components/primitives/baht-text.js +29 -0
  179. package/dist/components/primitives/baht-textarea.d.ts +5 -0
  180. package/dist/components/primitives/baht-textarea.js +40 -0
  181. package/dist/components/primitives/baht-theme-toggle.d.ts +44 -0
  182. package/dist/components/primitives/baht-theme-toggle.js +101 -0
  183. package/dist/components/primitives/baht-timeline.d.ts +21 -0
  184. package/dist/components/primitives/baht-timeline.js +42 -0
  185. package/dist/components/primitives/baht-toast.d.ts +29 -0
  186. package/dist/components/primitives/baht-toast.js +83 -0
  187. package/dist/components/primitives/baht-toggle.d.ts +6 -0
  188. package/dist/components/primitives/baht-toggle.js +42 -0
  189. package/dist/components/primitives/baht-tooltip.d.ts +34 -0
  190. package/dist/components/primitives/baht-tooltip.js +85 -0
  191. package/dist/components/primitives/baht-tree.d.ts +58 -0
  192. package/dist/components/primitives/baht-tree.js +159 -0
  193. package/dist/components/primitives/baht-typeahead.d.ts +92 -0
  194. package/dist/components/primitives/baht-typeahead.js +258 -0
  195. package/dist/components/primitives/baht-upload.d.ts +108 -0
  196. package/dist/components/primitives/baht-upload.js +325 -0
  197. package/dist/components/primitives/baht-wizard.d.ts +57 -0
  198. package/dist/components/primitives/baht-wizard.js +147 -0
  199. package/dist/components/primitives/charts.d.ts +134 -0
  200. package/dist/components/primitives/charts.js +184 -0
  201. package/dist/components/primitives/column-map.d.ts +56 -0
  202. package/dist/components/primitives/column-map.js +70 -0
  203. package/dist/components/primitives/control-icons.d.ts +2 -0
  204. package/dist/components/primitives/control-icons.js +40 -0
  205. package/dist/components/primitives/icons.d.ts +24 -0
  206. package/dist/components/primitives/icons.js +86 -0
  207. package/dist/components/primitives/illustrations.d.ts +21 -0
  208. package/dist/components/primitives/illustrations.js +78 -0
  209. package/dist/components/primitives/index.d.ts +89 -0
  210. package/dist/components/primitives/kbd.d.ts +6 -0
  211. package/dist/components/primitives/kbd.js +9 -0
  212. package/dist/components/primitives/listbox.d.ts +2 -0
  213. package/dist/components/primitives/listbox.js +7 -0
  214. package/dist/components/primitives/markdown-render.d.ts +9 -0
  215. package/dist/components/primitives/markdown-render.js +77 -0
  216. package/dist/components/primitives/rule-rows.d.ts +55 -0
  217. package/dist/components/primitives/rule-rows.js +75 -0
  218. package/dist/components/primitives/tag-map.d.ts +6 -0
  219. package/dist/components/primitives/tag-map.js +39 -0
  220. package/dist/components/reference-labels.d.ts +22 -0
  221. package/dist/components/reference-labels.js +29 -0
  222. package/dist/components/shortcuts.d.ts +7 -0
  223. package/dist/components/shortcuts.js +43 -0
  224. package/dist/css/components.css +7517 -0
  225. package/dist/css/datepicker.css +346 -0
  226. package/dist/css/tokens.css +679 -0
  227. package/dist/custom-elements.json +45110 -0
  228. package/dist/engine.d.ts +1 -0
  229. package/dist/engine.js +1 -0
  230. package/dist/hydrate.d.ts +9 -0
  231. package/dist/hydrate.js +46 -0
  232. package/dist/index.d.ts +7 -0
  233. package/dist/index.js +210 -0
  234. package/dist/overlay.d.ts +50 -0
  235. package/dist/overlay.js +140 -0
  236. package/dist/react.d.ts +557 -0
  237. package/dist/react.js +1 -0
  238. package/dist/register.d.ts +106 -0
  239. package/dist/register.js +99 -0
  240. package/dist/ssr.d.ts +16 -0
  241. package/dist/ssr.js +125 -0
  242. package/dist/tokens.css +8197 -0
  243. package/dist/vscode.css-custom-data.json +6 -0
  244. package/dist/vscode.html-custom-data.json +2261 -0
  245. package/dist/web-types.json +6523 -0
  246. package/package.json +157 -4
@@ -0,0 +1,191 @@
1
+ import { TemplateResult } from 'lit';
2
+ import { BahtElement } from './base.js';
3
+ import { DerivedFieldState, FeatureFlags, FormDefinition, Registry, ValidationError } from '@20baht/engine';
4
+ export interface BahtFormOptions {
5
+ validateOn?: 'change' | 'blur' | 'submit';
6
+ /** Debounce (ms) for typed fields; unset = BahtFieldBase.defaultDebounce (150). 0 = none. */
7
+ inputDebounce?: number;
8
+ }
9
+ /**
10
+ * <baht-form> — dumb controlled form renderer (spec 01).
11
+ * JSON in (form + value + registry) -> UI out; emits `baht-change` / `baht-validity`.
12
+ * No buttons, no cross-field logic — that's <baht-workflow> or the host.
13
+ * @fires {CustomEvent<{ form_name: string; key: string; value: unknown; data: Record<string, unknown> }>} baht-change - A field changed (an edit or a script); `data` is the whole form.
14
+ * @fires {CustomEvent<{ valid: boolean; errors: ValidationError[] }>} baht-validity - `validate()` ran.
15
+ * @fires {CustomEvent<{ value: string }>} baht-tab-change - A tab of a tabbed layout was picked.
16
+ * @fires {CustomEvent<{ data: Record<string, unknown> }>} baht-submit - `submit()` (or Enter with `submit-on-enter`) passed `validate()`.
17
+ */
18
+ export declare class BahtForm extends BahtElement {
19
+ form: FormDefinition;
20
+ /**
21
+ * The starting data, not a live binding: the user's edits sit over it. Setting a new `value`
22
+ * drops the edits to the keys it changes (compared by content) and keeps the rest, so a host
23
+ * that re-feeds a copy of the same data loses nothing. Read the current data with `getData()`
24
+ * or `baht-change`.
25
+ */
26
+ value: Record<string, unknown>;
27
+ registry: Registry;
28
+ /** Label every non-required field "(optional)" (localized) instead of relying on asterisks alone. */
29
+ showOptional: boolean;
30
+ options: BahtFormOptions;
31
+ /** L2 (workflow) derived per-field UI state, keyed by field key. Optional. */
32
+ fieldStates: Record<string, DerivedFieldState>;
33
+ /**
34
+ * Name of a view from `form.views`. Display-only: when set, only that view's
35
+ * fields are rendered and validated (the user can only fix what they see),
36
+ * but getData() still returns the FULL form — the server always validates
37
+ * the complete schema, views never change the submit payload.
38
+ */
39
+ view?: string | undefined;
40
+ /**
41
+ * Feature-flag values (spec 01 §12) — fields whose `flag` is off behave as
42
+ * if they were never in the schema: no render, no validation, no payload.
43
+ */
44
+ flags: FeatureFlags;
45
+ /** Key of the open tab section; the first one showing when unset or gone. */
46
+ tab: string;
47
+ /** Force every field readonly — a display-only render of this form's own layout/widths. */
48
+ readonly: boolean;
49
+ /**
50
+ * Enter in a single-line field (text, email, password, number, currency; never a textarea,
51
+ * and not while an input method is composing) calls `submit()`. Off by default, so a host
52
+ * that binds its own Enter handler does not submit twice.
53
+ */
54
+ submitOnEnter: boolean;
55
+ /** A save is in flight: every field is disabled, `aria-busy` is set and `submit()` does nothing. */
56
+ busy: boolean;
57
+ /**
58
+ * The session: the edits over `value`, the errors, what scripts set (spec 01 §14). Moved only
59
+ * by `send()` (core/engine/form-session.ts).
60
+ */
61
+ private session;
62
+ /** Sections folded right now. */
63
+ private folded;
64
+ private get edits();
65
+ private get errors();
66
+ private get fieldMessages();
67
+ private get formMessages();
68
+ /** What the session is told of this element on every step. */
69
+ private sessionInput;
70
+ /**
71
+ * One step of the session: it works out the next state and the events, this element keeps
72
+ * the state and dispatches them in order. `settled` runs between the two.
73
+ */
74
+ private send;
75
+ private stepping;
76
+ private readonly queued;
77
+ /** The sink of the step now running its scripts; `null` between steps. */
78
+ private stepSink;
79
+ /** The `g` handed to scripts, one per `form`: a handler may keep it and call it later. */
80
+ private scriptContext;
81
+ private g;
82
+ /** Read-only view: labels of reference ids, keyed `lookup\u0000id` (resolved async). */
83
+ private readonly referenceLabels;
84
+ private warnedLookups;
85
+ /** The `form` identity `load` scripts last ran for. */
86
+ private loadedForm;
87
+ /** `options_from` / `options_deps`: what each field has loaded (see form-options.ts). */
88
+ private readonly dynamicOptions;
89
+ /** Unknown `view` values already warned about — avoid re-warning on every render. */
90
+ private warnedViews;
91
+ /** applyFlags result, memoized on (form, flags) identity. */
92
+ private flagCache;
93
+ /**
94
+ * `form` as the host may actually have left it: a framework can connect the element
95
+ * before it binds the property, so internally it is optional until then.
96
+ */
97
+ private get assignedForm();
98
+ private get effectiveForm();
99
+ protected willUpdate(changed: Map<PropertyKey, unknown>): void;
100
+ /** A step that tells nothing and needs no options refetch: `willUpdate` syncs them itself. */
101
+ private step;
102
+ /** `sortedFields`, memoized on the (flag-resolved form, view) pair it was computed for. */
103
+ private sortedCache;
104
+ private get sortedFields();
105
+ private resolveSortedFields;
106
+ /**
107
+ * Visibility as of the last completed render, by key. A field that was
108
+ * hidden there and is visible now gets `baht-field--revealed` for one
109
+ * render so the stylesheet can fade it in; fields visible from the first
110
+ * render never animate (a form should not shimmer on mount).
111
+ */
112
+ private lastVisible;
113
+ private nextVisible;
114
+ private tabLayout;
115
+ private selectTab;
116
+ private toggleFold;
117
+ /** After a validate(): when no error can be seen, open the first tab that has one. */
118
+ private openTabWithError;
119
+ private renderTabStrip;
120
+ private revealClass;
121
+ private stateFor;
122
+ /** The row sub-field states of one repeater: `fieldStates` keys starting `key[`. */
123
+ private rowStatesFor;
124
+ /** What each repeater was last handed, so an unchanged render passes the same objects. */
125
+ private readonly rowStatesSeen;
126
+ private readonly rowErrorsSeen;
127
+ private rowErrorsFor;
128
+ /** Defaults that are fresh arrays, kept per descriptor so a re-render hands controls the same one. */
129
+ private readonly defaultsSeen;
130
+ /** `valueFor` for the render path: an unset collection field keeps one default array. */
131
+ private renderValueFor;
132
+ private valueFor;
133
+ /** Debounced keystrokes still in a control land in `edits` before anyone reads them. */
134
+ private flushTyped;
135
+ getData(): Record<string, unknown>;
136
+ /**
137
+ * Merge values programmatically. Runs each key's `change` scripts (like
138
+ * ServiceNow's g_form.setValue) but emits no `baht-change` — the host
139
+ * already knows, and a store adapter would otherwise loop.
140
+ */
141
+ setValue(patch: Record<string, unknown>): void;
142
+ /**
143
+ * Drop the user's edits to these keys, so each shows `value` again. For a host that refused an
144
+ * edit and has no new `value` to say so with: `<baht-workflow>` calls it when a rule wrote the
145
+ * field back (spec 02 §4). Emits nothing and runs no scripts.
146
+ */
147
+ revert(keys: readonly string[]): void;
148
+ /**
149
+ * Full validation pass: validators, then `submit` scripts (spec 01 §14). A
150
+ * script returning `false` blocks; its `addErrorMessage()` calls become
151
+ * `{ key: '$' }` errors so hosts see why.
152
+ */
153
+ validate(): {
154
+ valid: boolean;
155
+ errors: ValidationError[];
156
+ };
157
+ /**
158
+ * The host's Save: `validate()`, then `baht-submit { data }` when it passes. Returns
159
+ * whether it submitted (never while `busy`).
160
+ */
161
+ submit(): boolean;
162
+ /** `submit-on-enter`: Enter in a single-line control submits (spec 01 §6). */
163
+ private onKeydown;
164
+ reset(): void;
165
+ protected updated(changed: Map<PropertyKey, unknown>): void;
166
+ private onFieldInput;
167
+ /** `validateOn: 'blur'`: validate just the field the user left. */
168
+ private onFieldBlur;
169
+ private renderField;
170
+ /** `registry.references[field.reference]`, with `search` bound to the form's current data. */
171
+ /** A repeater column's lookup: it sees the form's data with its own row on top. */
172
+ private readonly rowLookup;
173
+ private lookupFor;
174
+ /** Read-only view of a reference: its resolved label once known, the raw id until then. */
175
+ private referenceText;
176
+ private uploaderFor;
177
+ private renderFieldMsg;
178
+ /**
179
+ * Resolve the descriptor at event time — it may have changed since the control
180
+ * was first rendered (the same node is reused across renders, see render()).
181
+ */
182
+ private onControlInput;
183
+ private renderReadonlyField;
184
+ private readonlyContext;
185
+ protected render(): TemplateResult;
186
+ }
187
+ declare global {
188
+ interface HTMLElementTagNameMap {
189
+ 'baht-form': BahtForm;
190
+ }
191
+ }