@alfadocs/ui-kit 1.43.0 → 1.44.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 (105) hide show
  1. package/dist/_chunks/{calendar-ChJQzRw-.js → calendar-U6N0F99w.js} +383 -359
  2. package/dist/_chunks/calendar-workspace-DBYAtdyd.js +12161 -0
  3. package/dist/_chunks/{face-scheme-Dg6ZyLKb.js → face-scheme-Bm6pe7R8.js} +265 -275
  4. package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js +741 -0
  5. package/dist/_chunks/{notes-panel-CRAovkjx.js → notes-panel-CY4KmDo-.js} +159 -152
  6. package/dist/_chunks/{panel-subview-PMBRPFOa.js → panel-subview-CYnuX-KR.js} +61 -40
  7. package/dist/_chunks/rich-text-editor-BYE6kK4u.js +3839 -0
  8. package/dist/_chunks/undo-2-CYNAzclj.js +26 -0
  9. package/dist/_chunks/variables-menu-vXUaSBj4.js +401 -0
  10. package/dist/agent-catalog.json +84 -3
  11. package/dist/agent-i18n/en.json +14 -3
  12. package/dist/components/calendar/calendar.d.ts +6 -0
  13. package/dist/components/calendar/index.js +1 -1
  14. package/dist/components/face-scheme/index.js +1 -1
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/notes-panel/index.js +1 -1
  17. package/dist/components/notes-panel/notes-panel.d.ts +4 -0
  18. package/dist/components/panel-subview/index.js +1 -1
  19. package/dist/components/panel-subview/panel-subview.d.ts +6 -0
  20. package/dist/components/rich-text-editor/editor-toolbar.d.ts +35 -3
  21. package/dist/components/rich-text-editor/index.d.ts +1 -1
  22. package/dist/components/rich-text-editor/index.js +1 -1
  23. package/dist/components/rich-text-editor/rich-text-editor.d.ts +98 -15
  24. package/dist/components/variables-menu/index.d.ts +4 -0
  25. package/dist/components/variables-menu/index.js +6 -0
  26. package/dist/components/variables-menu/variables-menu.agent.d.ts +10 -0
  27. package/dist/components/variables-menu/variables-menu.d.ts +53 -0
  28. package/dist/host-compat.css +5 -5
  29. package/dist/i18n/locales/ar.d.ts +77 -6
  30. package/dist/i18n/locales/ar.js +78 -7
  31. package/dist/i18n/locales/de.d.ts +77 -6
  32. package/dist/i18n/locales/de.js +78 -7
  33. package/dist/i18n/locales/el.d.ts +77 -6
  34. package/dist/i18n/locales/el.js +78 -7
  35. package/dist/i18n/locales/en.d.ts +77 -6
  36. package/dist/i18n/locales/en.js +85 -7
  37. package/dist/i18n/locales/es.d.ts +77 -6
  38. package/dist/i18n/locales/es.js +78 -7
  39. package/dist/i18n/locales/fr.d.ts +77 -6
  40. package/dist/i18n/locales/fr.js +78 -7
  41. package/dist/i18n/locales/hi.d.ts +77 -6
  42. package/dist/i18n/locales/hi.js +78 -7
  43. package/dist/i18n/locales/it.d.ts +77 -6
  44. package/dist/i18n/locales/it.js +78 -7
  45. package/dist/i18n/locales/ja.d.ts +77 -6
  46. package/dist/i18n/locales/ja.js +78 -7
  47. package/dist/i18n/locales/nl.d.ts +77 -6
  48. package/dist/i18n/locales/nl.js +78 -7
  49. package/dist/i18n/locales/pl.d.ts +77 -6
  50. package/dist/i18n/locales/pl.js +78 -7
  51. package/dist/i18n/locales/pt.d.ts +77 -6
  52. package/dist/i18n/locales/pt.js +78 -7
  53. package/dist/i18n/locales/ro.d.ts +77 -6
  54. package/dist/i18n/locales/ro.js +78 -7
  55. package/dist/i18n/locales/ru.d.ts +77 -6
  56. package/dist/i18n/locales/ru.js +78 -7
  57. package/dist/i18n/locales/sq.d.ts +77 -6
  58. package/dist/i18n/locales/sq.js +78 -7
  59. package/dist/i18n/locales/sv.d.ts +77 -6
  60. package/dist/i18n/locales/sv.js +78 -7
  61. package/dist/i18n/locales/tr.d.ts +77 -6
  62. package/dist/i18n/locales/tr.js +78 -7
  63. package/dist/i18n/locales/zh.d.ts +77 -6
  64. package/dist/i18n/locales/zh.js +78 -7
  65. package/dist/index.js +916 -913
  66. package/dist/locales/ar.json +78 -7
  67. package/dist/locales/de.json +78 -7
  68. package/dist/locales/el.json +78 -7
  69. package/dist/locales/en.json +78 -7
  70. package/dist/locales/es.json +78 -7
  71. package/dist/locales/fr.json +78 -7
  72. package/dist/locales/hi.json +78 -7
  73. package/dist/locales/it.json +78 -7
  74. package/dist/locales/ja.json +78 -7
  75. package/dist/locales/nl.json +78 -7
  76. package/dist/locales/pl.json +78 -7
  77. package/dist/locales/pt.json +78 -7
  78. package/dist/locales/ro.json +78 -7
  79. package/dist/locales/ru.json +78 -7
  80. package/dist/locales/sq.json +78 -7
  81. package/dist/locales/sv.json +78 -7
  82. package/dist/locales/tr.json +78 -7
  83. package/dist/locales/zh.json +78 -7
  84. package/dist/patterns/calendar/calendar-bookings-panel.d.ts +8 -3
  85. package/dist/patterns/calendar/calendar-care-rules.d.ts +49 -0
  86. package/dist/patterns/calendar/calendar-task-editor.d.ts +31 -0
  87. package/dist/patterns/calendar/calendar-workspace.d.ts +8 -1
  88. package/dist/patterns/calendar/calendar-workspace.model.d.ts +39 -12
  89. package/dist/patterns/calendar/calendar.data.d.ts +9 -0
  90. package/dist/patterns/calendar/calendar.journey.d.ts +35 -3
  91. package/dist/patterns/calendar/calendar.model.d.ts +23 -1
  92. package/dist/patterns/calendar/calendar.sheets.d.ts +21 -3
  93. package/dist/patterns/calendar/calendar.surface.d.ts +6 -1
  94. package/dist/patterns/calendar/calendar.types.d.ts +32 -1
  95. package/dist/patterns/calendar/index.js +1 -1
  96. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +58 -26
  97. package/dist/patterns/help-me-write-templates/index.d.ts +1 -1
  98. package/dist/patterns/help-me-write-templates/index.js +1 -1
  99. package/dist/tokens.css +6 -6
  100. package/package.json +5 -1
  101. package/dist/_chunks/calendar-workspace-DhXqqu-D.js +0 -11392
  102. package/dist/_chunks/help-me-write-templates-B-m7zgJa.js +0 -775
  103. package/dist/_chunks/highlighter-DSkckT2Q.js +0 -15
  104. package/dist/_chunks/rich-text-editor-DUMeifwc.js +0 -3176
  105. package/dist/_chunks/wand-sparkles-DAjKyhz7.js +0 -27
