@alfadocs/ui-kit 1.45.0 → 1.46.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.
- package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js → actions-cell-renderer-B5m9lwgC.js} +2 -2
- package/dist/_chunks/ai-credits-notice-xszqOZTC.js +90 -0
- package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +17 -0
- package/dist/_chunks/{ai-consent-banner-D7I2U-cz.js → ai-permission-notice-D7I2U-cz.js} +1 -1
- package/dist/_chunks/ai-sparkle-D23NT8Z_.js +45 -0
- package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js → anamnesis-summary-rows-DI-UX5r6.js} +2 -2
- package/dist/_chunks/{appointment-card-TgR_2GKS.js → appointment-card-DluZy8Iv.js} +2 -2
- package/dist/_chunks/{appointment-peek-abiR0T9e.js → appointment-peek-BsfCpiJs.js} +3 -3
- package/dist/_chunks/{appointment-timeline-CCnyUYKz.js → appointment-timeline-Cs5f9viN.js} +3 -3
- package/dist/_chunks/{appointment-tray-N0yEI8UF.js → appointment-tray-CLrGGnKR.js} +2 -2
- package/dist/_chunks/baby-Dku-Xvg9.js +23 -0
- package/dist/_chunks/{balance-badge-cell-o6LldMUA.js → balance-badge-cell-YGrYdrvR.js} +3 -3
- package/dist/_chunks/{booking-D43ASl8y.js → booking-B7gA9gFB.js} +279 -296
- package/dist/_chunks/button-group-CA1tmu39.js +325 -0
- package/dist/_chunks/{calendar-U6N0F99w.js → calendar-OzSeTb4V.js} +2 -2
- package/dist/_chunks/{calendar-event-card-DKUnT9Be.js → calendar-event-card-B6N5h1dO.js} +57 -48
- package/dist/_chunks/{calendar-workspace-B7KvZ1_D.js → calendar-workspace-BB-BZT7W.js} +3002 -2912
- package/dist/_chunks/{chart-PF2krCZC.js → chart-D8ucl8hH.js} +2 -2
- package/dist/_chunks/{data-table-CcAx_I1w.js → data-table-DnKOmEVw.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js → editable-currency-cell-renderer-OUkUv7U4.js} +2 -2
- package/dist/_chunks/{face-scheme-Bm6pe7R8.js → face-scheme-mIhwrQXt.js} +3 -3
- package/dist/_chunks/{file-manager-BfLQxF5t.js → file-manager-DOcJGIx2.js} +4 -4
- package/dist/_chunks/{header-settings-CTe45iDy.js → header-settings-BEfx_-TF.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-GUeEn3Ff.js → help-me-write-templates-DHIwa4xR.js} +205 -199
- package/dist/_chunks/{hover-card-BMJBVqIf.js → hover-card-nUae8NPJ.js} +67 -62
- package/dist/_chunks/{icon-button-group-DkkdIygu.js → icon-button-group-DZKC6KGf.js} +181 -168
- package/dist/_chunks/kit-extensions-DuoFF1R3.js +94 -0
- package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js → marketplace-app-shell-PB89Dkk_.js} +2 -2
- package/dist/_chunks/{notes-panel-Dkk9QPPX.js → notes-panel-CHbDDMx8.js} +83 -73
- package/dist/_chunks/{patient-details-C8ImUrVg.js → patient-details-DUj1htsH.js} +2 -2
- package/dist/_chunks/{patient-field-row-BRSOKvme.js → patient-field-row-CO0WR7yA.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BhmKB2KR.js → patient-summary-card-DNzdYjxE.js} +59 -45
- package/dist/_chunks/rich-text-editor-BwDV2XkZ.js +4153 -0
- package/dist/_chunks/{tasks-panel-CpcikOeY.js → tasks-panel-DncuBPIZ.js} +2 -2
- package/dist/_chunks/{theme-toggle-bI0pgDDv.js → theme-toggle-BP0XRGMM.js} +2 -2
- package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js +76 -0
- package/dist/_chunks/{workflow-status-xeaJTzD3.js → workflow-status-CuJAOuKL.js} +43 -42
- package/dist/agent-catalog.json +32 -4
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts +3 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +48 -0
- package/dist/components/ai-credits-notice/index.d.ts +4 -0
- package/dist/components/ai-credits-notice/index.js +7 -0
- package/dist/components/{ai-consent-banner/ai-consent-banner.agent.d.ts → ai-permission-notice/ai-permission-notice.agent.d.ts} +2 -2
- package/dist/components/{ai-consent-banner/ai-consent-banner.d.ts → ai-permission-notice/ai-permission-notice.d.ts} +1 -1
- package/dist/components/ai-permission-notice/index.d.ts +4 -0
- package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js +1 -1
- package/dist/components/ai-sparkle/ai-sparkle.d.ts +3 -3
- package/dist/components/ai-sparkle/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts +4 -0
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/hover-card/index.js +3 -2
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +10 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/rich-text-editor/editor-extensions.d.ts +54 -0
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +4 -0
- package/dist/components/rich-text-editor/index.d.ts +2 -0
- package/dist/components/rich-text-editor/index.js +6 -4
- package/dist/components/rich-text-editor/kit-extensions.d.ts +4 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +18 -2
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +51 -53
- package/dist/hooks/use-ai-sparkle.d.ts +7 -25
- package/dist/host-compat.css +2 -2
- package/dist/i18n/locales/ar.d.ts +31 -0
- package/dist/i18n/locales/ar.js +33 -2
- package/dist/i18n/locales/de.d.ts +31 -0
- package/dist/i18n/locales/de.js +33 -2
- package/dist/i18n/locales/el.d.ts +31 -0
- package/dist/i18n/locales/el.js +33 -2
- package/dist/i18n/locales/en.d.ts +31 -0
- package/dist/i18n/locales/en.js +33 -2
- package/dist/i18n/locales/es.d.ts +31 -0
- package/dist/i18n/locales/es.js +33 -2
- package/dist/i18n/locales/fr.d.ts +31 -0
- package/dist/i18n/locales/fr.js +33 -2
- package/dist/i18n/locales/hi.d.ts +31 -0
- package/dist/i18n/locales/hi.js +33 -2
- package/dist/i18n/locales/it.d.ts +31 -0
- package/dist/i18n/locales/it.js +33 -2
- package/dist/i18n/locales/ja.d.ts +31 -0
- package/dist/i18n/locales/ja.js +33 -2
- package/dist/i18n/locales/nl.d.ts +31 -0
- package/dist/i18n/locales/nl.js +33 -2
- package/dist/i18n/locales/pl.d.ts +31 -0
- package/dist/i18n/locales/pl.js +33 -2
- package/dist/i18n/locales/pt.d.ts +31 -0
- package/dist/i18n/locales/pt.js +33 -2
- package/dist/i18n/locales/ro.d.ts +31 -0
- package/dist/i18n/locales/ro.js +33 -2
- package/dist/i18n/locales/ru.d.ts +31 -0
- package/dist/i18n/locales/ru.js +33 -2
- package/dist/i18n/locales/sq.d.ts +31 -0
- package/dist/i18n/locales/sq.js +33 -2
- package/dist/i18n/locales/sv.d.ts +31 -0
- package/dist/i18n/locales/sv.js +33 -2
- package/dist/i18n/locales/tr.d.ts +31 -0
- package/dist/i18n/locales/tr.js +33 -2
- package/dist/i18n/locales/zh.d.ts +31 -0
- package/dist/i18n/locales/zh.js +33 -2
- package/dist/index.js +646 -639
- package/dist/locales/ar.json +33 -2
- package/dist/locales/de.json +33 -2
- package/dist/locales/el.json +33 -2
- package/dist/locales/en.json +33 -2
- package/dist/locales/es.json +33 -2
- package/dist/locales/fr.json +33 -2
- package/dist/locales/hi.json +33 -2
- package/dist/locales/it.json +33 -2
- package/dist/locales/ja.json +33 -2
- package/dist/locales/nl.json +33 -2
- package/dist/locales/pl.json +33 -2
- package/dist/locales/pt.json +33 -2
- package/dist/locales/ro.json +33 -2
- package/dist/locales/ru.json +33 -2
- package/dist/locales/sq.json +33 -2
- package/dist/locales/sv.json +33 -2
- package/dist/locales/tr.json +33 -2
- package/dist/locales/zh.json +33 -2
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +6 -4
- package/dist/patterns/calendar/calendar.data.d.ts +9 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +16 -5
- package/dist/patterns/calendar/calendar.types.d.ts +3 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +11 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +14 -4
- package/dist/_chunks/ai-sparkle-DXeP_6a0.js +0 -52
- package/dist/_chunks/button-group-R32U7SyV.js +0 -307
- package/dist/_chunks/rich-text-editor-BrAvNajV.js +0 -3779
- package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js +0 -103
- package/dist/components/ai-consent-banner/index.d.ts +0 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { H as e, h as o } from "../../_chunks/hover-card-
|
|
1
|
+
import { H as e, h as o, u as s } from "../../_chunks/hover-card-nUae8NPJ.js";
|
|
2
2
|
export {
|
|
3
3
|
e as HoverCard,
|
|
4
|
-
o as hoverCardAgent
|
|
4
|
+
o as hoverCardAgent,
|
|
5
|
+
s as useHoverCardTiming
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -117,7 +117,8 @@ export * from './tabs';
|
|
|
117
117
|
export * from './theme-toggle';
|
|
118
118
|
export * from './agenda-card';
|
|
119
119
|
export * from './agenda-tray';
|
|
120
|
-
export * from './ai-
|
|
120
|
+
export * from './ai-permission-notice';
|
|
121
|
+
export * from './ai-credits-notice';
|
|
121
122
|
export * from './alert';
|
|
122
123
|
export * from './appointment-card';
|
|
123
124
|
export * from './appointment-peek';
|
|
@@ -169,6 +169,16 @@ export interface NotesPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'titl
|
|
|
169
169
|
onUploadImage?: RichTextEditorProps['onUploadImage'];
|
|
170
170
|
/** An AI call ran out of credits. See `RichTextEditor`. */
|
|
171
171
|
onAiCreditsExhausted?: RichTextEditorProps['onAiCreditsExhausted'];
|
|
172
|
+
/** Show the editor extensions affordance. See `RichTextEditor`. */
|
|
173
|
+
showExtensions?: RichTextEditorProps['showExtensions'];
|
|
174
|
+
extensions?: RichTextEditorProps['extensions'];
|
|
175
|
+
extensionContext?: RichTextEditorProps['extensionContext'];
|
|
176
|
+
onExtensionRun?: RichTextEditorProps['onExtensionRun'];
|
|
177
|
+
/**
|
|
178
|
+
* Shows the AI-credits/bundles hover card on every AI action trigger in
|
|
179
|
+
* the composer. See `RichTextEditor`.
|
|
180
|
+
*/
|
|
181
|
+
aiCreditsNotice?: RichTextEditorProps['aiCreditsNotice'];
|
|
172
182
|
/**
|
|
173
183
|
* Rendered just above the composer — e.g. the Help-me-write templates
|
|
174
184
|
* pattern's `undoNotice`. Renders in both add and edit mode, whenever the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, C as l, N as n, P as t, a as C, T as i, b as o, g as T, u as p } from "../../_chunks/balance-badge-cell-
|
|
1
|
+
import { B as s, C as l, N as n, P as t, a as C, T as i, b as o, g as T, u as p } from "../../_chunks/balance-badge-cell-YGrYdrvR.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BalanceBadgeCell,
|
|
4
4
|
l as CarePlanStatusCell,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import type { InsertPayload } from '../_shared/insert-result';
|
|
4
|
+
import type { HelpMeWriteRenderContext } from './rich-text-editor';
|
|
5
|
+
export type EditorExtensionContext = 'note' | 'diagnosis' | 'document' | string;
|
|
6
|
+
export interface EditorExtensionRenderContext {
|
|
7
|
+
html: string;
|
|
8
|
+
text: string;
|
|
9
|
+
selectionText: HelpMeWriteRenderContext['selectionText'];
|
|
10
|
+
scope: HelpMeWriteRenderContext['scope'];
|
|
11
|
+
/** Inserts at the captured selection, then closes. Image modes require an upload seam. */
|
|
12
|
+
insert: (payload: InsertPayload) => Promise<void>;
|
|
13
|
+
close: () => void;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
export type EditorExtensionRunContext = EditorExtensionRenderContext;
|
|
17
|
+
/** Outcomes contain no editor content or host error messages. */
|
|
18
|
+
export type EditorExtensionRunResult = {
|
|
19
|
+
status: 'success';
|
|
20
|
+
} | {
|
|
21
|
+
status: 'error';
|
|
22
|
+
} | {
|
|
23
|
+
status: 'aborted';
|
|
24
|
+
};
|
|
25
|
+
export interface EditorExtension {
|
|
26
|
+
id: string;
|
|
27
|
+
/** Translated host label, or a kit translation key. */
|
|
28
|
+
label: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
icon?: ReactNode;
|
|
31
|
+
/** Absent means everywhere. Restricted entries require a matching editor context. */
|
|
32
|
+
contexts?: EditorExtensionContext[];
|
|
33
|
+
source?: {
|
|
34
|
+
kind: 'kit' | 'marketplace';
|
|
35
|
+
appName?: string;
|
|
36
|
+
appIconUrl?: string;
|
|
37
|
+
};
|
|
38
|
+
kind: 'panel' | 'action';
|
|
39
|
+
render?: (ctx: EditorExtensionRenderContext) => ReactNode;
|
|
40
|
+
run?: (ctx: EditorExtensionRunContext) => Promise<InsertPayload | null>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve an extension's `label` for display.
|
|
44
|
+
*
|
|
45
|
+
* `label` is either a kit translation key or a string the host has already
|
|
46
|
+
* translated, so it has to survive the round trip untouched when it is the
|
|
47
|
+
* latter. i18next reads `:` as its namespace separator and splits any key on
|
|
48
|
+
* it unless the key also carries a space, comma, `?`, `!` or `;` — so a host
|
|
49
|
+
* label like `ICD-10:lookup` came back as `lookup`, the prefix silently eaten
|
|
50
|
+
* (caught in review on #183). `nsSeparator: false` turns that parse off, and
|
|
51
|
+
* `defaultValue` returns the label verbatim when there is no key to look up.
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveExtensionLabel(t: TFunction, label: string): string;
|
|
54
|
+
//# sourceMappingURL=editor-extensions.d.ts.map
|
|
@@ -31,6 +31,7 @@ export interface EditorToolbarProps {
|
|
|
31
31
|
* wired to a menu.
|
|
32
32
|
*/
|
|
33
33
|
showExtensions?: boolean;
|
|
34
|
+
extensionControl?: ReactNode;
|
|
34
35
|
/** Template variables for the "Insert variable" menu (hidden when empty). */
|
|
35
36
|
variables?: RichTextEditorVariable[];
|
|
36
37
|
/** Most-recently-used tokens, most recent first — rendered as the menu's
|
|
@@ -100,5 +101,5 @@ export interface SelectionFloatingToolbarProps {
|
|
|
100
101
|
children?: ReactNode;
|
|
101
102
|
}
|
|
102
103
|
export declare function SelectionFloatingToolbar({ active, run, areaRef, getEditorRoot, suppressed, holdOpen, children, }: SelectionFloatingToolbarProps): React.JSX.Element | null;
|
|
103
|
-
export declare function EditorToolbar({ run, active, preset, insertHtml, insertTable, saveSelection, restoreSelection, getSelectedText, uploadImage, enableColor, enableImage, enableTable, showExtensions, variables, recentVariableTokens, insertVariable, }: EditorToolbarProps): React.JSX.Element;
|
|
104
|
+
export declare function EditorToolbar({ run, active, preset, insertHtml, insertTable, saveSelection, restoreSelection, getSelectedText, uploadImage, enableColor, enableImage, enableTable, showExtensions, extensionControl, variables, recentVariableTokens, insertVariable, }: EditorToolbarProps): React.JSX.Element;
|
|
104
105
|
//# sourceMappingURL=editor-toolbar.d.ts.map
|
|
@@ -21,5 +21,9 @@ export interface HelpMeWriteOverlayProps {
|
|
|
21
21
|
onFinalTranscript: (text: string) => void;
|
|
22
22
|
}) => Promise<void>;
|
|
23
23
|
}
|
|
24
|
+
/** Shared safe failure surface for requests made from the editor dock. */
|
|
25
|
+
export declare function EditorRequestError({ id }: {
|
|
26
|
+
id?: string;
|
|
27
|
+
}): React.JSX.Element;
|
|
24
28
|
export declare function HelpMeWriteOverlay({ open, onClose, onRequestAiDraft, onInsert, previewAsHtml, privacyNotice, onDictate, }: HelpMeWriteOverlayProps): React.JSX.Element;
|
|
25
29
|
//# sourceMappingURL=help-me-write-overlay.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { RichTextEditor, wrapperVariants } from './rich-text-editor';
|
|
2
2
|
export type { RichTextEditorHandle, RichTextEditorProps, RichTextEditorToolbar, RedactorFactory, AiConsentGate, RichTextEditorVariable, HelpMeWriteRenderContext, RichTextEditorAiTemplate, RichTextEditorAiTemplates, RichTextEditorAiActionRequest, RichTextEditorAiApplied, } from './rich-text-editor';
|
|
3
3
|
export { richTextEditorAgent } from './rich-text-editor.agent';
|
|
4
|
+
export type { EditorExtension, EditorExtensionContext, EditorExtensionRenderContext, EditorExtensionRunContext, EditorExtensionRunResult, } from './editor-extensions';
|
|
5
|
+
export { kitEditorExtensions } from './kit-extensions';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { R as
|
|
1
|
+
import { R as i, r as o, w as a } from "../../_chunks/rich-text-editor-BwDV2XkZ.js";
|
|
2
|
+
import { k as s } from "../../_chunks/kit-extensions-DuoFF1R3.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
i as RichTextEditor,
|
|
5
|
+
s as kitEditorExtensions,
|
|
6
|
+
o as richTextEditorAgent,
|
|
7
|
+
a as wrapperVariants
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import '../../tokens/themes/bridges/redactor-theme.css';
|
|
3
|
-
import { type AiConsentBannerHeadingLevel } from '../ai-
|
|
3
|
+
import { type AiConsentBannerHeadingLevel } from '../ai-permission-notice';
|
|
4
|
+
import type { EditorExtension, EditorExtensionContext, EditorExtensionRunResult } from './editor-extensions';
|
|
5
|
+
import { type AiCreditsNoticeProps } from '../ai-credits-notice';
|
|
4
6
|
export type RedactorFactory = (selector: string | HTMLElement, command?: unknown, ...args: unknown[]) => unknown;
|
|
5
7
|
export type RichTextEditorToolbar = 'minimal' | 'standard' | 'full';
|
|
6
8
|
/**
|
|
@@ -149,8 +151,11 @@ export interface RichTextEditorProps {
|
|
|
149
151
|
ariaLabel?: string;
|
|
150
152
|
/** Size variant for the minimum block-size of the editing region. */
|
|
151
153
|
minHeight?: 'sm' | 'md' | 'lg' | 'fill';
|
|
152
|
-
/**
|
|
154
|
+
/** @deprecated Pass extensions instead. Forces the disabled placeholder for one release. */
|
|
153
155
|
showExtensions?: boolean;
|
|
156
|
+
extensions?: EditorExtension[];
|
|
157
|
+
extensionContext?: EditorExtensionContext;
|
|
158
|
+
onExtensionRun?: (id: string, result: EditorExtensionRunResult) => void;
|
|
154
159
|
/** Extra class names on the wrapper. */
|
|
155
160
|
className?: string;
|
|
156
161
|
/** Inject the Redactor factory explicitly; else `window.$R` / `window.Redactor`. */
|
|
@@ -285,6 +290,17 @@ export interface RichTextEditorProps {
|
|
|
285
290
|
* error line shows.
|
|
286
291
|
*/
|
|
287
292
|
onAiCreditsExhausted?: () => void;
|
|
293
|
+
/**
|
|
294
|
+
* Shows an `AiCreditsNotice` hover card on every AI action trigger — the
|
|
295
|
+
* pill's segments (dictation, templates, proofread, auto-format,
|
|
296
|
+
* Help me write), the selection bubble's AI buttons, and both mics. Omit
|
|
297
|
+
* it for today's ungated behaviour: no card, no change. Present, it
|
|
298
|
+
* replaces any tooltip a wrapped trigger would otherwise show (one
|
|
299
|
+
* floating layer per trigger, never two) and never interferes with the
|
|
300
|
+
* consent gate — the button's own click still runs the action, or opens
|
|
301
|
+
* the gate, exactly as it does without this prop.
|
|
302
|
+
*/
|
|
303
|
+
aiCreditsNotice?: AiCreditsNoticeProps;
|
|
288
304
|
}
|
|
289
305
|
/** Block/inline formats the editor can toggle via `applyFormat`. */
|
|
290
306
|
export type EditorFormat = 'bold' | 'italic' | 'strikethrough' | 'bulletedList' | 'numberedList' | 'heading' | 'quote' | 'paragraph';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export { usePresenceTransition, type PresencePhase, type UsePresenceTransitionOp
|
|
|
30
30
|
export { useListReflow, REFLOW_ROW_CLASS, type UseListReflowOptions, type UseListReflowReturn, } from './use-list-reflow';
|
|
31
31
|
export { useClampOverflow } from './use-clamp-overflow';
|
|
32
32
|
export { useScrollOverflow, type UseScrollOverflowReturn, } from './use-scroll-overflow';
|
|
33
|
-
export { useAiSparkle, SHIMMER_CLASS as AI_SPARKLE_SHIMMER_CLASS, COMET_CLASS as AI_SPARKLE_COMET_CLASS,
|
|
33
|
+
export { useAiSparkle, SHIMMER_CLASS as AI_SPARKLE_SHIMMER_CLASS, COMET_CLASS as AI_SPARKLE_COMET_CLASS, COMET_TAIL as AI_SPARKLE_COMET_TAIL, COMET_WRAPPER_CLASS as AI_SPARKLE_COMET_WRAPPER_CLASS, type AiSparkleState, type UseAiSparkleOptions, type UseAiSparkleProps, type UseAiSparkleReturn, } from './use-ai-sparkle';
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { u as
|
|
3
|
-
import { Z as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { A as k, T as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
1
|
+
import { u as O } from "../_chunks/use-prefers-reduced-motion-BMwIQRjB.js";
|
|
2
|
+
import { u as h } from "../_chunks/use-media-query-CcAx5SMM.js";
|
|
3
|
+
import { Z as y, u as I, a as w, b as D } from "../_chunks/use-zoom-drilldown-qCX34w9I.js";
|
|
4
|
+
import { u as F } from "../_chunks/use-count-up-BLLetaZ8.js";
|
|
5
|
+
import { u as K } from "../_chunks/use-locale-BkCIHujH.js";
|
|
6
|
+
import { A as k, T as W, a as H, r as V, t as N, u as Y } from "../_chunks/use-theme-CAuo6EYT.js";
|
|
7
|
+
import { u as q } from "../_chunks/use-controllable-state-BiY4xTzM.js";
|
|
8
|
+
import { u as G } from "../_chunks/use-copy-to-clipboard-Cyfc_dlv.js";
|
|
9
9
|
import { u as j } from "../_chunks/use-debounced-callback-BisrB-Fq.js";
|
|
10
|
-
import { useState as
|
|
10
|
+
import { useState as x, useRef as E, useEffect as S } from "react";
|
|
11
11
|
import { u as Q, a as J } from "../_chunks/use-direction-Dp8h70PP.js";
|
|
12
12
|
import { u as $ } from "../_chunks/use-persistent-state-nZwZAnE9.js";
|
|
13
13
|
import { u as te } from "../_chunks/use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
@@ -16,15 +16,15 @@ import { c as ne, u as ae } from "../_chunks/use-priority-overflow-c9SjxZkZ.js";
|
|
|
16
16
|
import { u as ce } from "../_chunks/use-web-otp-D_utzp6S.js";
|
|
17
17
|
import { u as fe } from "../_chunks/use-visual-viewport-pin-ChurOsHM.js";
|
|
18
18
|
import { u as de } from "../_chunks/use-edge-resize-BHesP0kg.js";
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
import { R as
|
|
22
|
-
import { u as
|
|
23
|
-
import { u as
|
|
24
|
-
import {
|
|
25
|
-
function
|
|
26
|
-
const [t, i] =
|
|
27
|
-
return
|
|
19
|
+
import { u as Ee } from "../_chunks/use-countdown-Yd6ts0_a.js";
|
|
20
|
+
import { u as xe } from "../_chunks/use-check-animation--I3cS00X.js";
|
|
21
|
+
import { R as be, u as Ce, a as Le } from "../_chunks/use-list-reflow-Cw43nxw5.js";
|
|
22
|
+
import { u as _e } from "../_chunks/use-presence-transition-cDwWUXV-.js";
|
|
23
|
+
import { u as Re } from "../_chunks/use-clamp-overflow-DQE2kwZ9.js";
|
|
24
|
+
import { b as ve, C as ye, a as Ie, S as we, u as De } from "../_chunks/use-ai-sparkle-Cf4yVTLB.js";
|
|
25
|
+
function C(e, o) {
|
|
26
|
+
const [t, i] = x(e), s = E(null);
|
|
27
|
+
return S(() => {
|
|
28
28
|
if (o <= 0) {
|
|
29
29
|
s.current !== null && (clearTimeout(s.current), s.current = null), i(e);
|
|
30
30
|
return;
|
|
@@ -35,7 +35,7 @@ function _(e, o) {
|
|
|
35
35
|
return s.current = n, () => clearTimeout(n);
|
|
36
36
|
}, [e, o]), t;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const A = [
|
|
39
39
|
"a[href]",
|
|
40
40
|
"button:not([disabled])",
|
|
41
41
|
'input:not([disabled]):not([type="hidden"])',
|
|
@@ -48,7 +48,7 @@ const x = [
|
|
|
48
48
|
].join(",");
|
|
49
49
|
function p(e) {
|
|
50
50
|
return Array.from(
|
|
51
|
-
e.querySelectorAll(
|
|
51
|
+
e.querySelectorAll(A)
|
|
52
52
|
).filter((o) => {
|
|
53
53
|
if (o.hidden) return !1;
|
|
54
54
|
let t = o;
|
|
@@ -59,9 +59,9 @@ function p(e) {
|
|
|
59
59
|
return !0;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const { enabled: t = !0, autoFocus: i = !0, restoreFocus: s = !0 } = o, n =
|
|
64
|
-
|
|
62
|
+
function L(e, o = {}) {
|
|
63
|
+
const { enabled: t = !0, autoFocus: i = !0, restoreFocus: s = !0 } = o, n = E(null);
|
|
64
|
+
S(() => {
|
|
65
65
|
if (!t) return;
|
|
66
66
|
const a = e.current;
|
|
67
67
|
if (!a) return;
|
|
@@ -93,48 +93,46 @@ function C(e, o = {}) {
|
|
|
93
93
|
}
|
|
94
94
|
export {
|
|
95
95
|
k as ACCESSIBILITY_STORAGE_KEY,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
W as THEME_STORAGE_KEY,
|
|
105
|
-
h as ZOOM_DRILLDOWN_TRANSITION_CLASS,
|
|
96
|
+
ve as AI_SPARKLE_COMET_CLASS,
|
|
97
|
+
ye as AI_SPARKLE_COMET_TAIL,
|
|
98
|
+
Ie as AI_SPARKLE_COMET_WRAPPER_CLASS,
|
|
99
|
+
we as AI_SPARKLE_SHIMMER_CLASS,
|
|
100
|
+
be as REFLOW_ROW_CLASS,
|
|
101
|
+
W as THEME_CLASS,
|
|
102
|
+
H as THEME_STORAGE_KEY,
|
|
103
|
+
y as ZOOM_DRILLDOWN_TRANSITION_CLASS,
|
|
106
104
|
ne as computePriorityLayout,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
V as resolveTheme,
|
|
106
|
+
N as themeClassList,
|
|
107
|
+
De as useAiSparkle,
|
|
108
|
+
xe as useCheckAnimation,
|
|
109
|
+
Re as useClampOverflow,
|
|
110
|
+
q as useControllableState,
|
|
111
|
+
G as useCopyToClipboard,
|
|
112
|
+
F as useCountUp,
|
|
113
|
+
Ee as useCountdown,
|
|
116
114
|
j as useDebouncedCallback,
|
|
117
|
-
|
|
115
|
+
C as useDebouncedValue,
|
|
118
116
|
Q as useDirection,
|
|
119
117
|
J as useDocumentDirection,
|
|
120
118
|
de as useEdgeResize,
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
Ce as useExitTransition,
|
|
120
|
+
L as useFocusTrap,
|
|
123
121
|
te as useIsomorphicLayoutEffect,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
Le as useListReflow,
|
|
123
|
+
K as useLocale,
|
|
124
|
+
h as useMediaQuery,
|
|
127
125
|
oe as useOverflowCollapse,
|
|
128
126
|
$ as usePersistentState,
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
O as usePrefersReducedMotion,
|
|
128
|
+
_e as usePresenceTransition,
|
|
131
129
|
ae as usePriorityOverflow,
|
|
132
130
|
se as useScrollOverflow,
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
I as useScrollToFirstError,
|
|
132
|
+
w as useSigningSession,
|
|
135
133
|
Y as useTheme,
|
|
136
134
|
fe as useVisualViewportPin,
|
|
137
135
|
ce as useWebOtp,
|
|
138
|
-
|
|
136
|
+
D as useZoomDrilldown
|
|
139
137
|
};
|
|
140
138
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,23 +2,6 @@
|
|
|
2
2
|
export type AiSparkleState = 'intro' | 'working' | 'landed';
|
|
3
3
|
export declare const SHIMMER_CLASS: Record<AiSparkleState, string>;
|
|
4
4
|
export declare const COMET_CLASS: Record<AiSparkleState, string>;
|
|
5
|
-
export declare const BURST_CLASS: Record<AiSparkleState, string>;
|
|
6
|
-
export declare const SPARKLE_GLYPHS: readonly [{
|
|
7
|
-
readonly key: "start";
|
|
8
|
-
readonly className: "ds:absolute ds:opacity-0 ds:text-[color:var(--ai-sparkle)] ds:fill-current ds:drop-shadow-[0_0_var(--spacing-2xs)_var(--ai-sparkle)] ds:[animation-delay:calc(var(--animation-duration)*(var(--sparkle-base)+var(--sparkle-stagger)))] ds:[--sparkle-stagger:0] ds:size-3 ds:[inset-block-start:calc(var(--spacing-xs)*-1)] ds:[inset-inline-start:calc(var(--spacing-2xs)*-1)]";
|
|
9
|
-
}, {
|
|
10
|
-
readonly key: "top";
|
|
11
|
-
readonly className: "ds:absolute ds:opacity-0 ds:text-[color:var(--ai-sparkle)] ds:fill-current ds:drop-shadow-[0_0_var(--spacing-2xs)_var(--ai-sparkle)] ds:[animation-delay:calc(var(--animation-duration)*(var(--sparkle-base)+var(--sparkle-stagger)))] ds:[--sparkle-stagger:0.5] ds:size-4 ds:[inset-block-start:calc(var(--spacing-sm)*-1)] ds:[inset-inline-start:40%]";
|
|
12
|
-
}, {
|
|
13
|
-
readonly key: "end";
|
|
14
|
-
readonly className: "ds:absolute ds:opacity-0 ds:text-[color:var(--ai-sparkle)] ds:fill-current ds:drop-shadow-[0_0_var(--spacing-2xs)_var(--ai-sparkle)] ds:[animation-delay:calc(var(--animation-duration)*(var(--sparkle-base)+var(--sparkle-stagger)))] ds:[--sparkle-stagger:1] ds:size-3 ds:[inset-block-start:calc(var(--spacing-xs)*-1)] ds:[inset-inline-end:var(--spacing-md)]";
|
|
15
|
-
}, {
|
|
16
|
-
readonly key: "side";
|
|
17
|
-
readonly className: "ds:absolute ds:opacity-0 ds:text-[color:var(--ai-sparkle)] ds:fill-current ds:drop-shadow-[0_0_var(--spacing-2xs)_var(--ai-sparkle)] ds:[animation-delay:calc(var(--animation-duration)*(var(--sparkle-base)+var(--sparkle-stagger)))] ds:[--sparkle-stagger:1.5] ds:size-2 ds:[inset-block-start:40%] ds:[inset-inline-end:calc(var(--spacing-sm)*-1)]";
|
|
18
|
-
}, {
|
|
19
|
-
readonly key: "below";
|
|
20
|
-
readonly className: "ds:absolute ds:opacity-0 ds:text-[color:var(--ai-sparkle)] ds:fill-current ds:drop-shadow-[0_0_var(--spacing-2xs)_var(--ai-sparkle)] ds:[animation-delay:calc(var(--animation-duration)*(var(--sparkle-base)+var(--sparkle-stagger)))] ds:[--sparkle-stagger:2] ds:size-3 ds:[inset-block-end:calc(var(--spacing-xs)*-1)] ds:[inset-inline-start:25%]";
|
|
21
|
-
}];
|
|
22
5
|
export declare const COMET_WRAPPER_CLASS = "ds:pointer-events-none ds:absolute ds:[inset-block-start:0] ds:[inset-inline-start:0] ds:opacity-0 ds:[offset-path:inset(0_round_var(--radius-full))] ds:[offset-rotate:0deg]";
|
|
23
6
|
export declare const COMET_TAIL: readonly [{
|
|
24
7
|
readonly key: 1;
|
|
@@ -65,13 +48,13 @@ export interface UseAiSparkleProps {
|
|
|
65
48
|
'data-ai-sparkle': AiSparkleState | undefined;
|
|
66
49
|
/**
|
|
67
50
|
* The shimmer animation class for the current state — empty when at rest.
|
|
68
|
-
* Layer it over the host's own base positioning classes; the comet
|
|
69
|
-
*
|
|
51
|
+
* Layer it over the host's own base positioning classes; the comet layer
|
|
52
|
+
* needs real DOM and lives in the `AiSparkle` component instead.
|
|
70
53
|
*/
|
|
71
54
|
className: string;
|
|
72
55
|
}
|
|
73
56
|
export interface UseAiSparkleReturn {
|
|
74
|
-
/** `null` at rest — nothing to render for the comet
|
|
57
|
+
/** `null` at rest — nothing to render for the comet layer either. */
|
|
75
58
|
state: AiSparkleState | null;
|
|
76
59
|
props: UseAiSparkleProps;
|
|
77
60
|
/** An AI action started: swap to the looping `'working'` phase. */
|
|
@@ -93,13 +76,12 @@ export interface UseAiSparkleReturn {
|
|
|
93
76
|
* `props['data-ai-sparkle']` is a plain styling hook for the host element;
|
|
94
77
|
* `props.className` carries the shimmer layer's animation class from the
|
|
95
78
|
* same lookup table the RichTextEditor's pill originally inlined. The
|
|
96
|
-
* comet
|
|
97
|
-
*
|
|
98
|
-
* same `state`.
|
|
79
|
+
* comet layer needs actual DOM (a head and a tail of dots), so it lives in
|
|
80
|
+
* the sibling `AiSparkle` component, keyed off the same `state`.
|
|
99
81
|
*
|
|
100
82
|
* Both `intro` and `landed` are one-off: this hook clears them back to
|
|
101
|
-
* `null` on a timer sized to the comet's lap plus
|
|
102
|
-
*
|
|
83
|
+
* `null` on a timer sized to the comet's lap plus a small buffer, at the
|
|
84
|
+
* default 200ms `--animation-duration`. Under reduced
|
|
103
85
|
* motion (`prefers-reduced-motion` or `reducedMotion: 'auto'`'s system
|
|
104
86
|
* read) the CSS animations already collapse to 0ms, so the clear fires at
|
|
105
87
|
* the next tick instead of waiting out the full lap — the pill still gets
|
package/dist/host-compat.css
CHANGED
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
.ds\:\[--carousel-item-inline-size\:28rem\] {
|
|
88
88
|
--carousel-item-inline-size:448px;
|
|
89
89
|
}
|
|
90
|
-
.ds\:\[--inc1-nav-block-size\:
|
|
91
|
-
--inc1-nav-block-size:
|
|
90
|
+
.ds\:\[--inc1-nav-block-size\:2\.5rem\] {
|
|
91
|
+
--inc1-nav-block-size:40px;
|
|
92
92
|
}
|
|
93
93
|
.ds\:\[--map-block-size\:14rem\] {
|
|
94
94
|
--map-block-size:224px;
|
|
@@ -9,6 +9,25 @@ export declare const arUi: {
|
|
|
9
9
|
readonly infoTip: {
|
|
10
10
|
readonly triggerLabel: "مزيد من المعلومات";
|
|
11
11
|
};
|
|
12
|
+
readonly aiCreditsNotice: {
|
|
13
|
+
readonly dismiss: "عدم الإظهار مرة أخرى";
|
|
14
|
+
readonly included: {
|
|
15
|
+
readonly eyebrow: "مساعدة الذكاء الاصطناعي";
|
|
16
|
+
readonly heading: "مُدرج ضمن خطتك";
|
|
17
|
+
readonly body: "تُقدَّم ميزات الذكاء الاصطناعي دون أي تكلفة إضافية خلال فترة التجربة هذه.";
|
|
18
|
+
readonly allowance: "{{remaining}} من {{limit}} إجراءً بالذكاء الاصطناعي هذا الشهر";
|
|
19
|
+
readonly resetsOn: "يتجدد في {{date}}";
|
|
20
|
+
readonly learnMore: "معرفة المزيد";
|
|
21
|
+
};
|
|
22
|
+
readonly bundles: {
|
|
23
|
+
readonly eyebrow: "أرصدة الذكاء الاصطناعي";
|
|
24
|
+
readonly headingWithAllowance: "{{remaining}} من {{limit}} رصيدًا";
|
|
25
|
+
readonly body: "تشمل الخطة المجانية {{limit}} إجراءً شهريًا. اختر باقة أرصدة للمتابعة دون حدود.";
|
|
26
|
+
readonly bodyGeneric: "اختر باقة أرصدة للمتابعة دون حدود.";
|
|
27
|
+
readonly viewBundles: "عرض الباقات";
|
|
28
|
+
readonly seeCosts: "تكلفة كل إجراء";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
12
31
|
readonly opticalPrescription: {
|
|
13
32
|
readonly ariaLabel: "وصفة النظارات";
|
|
14
33
|
readonly metaLabel: "تفاصيل الوصفة";
|
|
@@ -598,6 +617,7 @@ export declare const arUi: {
|
|
|
598
617
|
readonly slider: {
|
|
599
618
|
readonly minLabel: "الحد الأدنى";
|
|
600
619
|
readonly maxLabel: "الحد الأقصى";
|
|
620
|
+
readonly value: "القيمة";
|
|
601
621
|
};
|
|
602
622
|
readonly checkboxGroup: {
|
|
603
623
|
readonly selectAll: "تحديد الكل";
|
|
@@ -749,6 +769,8 @@ export declare const arUi: {
|
|
|
749
769
|
readonly remove: "إزالة الملف";
|
|
750
770
|
readonly progress: "تم رفع {{percent}}%";
|
|
751
771
|
readonly filesSelected: "تم تحديد {{count}} ملف";
|
|
772
|
+
readonly maxSizeHint: "الحد الأقصى {{size}}";
|
|
773
|
+
readonly maxFilesHint: "حتى {{count}} ملف";
|
|
752
774
|
readonly errors: {
|
|
753
775
|
readonly fileTooLarge: "الملف يتجاوز {{maxSize}}";
|
|
754
776
|
readonly fileTooSmall: "الملف أصغر من {{minSize}}";
|
|
@@ -2044,6 +2066,7 @@ export declare const arUi: {
|
|
|
2044
2066
|
readonly mr: "السيد";
|
|
2045
2067
|
readonly ms: "السيدة";
|
|
2046
2068
|
};
|
|
2069
|
+
readonly nameWithHonorific: "{{honorific}} {{name}}";
|
|
2047
2070
|
readonly gender: {
|
|
2048
2071
|
readonly m: "ذكر";
|
|
2049
2072
|
readonly f: "أنثى";
|
|
@@ -2794,6 +2817,8 @@ export declare const arUi: {
|
|
|
2794
2817
|
readonly remove: "إزالة التمييز";
|
|
2795
2818
|
};
|
|
2796
2819
|
readonly heading: "عنوان";
|
|
2820
|
+
readonly extensionsKit: "من المجموعة";
|
|
2821
|
+
readonly extensionsMarketplace: "من السوق";
|
|
2797
2822
|
readonly extensions: "إضافات المحرر";
|
|
2798
2823
|
readonly insertVariable: "إدراج متغير";
|
|
2799
2824
|
readonly variables: {
|
|
@@ -4831,6 +4856,7 @@ export declare const arUi: {
|
|
|
4831
4856
|
readonly resetFiltersCount_zero: "إعادة تعيين عوامل التصفية — لا شيء نشط";
|
|
4832
4857
|
readonly resetFiltersCount_two: "إعادة تعيين عوامل التصفية — عاملان نشطان";
|
|
4833
4858
|
readonly resetFiltersCount_few: "إعادة تعيين عوامل التصفية — {{count}} عوامل نشطة";
|
|
4859
|
+
readonly backlogCount: "بحاجة إلى إكمال — {{n}} بحاجة إلى إكمال";
|
|
4834
4860
|
};
|
|
4835
4861
|
readonly view: {
|
|
4836
4862
|
readonly menuLabel: "عرض الأجندة — {{view}}";
|
|
@@ -4898,6 +4924,11 @@ export declare const arUi: {
|
|
|
4898
4924
|
readonly filterNoPatient: "بدون مريض";
|
|
4899
4925
|
readonly filterNoOperator: "بدون معالج";
|
|
4900
4926
|
readonly filterNoChair: "بدون كرسي";
|
|
4927
|
+
readonly settings: "إعدادات اللوحة";
|
|
4928
|
+
readonly settingsNarrowed: "إعدادات اللوحة، القائمة مُصفّاة";
|
|
4929
|
+
readonly settingsTitle: "ما الذي يُعرض";
|
|
4930
|
+
readonly settingsHint: "تبقى البطاقة ظاهرة ما دام أحد حقولها الناقصة مُفعّلاً.";
|
|
4931
|
+
readonly emptyNarrowed: "بعض عوامل التصفية مُعطّلة في إعدادات اللوحة.";
|
|
4901
4932
|
readonly notShownOnChairAxis: "لا تظهر في أعمدة الكراسي حتى يتم تعيين كرسي.";
|
|
4902
4933
|
};
|
|
4903
4934
|
readonly waitingList: {
|