@luzmo/lucero 1.0.3-alpha.8 → 1.0.3-alpha.9
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/components/checkbox/checkbox.d.ts +1 -1
- package/components/date-range-picker/index.cjs +1 -1
- package/components/date-range-picker/index.js +1 -1
- package/components/{date-range-picker-DdY9hGsU.cjs → date-range-picker-A-XRRg1X.cjs} +1 -1
- package/components/{date-range-picker-DocjwZKA.js → date-range-picker-CcDzRDm5.js} +1 -1
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +1 -1
- package/components/{date-time-picker-DdujhIkd.cjs → date-time-picker-Ca9GEA4N.cjs} +1 -1
- package/components/{date-time-picker-CPbIj4TN.js → date-time-picker-PHKHDgL9.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +12 -12
- package/components/prompt-box/controllers/attachments-controller.d.ts +1 -0
- package/components/prompt-box/index.cjs +1 -1
- package/components/prompt-box/index.d.ts +2 -1
- package/components/prompt-box/index.js +2 -2
- package/components/prompt-box/prompt-box-templates.d.ts +3 -0
- package/components/prompt-box/prompt-box.d.ts +30 -4
- package/components/prompt-box/types.d.ts +8 -0
- package/components/{prompt-box-Bj0qIPOy.js → prompt-box-DahvVbcc.js} +205 -155
- package/components/prompt-box-DfTe3nG0.cjs +311 -0
- package/components/skeleton-loader/index.cjs +1 -1
- package/components/skeleton-loader/index.js +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/status-light/index.cjs +1 -1
- package/components/status-light/index.js +1 -1
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +1 -1
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +1 -1
- package/components/{tabs-DYpbsO58.js → tabs-B54ELQtU.js} +1 -1
- package/components/{tabs-CTKkW-L8.cjs → tabs-Jo_qqM_H.cjs} +1 -1
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/top-nav/index.cjs +1 -1
- package/components/top-nav/index.js +1 -1
- package/components/{top-nav-CMVB3G_v.js → top-nav-B3w3DZ56.js} +1 -1
- package/components/{top-nav-bekRXHUk.cjs → top-nav-DZO8yZs6.cjs} +1 -1
- package/custom-elements.json +1 -1
- package/package.json +1 -1
- package/components/prompt-box-6Z5LIjCF.cjs +0 -299
- /package/components/{scaled-indicator-DF45Sc3W.cjs → scaled-indicator-Bl-3A2gz.cjs} +0 -0
- /package/components/{scaled-indicator-BoLeYSgL.js → scaled-indicator-fMYan6VK.js} +0 -0
- /package/components/{skeleton-loader-B8NgELvX.cjs → skeleton-loader-dNRfq6lt.cjs} +0 -0
- /package/components/{skeleton-loader-C1XG3m_u.js → skeleton-loader-oJVESWls.js} +0 -0
- /package/components/{slider-uXRKcOz5.cjs → slider-D8w2ipBg.cjs} +0 -0
- /package/components/{slider-3QBnq0S8.js → slider-Fy-VeKrU.js} +0 -0
- /package/components/{status-light-CBaAFRUc.cjs → status-light-BG_kopZQ.cjs} +0 -0
- /package/components/{status-light-Bf8jGu4G.js → status-light-DXWPBufE.js} +0 -0
- /package/components/{switch-C5g5t5x2.js → switch-CSuMgmAh.js} +0 -0
- /package/components/{switch-COhz9ka9.cjs → switch-nuCOB2P3.cjs} +0 -0
- /package/components/{tags-CBL5oFEo.js → tags-Bpl4u-eo.js} +0 -0
- /package/components/{tags-CndS4S2k.cjs → tags-Dj7Xm3KI.cjs} +0 -0
|
@@ -5,13 +5,13 @@ import '../button';
|
|
|
5
5
|
import '../button/clear-button';
|
|
6
6
|
import '../icon';
|
|
7
7
|
import '../overlay';
|
|
8
|
-
import '../
|
|
8
|
+
import '../skeleton-loader';
|
|
9
9
|
import '../text-field';
|
|
10
10
|
import { AttachmentsController } from './controllers/attachments-controller';
|
|
11
11
|
import { RecordingController } from './controllers/recording-controller';
|
|
12
12
|
import { RichInputController } from './controllers/rich-input-controller';
|
|
13
13
|
import { TriggerMenuController } from './controllers/trigger-menu-controller';
|
|
14
|
-
import type { PromptBoxAttachment, PromptBoxElement, PromptBoxElementInsertedDetail, PromptBoxElementRemovedDetail, PromptBoxRecordErrorDetail, PromptBoxRecordingCompleteDetail, PromptBoxSegment, PromptBoxSubmitDetail, TriggerConfig, TriggerMenuChangeDetail, TriggerMenuSelectDetail, TriggerOption } from './types';
|
|
14
|
+
import type { PromptBoxAttachment, PromptBoxElement, PromptBoxElementInsertedDetail, PromptBoxElementRemovedDetail, PromptBoxFileIcons, PromptBoxRecordErrorDetail, PromptBoxRecordingCompleteDetail, PromptBoxSegment, PromptBoxSubmitDetail, TriggerConfig, TriggerMenuChangeDetail, TriggerMenuSelectDetail, TriggerOption } from './types';
|
|
15
15
|
declare const LuzmoPromptBox_base: typeof LuzmoElement & {
|
|
16
16
|
new (...args: any[]): import("../..").SizedElementInterface;
|
|
17
17
|
prototype: import("../..").SizedElementInterface;
|
|
@@ -77,6 +77,29 @@ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
|
|
|
77
77
|
allowFiles: boolean;
|
|
78
78
|
/** Accepted file types for attachments (MIME types or extensions). */
|
|
79
79
|
acceptedFileTypes: string[];
|
|
80
|
+
/**
|
|
81
|
+
* Custom icons for file attachment tiles, keyed by extension
|
|
82
|
+
* without a leading dot (e.g. `pdf`, `csv`, `svg`).
|
|
83
|
+
* Merged over the built-in defaults (`DEFAULT_FILE_ICONS`); unmatched
|
|
84
|
+
* extensions fall back to the generic document icon.
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* promptBox.fileIcons = {
|
|
88
|
+
* pdf: luzmoHeart,
|
|
89
|
+
* svg: luzmoFileImage
|
|
90
|
+
* };
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
fileIcons: PromptBoxFileIcons;
|
|
94
|
+
/**
|
|
95
|
+
* Formats the accessible name for attachment remove buttons.
|
|
96
|
+
* Override to localize; receives the file name.
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* promptBox.removeAttachmentLabel = (name) => `Verwijder ${name}`;
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
removeAttachmentLabel: (fileName: string) => string;
|
|
80
103
|
/**
|
|
81
104
|
* Whether to enable rich input mode with inline element badges.
|
|
82
105
|
* When enabled, the textarea is replaced with a contenteditable div.
|
|
@@ -123,7 +146,6 @@ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
|
|
|
123
146
|
get hasRecordButton(): boolean;
|
|
124
147
|
/** @internal — used by templates */
|
|
125
148
|
get hasSubmitButton(): boolean;
|
|
126
|
-
get tagSize(): 's' | 'm';
|
|
127
149
|
get segments(): PromptBoxSegment[];
|
|
128
150
|
set segments(value: PromptBoxSegment[]);
|
|
129
151
|
connectedCallback(): void;
|
|
@@ -133,6 +155,7 @@ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
|
|
|
133
155
|
clear(): void;
|
|
134
156
|
addFiles(files: File[]): string[];
|
|
135
157
|
removeAttachment(id: string): void;
|
|
158
|
+
setAttachmentLoading(id: string, loading: boolean): void;
|
|
136
159
|
clearAttachments(): void;
|
|
137
160
|
getAttachments(): PromptBoxAttachment[];
|
|
138
161
|
openFilePicker(): void;
|
|
@@ -153,6 +176,8 @@ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
|
|
|
153
176
|
/** @internal */
|
|
154
177
|
handleRecordClick: (event: Event) => void;
|
|
155
178
|
/** @internal */
|
|
179
|
+
handleAttachmentRemoveClick: (event: Event) => void;
|
|
180
|
+
/** @internal */
|
|
156
181
|
handleInput: (e: Event) => void;
|
|
157
182
|
/** @internal */
|
|
158
183
|
handleKeydown: (e: KeyboardEvent) => void;
|
|
@@ -177,8 +202,9 @@ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
|
|
|
177
202
|
private _submit;
|
|
178
203
|
protected render(): TemplateResult;
|
|
179
204
|
}
|
|
180
|
-
export type { ActionValue, PromptBoxAttachment, PromptBoxElement, PromptBoxElementInsertedDetail, PromptBoxElementRemovedDetail, PromptBoxRecordErrorDetail, PromptBoxRecordingCompleteDetail, PromptBoxSegment, PromptBoxSubmitDetail, TriggerConfig, TriggerMenuChangeDetail, TriggerMenuSelectDetail, TriggerOption } from './types';
|
|
205
|
+
export type { ActionValue, PromptBoxAttachment, PromptBoxElement, PromptBoxElementInsertedDetail, PromptBoxElementRemovedDetail, PromptBoxFileIcons, PromptBoxRecordErrorDetail, PromptBoxRecordingCompleteDetail, PromptBoxSegment, PromptBoxSubmitDetail, TriggerConfig, TriggerMenuChangeDetail, TriggerMenuSelectDetail, TriggerOption } from './types';
|
|
181
206
|
export { ELEMENT_MIME_TYPE } from './types';
|
|
207
|
+
export { DEFAULT_FILE_ICONS } from './prompt-box-templates';
|
|
182
208
|
declare global {
|
|
183
209
|
interface GlobalEventHandlersEventMap {
|
|
184
210
|
'luzmo-submit': CustomEvent<PromptBoxSubmitDetail>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IconDefinition } from '@luzmo/icons';
|
|
1
2
|
export interface ActionValue {
|
|
2
3
|
element: Element;
|
|
3
4
|
name?: string;
|
|
@@ -8,7 +9,14 @@ export interface PromptBoxAttachment {
|
|
|
8
9
|
file: File;
|
|
9
10
|
id: string;
|
|
10
11
|
previewUrl?: string;
|
|
12
|
+
/** When true, the attachment tile shows a same-size skeleton instead of the preview. */
|
|
13
|
+
loading?: boolean;
|
|
11
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Map of file extension → Luzmo icon used for non-image attachment tiles.
|
|
17
|
+
* Keys are extensions without a leading dot (e.g. `pdf`, `csv`, `svg`).
|
|
18
|
+
*/
|
|
19
|
+
export type PromptBoxFileIcons = Record<string, IconDefinition>;
|
|
12
20
|
export interface PromptBoxElement {
|
|
13
21
|
id: string;
|
|
14
22
|
elementType: string;
|