@design.estate/dees-catalog 21.35.0 → 21.36.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 (37) hide show
  1. package/dist_bundle/bundle.js +613 -66
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CNZ4UM3.js → chunk-3YTKY5IS.js} +6 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CNZ4UM3.js.map → chunk-3YTKY5IS.js.map} +1 -1
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PHFZ5EZN.js → chunk-5UGXWLMH.js} +3 -3
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-KY5Z6Y6T.js → chunk-ZCZ72OW4.js} +2 -2
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-AGABQ27E.js → de-PERXVUIS.js} +6 -2
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-AGABQ27E.js.map → de-PERXVUIS.js.map} +1 -1
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-QBFEQURL.js → dees-modal-4QORKLGX.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-UYSWDBV4.js → dees-workspace-terminal-7SYZG2AB.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +5 -1
  13. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +11 -1
  14. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +28 -1
  15. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +78 -1
  16. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +75 -3
  17. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.js +140 -44
  18. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +500 -16
  19. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +72 -0
  20. package/dist_ts_web/i18n/de.d.ts +16 -0
  21. package/dist_ts_web/i18n/de.js +5 -1
  22. package/dist_ts_web/i18n/messages.d.ts +16 -0
  23. package/dist_ts_web/i18n/messages.js +5 -1
  24. package/package.json +1 -1
  25. package/readme.md +38 -1
  26. package/ts_web/00_commitinfo_data.ts +1 -1
  27. package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +17 -0
  28. package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +83 -0
  29. package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.ts +106 -2
  30. package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +484 -14
  31. package/ts_web/elements/00group-harness/interfaces.ts +77 -0
  32. package/ts_web/i18n/de.ts +4 -0
  33. package/ts_web/i18n/messages.ts +4 -0
  34. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PHFZ5EZN.js.map → chunk-5UGXWLMH.js.map} +0 -0
  35. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-KY5Z6Y6T.js.map → chunk-ZCZ72OW4.js.map} +0 -0
  36. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-QBFEQURL.js.map → dees-modal-4QORKLGX.js.map} +0 -0
  37. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-UYSWDBV4.js.map → dees-workspace-terminal-7SYZG2AB.js.map} +0 -0
