@8wave/ai-elements 0.121.0-beta.44 → 0.121.0-beta.45

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.
@@ -83,6 +83,12 @@ export type FieldSummary = {
83
83
  label: string;
84
84
  value: string;
85
85
  };
86
+ /**
87
+ * Each field of a form with its whole value, an empty one included: what a
88
+ * submit card compares with, to list first what changed. The fields `known`
89
+ * already holds are left out, so a page read again costs only its new ones.
90
+ */
91
+ export declare function formValues(form: HTMLFormElement, rules: PageRules, checked: string, known?: Pick<WeakMap<Element, string>, 'has'>): Map<Element, string>;
86
92
  /**
87
93
  * The fields of a form as its user sees them filled in, for the card that
88
94
  * asks before submitting it (spec `page-tools-improvements.md`, M2): what
@@ -91,7 +97,7 @@ export type FieldSummary = {
91
97
  * their labels, as the snapshot does), the hidden, disabled and empty ones,
92
98
  * and the buttons. `checked` is the value of a ticked checkbox.
93
99
  */
94
- export declare function formSummary(form: HTMLFormElement, rules: PageRules, { checked, whole, }: {
100
+ export declare function formSummary(form: HTMLFormElement, rules: PageRules, { checked, whole, before, }: {
95
101
  checked: string;
96
102
  /**
97
103
  * Every field with its whole value, a list box by the text it shows:
@@ -99,6 +105,13 @@ export declare function formSummary(form: HTMLFormElement, rules: PageRules, { c
99
105
  * fields past the card's eight and the ends of long values included.
100
106
  */
101
107
  whole?: boolean;
108
+ /**
109
+ * The whole value each field had before (`formValues`): the fields
110
+ * whose value differs come first, all of them, past the eight too,
111
+ * and a long one from where it changed. A field with no value
112
+ * before counts as unchanged.
113
+ */
114
+ before?: Pick<WeakMap<Element, string>, 'get'>;
102
115
  }): {
103
116
  fields: FieldSummary[];
104
117
  more: number;
package/dist-vue/index.js CHANGED
@@ -15971,9 +15971,11 @@ var OC = {
15971
15971
  key: 0,
15972
15972
  class: "pk-editor-prompt__label"
15973
15973
  }, FC = [
15974
+ "aria-label",
15975
+ "aria-placeholder",
15976
+ "aria-disabled",
15974
15977
  "lang",
15975
15978
  "tabindex",
15976
- "aria-label",
15977
15979
  "onKeydown"
15978
15980
  ], IC = {
15979
15981
  key: 0,
@@ -16022,9 +16024,14 @@ var OC = {
16022
16024
  onClick: l[0] ||= gi(() => {}, ["stop"])
16023
16025
  }, [P("div", {
16024
16026
  class: "pk-editor-prompt__input light-scrollbar",
16027
+ role: "textbox",
16028
+ "aria-readonly": "true",
16029
+ "aria-multiline": "true",
16030
+ "aria-label": e.label || void 0,
16031
+ "aria-placeholder": e.placeholder || void 0,
16032
+ "aria-disabled": e.disabled || void 0,
16025
16033
  lang: e.lang,
16026
16034
  tabindex: a.value ? 0 : void 0,
16027
- "aria-label": a.value && e.label || void 0,
16028
16035
  onClick: s,
16029
16036
  onKeydown: hi(gi(s, ["self", "prevent"]), ["enter"])
16030
16037
  }, [r.value ? (z(), N("div", IC, [I(Je, {