@@ -0,0 +1,26 @@
1
+ import { c as a } from "./createLucideIcon-DhHxpK9K.js";
2
+ /**
3
+ * @license lucide-react v1.22.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const o = [
9
+ ["path", { d: "m9 11-6 6v3h9l3-3", key: "1a3l36" }],
10
+ ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4", key: "14a9rk" }]
11
+ ], h = a("highlighter", o);
12
+ /**
13
+ * @license lucide-react v1.22.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */
18
+ const t = [
19
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
20
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
21
+ ], c = a("undo-2", t);
22
+ export {
23
+ h as H,
24
+ c as U
25
+ };
26
+ //# sourceMappingURL=undo-2-CYNAzclj.js.map
@@ -0,0 +1,401 @@
1
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as Q, useRef as _, useId as q, useMemo as h, useState as Y, useImperativeHandle as J, useEffect as W } from "react";
3
+ import { useTranslation as X } from "react-i18next";
4
+ import { n as z } from "./normalize-diacritics-BNGbFNlJ.js";
5
+ import { u as Z } from "./registry-DvAUVLHh.js";
6
+ import { S as ee } from "./search-QbWPlY5f.js";
7
+ import { F as O } from "./file-text-5yv6r2ls.js";
8
+ import { U as te } from "./user-cog-BTn98Arm.js";
9
+ import { B as se } from "./building-2-D33bLCWL.js";
10
+ import { C as ae } from "./calendar-days-BGWklvE-.js";
11
+ import { U as re } from "./user-B12p7bVF.js";
12
+ import { c as oe } from "./createLucideIcon-DhHxpK9K.js";
13
+ /**
14
+ * @license lucide-react v1.22.0 - ISC
15
+ *
16
+ * This source code is licensed under the ISC license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const ne = [
20
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
21
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
22
+ ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
23
+ ], ie = oe("history", ne), de = {
24
+ id: "variables-menu",
25
+ // Ephemeral filter (read) plus a persisted insert (write, not reversible by
26
+ // the same UI — undo lives in the editor, not here) and a close (read).
27
+ capabilities: ["filter", "select_single", "close"],
28
+ state: {
29
+ query: {
30
+ type: "string",
31
+ descriptionKey: "ui.agent.variablesMenu.state.query",
32
+ description: "Current filter text.",
33
+ read: (n) => n.getQuery()
34
+ },
35
+ visibleTokens: {
36
+ type: "string[]",
37
+ descriptionKey: "ui.agent.variablesMenu.state.visibleTokens",
38
+ description: "Tokens of the variables currently visible, in row order.",
39
+ read: (n) => n.getVisibleTokens()
40
+ }
41
+ },
42
+ actions: {
43
+ select_token: {
44
+ // Inserts a `[[TOKEN]]` chip into the host document.
45
+ safety: "write",
46
+ argsType: "{ token: string }",
47
+ argsSchema: {
48
+ type: "object",
49
+ properties: {
50
+ token: {
51
+ type: "string",
52
+ description: "Token of the variable to insert, without brackets."
53
+ }
54
+ },
55
+ required: ["token"]
56
+ },
57
+ idempotent: !1,
58
+ descriptionKey: "ui.agent.variablesMenu.actions.selectToken",
59
+ description: "Insert the given variable token at the anchor.",
60
+ examples: [
61
+ {
62
+ args: { token: "NOME" },
63
+ note: "Insert [[NOME]] and close the menu."
64
+ }
65
+ ],
66
+ invoke: (n, c) => {
67
+ n.selectToken(c.token);
68
+ }
69
+ },
70
+ close: {
71
+ safety: "read",
72
+ idempotent: !0,
73
+ descriptionKey: "ui.agent.variablesMenu.actions.close",
74
+ description: "Dismiss the menu without inserting anything.",
75
+ invoke: (n) => {
76
+ n.close();
77
+ }
78
+ }
79
+ },
80
+ domHooks: {
81
+ root: { attr: "data-component", value: "variables-menu" },
82
+ instanceId: {
83
+ attr: "data-component-id",
84
+ sourceProp: "id",
85
+ description: "Sourced from the id prop."
86
+ },
87
+ item: {
88
+ attr: "data-variable-token",
89
+ description: "Each visible row emits its token as data-variable-token."
90
+ }
91
+ }
92
+ }, C = [
93
+ "patient",
94
+ "appointment",
95
+ "practice",
96
+ "operator",
97
+ "document"
98
+ ], ce = {
99
+ recent: /* @__PURE__ */ a(ie, { "aria-hidden": "true", className: "ds:size-3" }),
100
+ patient: /* @__PURE__ */ a(re, { "aria-hidden": "true", className: "ds:size-3" }),
101
+ appointment: /* @__PURE__ */ a(ae, { "aria-hidden": "true", className: "ds:size-3" }),
102
+ practice: /* @__PURE__ */ a(se, { "aria-hidden": "true", className: "ds:size-3" }),
103
+ operator: /* @__PURE__ */ a(te, { "aria-hidden": "true", className: "ds:size-3" }),
104
+ document: /* @__PURE__ */ a(O, { "aria-hidden": "true", className: "ds:size-3" }),
105
+ other: /* @__PURE__ */ a(O, { "aria-hidden": "true", className: "ds:size-3" })
106
+ };
107
+ function U(n, c) {
108
+ const x = c.trim();
109
+ if (!x) return !0;
110
+ const l = z(x), u = l.replace(/\s+/g, "_"), i = z(n.token);
111
+ return z(n.label).includes(l) || i.includes(l) || i.includes(u);
112
+ }
113
+ const le = {
114
+ patient: "editor.variables.groups.patient",
115
+ appointment: "editor.variables.groups.appointment",
116
+ practice: "editor.variables.groups.practice",
117
+ operator: "editor.variables.groups.operator",
118
+ document: "editor.variables.groups.document",
119
+ other: "editor.variables.groups.other"
120
+ }, pe = {
121
+ patient: "Patient",
122
+ appointment: "Appointment",
123
+ practice: "Practice",
124
+ operator: "Operator",
125
+ document: "Document",
126
+ other: "Other"
127
+ }, ue = [
128
+ "ds:flex ds:flex-col",
129
+ "ds:w-[20rem] ds:overflow-hidden",
130
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
131
+ "ds:bg-[var(--popover)] ds:text-[color:var(--popover-foreground)]",
132
+ "ds:shadow-[var(--shadow-lg)]"
133
+ ].join(" "), me = [
134
+ "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
135
+ "ds:px-[var(--spacing-md)] ds:py-[var(--spacing-sm)]",
136
+ "ds:border-b ds:border-[color:var(--border)]"
137
+ ].join(" "), ve = [
138
+ "ds:w-full ds:bg-transparent ds:border-0 ds:outline-none",
139
+ "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]",
140
+ "ds:placeholder:text-[color:var(--muted-foreground)]"
141
+ ].join(" "), fe = [
142
+ "ds:flex ds:flex-col ds:overflow-y-auto",
143
+ "ds:[max-block-size:16.5rem] ds:p-[var(--spacing-2xs)]"
144
+ ].join(" "), ge = [
145
+ "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
146
+ "ds:px-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-2xs)]",
147
+ "ds:text-[length:var(--font-size-2xs)] ds:font-[var(--font-weight-bold)]",
148
+ "ds:tracking-[0.07em] ds:uppercase",
149
+ "ds:text-[color:var(--muted-foreground)]"
150
+ ].join(" "), be = [
151
+ "ds:group ds:flex ds:flex-col ds:justify-center ds:cursor-pointer",
152
+ "ds:gap-0 ds:rounded-[var(--radius-sm)]",
153
+ "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
154
+ "ds:min-h-8",
155
+ "ds:data-[active=true]:bg-[var(--violet-50)]",
156
+ "ds:[.theme-dark_&]:data-[active=true]:bg-[color-mix(in_oklab,var(--violet-700)_35%,transparent)]"
157
+ ].join(" "), he = "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", xe = "ds:flex-1 ds:truncate ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-medium)]", ke = [
158
+ "ds:font-[family-name:var(--font-mono)] ds:text-[length:var(--font-size-2xs)]",
159
+ "ds:text-[color:var(--muted-foreground)]",
160
+ "ds:bg-[var(--muted)] ds:rounded-[var(--radius-sm)]",
161
+ "ds:px-[var(--spacing-2xs)] ds:py-[0.0625rem]",
162
+ "ds:whitespace-nowrap",
163
+ "ds:group-data-[active=true]:bg-[var(--violet-100)]",
164
+ "ds:group-data-[active=true]:text-[color:var(--violet-700)]",
165
+ "ds:[.theme-dark_&]:group-data-[active=true]:bg-[color-mix(in_oklab,var(--violet-800)_55%,transparent)]",
166
+ "ds:[.theme-dark_&]:group-data-[active=true]:text-[color:var(--violet-100)]"
167
+ ].join(" "), ye = [
168
+ "ds:px-[var(--spacing-md)] ds:py-[var(--spacing-lg)] ds:text-center",
169
+ "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]"
170
+ ].join(" "), we = [
171
+ "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-md)]",
172
+ "ds:px-[var(--spacing-md)] ds:py-[var(--spacing-xs)]",
173
+ "ds:border-t ds:border-[color:var(--border)]",
174
+ "ds:bg-[var(--muted)]/40",
175
+ "ds:text-[length:var(--font-size-2xs)] ds:text-[color:var(--muted-foreground)]"
176
+ ].join(" "), j = [
177
+ "ds:font-[family-name:var(--font-mono)] ds:text-[length:var(--font-size-2xs)]",
178
+ "ds:border ds:border-[color:var(--border)] ds:border-b-2",
179
+ "ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-2xs)]",
180
+ "ds:bg-[var(--background)]"
181
+ ].join(" "), Ne = Q(function({
182
+ id: c,
183
+ className: x,
184
+ variables: l,
185
+ recentTokens: u,
186
+ query: i,
187
+ onQueryChange: V,
188
+ onSelect: k,
189
+ onClose: m,
190
+ searchFocusable: A = !0,
191
+ "aria-label": E,
192
+ onActiveDescendantChange: y
193
+ }, H) {
194
+ const { t: p } = X(), R = _(null), P = q().replace(/:/g, ""), v = `${c ?? `variables-menu-${P}`}-list`, T = h(() => {
195
+ const e = /* @__PURE__ */ new Map();
196
+ return l.forEach((r) => e.set(r.token, r)), e;
197
+ }, [l]), w = h(() => {
198
+ const e = [];
199
+ if (u && u.length > 0) {
200
+ const t = u.slice(0, 3).map((s) => T.get(s)).filter((s) => !!s).filter((s) => U(s, i)).map((s) => ({
201
+ key: `recent-${s.token}`,
202
+ group: "recent",
203
+ variable: s
204
+ }));
205
+ t.length > 0 && e.push({
206
+ key: "recent",
207
+ labelKey: "editor.variables.recent",
208
+ defaultLabel: "Recent",
209
+ items: t
210
+ });
211
+ }
212
+ const r = /* @__PURE__ */ new Map();
213
+ return l.forEach((t) => {
214
+ if (!U(t, i)) return;
215
+ const s = t.group && C.includes(t.group) ? t.group : "other", b = r.get(s) ?? [];
216
+ b.push({ key: `${s}-${t.token}`, group: s, variable: t }), r.set(s, b);
217
+ }), [...C, "other"].forEach((t) => {
218
+ const s = r.get(t);
219
+ s && s.length > 0 && e.push({
220
+ key: t,
221
+ labelKey: le[t],
222
+ defaultLabel: pe[t],
223
+ items: s
224
+ });
225
+ }), e;
226
+ }, [l, u, i, T]), o = h(() => w.flatMap((e) => e.items), [w]), [N, S] = Y(null), f = h(() => {
227
+ if (N !== null) {
228
+ const e = o.findIndex(
229
+ (r) => r.variable.token === N
230
+ );
231
+ if (e !== -1) return e;
232
+ }
233
+ return 0;
234
+ }, [N, o]), g = (e) => {
235
+ var r;
236
+ S(((r = o[e]) == null ? void 0 : r.variable.token) ?? null);
237
+ }, D = (e) => {
238
+ o.length !== 0 && g((f + e + o.length) % o.length);
239
+ }, B = () => {
240
+ const e = o[f];
241
+ return e ? (k(e.variable), m("select"), !0) : !1;
242
+ }, K = (e) => {
243
+ switch (e.key) {
244
+ case "ArrowDown":
245
+ return e.preventDefault(), D(1), !0;
246
+ case "ArrowUp":
247
+ return e.preventDefault(), D(-1), !0;
248
+ case "Home":
249
+ return e.preventDefault(), g(0), !0;
250
+ case "End":
251
+ return e.preventDefault(), g(Math.max(0, o.length - 1)), !0;
252
+ case "Enter":
253
+ return e.preventDefault(), B();
254
+ case "Escape":
255
+ return e.preventDefault(), m("escape"), !0;
256
+ default:
257
+ return !1;
258
+ }
259
+ };
260
+ J(H, () => ({
261
+ handleKeyDown: K,
262
+ focusSearch: () => {
263
+ var e;
264
+ return (e = R.current) == null ? void 0 : e.focus();
265
+ }
266
+ }));
267
+ const L = _(i);
268
+ L.current = i;
269
+ const M = _(o);
270
+ M.current = o;
271
+ const G = h(
272
+ () => ({
273
+ getQuery: () => L.current,
274
+ getVisibleTokens: () => M.current.map((e) => e.variable.token),
275
+ selectToken: (e) => {
276
+ const r = M.current.find(
277
+ (t) => t.variable.token === e
278
+ );
279
+ r && (k(r.variable), m("select"));
280
+ },
281
+ close: () => m("escape")
282
+ }),
283
+ [k, m]
284
+ );
285
+ Z(de, G, c);
286
+ const $ = o[f], I = $ ? `${v}-${$.key}` : void 0;
287
+ return W(() => {
288
+ y == null || y(I);
289
+ }, [I]), /* @__PURE__ */ d(
290
+ "div",
291
+ {
292
+ id: c,
293
+ "data-component": "variables-menu",
294
+ "data-component-id": c,
295
+ className: [ue, x].filter(Boolean).join(" "),
296
+ children: [
297
+ A ? /* @__PURE__ */ d("div", { className: me, children: [
298
+ /* @__PURE__ */ a(
299
+ ee,
300
+ {
301
+ "aria-hidden": "true",
302
+ className: "ds:size-3.5 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
303
+ }
304
+ ),
305
+ /* @__PURE__ */ a(
306
+ "input",
307
+ {
308
+ ref: R,
309
+ role: "combobox",
310
+ "aria-expanded": "true",
311
+ "aria-controls": v,
312
+ "aria-activedescendant": I,
313
+ "aria-autocomplete": "list",
314
+ "aria-label": E ?? p("editor.variables.menuLabel", "Variables"),
315
+ placeholder: p("editor.variables.search", "Search variables…"),
316
+ value: i,
317
+ onChange: (e) => V(e.target.value),
318
+ onKeyDown: K,
319
+ autoComplete: "off",
320
+ className: ve
321
+ }
322
+ )
323
+ ] }) : null,
324
+ /* @__PURE__ */ a(
325
+ "div",
326
+ {
327
+ id: v,
328
+ role: "listbox",
329
+ "aria-label": E ?? p("editor.variables.menuLabel", "Variables"),
330
+ className: fe,
331
+ children: o.length === 0 ? /* @__PURE__ */ a("div", { className: ye, children: p("editor.variables.empty", {
332
+ query: i,
333
+ defaultValue: 'No variables match "{{query}}"'
334
+ }) }) : w.map((e) => {
335
+ const r = `${v}-${e.key}-heading`;
336
+ return /* @__PURE__ */ d("div", { role: "group", "aria-labelledby": r, children: [
337
+ /* @__PURE__ */ d("div", { id: r, className: ge, children: [
338
+ ce[e.key],
339
+ /* @__PURE__ */ a("span", { children: p(e.labelKey, e.defaultLabel) })
340
+ ] }),
341
+ e.items.map((t) => {
342
+ const s = o.indexOf(t), b = s === f;
343
+ return /* @__PURE__ */ a(
344
+ "div",
345
+ {
346
+ id: `${v}-${t.key}`,
347
+ role: "option",
348
+ "aria-selected": b,
349
+ tabIndex: -1,
350
+ "data-active": b,
351
+ "data-variable-token": t.variable.token,
352
+ className: be,
353
+ onMouseDown: (F) => {
354
+ F.preventDefault(), g(s), k(t.variable), m("select");
355
+ },
356
+ onMouseMove: () => {
357
+ f !== s && g(s);
358
+ },
359
+ children: /* @__PURE__ */ d("div", { className: he, children: [
360
+ /* @__PURE__ */ a("span", { className: xe, children: t.variable.label }),
361
+ /* @__PURE__ */ a(
362
+ "span",
363
+ {
364
+ className: ke,
365
+ children: `[[${t.variable.token}]]`
366
+ }
367
+ )
368
+ ] })
369
+ },
370
+ t.key
371
+ );
372
+ })
373
+ ] }, e.key);
374
+ })
375
+ }
376
+ ),
377
+ /* @__PURE__ */ d("div", { className: we, children: [
378
+ /* @__PURE__ */ d("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
379
+ /* @__PURE__ */ a("kbd", { className: j, children: "↑↓" }),
380
+ p("editor.variables.footer.navigate", "navigate")
381
+ ] }),
382
+ /* @__PURE__ */ d("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
383
+ /* @__PURE__ */ a("kbd", { className: j, children: "↵" }),
384
+ p("editor.variables.footer.insert", "insert")
385
+ ] }),
386
+ /* @__PURE__ */ d("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
387
+ /* @__PURE__ */ a("kbd", { className: j, children: "esc" }),
388
+ p("editor.variables.footer.close", "close")
389
+ ] })
390
+ ] })
391
+ ]
392
+ }
393
+ );
394
+ });
395
+ Ne.displayName = "VariablesMenu";
396
+ export {
397
+ ie as H,
398
+ Ne as V,
399
+ de as v
400
+ };
401
+ //# sourceMappingURL=variables-menu-vXUaSBj4.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.43.0",
3
+ "packageVersion": "1.44.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -11709,6 +11709,12 @@
11709
11709
  "type": "string",
