@aparte/core 0.27.2 → 0.27.4
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/custom-elements.json +14446 -14442
- package/dist/{defer-hydration-CcKxPqNM.js → defer-hydration-BlmPqEgs.js} +15 -11
- package/dist/defer-hydration-BlmPqEgs.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 +9 -0
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -1
- package/package.json +2 -2
- package/dist/defer-hydration-CcKxPqNM.js.map +0 -1
|
@@ -7218,7 +7218,7 @@ function el(tag, className, text) {
|
|
|
7218
7218
|
return node;
|
|
7219
7219
|
}
|
|
7220
7220
|
let askSeq = 0;
|
|
7221
|
-
function buildApprovalPanel(message, options, onChange, details) {
|
|
7221
|
+
function buildApprovalPanel(message, options, onChange, details, allowOther = true) {
|
|
7222
7222
|
const cfg = contextConfig();
|
|
7223
7223
|
const panel = el("div", "aparte-elic-panel aparte-approval-panel");
|
|
7224
7224
|
const body = el("div", "aparte-elic-body");
|
|
@@ -7267,13 +7267,15 @@ function buildApprovalPanel(message, options, onChange, details) {
|
|
|
7267
7267
|
labelled.push({ button, option });
|
|
7268
7268
|
}
|
|
7269
7269
|
body.appendChild(row);
|
|
7270
|
-
const instruction = el("textarea", "aparte-approval-instruction");
|
|
7271
|
-
instruction
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7270
|
+
const instruction = allowOther ? 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() ?? "";
|
|
7277
7279
|
return {
|
|
7278
7280
|
el: panel,
|
|
7279
7281
|
dismiss,
|
|
@@ -7288,8 +7290,10 @@ function buildApprovalPanel(message, options, onChange, details) {
|
|
|
7288
7290
|
relabel: () => {
|
|
7289
7291
|
const now = contextConfig();
|
|
7290
7292
|
const label = now.t("approvalInstructionPlaceholder");
|
|
7291
|
-
instruction
|
|
7292
|
-
|
|
7293
|
+
if (instruction) {
|
|
7294
|
+
instruction.placeholder = label;
|
|
7295
|
+
instruction.setAttribute("aria-label", label);
|
|
7296
|
+
}
|
|
7293
7297
|
row.setAttribute("aria-label", now.t("approvalOptionsLabel"));
|
|
7294
7298
|
if (ask) ask.textContent = askText();
|
|
7295
7299
|
if (argsLabel) argsLabel.textContent = now.t("approvalArgsLabel");
|
|
@@ -9342,4 +9346,4 @@ export {
|
|
|
9342
9346
|
collectRendererStyles as y,
|
|
9343
9347
|
contentToText as z
|
|
9344
9348
|
};
|
|
9345
|
-
//# sourceMappingURL=defer-hydration-
|
|
9349
|
+
//# sourceMappingURL=defer-hydration-BlmPqEgs.js.map
|