@magicx-eng/ai-autocomplete-react 0.62.1 → 0.62.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/index.mjs CHANGED
@@ -115,16 +115,26 @@ import{buildSubmitResult as vs,cellDay as xs,cellIso as ys,DATE_RANGE_META_END a
115
115
  <strong>). The completed class is stamped by the shared renderer as a global
116
116
  string, so match it via [class~=] to bypass CSS Modules' hashing. */
117
117
  :where(.aia-input-IW-P-) strong[class~="magicx-aia-segment--completed"] {
118
- /* inline (not inline-block) so a chip too wide for the line breaks across two
119
- lines; box-decoration-break: clone gives each fragment its own padding /
120
- radius / fill, so an over-long recognized phrase renders as two little
121
- rounded blocks instead of overflowing the field. */
122
- display: inline;
118
+ /* inline-block, so the chip is one unit on its line: when the line runs out
119
+ the whole chip moves to the next one instead of breaking in the middle
120
+ (between its icon and its text, or at a space). max-width keeps a chip
121
+ wider than the whole field inside it: its text then wraps within the
122
+ chip, drawn as one rounded box of several lines (white-space: normal
123
+ below; the field's overflow-wrap / word-break are inherited, so one very
124
+ long word cannot push it out either). */
125
+ display: inline-block;
126
+ box-sizing: border-box;
127
+ max-width: 100%;
123
128
  padding: 3px 6px;
129
+ /* An inline-block counts its vertical padding in the line box, where the
130
+ inline chip this replaces did not. The negative margin takes it back out,
131
+ and the baseline alignment keeps the chip's text on the surrounding
132
+ text's baseline, so rows of chips sit exactly --aia-editor-line-height
133
+ apart, as plain text does. */
134
+ margin: -3px 0;
135
+ vertical-align: baseline;
124
136
  /* Rounded rectangle, not a full capsule. */
125
137
  border-radius: 6px;
126
- -webkit-box-decoration-break: clone;
127
- box-decoration-break: clone;
128
138
  background: var(--aia-completed-pill-bg, rgba(189, 189, 189, 0.105));
129
139
  color: var(--aia-completed-pill-color, var(--aia-written-text-color, #fff));
130
140
  font-size: var(--aia-pill-font-size, 14px);
@@ -149,8 +159,8 @@ import{buildSubmitResult as vs,cellDay as xs,cellIso as ys,DATE_RANGE_META_END a
149
159
 
150
160
  /* The picked option's icon inside a completed chip (see \`icon_svg\` on
151
161
  CompletedParamState). Inline-block, one em square and sat on the text
152
- baseline, so the chip keeps \`display: inline\` and still wraps across
153
- lines; contentEditable is off on it (the renderer sets that) so it adds
162
+ baseline; the chip is one inline-block, so the icon never ends a line
163
+ apart from its text. contentEditable is off on it (the renderer sets that) so it adds
154
164
  no characters to the caret's plain text. */
155
165
  :where(.aia-input-IW-P-) span[class~="magicx-aia-segment-icon"] {
156
166
  display: inline-block;