11710
11710
  "description": "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
11711
11711
  "descriptionKey": "ui.agent.richTextEditor.state.markdown"
11712
+ },
11713
+ {
11714
+ "name": "aiBusy",
11715
+ "type": "boolean",
11716
+ "description": "True while a one-shot AI action (a practice template, spelling or auto-format) is rewriting the note. Read `html` once it is false.",
11717
+ "descriptionKey": "ui.agent.richTextEditor.state.aiBusy"
11712
11718
  }
11713
11719
  ],
11714
11720
  "actions": [
@@ -15378,6 +15384,81 @@
15378
15384
  }
15379
15385
  }
15380
15386
  },
15387
+ {
15388
+ "kind": "component",
15389
+ "id": "variables-menu",
15390
+ "capabilities": [
15391
+ "filter",
15392
+ "select_single",
15393
+ "close"
15394
+ ],
15395
+ "state": [
15396
+ {
15397
+ "name": "query",
15398
+ "type": "string",
15399
+ "description": "Current filter text.",
15400
+ "descriptionKey": "ui.agent.variablesMenu.state.query"
15401
+ },
15402
+ {
15403
+ "name": "visibleTokens",
15404
+ "type": "string[]",
15405
+ "description": "Tokens of the variables currently visible, in row order.",
15406
+ "descriptionKey": "ui.agent.variablesMenu.state.visibleTokens"
15407
+ }
15408
+ ],
15409
+ "actions": [
15410
+ {
15411
+ "name": "select_token",
15412
+ "safety": "write",
15413
+ "argsType": "{ token: string }",
15414
+ "argsSchema": {
15415
+ "type": "object",
15416
+ "properties": {
15417
+ "token": {
15418
+ "type": "string",
15419
+ "description": "Token of the variable to insert, without brackets."
15420
+ }
15421
+ },
15422
+ "required": [
15423
+ "token"
15424
+ ]
15425
+ },
15426
+ "idempotent": false,
15427
+ "examples": [
15428
+ {
15429
+ "args": {
15430
+ "token": "NOME"
15431
+ },
15432
+ "note": "Insert [[NOME]] and close the menu."
15433
+ }
15434
+ ],
15435
+ "description": "Insert the given variable token at the anchor.",
15436
+ "descriptionKey": "ui.agent.variablesMenu.actions.selectToken"
15437
+ },
15438
+ {
15439
+ "name": "close",
15440
+ "safety": "read",
15441
+ "idempotent": true,
15442
+ "description": "Dismiss the menu without inserting anything.",
15443
+ "descriptionKey": "ui.agent.variablesMenu.actions.close"
15444
+ }
15445
+ ],
15446
+ "domHooks": {
15447
+ "root": {
15448
+ "attr": "data-component",
15449
+ "value": "variables-menu"
15450
+ },
15451
+ "instanceId": {
15452
+ "attr": "data-component-id",
15453
+ "sourceProp": "id",
15454
+ "description": "Sourced from the id prop."
15455
+ },
15456
+ "item": {
15457
+ "attr": "data-variable-token",
15458
+ "description": "Each visible row emits its token as data-variable-token."
15459
+ }
15460
+ }
15461
+ },
15381
15462
  {
15382
15463
  "kind": "component",
15383
15464
  "id": "visually-hidden",
@@ -18608,7 +18689,7 @@
18608
18689
  {
18609
18690
  "name": "run_template",
18610
18691
  "safety": "phi",
18611
- "description": "Open the Alia Writing Assistant from the editor's AI pill, open the Templates menu (default template first) and pick a template. It rewrites the selected text, or the whole note when nothing is selected; the draft shows beside the note. Replace swaps the source for the draft, Insert below keeps it and adds the draft after it; the notice that follows offers Undo. Any text typed in the prompt first goes along as extra instructions. Out of AI credits shows a notice instead of a draft.",
18692
+ "description": "Open the Templates menu from the editor's AI pill, or from the bubble that appears over selected text, and pick a template (default first). It runs straight away and rewrites the selected text, or the whole note when nothing is selected; the notice that follows offers Undo. Without patient AI consent the consent banner shows first. Out of AI credits opens the Alia Writing Assistant on the out-of-credits notice.",
18612
18693
  "descriptionKey": "ui.agent.helpMeWriteTemplates.workflows.runTemplate",
18613
18694
  "uiActions": [
18614
18695
  "dropdown-menu.open",
@@ -18634,7 +18715,7 @@
18634
18715
  {
18635
18716
  "name": "manage_templates",
18636
18717
  "safety": "write",
18637
- "description": "Open Manage templates from the Templates menu: list the practice's templates, create or edit one (name, optional short description, instructions for the AI, use as default; names are unique) and delete one after a confirmation. Shown only when the host allows managing.",
18718
+ "description": "Open Manage templates from the Templates menu in the AI pill: list the practice's templates, create or edit one (name, optional short description, instructions for the AI, use as default; names are unique) and delete one after a confirmation. Shown only when the host allows managing.",
18638
18719
  "descriptionKey": "ui.agent.helpMeWriteTemplates.workflows.manageTemplates",
18639
18720
  "uiActions": [
18640
18721
  "dialog.close",
@@ -1217,7 +1217,8 @@
1217
1217
  "state": {
1218
1218
  "html": "Sanitised HTML representation of the editor content.",
1219
1219
  "text": "Plain-text content of the editor (tags stripped).",
1220
- "markdown": "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead."
1220
+ "markdown": "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
1221
+ "aiBusy": "True while a one-shot AI action (a practice template, spelling or auto-format) is rewriting the note. Read `html` once it is false."
1221
1222
  },
1222
1223
  "actions": {
1223
1224
  "setContent": "Replace the editor content. Loses unsaved input.",
@@ -1545,6 +1546,16 @@
1545
1546
  "getResult": "Return the converted value in the to-unit, or null when no source value is set."
1546
1547
  }
1547
1548
  },
1549
+ "variablesMenu": {
1550
+ "state": {
1551
+ "query": "Current filter text.",
1552
+ "visibleTokens": "Tokens of the variables currently visible, in row order."
1553
+ },
1554
+ "actions": {
1555
+ "selectToken": "Insert the given variable token at the anchor.",
1556
+ "close": "Dismiss the menu without inserting anything."
1557
+ }
1558
+ },
1548
1559
  "widgetPicker": {
1549
1560
  "state": {
1550
1561
  "open": "Whether the picker dialog is currently open.",
@@ -1743,9 +1754,9 @@
1743
1754
  },
1744
1755
  "helpMeWriteTemplates": {
1745
1756
  "workflows": {
1746
- "runTemplate": "Open the Alia Writing Assistant from the editor's AI pill, open the Templates menu (default template first) and pick a template. It rewrites the selected text, or the whole note when nothing is selected; the draft shows beside the note. Replace swaps the source for the draft, Insert below keeps it and adds the draft after it; the notice that follows offers Undo. Any text typed in the prompt first goes along as extra instructions. Out of AI credits shows a notice instead of a draft.",
1757
+ "runTemplate": "Open the Templates menu from the editor's AI pill, or from the bubble that appears over selected text, and pick a template (default first). It runs straight away and rewrites the selected text, or the whole note when nothing is selected; the notice that follows offers Undo. Without patient AI consent the consent banner shows first. Out of AI credits opens the Alia Writing Assistant on the out-of-credits notice.",
1747
1758
  "freePrompt": "Type (or dictate with the bar mic) what to write and press Write; the draft is inserted at the caret on Insert.",
1748
- "manageTemplates": "Open Manage templates from the Templates menu: list the practice's templates, create or edit one (name, optional short description, instructions for the AI, use as default; names are unique) and delete one after a confirmation. Shown only when the host allows managing."
1759
+ "manageTemplates": "Open Manage templates from the Templates menu in the AI pill: list the practice's templates, create or edit one (name, optional short description, instructions for the AI, use as default; names are unique) and delete one after a confirmation. Shown only when the host allows managing."
1749
1760
  }
1750
1761
  },
1751
1762
  "invoices": {
@@ -109,6 +109,12 @@ export interface CalendarEvent {
109
109
  startEditable?: boolean;
110
110
  patientId?: string | number;
111
111
  operatorId?: string | number;
112
+ /**
113
+ * Distinct chair x operator combinations behind a background
114
+ * availability cell (`isInternal`) — read into the cell's tooltip and
115
+ * accessible name, never rendered as a visible chip on the cell itself.
116
+ */
117
+ optionCount?: number;
112
118
  }
113
119
  export interface CalendarResource {
114
120
  id: string;
@@ -1,4 +1,4 @@
1
- import { C as r, c as l, r as n } from "../../_chunks/calendar-ChJQzRw-.js";
1
+ import { C as r, c as l, r as n } from "../../_chunks/calendar-U6N0F99w.js";
2
2
  export {
3
3
  r as Calendar,
4
4
  l as calendarAgent,
@@ -1,4 +1,4 @@
1
- import { A as e, F as o, a as n, b as A, c as i, d as f, e as t, I, f as N, g as T, h as F, i as _, j as E, k as c, l as h, m as r, n as p, o as O, p as S, q as m, r as l, s as d, t as C, u as D } from "../../_chunks/face-scheme-Dg6ZyLKb.js";
1
+ import { A as e, F as o, a as n, b as A, c as i, d as f, e as t, I, f as N, g as T, h as F, i as _, j as E, k as c, l as h, m as r, n as p, o as O, p as S, q as m, r as l, s as d, t as C, u as D } from "../../_chunks/face-scheme-Bm6pe7R8.js";
2
2
  export {
3
3
  e as ANNOTATION_TOOL_KIND,
4
4
  o as FACE_ANNOTATION_TOOLS,
@@ -60,6 +60,7 @@ export * from './switch';
60
60
  export * from './text-area';
61
61
  export * from './text-input';
62
62
  export * from './time-picker';
63
+ export * from './variables-menu';
63
64
  export { InsertButton, svgCardToPngDataUri, svgCardToPng, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertPngResult, type InsertMode, type InsertCardData, type InsertCardField, type InsertCardGauge, type SvgCardToPngOptions, } from './_shared/insert-result';
64
65
  export * from './accordion';
65
66
  export * from './annotation-marker';
@@ -1,4 +1,4 @@
1
- import { N as a } from "../../_chunks/notes-panel-CRAovkjx.js";
1
+ import { N as a } from "../../_chunks/notes-panel-CY4KmDo-.js";
2
2
  export {
3
3
  a as NotesPanel
4
4
  };
@@ -161,6 +161,10 @@ export interface NotesPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'titl
161
161
  * `RichTextEditorProps['renderHelpMeWrite']`.
162
162
  */
163
163
  renderHelpMeWrite?: RichTextEditorProps['renderHelpMeWrite'];
164
+ /** Practice templates in the composer's AI pill. See `RichTextEditor`. */
165
+ aiTemplates?: RichTextEditorProps['aiTemplates'];
166
+ /** After a pill action rewrote the draft (offer Undo). See `RichTextEditor`. */
167
+ onAiApplied?: RichTextEditorProps['onAiApplied'];
164
168
  /** Upload an image yourself and resolve its URL. See `RichTextEditor`. */
165
169
  onUploadImage?: RichTextEditorProps['onUploadImage'];
166
170
  /** An AI call ran out of credits. See `RichTextEditor`. */
@@ -1,4 +1,4 @@
1
- import { P as o } from "../../_chunks/panel-subview-PMBRPFOa.js";
1
+ import { P as o } from "../../_chunks/panel-subview-CYnuX-KR.js";
2
2
  import { p as r } from "../../_chunks/panel-subview.agent-BIBvE-IW.js";
3
3
  export {
4
4
  o as PanelSubview,
@@ -17,6 +17,12 @@ export interface PanelSubviewProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
17
17
  headerActions?: ReactNode;
18
18
  /** Pinned below the scroll body: the form's cancel and save, typically. */
19
19
  footer?: ReactNode;
20
+ /** How `footer`'s row is justified. `'end'` (default) keeps the single
21
+ * trailing cluster every other subview uses; `'between'` splits the
22
+ * row — render `footer` as two children (a leading destructive action,
23
+ * a trailing Cancel/Save cluster) and the container puts one at each
24
+ * end, the same shape as the appointment editor's ACTION FOOTER. */
25
+ footerAlign?: 'end' | 'between';
20
26
  /** Fires once the exit has played and the subview has unmounted. */
21
27
  onExited?: () => void;
22
28
  /**