@@ -26,7 +26,7 @@ import {
26
26
  ownAppuiLabels,
27
27
  resolveAppuiLabels,
28
28
  xtermStyles
29
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-PHFZ5EZN.js";
29
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-5UGXWLMH.js";
30
30
  import {
31
31
  ActionRunController,
32
32
  BarInfoController,
@@ -123,7 +123,7 @@ import {
123
123
  workspaceVisibility,
124
124
  zIndexLayers,
125
125
  zIndexRegistry
126
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-KY5Z6Y6T.js";
126
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-ZCZ72OW4.js";
127
127
  import {
128
128
  dcMessages,
129
129
  dcSourceI18n,
@@ -133,7 +133,7 @@ import {
133
133
  firstDayOfWeek,
134
134
  iso_exports,
135
135
  momentFormat
136
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-5CNZ4UM3.js";
136
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-3YTKY5IS.js";
137
137
  import {
138
138
  __decorateElement,
139
139
  __decoratorMetadata,
@@ -49878,69 +49878,147 @@ var decided = [
49878
49878
  outcome: { tone: "error", text: "The ledger refused the change: account 1200 is locked for the closed year 2025." }
49879
49879
  }
49880
49880
  ];
49881
- var demoFunc44 = /* @__PURE__ */ __name(() => demoPage("Questions", "Questions the agent asks, and changes it proposes that wait for a confirmation.", b`
49881
+ var REFUSED_PASSWORD = "refused";
49882
+ var personProposal = /* @__PURE__ */ __name((idArg) => ({
49883
+ id: idArg,
49884
+ kind: "proposal",
49885
+ severity: "warning",
49886
+ question: "Send invoices through your own mail server?",
49887
+ itemsDeclinable: true,
49888
+ items: [
49889
+ {
49890
+ id: "smtp",
49891
+ summary: "Sends invoices from invoices@nordwind.de through your mail server",
49892
+ label: "Mail settings",
49893
+ href: "#",
49894
+ changes: [{ label: "Server", before: "Built-in", after: "smtp.nordwind.de:587" }]
49895
+ },
49896
+ { id: "dkim", summary: "Signs outgoing invoices with your DKIM key" },
49897
+ { id: "webhook", summary: "Issues a key for the delivery report webhook" }
49898
+ ],
49899
+ personFields: [
49900
+ { id: "user", itemId: "smtp", label: "User name", input: "text", required: true, maxLength: 128 },
49901
+ { id: "password", itemId: "smtp", label: "Password", input: "secret", required: true, maxLength: 128 },
49902
+ {
49903
+ id: "key",
49904
+ itemId: "dkim",
49905
+ label: "Private key",
49906
+ input: "secret",
49907
+ multiline: true,
49908
+ required: true,
49909
+ maxLength: 4096,
49910
+ hint: "The PEM block, from -----BEGIN to -----END."
49911
+ }
49912
+ ]
49913
+ }), "personProposal");
49914
+ var personResults = [
49915
+ { id: "dkim-record", itemId: "dkim", label: "DNS record", value: "nm2026._domainkey.nordwind.de", display: "text" },
49916
+ { id: "webhook-key", itemId: "webhook", label: "Webhook key", value: "whsec_demo_5Jk2-Qp8r-Tx3v-Lm7w", display: "secret" },
49917
+ { id: "webhook-guide", itemId: "webhook", label: "Set-up guide", value: "https://example.com/docs/delivery-reports", display: "link" }
49918
+ ];
49919
+ var runPersonProposal = /* @__PURE__ */ __name((event) => {
49920
+ const card = event.target;
49921
+ const { requestId, answers, declinedItemIds, personValues } = event.detail;
49922
+ showDemoResult(event.currentTarget, {
49923
+ requestId,
49924
+ answers,
49925
+ declinedItemIds,
49926
+ personValues: personValues?.map(({ itemId, fieldId }) => ({ itemId, fieldId, value: "(not shown)" }))
49927
+ });
49928
+ if (answers[0] !== "confirm") {
49929
+ card.request = { ...card.request, response: answers, respondedAt: Date.now() };
49930
+ return;
49931
+ }
49932
+ const password = personValues?.find((entry) => entry.itemId === "smtp" && entry.fieldId === "password")?.value;
49933
+ setTimeout(() => {
49934
+ if (password === REFUSED_PASSWORD) {
49935
+ card.rejectResponse({
49936
+ message: "The mail server refused the sign-in. Nothing was changed.",
49937
+ fieldErrors: [{ itemId: "smtp", fieldId: "password", message: "The mail server refused this password." }]
49938
+ });
49939
+ return;
49940
+ }
49941
+ card.request = { ...card.request, response: answers, respondedAt: Date.now(), declinedItemIds, outcome: { tone: "success", text: "Mail server connected" } };
49942
+ card.personResults = personResults.filter((result) => !declinedItemIds?.includes(result.itemId));
49943
+ }, 800);
49944
+ }, "runPersonProposal");
49945
+ var demoFunc44 = /* @__PURE__ */ __name(() => {
49946
+ const refused = document.createElement("dees-harness-question-card");
49947
+ refused.request = personProposal("p-person-refused");
49948
+ void refused.updateComplete.then(() => refused.rejectResponse({
49949
+ message: "The mail server refused the sign-in. Nothing was changed.",
49950
+ fieldErrors: [{ itemId: "smtp", fieldId: "password", message: "The mail server refused this password." }]
49951
+ }));
49952
+ const returned = document.createElement("dees-harness-question-card");
49953
+ returned.request = {
49954
+ ...personProposal("p-person-done"),
49955
+ response: ["confirm"],
49956
+ outcome: { tone: "success", text: "Mail server connected" }
49957
+ };
49958
+ returned.personResults = personResults;
49959
+ return demoPage("Questions", "Questions the agent asks, and changes it proposes that wait for a confirmation.", b`
49882
49960
  ${demoSection("Questions", "Single choices, multiple choices and written answers.", b`
49883
49961
  <div class="questionDemo dees-demo-stack" @harness-question-response=${logResponse2}>
49884
49962
  <dees-harness-question-card
49885
49963
  .request=${{
49886
- id: "q1",
49887
- question: "Which database should the new service use?",
49888
- createdAt: Date.now(),
49889
- options: [
49890
- { label: "PostgreSQL", description: "Relational, already in the stack" },
49891
- { label: "MongoDB", description: "Document store, flexible schema" },
49892
- { label: "SQLite", description: "Embedded, zero ops" }
49893
- ]
49894
- }}
49964
+ id: "q1",
49965
+ question: "Which database should the new service use?",
49966
+ createdAt: Date.now(),
49967
+ options: [
49968
+ { label: "PostgreSQL", description: "Relational, already in the stack" },
49969
+ { label: "MongoDB", description: "Document store, flexible schema" },
49970
+ { label: "SQLite", description: "Embedded, zero ops" }
49971
+ ]
49972
+ }}
49895
49973
  ></dees-harness-question-card>
49896
49974
  <dees-harness-question-card
49897
49975
  .request=${{
49898
- id: "q2",
49899
- question: "Which environments should the rollout include?",
49900
- multiSelect: true,
49901
- allowCustom: false,
49902
- options: [
49903
- { label: "staging" },
49904
- { label: "production-eu" },
49905
- { label: "production-us" }
49906
- ]
49907
- }}
49976
+ id: "q2",
49977
+ question: "Which environments should the rollout include?",
49978
+ multiSelect: true,
49979
+ allowCustom: false,
49980
+ options: [
49981
+ { label: "staging" },
49982
+ { label: "production-eu" },
49983
+ { label: "production-us" }
49984
+ ]
49985
+ }}
49908
49986
  ></dees-harness-question-card>
49909
49987
  <dees-harness-question-card
49910
49988
  .request=${{
49911
- id: "q-warning",
49912
- severity: "warning",
49913
- question: "The import brings its own tax settings. Replace the current ones?",
49914
- allowCustom: false,
49915
- options: [
49916
- { label: "Replace them", description: "The imported rates apply from the next booking on" },
49917
- { label: "Keep the current ones" }
49918
- ]
49919
- }}
49989
+ id: "q-warning",
49990
+ severity: "warning",
49991
+ question: "The import brings its own tax settings. Replace the current ones?",
49992
+ allowCustom: false,
49993
+ options: [
49994
+ { label: "Replace them", description: "The imported rates apply from the next booking on" },
49995
+ { label: "Keep the current ones" }
49996
+ ]
49997
+ }}
49920
49998
  ></dees-harness-question-card>
49921
49999
  <dees-harness-question-card
49922
50000
  .request=${{
49923
- id: "q3",
49924
- question: "Anything else I should know before migrating?",
49925
- options: []
49926
- }}
50001
+ id: "q3",
50002
+ question: "Anything else I should know before migrating?",
50003
+ options: []
50004
+ }}
49927
50005
  ></dees-harness-question-card>
49928
50006
  <dees-harness-question-card
49929
50007
  busy
49930
50008
  .request=${{
49931
- id: "q-busy",
49932
- question: "Waiting for the runtime \u2014 which region?",
49933
- options: [{ label: "eu-central" }, { label: "us-east" }]
49934
- }}
50009
+ id: "q-busy",
50010
+ question: "Waiting for the runtime \u2014 which region?",
50011
+ options: [{ label: "eu-central" }, { label: "us-east" }]
50012
+ }}
49935
50013
  ></dees-harness-question-card>
49936
50014
  <dees-harness-question-card
49937
50015
  .request=${{
49938
- id: "q4",
49939
- question: "Which framework for the admin UI?",
49940
- options: [{ label: "Lit" }, { label: "React" }],
49941
- response: ["Lit"],
49942
- respondedAt: Date.now() - 6e4
49943
- }}
50016
+ id: "q4",
50017
+ question: "Which framework for the admin UI?",
50018
+ options: [{ label: "Lit" }, { label: "React" }],
50019
+ response: ["Lit"],
50020
+ respondedAt: Date.now() - 6e4
50021
+ }}
49944
50022
  ></dees-harness-question-card>
49945
50023
  </div>
49946
50024
  ${demoOutput()}
@@ -49951,22 +50029,41 @@ var demoFunc44 = /* @__PURE__ */ __name(() => demoPage("Questions", "Questions t
49951
50029
  </div>
49952
50030
  ${demoOutput()}
49953
50031
  `)}
50032
+ ${demoSection("Values only the person gives", `A change may need values from the person alone: entered under it, a secret masked until shown, and sent with the confirmation only. What the changes return to the person shows under them. Enter the password "${REFUSED_PASSWORD}" to see the host turn the confirmation down.`, b`
50033
+ <div class="dees-demo-stack" @harness-question-response=${runPersonProposal} @harness-question-link=${routeLink}>
50034
+ <dees-harness-question-card .request=${personProposal("p-person")}></dees-harness-question-card>
50035
+ ${refused}
50036
+ ${returned}
50037
+ </div>
50038
+ ${demoOutput()}
50039
+ `)}
49954
50040
  ${demoSection("Decided proposals", "Read-only once decided: confirmed and under way, confirmed with a change left out, confirmed with a secret only the reader sees, declined, expired, failed.", b`
49955
50041
  <div class="dees-demo-stack" @harness-question-link=${routeLink}>
49956
50042
  ${decided.map((request) => b`<dees-harness-question-card .request=${request}></dees-harness-question-card>`)}
49957
50043
  </div>
49958
50044
  ${demoOutput()}
49959
50045
  `)}
49960
- `), "demoFunc");
50046
+ `);
50047
+ }, "demoFunc");
49961
50048
 
49962
50049
  // ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts
49963
- var _copyFeedback_dec2, _credentialsShown_dec, _leftOut_dec, _itemsExpanded_dec2, _customText_dec, _selected_dec, _answered_dec2, _viewState_dec6, _busy_dec2, _request_dec2, _a64, _DeesHarnessQuestionCard_decorators, _init66, _request2, _busy2, _viewState6, _answered2, _selected, _customText, _itemsExpanded2, _leftOut, _credentialsShown, _copyFeedback2;
50050
+ var _rejection_dec, _personResultsShown_dec, _personFieldsShown_dec, _personValues_dec, _personResults_dec, _copyFeedback_dec2, _credentialsShown_dec, _leftOut_dec, _itemsExpanded_dec2, _customText_dec, _selected_dec, _answered_dec2, _viewState_dec6, _busy_dec2, _request_dec2, _a64, _DeesHarnessQuestionCard_decorators, _init66, _request2, _busy2, _viewState6, _answered2, _selected, _customText, _itemsExpanded2, _leftOut, _credentialsShown, _copyFeedback2, _personResults, _personValues, _personFieldsShown, _personResultsShown, _rejection;
49964
50051
  var titleIcon = /* @__PURE__ */ __name((kindArg, severityArg) => severityArg === "danger" ? "lucide:OctagonAlert" : severityArg === "warning" ? "lucide:TriangleAlert" : kindArg === "proposal" ? "lucide:ListChecks" : "lucide:MessageCircleQuestionMark", "titleIcon");
49965
50052
  var ITEM_ICON = {
49966
50053
  warning: "lucide:TriangleAlert",
49967
50054
  danger: "lucide:OctagonAlert"
49968
50055
  };
49969
50056
  var CREDENTIAL_MASK = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
50057
+ var personKey = /* @__PURE__ */ __name((itemIdArg, fieldIdArg) => `${itemIdArg}\0${fieldIdArg}`, "personKey");
50058
+ var NO_PERSON_RESULTS = [];
50059
+ var httpHref = /* @__PURE__ */ __name((valueArg) => {
50060
+ try {
50061
+ const url = new URL(valueArg);
50062
+ return url.protocol === "http:" || url.protocol === "https:" ? url.href : void 0;
50063
+ } catch {
50064
+ return void 0;
50065
+ }
50066
+ }, "httpHref");
49970
50067
  var STATE_BADGE = {
49971
50068
  confirmed: "success",
49972
50069
  declined: "default",
@@ -49974,7 +50071,7 @@ var STATE_BADGE = {
49974
50071
  failed: "error"
49975
50072
  };
49976
50073
  _DeesHarnessQuestionCard_decorators = [customElement("dees-harness-question-card")];
49977
- var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = DeesElement, _request_dec2 = [n({ attribute: false })], _busy_dec2 = [n({ type: Boolean, reflect: true })], _viewState_dec6 = [n({ attribute: false })], _answered_dec2 = [r2()], _selected_dec = [r2()], _customText_dec = [r2()], _itemsExpanded_dec2 = [r2()], _leftOut_dec = [r2()], _credentialsShown_dec = [r2()], _copyFeedback_dec2 = [r2()], _a64) {
50074
+ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = DeesElement, _request_dec2 = [n({ attribute: false })], _busy_dec2 = [n({ type: Boolean, reflect: true })], _viewState_dec6 = [n({ attribute: false })], _answered_dec2 = [r2()], _selected_dec = [r2()], _customText_dec = [r2()], _itemsExpanded_dec2 = [r2()], _leftOut_dec = [r2()], _credentialsShown_dec = [r2()], _copyFeedback_dec2 = [r2()], _personResults_dec = [n({ attribute: false })], _personValues_dec = [r2()], _personFieldsShown_dec = [r2()], _personResultsShown_dec = [r2()], _rejection_dec = [r2()], _a64) {
49978
50075
  constructor() {
49979
50076
  super(...arguments);
49980
50077
  __publicField(this, "t", dcLocalize(this));
@@ -49988,6 +50085,11 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
49988
50085
  __privateAdd(this, _leftOut, __runInitializers(_init66, 36, this)), __runInitializers(_init66, 39, this);
49989
50086
  __privateAdd(this, _credentialsShown, __runInitializers(_init66, 40, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 43, this);
49990
50087
  __privateAdd(this, _copyFeedback2, __runInitializers(_init66, 44, this)), __runInitializers(_init66, 47, this);
50088
+ __privateAdd(this, _personResults, __runInitializers(_init66, 48, this, NO_PERSON_RESULTS)), __runInitializers(_init66, 51, this);
50089
+ __privateAdd(this, _personValues, __runInitializers(_init66, 52, this, /* @__PURE__ */ new Map())), __runInitializers(_init66, 55, this);
50090
+ __privateAdd(this, _personFieldsShown, __runInitializers(_init66, 56, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 59, this);
50091
+ __privateAdd(this, _personResultsShown, __runInitializers(_init66, 60, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 63, this);
50092
+ __privateAdd(this, _rejection, __runInitializers(_init66, 64, this)), __runInitializers(_init66, 67, this);
49991
50093
  __publicField(this, "copyRequest", 0);
49992
50094
  __publicField(this, "copyResetTimeout");
49993
50095
  __publicField(this, "footerActions");
@@ -50026,6 +50128,29 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50026
50128
  const chosen = new Set(ids);
50027
50129
  return new Set((this.request.items ?? []).filter((item) => chosen.has(item.id)).map((item) => item.id));
50028
50130
  }
50131
+ /** A change's person fields, those of a proposal only. */
50132
+ personFieldsOf(itemIdArg) {
50133
+ if (this.request.kind !== "proposal") return [];
50134
+ return (this.request.personFields ?? []).filter((field) => field.itemId === itemIdArg);
50135
+ }
50136
+ /** The person fields a confirmation sends: those of the changes it includes. */
50137
+ get includedPersonFields() {
50138
+ if (this.request.kind !== "proposal" || !this.request.personFields?.length) return [];
50139
+ const leftOut = this.effectiveLeftOut;
50140
+ const included = new Set((this.request.items ?? []).filter((item) => !leftOut.has(item.id)).map((item) => item.id));
50141
+ return this.request.personFields.filter((field) => included.has(field.itemId));
50142
+ }
50143
+ personValueOf(fieldArg) {
50144
+ return this.personValues.get(personKey(fieldArg.itemId, fieldArg.id)) ?? "";
50145
+ }
50146
+ /** Whether a required field of an included change is still empty. */
50147
+ get personFieldsMissing() {
50148
+ return this.includedPersonFields.some((field) => field.required === true && this.personValueOf(field).trim() === "");
50149
+ }
50150
+ /** Whether the included changes have every value they need, none of them too long. */
50151
+ get personFieldsComplete() {
50152
+ return !this.personFieldsMissing && this.includedPersonFields.every((field) => this.personValueOf(field).length <= field.maxLength);
50153
+ }
50029
50154
  /** Whether the card takes no answer: answered, waiting for the host (`busy`), or its changes under way or decided. */
50030
50155
  get locked() {
50031
50156
  return this.busy || this.effectiveResponse !== void 0 || this.proposalState !== "pending";
@@ -50121,8 +50246,16 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50121
50246
  /** The proposed changes and, once decided, the state and what came of it. */
50122
50247
  renderProposal() {
50123
50248
  const items = this.request.items ?? [];
50124
- const expanded = this.effectiveItemsExpanded;
50125
50249
  const proposalState = this.proposalState;
50250
+ const pending = proposalState === "pending";
50251
+ const personItems = /* @__PURE__ */ new Set([
50252
+ ...pending ? (this.request.personFields ?? []).map((field) => field.itemId) : [],
50253
+ ...this.personResults.map((result) => result.itemId)
50254
+ ]);
50255
+ const unfolded = !this.effectiveItemsExpanded && items.slice(harnessRecordsShown).some((item) => personItems.has(item.id));
50256
+ const expanded = this.effectiveItemsExpanded || unfolded;
50257
+ const itemIds = new Set(items.map((item) => item.id));
50258
+ const otherResults = this.personResults.filter((result) => !itemIds.has(result.itemId));
50126
50259
  const choosing = this.itemsDeclinable && proposalState === "pending";
50127
50260
  const leftOut = choosing || proposalState === "confirmed" || proposalState === "failed" ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50128
50261
  return b`
@@ -50151,13 +50284,17 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50151
50284
  </div>
50152
50285
  ${item.label ? item.href ? b`<a class="itemLabel" href=${item.href} @click=${(event) => this.openItem(event, item)}>${item.label}</a>` : b`<span class="itemLabel">${item.label}</span>` : ""}
50153
50286
  ${item.changes?.length ? renderHarnessChanges(this.t, item.changes) : ""}
50287
+ ${pending && !isLeftOut && this.personFieldsOf(item.id).length ? this.renderPersonFields(this.personFieldsOf(item.id)) : ""}
50154
50288
  ${item.credential ? this.renderCredential(item) : ""}
50289
+ ${this.personResults.some((result) => result.itemId === item.id) ? this.renderPersonResults(this.personResults.filter((result) => result.itemId === item.id)) : ""}
50155
50290
  </li>
50156
50291
  `;
50157
50292
  })}
50158
50293
  </ul>
50159
- ${renderHarnessMoreRecords(this.t, items.length, expanded, this.toggleItems)}
50294
+ ${unfolded ? "" : renderHarnessMoreRecords(this.t, items.length, expanded, this.toggleItems)}
50160
50295
  ` : ""}
50296
+ ${otherResults.length ? this.renderPersonResults(otherResults) : ""}
50297
+ ${pending ? this.renderPersonNotes() : ""}
50161
50298
  ${proposalState === "pending" ? "" : b`
50162
50299
  <div class="decision" tabindex="-1">
50163
50300
  <dees-badge type=${STATE_BADGE[proposalState]} .text=${this.t(`question.${proposalState}`)} rounded></dees-badge>
@@ -50173,7 +50310,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50173
50310
  renderCredential(itemArg) {
50174
50311
  const credential = itemArg.credential;
50175
50312
  const shown = this.credentialsShown.has(itemArg.id);
50176
- const feedback = this.copyFeedback?.itemId === itemArg.id ? this.copyFeedback : void 0;
50313
+ const feedback = this.copyFeedback?.key === `credential:${itemArg.id}` ? this.copyFeedback : void 0;
50177
50314
  return b`
50178
50315
  <div class="credential">
50179
50316
  <div class="credentialRow">
@@ -50189,7 +50326,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50189
50326
  class="credentialAction"
50190
50327
  type="button"
50191
50328
  aria-label=${this.t("question.credentialCopy", { label: credential.label })}
50192
- @click=${() => this.copyCredential(itemArg)}
50329
+ @click=${() => this.copySecret(`credential:${itemArg.id}`, credential.label, credential.value)}
50193
50330
  >${this.t("common.copy")}</button>
50194
50331
  <span class="credentialFeedback ${feedback?.failed ? "failed" : ""}" role="status" aria-live="polite">${feedback?.text ?? ""}</span>
50195
50332
  </div>
@@ -50197,19 +50334,140 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50197
50334
  </div>
50198
50335
  `;
50199
50336
  }
50337
+ /** The values a change needs from the person, under it while the proposal waits. */
50338
+ renderPersonFields(fieldsArg) {
50339
+ return b`<div class="personFields">${fieldsArg.map((field) => this.renderPersonField(field))}</div>`;
50340
+ }
50341
+ /**
50342
+ * One value for the person to enter: labelled, a secret masked until shown, its hint, and what
50343
+ * holds it back: too long, or refused by the host. It is not cut at its `maxLength`: a pasted
50344
+ * secret cut short would be a wrong one.
50345
+ */
50346
+ renderPersonField(fieldArg) {
50347
+ const key = personKey(fieldArg.itemId, fieldArg.id);
50348
+ const domId = `person-field-${(this.request.personFields ?? []).indexOf(fieldArg)}`;
50349
+ const value = this.personValues.get(key) ?? "";
50350
+ const secret = fieldArg.input === "secret";
50351
+ const shown = this.personFieldsShown.has(key);
50352
+ const error = value.length > fieldArg.maxLength ? this.t("question.personTooLong", { max: fieldArg.maxLength, count: value.length }) : this.effectiveRejection?.fieldErrors?.find((entry) => entry.itemId === fieldArg.itemId && entry.fieldId === fieldArg.id)?.message;
50353
+ const describedBy = [fieldArg.hint ? `${domId}-hint` : "", error ? `${domId}-error` : ""].filter(Boolean).join(" ");
50354
+ const input = /* @__PURE__ */ __name((eventArg) => this.setPersonValue(fieldArg, eventArg.currentTarget.value), "input");
50355
+ return b`
50356
+ <div class="personField">
50357
+ <label class="personLabel" for=${domId}>${fieldArg.label}${fieldArg.required ? b`<span class="required" aria-hidden="true">*</span>` : ""}</label>
50358
+ <div class="personInputRow">
50359
+ ${fieldArg.multiline ? b`
50360
+ <textarea
50361
+ id=${domId}
50362
+ class="personInput ${secret ? "secret" : ""} ${secret && !shown ? "masked" : ""}"
50363
+ rows="3"
50364
+ autocomplete="off"
50365
+ spellcheck=${secret ? "false" : "true"}
50366
+ aria-required=${fieldArg.required ? "true" : "false"}
50367
+ aria-invalid=${error ? "true" : "false"}
50368
+ aria-describedby=${describedBy}
50369
+ .value=${value}
50370
+ ?disabled=${this.locked}
50371
+ @input=${input}
50372
+ ></textarea>
50373
+ ` : b`
50374
+ <input
50375
+ id=${domId}
50376
+ class="personInput ${secret ? "secret" : ""}"
50377
+ type=${secret && !shown ? "password" : "text"}
50378
+ autocomplete="off"
50379
+ spellcheck=${secret ? "false" : "true"}
50380
+ aria-required=${fieldArg.required ? "true" : "false"}
50381
+ aria-invalid=${error ? "true" : "false"}
50382
+ aria-describedby=${describedBy}
50383
+ .value=${value}
50384
+ ?disabled=${this.locked}
50385
+ @input=${input}
50386
+ />
50387
+ `}
50388
+ ${secret ? b`
50389
+ <button
50390
+ class="credentialAction"
50391
+ type="button"
50392
+ aria-controls=${domId}
50393
+ aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: fieldArg.label })}
50394
+ @click=${() => this.togglePersonField(key)}
50395
+ >${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
50396
+ ` : ""}
50397
+ </div>
50398
+ ${fieldArg.hint ? b`<p class="personHint" id="${domId}-hint">${fieldArg.hint}</p>` : ""}
50399
+ ${error ? b`<p class="personError" id="${domId}-error">${error}</p>` : ""}
50400
+ </div>
50401
+ `;
50402
+ }
50403
+ /**
50404
+ * Under the changes of a waiting proposal: the host's refusal of the last confirmation, that
50405
+ * what the person enters goes nowhere but with the confirmation, and what still holds it back.
50406
+ */
50407
+ renderPersonNotes() {
50408
+ const rejection = this.effectiveRejection;
50409
+ const rejectionText = rejection?.message ?? (rejection?.fieldErrors?.length ? this.t("question.rejected") : "");
50410
+ const fields = this.includedPersonFields.length > 0;
50411
+ return b`
50412
+ ${rejectionText ? b`<p class="rejection" role="alert">${rejectionText}</p>` : ""}
50413
+ ${fields ? b`<p class="personNote">${this.t("question.personFieldsNote")}</p>` : ""}
50414
+ ${fields && !this.locked && this.personFieldsMissing ? b`<p class="personNote personMissing">${this.t("question.personFieldsMissing")}</p>` : ""}
50415
+ `;
50416
+ }
50417
+ /** What the confirmed changes returned to the person: a secret masked until shown, a link to an http or https address only. */
50418
+ renderPersonResults(resultsArg) {
50419
+ return b`
50420
+ <div class="credential personResults">
50421
+ ${resultsArg.map((result) => b`
50422
+ <div class="credentialRow">
50423
+ <span class="credentialLabel">${result.label}</span>
50424
+ ${this.renderPersonResultValue(result)}
50425
+ </div>
50426
+ `)}
50427
+ <p class="credentialNote">${this.t("question.credentialNote")}</p>
50428
+ </div>
50429
+ `;
50430
+ }
50431
+ renderPersonResultValue(resultArg) {
50432
+ if (resultArg.display === "link") {
50433
+ const href = httpHref(resultArg.value);
50434
+ return href ? b`<a class="personResultLink" href=${href} target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">${resultArg.value}</a>` : b`<span class="personResultText">${resultArg.value}</span>`;
50435
+ }
50436
+ if (resultArg.display !== "secret") return b`<span class="personResultText">${resultArg.value}</span>`;
50437
+ const shown = this.personResultsShown.has(resultArg.id);
50438
+ const feedback = this.copyFeedback?.key === `result:${resultArg.id}` ? this.copyFeedback : void 0;
50439
+ return b`
50440
+ <code class="credentialValue">${shown ? resultArg.value : b`<span aria-hidden="true">${CREDENTIAL_MASK}</span><span class="srOnly">${this.t("question.credentialHidden")}</span>`}</code>
50441
+ <button
50442
+ class="credentialAction"
50443
+ type="button"
50444
+ aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: resultArg.label })}
50445
+ @click=${() => this.togglePersonResult(resultArg.id)}
50446
+ >${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
50447
+ <button
50448
+ class="credentialAction"
50449
+ type="button"
50450
+ aria-label=${this.t("question.credentialCopy", { label: resultArg.label })}
50451
+ @click=${() => this.copySecret(`result:${resultArg.id}`, resultArg.label, resultArg.value)}
50452
+ >${this.t("common.copy")}</button>
50453
+ <span class="credentialFeedback ${feedback?.failed ? "failed" : ""}" role="status" aria-live="polite">${feedback?.text ?? ""}</span>
50454
+ `;
50455
+ }
50200
50456
  /** Decline, and Confirm as the primary; kept while their words and Confirm's availability stay, so the footer knows a running one by its object. */
50201
50457
  get proposalActions() {
50202
50458
  const confirm2 = this.request.confirmLabel ?? this.t("question.proposalConfirm");
50203
50459
  const decline = this.request.declineLabel ?? this.t("question.proposalDecline");
50204
50460
  const nothingIncluded = this.itemsDeclinable && this.effectiveLeftOut.size === (this.request.items?.length ?? 0);
50205
- if (this.footerActions?.confirm !== confirm2 || this.footerActions.decline !== decline || this.footerActions.nothingIncluded !== nothingIncluded) {
50461
+ const held = !this.personFieldsComplete;
50462
+ if (this.footerActions?.confirm !== confirm2 || this.footerActions.decline !== decline || this.footerActions.nothingIncluded !== nothingIncluded || this.footerActions.held !== held) {
50206
50463
  this.footerActions = {
50207
50464
  confirm: confirm2,
50208
50465
  decline,
50209
50466
  nothingIncluded,
50467
+ held,
50210
50468
  actions: [
50211
50469
  { name: decline, action: /* @__PURE__ */ __name(async () => this.respond(["decline"]), "action") },
50212
- { name: confirm2, primary: true, disabled: nothingIncluded, action: /* @__PURE__ */ __name(async () => this.respond(["confirm"]), "action") }
50470
+ { name: confirm2, primary: true, disabled: nothingIncluded || held, action: /* @__PURE__ */ __name(async () => this.respond(["confirm"]), "action") }
50213
50471
  ]
50214
50472
  };
50215
50473
  }
@@ -50230,18 +50488,65 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50230
50488
  else next.add(itemIdArg);
50231
50489
  this.credentialsShown = next;
50232
50490
  }
50233
- async copyCredential(itemArg) {
50234
- const credential = itemArg.credential;
50491
+ togglePersonField(keyArg) {
50492
+ const next = new Set(this.personFieldsShown);
50493
+ if (next.has(keyArg)) next.delete(keyArg);
50494
+ else next.add(keyArg);
50495
+ this.personFieldsShown = next;
50496
+ }
50497
+ togglePersonResult(resultIdArg) {
50498
+ const next = new Set(this.personResultsShown);
50499
+ if (next.has(resultIdArg)) next.delete(resultIdArg);
50500
+ else next.add(resultIdArg);
50501
+ this.personResultsShown = next;
50502
+ }
50503
+ /** The person enters a value; one the host refused is answered by the edit. */
50504
+ setPersonValue(fieldArg, valueArg) {
50505
+ if (this.locked) return;
50506
+ const next = new Map(this.personValues);
50507
+ if (valueArg) next.set(personKey(fieldArg.itemId, fieldArg.id), valueArg);
50508
+ else next.delete(personKey(fieldArg.itemId, fieldArg.id));
50509
+ this.personValues = next;
50510
+ const refused = /* @__PURE__ */ __name((entryArg) => entryArg.itemId === fieldArg.itemId && entryArg.fieldId === fieldArg.id, "refused");
50511
+ const rejection = this.effectiveRejection;
50512
+ if (rejection?.fieldErrors?.some(refused)) {
50513
+ this.setRejection({ ...rejection, fieldErrors: rejection.fieldErrors.filter((entry) => !refused(entry)) });
50514
+ }
50515
+ }
50516
+ /** The host's refusal the card shows: its own, or the one the view state kept over a remount. */
50517
+ get effectiveRejection() {
50518
+ return this.rejection ?? this.viewState?.rejection;
50519
+ }
50520
+ setRejection(rejectionArg) {
50521
+ this.rejection = rejectionArg;
50522
+ if (!this.viewState) return;
50523
+ if (rejectionArg) this.viewState.rejection = rejectionArg;
50524
+ else delete this.viewState.rejection;
50525
+ }
50526
+ /** Forgets what the person entered and showed, and the host's refusal of it. */
50527
+ clearPersonEntries() {
50528
+ this.personValues = /* @__PURE__ */ new Map();
50529
+ this.personFieldsShown = /* @__PURE__ */ new Set();
50530
+ this.rejection = void 0;
50531
+ }
50532
+ /** Forgets everything person-only: what was entered, and what the changes returned. */
50533
+ clearPersonState() {
50534
+ this.clearPersonEntries();
50535
+ this.personResults = NO_PERSON_RESULTS;
50536
+ this.personResultsShown = /* @__PURE__ */ new Set();
50537
+ if (this.copyFeedback?.key.startsWith("result:")) this.copyFeedback = void 0;
50538
+ }
50539
+ async copySecret(keyArg, labelArg, valueArg) {
50235
50540
  const request = ++this.copyRequest;
50236
50541
  clearTimeout(this.copyResetTimeout);
50237
50542
  this.copyFeedback = void 0;
50238
50543
  try {
50239
- await navigator.clipboard.writeText(credential.value);
50544
+ await navigator.clipboard.writeText(valueArg);
50240
50545
  if (!this.isConnected || request !== this.copyRequest) return;
50241
- this.copyFeedback = { itemId: itemArg.id, text: this.t("question.credentialCopied", { label: credential.label }), failed: false };
50546
+ this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopied", { label: labelArg }), failed: false };
50242
50547
  } catch {
50243
50548
  if (!this.isConnected || request !== this.copyRequest) return;
50244
- this.copyFeedback = { itemId: itemArg.id, text: this.t("question.credentialCopyFailed"), failed: true };
50549
+ this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopyFailed"), failed: true };
50245
50550
  }
50246
50551
  this.copyResetTimeout = setTimeout(() => {
50247
50552
  this.copyFeedback = void 0;
@@ -50273,11 +50578,15 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50273
50578
  respond(answers) {
50274
50579
  if (this.locked || !answers.length) return;
50275
50580
  const items = this.request.items ?? [];
50276
- const leftOut = answers[0] === "confirm" && this.itemsDeclinable ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50581
+ const confirming = answers[0] === "confirm";
50582
+ const leftOut = confirming && this.itemsDeclinable ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50277
50583
  if (leftOut.size > 0 && leftOut.size === items.length) return;
50584
+ if (confirming && !this.personFieldsComplete) return;
50585
+ const personValues = confirming ? this.includedPersonFields.map((field) => ({ itemId: field.itemId, fieldId: field.id, value: this.personValueOf(field) })).filter((entry) => entry.value !== "") : [];
50278
50586
  const footerFocused = this.shadowRoot?.activeElement?.localName === "dees-actionfooter";
50279
50587
  this.answered = answers;
50280
50588
  if (this.viewState) this.viewState.answered = answers;
50589
+ this.setRejection(void 0);
50281
50590
  if (footerFocused) {
50282
50591
  void this.updateComplete.then(() => this.shadowRoot?.querySelector(".decision")?.focus());
50283
50592
  }
@@ -50287,11 +50596,38 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50287
50596
  request: harnessWithoutCredentials(this.request)
50288
50597
  };
50289
50598
  if (leftOut.size > 0) detail.declinedItemIds = items.filter((item) => leftOut.has(item.id)).map((item) => item.id);
50599
+ if (personValues.length) detail.personValues = personValues;
50290
50600
  this.dispatchEvent(new CustomEvent("harness-question-response", {
50291
50601
  detail,
50292
50602
  bubbles: true,
50293
50603
  composed: true
50294
50604
  }));
50605
+ this.clearPersonEntries();
50606
+ }
50607
+ /**
50608
+ * The host refused the answer it was sent, such as a confirmation its server turned down: the
50609
+ * card waits for an answer again, keeps the changes the reader left out, and shows the host's
50610
+ * `message` and the error of each value it names. What the person entered went with the answer
50611
+ * and is entered anew. The refusal stands until the next answer, in the view state as well, so a
50612
+ * card the transcript remounts still shows it. A question that is not a proposal, a card whose
50613
+ * request carries the host's `response`, and one the host decided otherwise stay as they are: `false`.
50614
+ */
50615
+ rejectResponse(rejectionArg = {}) {
50616
+ if (this.request.kind !== "proposal" || this.request.response !== void 0) return false;
50617
+ if (harnessProposalState(this.request, void 0) !== "pending") return false;
50618
+ this.answered = void 0;
50619
+ if (this.viewState) this.viewState.answered = void 0;
50620
+ this.setRejection(rejectionArg);
50621
+ return true;
50622
+ }
50623
+ willUpdate(changedProperties) {
50624
+ super.willUpdate(changedProperties);
50625
+ const previous = changedProperties.get("request");
50626
+ if (previous && previous.id !== this.request.id) {
50627
+ this.clearPersonEntries();
50628
+ this.personResultsShown = /* @__PURE__ */ new Set();
50629
+ if (!changedProperties.has("personResults")) this.personResults = NO_PERSON_RESULTS;
50630
+ }
50295
50631
  }
50296
50632
  async disconnectedCallback() {
50297
50633
  ++this.copyRequest;
@@ -50299,6 +50635,9 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50299
50635
  this.copyResetTimeout = void 0;
50300
50636
  this.copyFeedback = void 0;
50301
50637
  this.credentialsShown = /* @__PURE__ */ new Set();
50638
+ queueMicrotask(() => {
50639
+ if (!this.isConnected) this.clearPersonState();
50640
+ });
50302
50641
  await super.disconnectedCallback();
50303
50642
  }
50304
50643
  };
@@ -50313,6 +50652,11 @@ _itemsExpanded2 = new WeakMap();
50313
50652
  _leftOut = new WeakMap();
50314
50653
  _credentialsShown = new WeakMap();
50315
50654
  _copyFeedback2 = new WeakMap();
50655
+ _personResults = new WeakMap();
50656
+ _personValues = new WeakMap();
50657
+ _personFieldsShown = new WeakMap();
50658
+ _personResultsShown = new WeakMap();
50659
+ _rejection = new WeakMap();
50316
50660
  __decorateElement(_init66, 4, "request", _request_dec2, _DeesHarnessQuestionCard, _request2);
50317
50661
  __decorateElement(_init66, 4, "busy", _busy_dec2, _DeesHarnessQuestionCard, _busy2);
50318
50662
  __decorateElement(_init66, 4, "viewState", _viewState_dec6, _DeesHarnessQuestionCard, _viewState6);
@@ -50323,6 +50667,11 @@ __decorateElement(_init66, 4, "itemsExpanded", _itemsExpanded_dec2, _DeesHarness
50323
50667
  __decorateElement(_init66, 4, "leftOut", _leftOut_dec, _DeesHarnessQuestionCard, _leftOut);
50324
50668
  __decorateElement(_init66, 4, "credentialsShown", _credentialsShown_dec, _DeesHarnessQuestionCard, _credentialsShown);
50325
50669
  __decorateElement(_init66, 4, "copyFeedback", _copyFeedback_dec2, _DeesHarnessQuestionCard, _copyFeedback2);
50670
+ __decorateElement(_init66, 4, "personResults", _personResults_dec, _DeesHarnessQuestionCard, _personResults);
50671
+ __decorateElement(_init66, 4, "personValues", _personValues_dec, _DeesHarnessQuestionCard, _personValues);
50672
+ __decorateElement(_init66, 4, "personFieldsShown", _personFieldsShown_dec, _DeesHarnessQuestionCard, _personFieldsShown);
50673
+ __decorateElement(_init66, 4, "personResultsShown", _personResultsShown_dec, _DeesHarnessQuestionCard, _personResultsShown);
50674
+ __decorateElement(_init66, 4, "rejection", _rejection_dec, _DeesHarnessQuestionCard, _rejection);
50326
50675
  _DeesHarnessQuestionCard = __decorateElement(_init66, 0, "DeesHarnessQuestionCard", _DeesHarnessQuestionCard_decorators, _DeesHarnessQuestionCard);
50327
50676
  __name(_DeesHarnessQuestionCard, "DeesHarnessQuestionCard");
50328
50677
  __publicField(_DeesHarnessQuestionCard, "demo", demoFunc44);
@@ -50627,6 +50976,130 @@ __publicField(_DeesHarnessQuestionCard, "styles", [
50627
50976
  color: var(--dees-color-text-secondary);
50628
50977
  font-size: var(--dees-font-caption1-size, 11px);
50629
50978
  }
50979
+
50980
+ .personResultText {
50981
+ flex: 1 1 12em;
50982
+ min-width: 0;
50983
+ color: var(--dees-color-text-primary);
50984
+ overflow-wrap: anywhere;
50985
+ }
50986
+
50987
+ .personResultLink {
50988
+ flex: 1 1 12em;
50989
+ min-width: 0;
50990
+ color: var(--dees-color-accent-primary);
50991
+ overflow-wrap: anywhere;
50992
+ border-radius: var(--dees-radius-xs);
50993
+ }
50994
+
50995
+ .personResultLink:focus-visible {
50996
+ outline: var(--dees-line-width-focus-ring) solid var(--dees-color-focus-ring);
50997
+ outline-offset: 2px;
50998
+ }
50999
+
51000
+ .personFields {
51001
+ display: grid;
51002
+ gap: var(--dees-spacing-sm);
51003
+ margin-top: 4px;
51004
+ }
51005
+
51006
+ .personField {
51007
+ display: grid;
51008
+ gap: 4px;
51009
+ min-width: 0;
51010
+ }
51011
+
51012
+ .personLabel {
51013
+ justify-self: start;
51014
+ color: var(--dees-color-text-secondary);
51015
+ font-weight: 500;
51016
+ }
51017
+
51018
+ .personLabel .required {
51019
+ margin-left: var(--dees-spacing-2xs);
51020
+ color: var(--dees-color-accent-error);
51021
+ }
51022
+
51023
+ .personInputRow {
51024
+ display: flex;
51025
+ align-items: center;
51026
+ gap: var(--dees-spacing-sm);
51027
+ min-width: 0;
51028
+ }
51029
+
51030
+ .personInput {
51031
+ flex: 1;
51032
+ min-width: 0;
51033
+ height: var(--dees-control-height-md);
51034
+ padding: 0 var(--dees-spacing-sm);
51035
+ border: var(--dees-line-width-hairline) solid var(--dees-color-border-default);
51036
+ border-radius: var(--dees-radius-md);
51037
+ corner-shape: var(--dees-corner-shape);
51038
+ background: var(--dees-color-bg-primary);
51039
+ color: var(--dees-color-text-primary);
51040
+ font-family: inherit;
51041
+ font-size: var(--dees-font-control-size-sm, 12px);
51042
+ outline: none;
51043
+ }
51044
+
51045
+ .personInput.secret {
51046
+ font-family: var(--dees-font-family-mono);
51047
+ }
51048
+
51049
+ textarea.personInput {
51050
+ height: auto;
51051
+ min-height: calc(var(--dees-control-height-md) * 2);
51052
+ padding: 6px var(--dees-spacing-sm);
51053
+ line-height: 1.4;
51054
+ resize: vertical;
51055
+ }
51056
+
51057
+ /* a secret of several lines has no password input: it is masked as one is */
51058
+ textarea.personInput.masked {
51059
+ -webkit-text-security: disc;
51060
+ }
51061
+
51062
+ .personInput:focus {
51063
+ border-color: var(--dees-color-accent-primary);
51064
+ box-shadow: 0 0 0 var(--dees-line-width-focus-ring) var(--dees-color-focus-ring);
51065
+ }
51066
+
51067
+ .personInput[aria-invalid='true'] {
51068
+ border-color: var(--dees-color-accent-error);
51069
+ }
51070
+
51071
+ .personInput:disabled {
51072
+ cursor: default;
51073
+ opacity: 0.6;
51074
+ }
51075
+
51076
+ .personHint,
51077
+ .personError,
51078
+ .personNote {
51079
+ margin: 0;
51080
+ color: var(--dees-color-text-secondary);
51081
+ font-size: var(--dees-font-caption1-size, 11px);
51082
+ }
51083
+
51084
+ .personError {
51085
+ color: var(--dees-color-text-error);
51086
+ }
51087
+
51088
+ .personNote + .personNote {
51089
+ margin-top: var(--dees-spacing-2xs);
51090
+ }
51091
+
51092
+ .rejection {
51093
+ margin: 0 0 12px;
51094
+ padding: 8px 12px;
51095
+ border: var(--dees-line-width-hairline) solid var(--dees-color-accent-error);
51096
+ border-radius: var(--dees-radius-lg);
51097
+ corner-shape: var(--dees-corner-shape);
51098
+ background: var(--dees-color-badge-error-bg);
51099
+ color: var(--dees-color-badge-error-fg);
51100
+ font-size: var(--dees-font-control-size-sm, 12px);
51101
+ overflow-wrap: anywhere;
51102
+ }
50630
51103
  `
50631
51104
  ]);
50632
51105
  __runInitializers(_init66, 1, _DeesHarnessQuestionCard);
@@ -50644,6 +51117,7 @@ var virtualGapPx = 8;
50644
51117
  var toolRowHeightPx = 28;
50645
51118
  var toolRowGapPx = 2;
50646
51119
  var thinkingRowGapPx = 2;
51120
+ var NO_PERSON_RESULTS2 = [];
50647
51121
  var pinnedRequestTime = Number.MAX_SAFE_INTEGER;
50648
51122
  var messageKeyOf = /* @__PURE__ */ __name((messageIdArg) => `message:${messageIdArg}`, "messageKeyOf");
50649
51123
  var thinkingSignatureOf = /* @__PURE__ */ __name((messageArg) => {
@@ -50719,6 +51193,14 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
50719
51193
  __publicField(this, "selectionGestureCrossesOwners", false);
50720
51194
  __publicField(this, "selectionGestureSnapshot");
50721
51195
  __publicField(this, "explicitRetainedVirtualKey");
51196
+ /** question rows kept mounted while the host's rejection reaches their card */
51197
+ __publicField(this, "heldQuestionKeys", /* @__PURE__ */ new Set());
51198
+ /**
51199
+ * What confirmed changes returned to the person, by question id: kept here rather than in the
51200
+ * view state, so a card mounted anew shows them again, and only while the question stays in
51201
+ * this transcript.
51202
+ */
51203
+ __publicField(this, "questionPersonResults", /* @__PURE__ */ new Map());
50722
51204
  __publicField(this, "virtualRowResizeObserver", null);
50723
51205
  __publicField(this, "virtualViewportResizeObserver", null);
50724
51206
  __publicField(this, "virtualMeasureFrame", null);
@@ -51071,6 +51553,9 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51071
51553
  for (const key of Object.keys(effectiveViewState.questions)) {
51072
51554
  if (!questionIds.has(key)) delete effectiveViewState.questions[key];
51073
51555
  }
51556
+ for (const key of this.questionPersonResults.keys()) {
51557
+ if (!questionIds.has(key)) this.questionPersonResults.delete(key);
51558
+ }
51074
51559
  for (const message of this.messages) effectiveViewState.messages[message.id] ??= {};
51075
51560
  for (const request of this.permissions) effectiveViewState.permissions[request.id] ??= {};
51076
51561
  for (const request of this.questions) effectiveViewState.questions[request.id] ??= {};
@@ -51487,6 +51972,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51487
51972
  .request=${itemArg.question}
51488
51973
  .busy=${this.permissionsBusy}
51489
51974
  .viewState=${this.questionViewState(itemArg.question.id)}
51975
+ .personResults=${this.questionPersonResults.get(itemArg.question.id) ?? NO_PERSON_RESULTS2}
51490
51976
  ></dees-harness-question-card>
51491
51977
  `;
51492
51978
  }
@@ -51753,6 +52239,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51753
52239
  this.virtualEndIndex = 0;
51754
52240
  this.retainedVirtualKeys.clear();
51755
52241
  this.explicitRetainedVirtualKey = void 0;
52242
+ this.heldQuestionKeys.clear();
52243
+ this.questionPersonResults.clear();
51756
52244
  this.measuredVirtualHeights.clear();
51757
52245
  this.virtualOffsets = [];
51758
52246
  this.virtualTotalHeight = 0;
@@ -51802,6 +52290,50 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51802
52290
  card.scrollIntoView({ block: "center" });
51803
52291
  return card.focusFirstAction();
51804
52292
  }
52293
+ /**
52294
+ * Hands the card of question `questionIdArg` what its confirmed changes returned to the person
52295
+ * (`IHarnessQuestionPersonResult`), after the host's own confirmation: shown under their changes,
52296
+ * kept by the list (never in the view state) while the question stays in this transcript, and
52297
+ * taken away with `[]`. `false` when this transcript has no such question.
52298
+ */
52299
+ async showQuestionPersonResults(questionIdArg, resultsArg) {
52300
+ if (!this.questions.some((request) => request.id === questionIdArg)) return false;
52301
+ if (resultsArg.length) this.questionPersonResults.set(questionIdArg, resultsArg);
52302
+ else this.questionPersonResults.delete(questionIdArg);
52303
+ this.requestUpdate();
52304
+ await this.updateComplete;
52305
+ return true;
52306
+ }
52307
+ /**
52308
+ * The host refused the answer the card of question `questionIdArg` sent, such as a confirmation
52309
+ * its server turned down: the card waits for an answer again with the changes the reader left
52310
+ * out, and shows why (`IHarnessQuestionRejection`), brought into view. Its request carries no
52311
+ * `response`. `false` when this transcript has no such question or the card cannot ask again.
52312
+ */
52313
+ async rejectQuestionResponse(questionIdArg, rejectionArg = {}) {
52314
+ if (!this.questions.some((request) => request.id === questionIdArg)) return false;
52315
+ const key = `question:${questionIdArg}`;
52316
+ this.heldQuestionKeys.add(key);
52317
+ this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
52318
+ this.requestUpdate();
52319
+ try {
52320
+ await this.updateComplete;
52321
+ const card = Array.from(
52322
+ this.shadowRoot?.querySelectorAll("dees-harness-question-card[data-timeline-key]") ?? []
52323
+ ).find((candidate) => candidate.dataset.timelineKey === key);
52324
+ if (!card) return false;
52325
+ const asked = card.rejectResponse(rejectionArg);
52326
+ if (asked) {
52327
+ await card.updateComplete;
52328
+ card.scrollIntoView({ block: "nearest" });
52329
+ }
52330
+ return asked;
52331
+ } finally {
52332
+ this.heldQuestionKeys.delete(key);
52333
+ this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
52334
+ this.scheduleVirtualRangeUpdate();
52335
+ }
52336
+ }
51805
52337
  schedulePendingVirtualizationActivation() {
51806
52338
  if (!this.virtualizationEnablePending && !this.virtualizationDisablePending || this.virtualizationActivationFrame !== null) return;
51807
52339
  this.virtualizationActivationFrame = requestAnimationFrame(() => {
@@ -52103,7 +52635,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
52103
52635
  return [
52104
52636
  ...this.explicitRetainedVirtualKey ? [this.explicitRetainedVirtualKey] : [],
52105
52637
  ...focusKey ? [focusKey] : [],
52106
- ...this.activeSelectionKeys()
52638
+ ...this.activeSelectionKeys(),
52639
+ ...this.heldQuestionKeys
52107
52640
  ].filter((key, index, keys) => keys.indexOf(key) === index);
52108
52641
  }
52109
52642
  activeTimelineKey() {
@@ -52274,6 +52807,10 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
52274
52807
  this.pendingVirtualRepin = false;
52275
52808
  this.explicitRetainedVirtualKey = void 0;
52276
52809
  this.retainedVirtualKeys.clear();
52810
+ this.heldQuestionKeys.clear();
52811
+ queueMicrotask(() => {
52812
+ if (!this.isConnected) this.questionPersonResults.clear();
52813
+ });
52277
52814
  for (const key of [...this.enteringKeys]) this.endRowEntrance(key);
52278
52815
  this.clearSelectionGesture();
52279
52816
  this.resetLoadEarlierState();
@@ -55534,6 +56071,16 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a69 = DeesElement, _mess
55534
56071
  await this.updateComplete;
55535
56072
  return this.listElement?.focusPendingPermission() ?? false;
55536
56073
  }
56074
+ /** Hands a question card what its confirmed changes returned to the person; see the message list's `showQuestionPersonResults()`. */
56075
+ async showQuestionPersonResults(questionIdArg, resultsArg) {
56076
+ await this.updateComplete;
56077
+ return await this.listElement?.showQuestionPersonResults(questionIdArg, resultsArg) ?? false;
56078
+ }
56079
+ /** Asks a question card again after the host refused its answer; see the message list's `rejectQuestionResponse()`. */
56080
+ async rejectQuestionResponse(questionIdArg, rejectionArg) {
56081
+ await this.updateComplete;
56082
+ return await this.listElement?.rejectQuestionResponse(questionIdArg, rejectionArg) ?? false;
56083
+ }
55537
56084
  scrollToBottom(force = false) {
55538
56085
  this.listElement?.scrollToBottom(force);
55539
56086
  }
@@ -71696,7 +72243,7 @@ var _DeesHarnessConversationPicker = class _DeesHarnessConversationPicker extend
71696
72243
  * cancelled. Focus returns to whatever had it when the picker opened.
71697
72244
  */
71698
72245
  static async pick(optionsArg = {}) {
71699
- const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-QBFEQURL.js");
72246
+ const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
71700
72247
  const picker = new _DeesHarnessConversationPicker();
71701
72248
  picker.sessions = optionsArg.sessions ?? [];
71702
72249
  picker.groups = optionsArg.groups ?? [];
@@ -72157,7 +72704,7 @@ var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
72157
72704
  list.selectedResourceId = event.detail.resource.id;
72158
72705
  }, "handleResourceContext");
72159
72706
  var openModal = /* @__PURE__ */ __name(async (sessions, groups) => {
72160
- const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-QBFEQURL.js");
72707
+ const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
72161
72708
  const content = document.createElement("dees-harness-session-list");
72162
72709
  content.sessions = sessions;
72163
72710
  content.groups = groups;
@@ -115844,7 +116391,7 @@ var _DeesSimpleAppDash = class _DeesSimpleAppDash extends (_a138 = DeesElement,
115844
116391
  this.terminalOpen = true;
115845
116392
  const request = ++this.terminalRequest;
115846
116393
  try {
115847
- const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-UYSWDBV4.js");
116394
+ const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-7SYZG2AB.js");
115848
116395
  await this.updateComplete;
115849
116396
  if (!this.isConnected || request !== this.terminalRequest) return;
115850
116397
  const terminal = new DeesWorkspaceTerminal3();
@@ -122849,7 +123396,7 @@ var bright = {
122849
123396
  // ts_web/00_commitinfo_data.ts
122850
123397
  var commitinfo = {
122851
123398
  name: "@design.estate/dees-catalog",
122852
- version: "21.35.0",
123399
+ version: "21.36.0",
122853
123400
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
122854
123401
  };
122855
123402
  export {