@revolist/ui 4.0.5-rc → 4.0.6-rc

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 (153) hide show
  1. package/MIGRATION.md +36 -0
  2. package/OWNERSHIP.md +10 -10
  3. package/README.md +6 -4
  4. package/_chunks/{calendar-DsXIhybL.js → calendar-QWDyYzdo.js} +1 -1
  5. package/_chunks/{chart-frame-CuZABXVI.js → chart-frame-hcOlnQ1K.js} +13 -9
  6. package/_chunks/{choice-chips-BhP8MZjs.js → choice-chips-A6WR-WJe.js} +1 -1
  7. package/_chunks/{color-picker-B4TQvxxB.js → color-picker-BK4W1nd6.js} +1 -1
  8. package/_chunks/{component-qKctqdzk.js → component-CMkF17YZ.js} +5 -5
  9. package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
  10. package/_chunks/{configurator-actions-C19O1rda.js → configurator-actions-By8WSL2m.js} +3 -3
  11. package/_chunks/{control-BkWukVt9.js → control-mlH7l0Uq.js} +30 -5
  12. package/_chunks/{controls-BLQnWEd7.js → controls-FUU-MUKC.js} +26 -33
  13. package/_chunks/{date-control-Cgw5PwlZ.js → date-control-Dup_P3w5.js} +1 -1
  14. package/_chunks/{date-time-B8rK5gpC.js → date-time-9z6pAG5T.js} +304 -281
  15. package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
  16. package/_chunks/{duration-DwFXonEV.js → duration-D7oRjsmP.js} +5 -2
  17. package/_chunks/{editor-popup-BaaxL89T.js → editor-popup-ByU7qiub.js} +8 -7
  18. package/_chunks/{field-configurator-1eQP0tKy.js → field-configurator-BCINdXpU.js} +1 -1
  19. package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
  20. package/_chunks/{icon-toolbar-xbqa0hu9.js → icon-toolbar-DSjOdwM7.js} +39 -33
  21. package/_chunks/mount-Cw2zk58T.js +266 -0
  22. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  23. package/_chunks/{native-control-DO0d1kgx.js → native-control-pFMuHf3G.js} +106 -98
  24. package/_chunks/{number-input-s9ddPwX6.js → number-input-DqXV6vgP.js} +2 -2
  25. package/_chunks/{picker-AY05b41W.js → picker-gEGTu1Ki.js} +2 -2
  26. package/_chunks/{popup-UXGCiv3n.js → popup-C35Isk7p.js} +19 -8
  27. package/_chunks/{rating-choice-BEs_QFZC.js → rating-choice-DbxdUJr-.js} +1 -1
  28. package/_chunks/{reorder-list-A49l172e.js → reorder-list-B0_13Sja.js} +1 -1
  29. package/_chunks/{request-trail-DCOfa5zw.js → request-trail-CCSK6TJA.js} +2 -2
  30. package/_chunks/{rich-text-xfMWadGi.js → rich-text-5rnc8lpI.js} +3 -3
  31. package/_variables.scss +33 -32
  32. package/ai/index.js +2 -2
  33. package/ai/results/_style.scss +3 -0
  34. package/assignee/assignee.scss +5 -1
  35. package/assignee/index.js +2 -2
  36. package/avatar/index.d.ts +25 -2
  37. package/avatar/index.js +1 -1
  38. package/brush-range/component.d.ts +1 -3
  39. package/brush-range/component.js +8 -9
  40. package/buttons/remove-button.d.ts +1 -1
  41. package/buttons/remove-button.style.scss +1 -1
  42. package/buttons/svg-button.js +1 -1
  43. package/calendar/calendar.js +1 -1
  44. package/calendar/index.js +2 -2
  45. package/checkbox/checkbox.scss +1 -22
  46. package/choice-chips/index.js +1 -1
  47. package/color-palette/color-picker.js +1 -1
  48. package/color-palette/common-palettes.d.ts +1 -1
  49. package/color-palette/common-palettes.js +1 -1
  50. package/color-palette/native.d.ts +15 -2
  51. package/component-catalog.d.ts +3 -6
  52. package/configurator-actions.js +1 -1
  53. package/configurator-aggregation-list.js +1 -1
  54. package/configurator-drop-zone.d.ts +1 -1
  55. package/configurator-drop-zone.js +1 -1
  56. package/control-presentation.d.ts +8 -2
  57. package/control-presentation.js +1 -1
  58. package/controls.js +1 -1
  59. package/core/editor-popup-position.d.ts +6 -2
  60. package/core/editor-popup.d.ts +4 -0
  61. package/core/editor-popup.js +1 -1
  62. package/date-time/attach.d.ts +1 -1
  63. package/date-time/field.d.ts +3 -2
  64. package/date-time/index.js +1 -1
  65. package/date-time/style.scss +16 -2
  66. package/date-time/types.d.ts +5 -1
  67. package/dialog/dialog-action-footer.d.ts +17 -2
  68. package/dialog/dialog.dom.d.ts +15 -2
  69. package/dialog/dialog.dom.js +3 -3
  70. package/dialog/dialog.parts.d.ts +1 -1
  71. package/dialog/dialog.parts.js +1 -1
  72. package/distribution-chart/_distribution-chart.scss +14 -0
  73. package/distribution-chart/area-chart.js +1 -1
  74. package/distribution-chart/bar-chart.js +1 -1
  75. package/distribution-chart/index.d.ts +1 -1
  76. package/distribution-chart/line-chart.js +1 -1
  77. package/dropdown/content.js +1 -1
  78. package/dropdown/control.js +1 -1
  79. package/dropdown/editor-dropdown.style.scss +5 -0
  80. package/dropdown/index.js +2 -2
  81. package/dropdown/lookup-field.d.ts +5 -0
  82. package/dropdown/lookup-field.js +1 -1
  83. package/dropdown/popup.js +1 -1
  84. package/duration/index.js +1 -1
  85. package/editor-actions.js +1 -1
  86. package/field-configurator.d.ts +8 -0
  87. package/field-configurator.js +1 -1
  88. package/filter/filters/slider/_slider.scss +8 -8
  89. package/filter/filters/slider/single.js +1 -1
  90. package/filter-badge.js +1 -1
  91. package/filter-controls.d.ts +0 -1
  92. package/filter-controls.js +5 -6
  93. package/form-controls/index.d.ts +10 -2
  94. package/form-controls/index.js +3 -3
  95. package/formatting/index.d.ts +1 -1
  96. package/formatting/index.js +1 -1
  97. package/framework.js +202 -205
  98. package/icon-toolbar.d.ts +5 -1
  99. package/icon-toolbar.js +1 -1
  100. package/masked-input/index.js +1 -1
  101. package/native-control.js +1 -1
  102. package/native-controls.d.ts +54 -2
  103. package/native-styles.css +1 -1
  104. package/native.js +29 -29
  105. package/number-input/index.js +1 -1
  106. package/package.json +1 -1
  107. package/pagination.js +11 -11
  108. package/pdf-viewer/index.js +1 -1
  109. package/preact.d.ts +1 -6
  110. package/preact.js +60 -60
  111. package/rating-choice.js +1 -1
  112. package/react-control.d.ts +2 -0
  113. package/react-control.js +2 -2
  114. package/react.d.ts +0 -6
  115. package/react.js +54 -54
  116. package/reorder-list.js +1 -1
  117. package/resource-picker/resource-picker-popup.js +1 -1
  118. package/rich-text/index.js +1 -1
  119. package/search-input/index.js +1 -1
  120. package/search-input/native.d.ts +21 -2
  121. package/select.js +1 -1
  122. package/styles/_alert.scss +18 -4
  123. package/styles/_editor-slider.scss +0 -2
  124. package/styles/_field-configurator.scss +2 -1
  125. package/styles/_fields-grid.scss +2 -0
  126. package/styles/_palette.scss +0 -24
  127. package/styles/_primitives.scss +3 -1
  128. package/styles.css +1 -1
  129. package/styles.scss +2 -2
  130. package/surfaces.d.ts +34 -3
  131. package/surfaces.js +2 -2
  132. package/svelte.js +3 -3
  133. package/switch/index.js +1 -1
  134. package/time-grid.d.ts +0 -1
  135. package/time-grid.js +4 -4
  136. package/timeline-track/index.js +1 -1
  137. package/ui.css +1 -1
  138. package/vue.d.ts +2 -21
  139. package/vue.js +83 -89
  140. package/_chunks/dialog.parts-BSbvnEwX.js +0 -134
  141. package/_chunks/mount-D1i5DLRn.js +0 -266
  142. package/avatar/index.view.d.ts +0 -25
  143. package/color-palette/native.view.d.ts +0 -15
  144. package/control-presentation.view.d.ts +0 -8
  145. package/dialog/dialog-action-footer.view.d.ts +0 -20
  146. package/dialog/dialog.dom.view.d.ts +0 -15
  147. package/form-controls/index.view.d.ts +0 -10
  148. package/formatting/control-tooltip.d.ts +0 -2
  149. package/native-controls.view.d.ts +0 -54
  150. package/search-input/native.view.d.ts +0 -21
  151. package/surfaces.view.d.ts +0 -33
  152. /package/styles/{legacy-pagination.css → pagination.css} +0 -0
  153. /package/styles/{legacy-rating.css → rating.css} +0 -0
