@magicx-eng/ai-autocomplete-vanilla 0.70.0 → 0.71.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.
- package/REFERENCE.md +1 -0
- package/dist/index.d.mts +33 -4
- package/dist/index.d.ts +33 -4
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/REFERENCE.md
CHANGED
|
@@ -594,6 +594,7 @@ The full input also accepts `--aia-input-radius` and `--aia-written-text-font-we
|
|
|
594
594
|
| `--aia-date-today-ring` | `--aia-option-color` | `--aia-option-color` | Outline drawn around today's date. |
|
|
595
595
|
| `--aia-date-selected-bg` | white at 12% | white at 12% | Fill behind the date a re-edited parameter already holds. |
|
|
596
596
|
| `--aia-date-range-bg` | white at 6% | white at 6% | Band across the days between the two ends of a picked date range. The ends themselves use `--aia-date-selected-bg`. |
|
|
597
|
+
| `--aia-date-reference-bg` | white at 7% | white at 7% | Soft fill behind a day another answer already holds (the pickup date while the return date is asked), shown for reference; the day stays pickable. |
|
|
597
598
|
| `--aia-time-panel-width` | `240px` | `240px` | Max width of the whole dropdown panel while the time wheel is up. |
|
|
598
599
|
| `--aia-time-font-size` | `15px` | `15px` | The time wheel's numbers and its `:` separator. |
|
|
599
600
|
| `--aia-time-band-bg` | white at 8% | white at 8% | The band behind the wheels' top rows — the chosen time. |
|
package/dist/index.d.mts
CHANGED
|
@@ -1193,6 +1193,13 @@ interface CoreDerivedState {
|
|
|
1193
1193
|
* mark that start, dim the days before it, and no earlier day can be picked.
|
|
1194
1194
|
*/
|
|
1195
1195
|
dateFloor: string | null;
|
|
1196
|
+
/**
|
|
1197
|
+
* The days other date answers in the request already hold, as sorted
|
|
1198
|
+
* `YYYY-MM-DD` (the pickup day while the return day is asked). The calendars
|
|
1199
|
+
* box them for reference; they stay pickable. Empty unless
|
|
1200
|
+
* `activeFormatType` is a calendar one.
|
|
1201
|
+
*/
|
|
1202
|
+
dateReferences: string[];
|
|
1196
1203
|
/**
|
|
1197
1204
|
* What the time wheel shows. Null unless `activeFormatType` is `"time"`.
|
|
1198
1205
|
* `touched` is false while it still shows its suggested starting time.
|
|
@@ -1605,6 +1612,8 @@ declare class AIAutocomplete {
|
|
|
1605
1612
|
private openWordText;
|
|
1606
1613
|
/** The input text the location field last mirrored while on screen. */
|
|
1607
1614
|
private locationMirrorText;
|
|
1615
|
+
/** The search the input last put in the location field, so deleting those words clears it again. */
|
|
1616
|
+
private locationMirrored;
|
|
1608
1617
|
/** Identified params held back until the word they end ends. */
|
|
1609
1618
|
private heldIdentified;
|
|
1610
1619
|
/** Values waiting for confirmation. Only a submit of the same text admits them. */
|
|
@@ -1840,8 +1849,17 @@ declare class AIAutocomplete {
|
|
|
1840
1849
|
* words name, whichever row the arrows last rested on.
|
|
1841
1850
|
*/
|
|
1842
1851
|
private spacePicksTopPlace;
|
|
1843
|
-
/**
|
|
1852
|
+
/**
|
|
1853
|
+
* The place query the words after the last chip make, as the field mirrors
|
|
1854
|
+
* it. Words the server recognized as another parameter ("27th" in "on the
|
|
1855
|
+
* 27th") count as a chip too, so only the text after the last of them is
|
|
1856
|
+
* searched; a span recognized as the location being asked is the place
|
|
1857
|
+
* itself and stays.
|
|
1858
|
+
*/
|
|
1844
1859
|
private typedLocationQuery;
|
|
1860
|
+
private isReEditing;
|
|
1861
|
+
/** The words typed for the place: after the last chip and any span recognized as another parameter. */
|
|
1862
|
+
private typedLocationPhrase;
|
|
1845
1863
|
private runLocationSearch;
|
|
1846
1864
|
private cancelLocationSearch;
|
|
1847
1865
|
/**
|
|
@@ -1980,8 +1998,9 @@ declare class AIAutocomplete {
|
|
|
1980
1998
|
* before the server asked for it ("going to paris", then the destination
|
|
1981
1999
|
* question) is searched right away.
|
|
1982
2000
|
*
|
|
1983
|
-
* The phrase is `
|
|
1984
|
-
*
|
|
2001
|
+
* The phrase is `typedLocationQuery` (the text after the last chip and
|
|
2002
|
+
* after any span recognized as another parameter), not `optionQuery`,
|
|
2003
|
+
* which reads "" mid-word once a /suggest response lands.
|
|
1985
2004
|
*/
|
|
1986
2005
|
private mirrorTypedIntoLocationSearch;
|
|
1987
2006
|
/** True while commitOnWordEnd is on and the user still types the last word. */
|
|
@@ -2189,6 +2208,12 @@ interface DateSelection {
|
|
|
2189
2208
|
* it are dimmed and, unlike a day gone by, cannot be picked.
|
|
2190
2209
|
*/
|
|
2191
2210
|
floor?: string | null;
|
|
2211
|
+
/**
|
|
2212
|
+
* Days other date answers already hold (the pickup day while the return day
|
|
2213
|
+
* is asked), boxed for reference. They mark nothing as answered and stay
|
|
2214
|
+
* pickable.
|
|
2215
|
+
*/
|
|
2216
|
+
references?: readonly string[];
|
|
2192
2217
|
}
|
|
2193
2218
|
/**
|
|
2194
2219
|
* The calendar's selection, read off core state.
|
|
@@ -2211,6 +2236,7 @@ declare function dateSelectionFor(state: {
|
|
|
2211
2236
|
} | null;
|
|
2212
2237
|
dateRangeStart: string | null;
|
|
2213
2238
|
dateFloor?: string | null;
|
|
2239
|
+
dateReferences?: readonly string[];
|
|
2214
2240
|
}): DateSelection;
|
|
2215
2241
|
/**
|
|
2216
2242
|
* The span the calendar should paint right now.
|
|
@@ -2229,7 +2255,8 @@ declare function visibleDateRange(args: {
|
|
|
2229
2255
|
}): DateRange | null;
|
|
2230
2256
|
/**
|
|
2231
2257
|
* How one cell renders against the current selection: filled at either end of
|
|
2232
|
-
* the span, banded in between
|
|
2258
|
+
* the span, banded in between, boxed for reference when another answer holds
|
|
2259
|
+
* the day and it is neither.
|
|
2233
2260
|
*
|
|
2234
2261
|
* Shared by all three packages' calendars so a range can't be painted three
|
|
2235
2262
|
* subtly different ways. `selectedIso` is the single-date answer, which is
|
|
@@ -2239,9 +2266,11 @@ declare function visibleDateRange(args: {
|
|
|
2239
2266
|
declare function dateCellMarks(iso: string | null, args: {
|
|
2240
2267
|
selectedIso: string | null;
|
|
2241
2268
|
range: DateRange | null;
|
|
2269
|
+
references?: readonly string[];
|
|
2242
2270
|
}): {
|
|
2243
2271
|
selected: boolean;
|
|
2244
2272
|
inRange: boolean;
|
|
2273
|
+
reference: boolean;
|
|
2245
2274
|
};
|
|
2246
2275
|
/**
|
|
2247
2276
|
* Whether a day is dimmed: one already gone by, or one before the earliest day
|
package/dist/index.d.ts
CHANGED
|
@@ -1193,6 +1193,13 @@ interface CoreDerivedState {
|
|
|
1193
1193
|
* mark that start, dim the days before it, and no earlier day can be picked.
|
|
1194
1194
|
*/
|
|
1195
1195
|
dateFloor: string | null;
|
|
1196
|
+
/**
|
|
1197
|
+
* The days other date answers in the request already hold, as sorted
|
|
1198
|
+
* `YYYY-MM-DD` (the pickup day while the return day is asked). The calendars
|
|
1199
|
+
* box them for reference; they stay pickable. Empty unless
|
|
1200
|
+
* `activeFormatType` is a calendar one.
|
|
1201
|
+
*/
|
|
1202
|
+
dateReferences: string[];
|
|
1196
1203
|
/**
|
|
1197
1204
|
* What the time wheel shows. Null unless `activeFormatType` is `"time"`.
|
|
1198
1205
|
* `touched` is false while it still shows its suggested starting time.
|
|
@@ -1605,6 +1612,8 @@ declare class AIAutocomplete {
|
|
|
1605
1612
|
private openWordText;
|
|
1606
1613
|
/** The input text the location field last mirrored while on screen. */
|
|
1607
1614
|
private locationMirrorText;
|
|
1615
|
+
/** The search the input last put in the location field, so deleting those words clears it again. */
|
|
1616
|
+
private locationMirrored;
|
|
1608
1617
|
/** Identified params held back until the word they end ends. */
|
|
1609
1618
|
private heldIdentified;
|
|
1610
1619
|
/** Values waiting for confirmation. Only a submit of the same text admits them. */
|
|
@@ -1840,8 +1849,17 @@ declare class AIAutocomplete {
|
|
|
1840
1849
|
* words name, whichever row the arrows last rested on.
|
|
1841
1850
|
*/
|
|
1842
1851
|
private spacePicksTopPlace;
|
|
1843
|
-
/**
|
|
1852
|
+
/**
|
|
1853
|
+
* The place query the words after the last chip make, as the field mirrors
|
|
1854
|
+
* it. Words the server recognized as another parameter ("27th" in "on the
|
|
1855
|
+
* 27th") count as a chip too, so only the text after the last of them is
|
|
1856
|
+
* searched; a span recognized as the location being asked is the place
|
|
1857
|
+
* itself and stays.
|
|
1858
|
+
*/
|
|
1844
1859
|
private typedLocationQuery;
|
|
1860
|
+
private isReEditing;
|
|
1861
|
+
/** The words typed for the place: after the last chip and any span recognized as another parameter. */
|
|
1862
|
+
private typedLocationPhrase;
|
|
1845
1863
|
private runLocationSearch;
|
|
1846
1864
|
private cancelLocationSearch;
|
|
1847
1865
|
/**
|
|
@@ -1980,8 +1998,9 @@ declare class AIAutocomplete {
|
|
|
1980
1998
|
* before the server asked for it ("going to paris", then the destination
|
|
1981
1999
|
* question) is searched right away.
|
|
1982
2000
|
*
|
|
1983
|
-
* The phrase is `
|
|
1984
|
-
*
|
|
2001
|
+
* The phrase is `typedLocationQuery` (the text after the last chip and
|
|
2002
|
+
* after any span recognized as another parameter), not `optionQuery`,
|
|
2003
|
+
* which reads "" mid-word once a /suggest response lands.
|
|
1985
2004
|
*/
|
|
1986
2005
|
private mirrorTypedIntoLocationSearch;
|
|
1987
2006
|
/** True while commitOnWordEnd is on and the user still types the last word. */
|
|
@@ -2189,6 +2208,12 @@ interface DateSelection {
|
|
|
2189
2208
|
* it are dimmed and, unlike a day gone by, cannot be picked.
|
|
2190
2209
|
*/
|
|
2191
2210
|
floor?: string | null;
|
|
2211
|
+
/**
|
|
2212
|
+
* Days other date answers already hold (the pickup day while the return day
|
|
2213
|
+
* is asked), boxed for reference. They mark nothing as answered and stay
|
|
2214
|
+
* pickable.
|
|
2215
|
+
*/
|
|
2216
|
+
references?: readonly string[];
|
|
2192
2217
|
}
|
|
2193
2218
|
/**
|
|
2194
2219
|
* The calendar's selection, read off core state.
|
|
@@ -2211,6 +2236,7 @@ declare function dateSelectionFor(state: {
|
|
|
2211
2236
|
} | null;
|
|
2212
2237
|
dateRangeStart: string | null;
|
|
2213
2238
|
dateFloor?: string | null;
|
|
2239
|
+
dateReferences?: readonly string[];
|
|
2214
2240
|
}): DateSelection;
|
|
2215
2241
|
/**
|
|
2216
2242
|
* The span the calendar should paint right now.
|
|
@@ -2229,7 +2255,8 @@ declare function visibleDateRange(args: {
|
|
|
2229
2255
|
}): DateRange | null;
|
|
2230
2256
|
/**
|
|
2231
2257
|
* How one cell renders against the current selection: filled at either end of
|
|
2232
|
-
* the span, banded in between
|
|
2258
|
+
* the span, banded in between, boxed for reference when another answer holds
|
|
2259
|
+
* the day and it is neither.
|
|
2233
2260
|
*
|
|
2234
2261
|
* Shared by all three packages' calendars so a range can't be painted three
|
|
2235
2262
|
* subtly different ways. `selectedIso` is the single-date answer, which is
|
|
@@ -2239,9 +2266,11 @@ declare function visibleDateRange(args: {
|
|
|
2239
2266
|
declare function dateCellMarks(iso: string | null, args: {
|
|
2240
2267
|
selectedIso: string | null;
|
|
2241
2268
|
range: DateRange | null;
|
|
2269
|
+
references?: readonly string[];
|
|
2242
2270
|
}): {
|
|
2243
2271
|
selected: boolean;
|
|
2244
2272
|
inRange: boolean;
|
|
2273
|
+
reference: boolean;
|
|
2245
2274
|
};
|
|
2246
2275
|
/**
|
|
2247
2276
|
* Whether a day is dimmed: one already gone by, or one before the earliest day
|