@aparte/core 0.27.1 → 0.27.3
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/components/bubble/aparte-chat-bubble.d.ts +3 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +1 -0
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/custom-elements.json +13310 -13287
- package/dist/{defer-hydration-CcoHD2cy.js → defer-hydration-BG8ANn8q.js} +19 -13
- package/dist/defer-hydration-BG8ANn8q.js.map +1 -0
- package/dist/elicitation/approval-panel.d.ts +1 -1
- package/dist/elicitation/approval-panel.d.ts.map +1 -1
- package/dist/elicitation/types.d.ts +8 -0
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +18 -11
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -1
- package/dist/types/events.d.ts +7 -4
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/models.d.ts +8 -0
- package/dist/types/models.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/defer-hydration-CcoHD2cy.js.map +0 -1
|
@@ -1978,7 +1978,8 @@ const APARTE_DEFAULT_BUBBLE_ACTIONS = {
|
|
|
1978
1978
|
info: false
|
|
1979
1979
|
};
|
|
1980
1980
|
const APARTE_DEFAULT_HOST_HANDLERS = {
|
|
1981
|
-
attachmentPreview: false
|
|
1981
|
+
attachmentPreview: false,
|
|
1982
|
+
filePreview: false
|
|
1982
1983
|
};
|
|
1983
1984
|
const NOOP = () => {
|
|
1984
1985
|
};
|
|
@@ -2207,7 +2208,8 @@ class AparteConfig {
|
|
|
2207
2208
|
// forgotten here.
|
|
2208
2209
|
getHostHandlers() {
|
|
2209
2210
|
return {
|
|
2210
|
-
attachmentPreview: this._hostHandlers.attachmentPreview ?? APARTE_DEFAULT_HOST_HANDLERS.attachmentPreview
|
|
2211
|
+
attachmentPreview: this._hostHandlers.attachmentPreview ?? APARTE_DEFAULT_HOST_HANDLERS.attachmentPreview,
|
|
2212
|
+
filePreview: this._hostHandlers.filePreview ?? APARTE_DEFAULT_HOST_HANDLERS.filePreview
|
|
2211
2213
|
};
|
|
2212
2214
|
}
|
|
2213
2215
|
/** Returns the resolved bubble actions config (flag defaults applied; per-role sets passed through). */
|
|
@@ -7216,7 +7218,7 @@ function el(tag, className, text) {
|
|
|
7216
7218
|
return node;
|
|
7217
7219
|
}
|
|
7218
7220
|
let askSeq = 0;
|
|
7219
|
-
function buildApprovalPanel(message, options, onChange, details) {
|
|
7221
|
+
function buildApprovalPanel(message, options, onChange, details, freeText = true) {
|
|
7220
7222
|
const cfg = contextConfig();
|
|
7221
7223
|
const panel = el("div", "aparte-elic-panel aparte-approval-panel");
|
|
7222
7224
|
const body = el("div", "aparte-elic-body");
|
|
@@ -7265,13 +7267,15 @@ function buildApprovalPanel(message, options, onChange, details) {
|
|
|
7265
7267
|
labelled.push({ button, option });
|
|
7266
7268
|
}
|
|
7267
7269
|
body.appendChild(row);
|
|
7268
|
-
const instruction = el("textarea", "aparte-approval-instruction");
|
|
7269
|
-
instruction
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7270
|
+
const instruction = freeText ? el("textarea", "aparte-approval-instruction") : null;
|
|
7271
|
+
if (instruction) {
|
|
7272
|
+
instruction.rows = 1;
|
|
7273
|
+
instruction.placeholder = cfg.t("approvalInstructionPlaceholder");
|
|
7274
|
+
instruction.setAttribute("aria-label", cfg.t("approvalInstructionPlaceholder"));
|
|
7275
|
+
instruction.addEventListener("input", onChange);
|
|
7276
|
+
body.appendChild(instruction);
|
|
7277
|
+
}
|
|
7278
|
+
const typed = () => instruction?.value.trim() ?? "";
|
|
7275
7279
|
return {
|
|
7276
7280
|
el: panel,
|
|
7277
7281
|
dismiss,
|
|
@@ -7286,8 +7290,10 @@ function buildApprovalPanel(message, options, onChange, details) {
|
|
|
7286
7290
|
relabel: () => {
|
|
7287
7291
|
const now = contextConfig();
|
|
7288
7292
|
const label = now.t("approvalInstructionPlaceholder");
|
|
7289
|
-
instruction
|
|
7290
|
-
|
|
7293
|
+
if (instruction) {
|
|
7294
|
+
instruction.placeholder = label;
|
|
7295
|
+
instruction.setAttribute("aria-label", label);
|
|
7296
|
+
}
|
|
7291
7297
|
row.setAttribute("aria-label", now.t("approvalOptionsLabel"));
|
|
7292
7298
|
if (ask) ask.textContent = askText();
|
|
7293
7299
|
if (argsLabel) argsLabel.textContent = now.t("approvalArgsLabel");
|
|
@@ -9340,4 +9346,4 @@ export {
|
|
|
9340
9346
|
collectRendererStyles as y,
|
|
9341
9347
|
contentToText as z
|
|
9342
9348
|
};
|
|
9343
|
-
//# sourceMappingURL=defer-hydration-
|
|
9349
|
+
//# sourceMappingURL=defer-hydration-BG8ANn8q.js.map
|