@@ -1,266 +0,0 @@
1
- import { i as e, r as t } from "./preact.module-BBM36DnO.js";
2
- import { c as n, i as r, t as i } from "./hooks.module-CG3gN83z.js";
3
- import { E as a, _ as o, a as s, c, i as l, m as u, n as d, o as f, p, r as m, t as h, u as g, v as _, y as v } from "./request-trail-DCOfa5zw.js";
4
- import { t as y } from "./jsxRuntime.module-F6UFnpT-.js";
5
- import { n as b } from "./popup-UXGCiv3n.js";
6
- import { t as x } from "./controls-BLQnWEd7.js";
7
- import { HistoryControls as S } from "../history-controls.js";
8
- import { n as C } from "./render-m5eMMwFR.js";
9
- //#region src/ai/transcript.ts
10
- var w = (e) => new TextEncoder().encode(JSON.stringify(e)).byteLength, T = (e) => {
11
- if (!e) return "";
12
- if (w(e) <= 16384) return e;
13
- let t = 0, n = Math.min(e.length, 16384);
14
- for (; t < n;) {
15
- let r = Math.ceil((t + n) / 2);
16
- w(e.slice(0, r) + "…") <= 16384 ? t = r : n = r - 1;
17
- }
18
- return /[\uD800-\uDBFF]/.test(e.charAt(t - 1)) && t--, e.slice(0, t) + "…";
19
- }, E = class {
20
- messages = [];
21
- epoch = 0;
22
- initialized = !1;
23
- requestId;
24
- ignoredRequest;
25
- currentId;
26
- active = !1;
27
- lastPhase;
28
- key = "";
29
- sequence = 0;
30
- update(e) {
31
- if (this.initialized ||= (this.epoch = e.chatKey ?? 0, !0), (e.chatKey ?? 0) !== this.epoch) {
32
- this.epoch = e.chatKey ?? 0, this.messages = [], this.requestId = void 0, this.ignoredRequest = e.request?.id, this.currentId = void 0, this.active = !1, this.key = "", this.lastPhase = void 0;
33
- return;
34
- }
35
- if (e.phase === "idle" || e.request?.id === this.ignoredRequest && this.ignoredRequest !== void 0) return;
36
- let t = e.request, n = !!t && t.id !== this.requestId, r = e.phase === "completed" && e.result && w(e.result) <= 16384 ? structuredClone(e.result) : void 0, i = {
37
- text: T(e.message),
38
- phase: e.phase,
39
- details: e.phase === "completed" && !r && e.resultDetails ? T(e.resultDetails) : void 0,
40
- pending: !!e.pendingAction,
41
- result: r
42
- }, a = JSON.stringify([t?.id, i]);
43
- if (!n && a === this.key || !n && !i.text && !i.pending) return;
44
- let o = this.messages.find((e) => e.id === this.currentId), s = this.lastPhase === "completed" && e.phase === "understanding" && o?.from === "assistant", c = o?.from === "system" && o.phase === "completed" && (e.phase === "applying" || e.phase === "completed");
45
- if (n) {
46
- this.requestId = t.id, this.ignoredRequest = void 0;
47
- let e = "turn:" + ++this.sequence;
48
- this.currentId = e + ":assistant", this.messages = [
49
- ...this.messages,
50
- {
51
- id: e + ":user",
52
- group: e,
53
- from: "user",
54
- text: T(t.prompt)
55
- },
56
- {
57
- id: this.currentId,
58
- group: e,
59
- from: "assistant",
60
- ...i
61
- }
62
- ];
63
- } else if ((this.active || s || c) && o) this.messages = this.messages.map((e) => e.id === this.currentId ? {
64
- ...e,
65
- ...i
66
- } : e);
67
- else {
68
- let e = "system:" + ++this.sequence;
69
- this.currentId = e, this.messages = [...this.messages, {
70
- id: e,
71
- group: e,
72
- from: "system",
73
- ...i
74
- }];
75
- }
76
- for (this.active = e.phase === "understanding" || e.phase === "applying" || !!e.pendingAction, this.lastPhase = e.phase, this.key = a; this.messages.length > 50 || w(this.messages) > 65536;) {
77
- let e = this.messages[0].group;
78
- this.messages = this.messages.filter((t) => t.group !== e);
79
- }
80
- }
81
- clear() {
82
- this.messages = [], this.requestId = void 0, this.currentId = void 0, this.active = !1, this.key = "";
83
- }
84
- };
85
- //#endregion
86
- //#region src/ai/mount.tsx
87
- function D(w, T) {
88
- let D = (e) => a(e, T.translations), O = !1, k = T.suggestions ?? [], A, j = _(T.promptHistory?.items ?? []), M = new E(), N = T.mode === "chat", P = [], F = 0, I = !1, L = "";
89
- function R(e) {
90
- if (e.phase === "idle" || !e.message || e.pendingAction) return;
91
- let t = e.phase === "understanding" || e.phase === "applying", n = JSON.stringify([
92
- e.phase,
93
- e.message,
94
- e.matchedRows,
95
- e.resultDetails
96
- ]);
97
- if (n === L) return;
98
- let r = P.at(-1), i = {
99
- id: I && r ? r.id : String(++F),
100
- title: e.message,
101
- busy: t,
102
- tone: e.phase === "error" ? "danger" : e.phase === "completed" ? "success" : "neutral",
103
- description: e.phase === "completed" && e.matchedRows !== void 0 ? T.countLabel?.(e.matchedRows) ?? D("{count} matching rows").replace("{count}", e.matchedRows.toLocaleString()) : void 0,
104
- detail: e.phase === "completed" && !e.result ? e.resultDetails : void 0
105
- };
106
- P = [...I && r ? P.slice(0, -1) : P, i].slice(-50), I = t, L = n;
107
- }
108
- function z({ state: t }) {
109
- let [a, E] = r(""), [O, A] = r(j), [F, I] = r(!1), L = i();
110
- n(() => {
111
- E(""), L.current = void 0;
112
- }, [t.chatKey]);
113
- let R = t.phase === "understanding" || t.phase === "applying", z = !!t.pendingAction, V = t.steps ?? [], H = i(!1);
114
- n(() => {
115
- H.current && !z && !R && w.querySelector("textarea")?.focus(), H.current = z || R && H.current;
116
- }, [z, R]), n(() => {
117
- if (R || z || t.phase === "idle" || L.current === void 0) return;
118
- let e = L.current;
119
- L.current = void 0, t.phase === "completed" && E((t) => t.trim() === e ? "" : t);
120
- }, [t]);
121
- let U = (e) => {
122
- L.current = e.trim(), T.promptHistory && (j = _([...j, e]), A(j), T.promptHistory.onChange?.([...j])), T.onSubmit(e);
123
- }, W = /* @__PURE__ */ y(o, {
124
- items: t.choices?.length ? t.choices : t.suggestions?.length ? t.suggestions : k,
125
- onSelect: (e) => {
126
- R || z || (E(e), U(e));
127
- },
128
- disabled: R || z
129
- }), G = /* @__PURE__ */ y(m, {
130
- label: T.prompt?.label ?? "Ask AI to change this view",
131
- ...T.prompt,
132
- value: a,
133
- onValueChange: E,
134
- onSubmit: U,
135
- onStop: T.onStop,
136
- busy: R,
137
- promptHistory: T.promptHistory ? O : void 0,
138
- disabled: z,
139
- hint: V.length ? "" : T.prompt?.hint,
140
- footer: W,
141
- actions: /* @__PURE__ */ y(h, {
142
- ...T.trail,
143
- items: V,
144
- onRemove: (e) => T.onRemoveStep?.(e),
145
- onClear: T.onReset,
146
- onEmpty: () => w.querySelector("textarea")?.focus(),
147
- disabled: R || z,
148
- removalsDisabled: !T.onRemoveStep || t.canEditSteps === !1,
149
- clearDescription: T.trail?.clearDescription ?? "Restore the starting view",
150
- clearLabel: T.trail?.clearLabel ?? T.resetLabel ?? "Clear all",
151
- changedMessage: !R && V.length > 0 && t.canEditSteps === !1 ? T.trail?.changedMessage ?? "The view changed manually. Start a new request to continue." : void 0
152
- })
153
- }), K = t.pendingAction && /* @__PURE__ */ y(u, {
154
- ...t.pendingAction,
155
- disabled: R || !T.onApplyAction,
156
- onApply: () => T.onApplyAction?.(),
157
- onCancel: () => T.onCancelAction?.()
158
- }), q = /* @__PURE__ */ y("div", {
159
- class: "rv-ai-result-actions",
160
- children: [
161
- (T.onUndoData || T.onRedoData) && /* @__PURE__ */ y(S, {
162
- onUndo: T.onUndoData,
163
- onRedo: T.onRedoData,
164
- canUndo: !R && !z && !!t.canUndoData,
165
- canRedo: !R && !z && !!t.canRedoData,
166
- undoLabel: D("Undo data change"),
167
- redoLabel: D("Redo data change"),
168
- label: D("Data history")
169
- }),
170
- /* @__PURE__ */ y(x, {
171
- disabled: R || z || !t.canRestore,
172
- onClick: T.onRestore,
173
- size: "compact",
174
- children: D(T.restoreLabel ?? "Restore previous view")
175
- }),
176
- !V.length && /* @__PURE__ */ y(x, {
177
- disabled: R || z,
178
- onClick: T.onReset,
179
- size: "compact",
180
- variant: "ghost",
181
- children: D(T.resetLabel ?? "Reset view")
182
- }),
183
- N && T.showClearChat !== !1 && /* @__PURE__ */ y(x, {
184
- size: "compact",
185
- variant: "ghost",
186
- disabled: R || z || !T.onClearChat || !M.messages.length,
187
- onClick: () => T.onClearChat?.(),
188
- children: D("Clear chat")
189
- })
190
- ]
191
- }), J = T.showHistoryControls === !1 ? null : T.controlsMountTo ? b(q, T.controlsMountTo) : q;
192
- return /* @__PURE__ */ y(p, {
193
- layout: T.layout,
194
- translations: T.translations,
195
- label: T.label,
196
- busy: R,
197
- footer: T.footer,
198
- children: N ? /* @__PURE__ */ y(d, {
199
- className: "rv-ai-mounted-chat",
200
- children: [
201
- /* @__PURE__ */ y(l, {
202
- busy: R,
203
- children: [!M.messages.length && T.emptyState && /* @__PURE__ */ y(s, { ...T.emptyState }), M.messages.map((e) => /* @__PURE__ */ y(f, {
204
- from: e.from,
205
- isStreaming: e.phase === "understanding" || e.phase === "applying",
206
- children: [
207
- e.from === "user" ? /* @__PURE__ */ y(c, { children: e.text }) : e.phase === "preview" && e.pending && e.id === M.messages.at(-1)?.id && t.pendingAction ? null : /* @__PURE__ */ y(c, { children: e.phase === "understanding" || e.phase === "applying" || e.phase === "error" || e.phase === "cancelled" ? /* @__PURE__ */ y(g, {
208
- title: e.text,
209
- status: e.phase === "understanding" || e.phase === "applying" ? "running" : e.phase === "error" ? "error" : "cancelled"
210
- }) : e.text }),
211
- e.result ? /* @__PURE__ */ y(v, {
212
- result: e.result,
213
- renderTable: T.renderTable
214
- }) : e.details && /* @__PURE__ */ y("pre", {
215
- class: "rv-ai-chat-result",
216
- children: e.details
217
- }),
218
- e.id === M.messages.at(-1)?.id && e.pending && K
219
- ]
220
- }, e.id))]
221
- }),
222
- G,
223
- J
224
- ]
225
- }) : /* @__PURE__ */ y(e, { children: [
226
- G,
227
- K,
228
- t.phase === "completed" && t.result && /* @__PURE__ */ y(v, {
229
- result: t.result,
230
- renderTable: T.renderTable
231
- }),
232
- !!P.length && /* @__PURE__ */ y(C, {
233
- className: "rv-ai-activity",
234
- title: D("Activity"),
235
- compact: !0,
236
- autoDismissMs: T.activityDurationMs,
237
- onDismissItem: (e) => {
238
- P = P.filter((t) => t.id !== e), B();
239
- },
240
- collapsed: F,
241
- onCollapsedChange: I,
242
- collapseLabel: D("Collapse activity"),
243
- expandLabel: D("Expand activity"),
244
- items: P
245
- }),
246
- J
247
- ] })
248
- });
249
- }
250
- let B = () => {
251
- !O && A && t(/* @__PURE__ */ y(z, { state: A }), w);
252
- };
253
- return {
254
- update(e) {
255
- N ? M.update(e) : R(e), A = e, B();
256
- },
257
- setSuggestions(e) {
258
- k = [...e], B();
259
- },
260
- destroy() {
261
- O || (O = !0, j = [], M.clear(), t(null, w));
262
- }
263
- };
264
- }
265
- //#endregion
266
- export { D as t };
@@ -1,25 +0,0 @@
1
- import { h } from '../_vendor/preact/src/index';
2
- export { AVATAR_CELL_BACKGROUNDS } from '../color-palette/common-palettes';
3
- export type AvatarTemplateOptions = {
4
- ariaLabel?: string;
5
- className?: string;
6
- index?: number;
7
- initials?: string;
8
- key?: string | number;
9
- label?: string;
10
- rectangular?: boolean;
11
- size?: number;
12
- style?: Record<string, string | number | null | undefined>;
13
- value?: unknown;
14
- };
15
- /** Shared Preact avatar, including image-error fallback. */
16
- export declare function AvatarElement({ options }: {
17
- options?: AvatarTemplateOptions;
18
- }): h.JSX.Element;
19
- export declare function createAvatarElement(document: Document, options?: AvatarTemplateOptions): HTMLSpanElement;
20
- export declare function getAvatarCellBackground(index?: number): "linear-gradient(135deg, #7dd3fc, #2563eb)" | "linear-gradient(135deg, #facc15, #b45309)" | "linear-gradient(135deg, #f9a8d4, #be185d)" | "linear-gradient(135deg, #a5b4fc, #4f46e5)" | "linear-gradient(135deg, #86efac, #15803d)" | "linear-gradient(135deg, #fda4af, #be123c)" | "linear-gradient(135deg, #c4b5fd, #7c3aed)" | "linear-gradient(135deg, #fdba74, #c2410c)";
21
- export declare function getAvatarInitials(value: unknown): string;
22
- export declare function getAvatarIndex(value: unknown): number;
23
- export declare function avatarTemplate(h: any, options?: AvatarTemplateOptions): any;
24
- /** Shared avatar-and-label presentation; resource/row lookup stays with consumers. */
25
- export declare function avatarWithTextTemplate(h: any, options?: AvatarTemplateOptions): any;
@@ -1,15 +0,0 @@
1
- export interface NativeColorPickerProps {
2
- label: string;
3
- value?: string;
4
- disabled?: boolean;
5
- optional?: boolean;
6
- defaultLabel: string;
7
- customLabel: string;
8
- invalidColor?: string;
9
- colorLabels: Readonly<Record<string, string>>;
10
- onChange(value: string | undefined): void;
11
- }
12
- /** Compatibility mount API; palette markup and interaction belong to ColorPicker. */
13
- export declare function mountColorPicker(host: HTMLElement, props: NativeColorPickerProps): {
14
- destroy(): void;
15
- };
@@ -1,8 +0,0 @@
1
- import { ControlTag, ControlAttributes } from './control-attributes';
2
- export * from './control-attributes';
3
- export declare function renderControl<H extends (...args: any[]) => any>(h: H, tag: ControlTag, attributes?: ControlAttributes | null, ...children: any[]): ReturnType<H>;
4
- export declare function createControl<K extends ControlTag>(document: Document, tag: K, attributes?: ControlAttributes): HTMLElementTagNameMap[K];
5
- export declare function registerControl<T extends object>(component: T, tag: ControlTag): T;
6
- export declare function nativeControlTag(type: unknown): string | undefined;
7
- /** Decorate a native icon control after installing its trusted bundled SVG. */
8
- export declare function decorateIconAction(element: HTMLElement, label: string): void;
@@ -1,20 +0,0 @@
1
- import { h } from '../_vendor/preact/src/index';
2
- import { ElementFactory } from '../native-controls';
3
- export interface NativeDialogAction {
4
- label?: string;
5
- disabled?: boolean;
6
- onClick?: () => void;
7
- }
8
- export interface NativeDialogActionFooterProps {
9
- cancel?: NativeDialogAction | false;
10
- save?: NativeDialogAction | false;
11
- deleteAction?: NativeDialogAction | false;
12
- reset?: NativeDialogAction | false;
13
- }
14
- /** One TSX composition for Preact consumers and element-returning host adapters. */
15
- export declare function ActionFooterView({ cancel, save, deleteAction, reset, start, end, children, actionsClass, class: className, ...props }: Record<string, any>): h.JSX.Element;
16
- /** Compatibility signature retained for existing Preact consumers. */
17
- export declare function renderDialogActionFooter<H extends ElementFactory>(_h: H, props: Record<string, any>): ReturnType<H>;
18
- export declare function mountDialogActionFooter(host: HTMLElement, props: NativeDialogActionFooterProps): {
19
- destroy(): void;
20
- };
@@ -1,15 +0,0 @@
1
- import { DialogButtonVariant, DialogOpenOptions } from './dialog.types';
2
- export interface DialogElements {
3
- readonly root: HTMLElement;
4
- readonly surface: HTMLElement;
5
- readonly header: HTMLElement;
6
- readonly body: HTMLElement;
7
- readonly footer: HTMLElement;
8
- readonly actions: HTMLElement;
9
- }
10
- /** Element-returning compatibility API; shared TSX owns the entire dialog chrome. */
11
- export declare function createDialogElements(document: Document, options: DialogOpenOptions, close: () => void): DialogElements;
12
- export declare function createDialogCloseButton(document: Document, label: string, close: () => void): HTMLButtonElement;
13
- export declare function createDialogButton(document: Document, label: string, action: () => void, variant?: DialogButtonVariant): HTMLButtonElement;
14
- export declare function trapDialogFocus(root: HTMLElement, event: KeyboardEvent): void;
15
- export declare function getDialogFocusableElements(root: HTMLElement): HTMLElement[];
@@ -1,10 +0,0 @@
1
- export interface FormFieldOptions {
2
- readonly label: string;
3
- readonly control: HTMLElement;
4
- readonly hint?: string;
5
- readonly className?: string;
6
- }
7
- export declare function createFormField(document: Document, options: FormFieldOptions): HTMLLabelElement;
8
- export declare function createTextControl(document: Document, placeholder: string): HTMLInputElement;
9
- /** DOM counterpart of Dropdown; callers own its lifetime. */
10
- export { createDropdownControl } from '../dropdown/control';
@@ -1,2 +0,0 @@
1
- /** Compatibility exports; all tooltip behavior is owned by the UI core. */
2
- export { useTooltip, useControlTooltip, ControlTooltip } from '../core/tooltip';
@@ -1,54 +0,0 @@
1
- /** Renderer-neutral controls shared by native DOM, Stencil and Preact hosts. */
2
- export type ElementFactory = (...args: any[]) => any;
3
- export declare function renderLoadingIndicator<H extends ElementFactory>(h: H, options: {
4
- className?: string;
5
- label?: string;
6
- ref?: (element?: HTMLElement) => void;
7
- showSpinner?: boolean;
8
- }): ReturnType<H>;
9
- export declare function createButtonElement(document: Document, options: {
10
- label: string;
11
- text?: string;
12
- disabled?: boolean;
13
- className?: string;
14
- onClick?: (event: MouseEvent) => void;
15
- }): HTMLButtonElement;
16
- export declare function renderMenuItem<H extends ElementFactory>(h: H, options: {
17
- label: string;
18
- disabled: boolean;
19
- submenu: boolean;
20
- onActivate: () => void;
21
- style?: string;
22
- }): ReturnType<H>;
23
- export declare function renderRatingStars<H extends ElementFactory>(h: H, value: number, maximum?: number): ReturnType<H>[];
24
- export interface ScalarSliderOptions {
25
- min: number;
26
- max: number;
27
- step: number;
28
- value: number;
29
- hideValue?: boolean;
30
- displayValue?: string | number;
31
- formatValue?: (value: number) => string | number;
32
- thresholdClassNames?: string;
33
- thresholds?: readonly {
34
- value: number;
35
- className: string;
36
- }[];
37
- label?: string;
38
- onChange: (value: number, event: Event) => void;
39
- onMouseDown?: (event: MouseEvent) => void;
40
- }
41
- /** Shared scalar slider presentation; edit commits and threshold policy are caller-owned. */
42
- export declare function renderScalarSlider<H extends ElementFactory>(h: H, options: ScalarSliderOptions): ReturnType<H>;
43
- export interface CounterOptions {
44
- value: number;
45
- min: number;
46
- max: number;
47
- step: number;
48
- hideValue?: boolean;
49
- onChange: (value: number, event: MouseEvent) => void;
50
- decreaseLabel?: string;
51
- increaseLabel?: string;
52
- onMouseDown?: (event: MouseEvent) => void;
53
- }
54
- export declare function renderCounter<H extends ElementFactory>(h: H, options: CounterOptions): ReturnType<H>;
@@ -1,21 +0,0 @@
1
- export interface SearchPresentation {
2
- rootClassName?: string;
3
- inputClassName?: string;
4
- iconClassName?: string;
5
- shortcutClassName?: string;
6
- hideIcon?: boolean;
7
- icon?: any;
8
- shortcut?: any;
9
- leading?: any;
10
- trailing?: any;
11
- testId?: string;
12
- inputAttributes?: Record<string, any>;
13
- }
14
- /** One search composition for native, grid and Preact rendering. */
15
- export declare function renderSearchInput<H extends (...args: any[]) => any>(h: H, options: SearchPresentation): ReturnType<H>;
16
- export declare function createSearchInput(document: Document, options: Omit<SearchPresentation, 'icon'> & {
17
- iconSvg: string;
18
- }): {
19
- root: HTMLElement;
20
- input: HTMLInputElement;
21
- };
@@ -1,33 +0,0 @@
1
- import { DialogHandle, DialogOpenOptions } from './dialog/dialog.types';
2
- export interface DialogEnvironment {
3
- beforeMount?: (root: HTMLElement) => void;
4
- onOpen?: (options: DialogOpenOptions) => void;
5
- restoreFocus?: (explicit?: HTMLElement, previous?: HTMLElement) => void;
6
- }
7
- /** Standalone modal lifecycle. Integration hooks belong to the host application. */
8
- export declare class DialogController {
9
- private readonly document;
10
- private readonly environment;
11
- private active?;
12
- constructor(document: Document, environment?: DialogEnvironment);
13
- get isOpen(): boolean;
14
- open(options: DialogOpenOptions): DialogHandle;
15
- close(root?: HTMLElement): void;
16
- destroy(): void;
17
- }
18
- export { PopoverController, TooltipController, createTooltipElement, type PopoverOptions } from './core/popover-controller';
19
- /** Keyboard behavior for menu surfaces; activation stays on native buttons. */
20
- export declare function attachMenuKeyboard(menu: HTMLElement, onClose?: () => void, options?: {
21
- closeOnEscape?: boolean;
22
- }): () => void;
23
- export interface ResizeOptions {
24
- value: number;
25
- min?: number;
26
- max?: number;
27
- step?: number;
28
- label: string;
29
- onChange: (value: number) => void;
30
- direction?: 'ltr' | 'rtl';
31
- }
32
- /** Width resize controller. An options reader keeps controlled updates from interrupting a drag. */
33
- export declare function attachResizeHandle(handle: HTMLElement, options: ResizeOptions | (() => ResizeOptions)): () => void;
File without changes