@indxsearch/systm 2.19.0 → 2.21.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/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bac9b80: SearchField has a built-in Clear button. It shows while the field holds text and puts the focus back in the field. Turn it off with `clearable={false}`. SearchInput keeps its own Clear, which also resets the filters.
8
+ - Three new spinners for search: `searching`, a glint moving around the lens of a magnifying glass; `search-as-you-type`, a text cursor stepping forward and leaving typed characters behind it; and `blinking-cursor`, a text cursor blinking in place. The `terminal` spinner has a third frame. `<Spinner name="searching" />`.
9
+ - f1bb38b: New `typing` spinner, drawn from the pixl `typing` icon: keystrokes land above and below a row of keys in short bursts, with a pause between words. `<Spinner name="typing" />`.
10
+
11
+ ### Patch Changes
12
+
13
+ - ffda712: The `analytics` spinner is 7×5 like every other spinner. It drew at 8×5, so it came out wider than the rest and showed an extra bar at the right edge on every other frame.
14
+ - Every Button variant now has the same 1px border, transparent where none shows. A button that changed variant used to move by a pixel, so a ghost tab jumped when it became the selected one.
15
+
16
+ ## 2.20.0
17
+
18
+ ### Minor Changes
19
+
20
+ - f9400f4: New `CodeCopy`: a one-line command with a copy button, like the install line on a package page. Give it `code` and it shows the text in a monospace field as tall as a default Button, so it sits in a row of buttons. After a copy the icon turns into a check for two seconds and screen readers hear "Copied". It also copies on a plain http page, where the browser's clipboard API is not available. A long command scrolls sideways instead of wrapping.
21
+
22
+ New `--font-mono` token for code, commands and keys: Geist Mono, falling back to the system's monospace font. The app loads the Geist Mono face itself, for example with `@fontsource/geist-mono`.
23
+
24
+ ### Patch Changes
25
+
26
+ - 1533dad: SearchInput shows what the search is doing. A blue chip counts the active filters. A Nearest chip appears when nothing matched your words directly and the list holds the nearest results instead; its tooltip says so. A No results chip appears when a search returns nothing. There is one Clear button, and it now resets the query and the filters together, so it also shows on an empty search with filters set. `showStatus={false}` hides the chips.
27
+
28
+ SearchField leaves room for what sits on its right, such as a Clear button or chips, so typed text no longer runs underneath them.
29
+
30
+ The search icon lights up only while the input has focus. Clicking Clear used to light it for a moment.
31
+
3
32
  ## 2.19.0
4
33
 
5
34
  ### Minor Changes
@@ -15,6 +15,9 @@ export interface ComposerProps {
15
15
  icon?: React.ReactNode;
16
16
  /** Tallest the field grows before it scrolls, in lines. */
17
17
  maxLines?: number;
18
+ /** Longest text that can be sent, in characters. Over it the field says so under itself and Send
19
+ * waits, so a limit the receiver enforces is never met as a silent refusal. */
20
+ maxLength?: number;
18
21
  className?: string;
19
22
  'aria-label'?: string;
20
23
  }
@@ -22,5 +25,5 @@ export interface ComposerHandle {
22
25
  focus: () => void;
23
26
  }
24
27
  /** The message field. Enter sends, Shift+Enter breaks the line; the field grows with its text up
25
- * to `maxLines`. Send becomes Stop while an answer streams. */
28
+ * to `maxLines`; over `maxLength` it says so and Send waits. Send becomes Stop while an answer streams. */
26
29
  export declare const Composer: React.ForwardRefExoticComponent<ComposerProps & React.RefAttributes<ComposerHandle>>;
@@ -1,7 +1,10 @@
1
1
  import { default as React } from 'react';
2
+ import { SpinnerName } from '../Spinner/spinners.generated';
2
3
  export interface StreamStatusProps {
3
4
  children: React.ReactNode;
5
+ /** Which spinner plays beside the line, so each stage can have its own: `grow` while writing. */
6
+ spinner?: SpinnerName;
4
7
  className?: string;
5
8
  }
6
9
  /** One quiet line saying what the assistant is doing right now — "Searching the docs…", "Writing…". */
7
- export declare function StreamStatus({ children, className }: StreamStatusProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function StreamStatus({ children, spinner, className }: StreamStatusProps): import("react/jsx-runtime").JSX.Element;
@@ -13,5 +13,7 @@ export interface ChipProps {
13
13
  /** `large` is a taller, more-padded badge that suits a leading icon. */
14
14
  size?: 'default' | 'large';
15
15
  }
16
+ /** `indx-chip` is a stable class beside the hashed one, as the Blazor Chip has, so a container can
17
+ * style the chips inside it (intrface's result rows set their background). */
16
18
  export declare function Chip({ children, color, textColor, className, icon, size }: ChipProps): import("react/jsx-runtime").JSX.Element;
17
19
  export {};
@@ -0,0 +1,10 @@
1
+ export interface CodeCopyProps {
2
+ /** The command or snippet, shown on one line and copied as is. */
3
+ code: string;
4
+ className?: string;
5
+ /** Called after the code is on the clipboard. */
6
+ onCopy?: () => void;
7
+ }
8
+ /** A one-line command with a copy button, like the install line on a package page. The icon turns
9
+ * into a check for two seconds after a copy. As tall as a default Button, so it sits in a row of them. */
10
+ export declare function CodeCopy({ code, className, onCopy }: CodeCopyProps): import("react/jsx-runtime").JSX.Element;
@@ -13,7 +13,12 @@ export interface SearchFieldProps extends React.InputHTMLAttributes<HTMLInputEle
13
13
  searchIconColor?: string;
14
14
  inputSize?: InputSize;
15
15
  showFocusBorder?: boolean;
16
+ /** A ghost "Clear" button at the end of the field while it holds text (default true), as the
17
+ * Blazor port's `Clearable`. Clearing fires `onChange` with an empty value and keeps the focus
18
+ * in the field. Turn it off where the page draws its own Clear (intrface's SearchInput, whose
19
+ * Clear also resets the filters). */
20
+ clearable?: boolean;
16
21
  children?: React.ReactNode;
17
22
  }
18
- export declare function SearchField({ label, error, className, showSearchIcon, searchIcon, searchIconColor, inputSize, showFocusBorder, children, id: providedId, type, ...props }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SearchField({ label, error, className, showSearchIcon, searchIcon, searchIconColor, inputSize, showFocusBorder, clearable, children, id: providedId, type, onChange, ...props }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
19
24
  export {};
@@ -0,0 +1,24 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface SkeletonProps {
3
+ /** Any CSS length; a number is px. Defaults to the full width. */
4
+ width?: number | string;
5
+ /** Any CSS length; a number is px. Defaults to 10px, a line of small text. */
6
+ height?: number | string;
7
+ /** The tone: 2 on the page (lv0, lv1), 3 on a Base surface (lv2), so it stays darker than what it sits on. */
8
+ level?: 2 | 3;
9
+ /** Seconds to hold this one back, to stagger a column of skeletons. */
10
+ delay?: number;
11
+ /**
12
+ * Fade in after a short wait, so an answer that comes quickly never flashes a skeleton. Default
13
+ * true. Turn it off when a parent fades the whole group in instead.
14
+ */
15
+ appear?: boolean;
16
+ className?: string;
17
+ style?: CSSProperties;
18
+ }
19
+ /**
20
+ * A placeholder for content that is on its way: a bar or block that pulses slowly. The one place
21
+ * systm moves besides Spinner, because the visitor is waiting. With reduced motion it holds a
22
+ * steady tone. It is decorative (aria-hidden); mark the region that is loading with aria-busy.
23
+ */
24
+ export declare function Skeleton({ width, height, level, delay, appear, className, style }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
@@ -28,6 +28,12 @@ export interface SparklineProps {
28
28
  * so a count that is only partway through does not read as a drop.
29
29
  */
30
30
  lastIsPartial?: boolean;
31
+ /**
32
+ * Line only: where the series stays at zero, the line and its fill take this colour, switching
33
+ * sharply where it rises, so a quiet stretch reads as quiet rather than as a line like any other. Most useful
34
+ * on many sparklines at once, where most are idle. Off when not given.
35
+ */
36
+ idleColor?: string;
31
37
  /** Bar only: the gap between bars, in real pixels whatever the width. */
32
38
  gap?: number;
33
39
  /**
@@ -37,4 +43,4 @@ export interface SparklineProps {
37
43
  ariaLabel?: string;
38
44
  className?: string;
39
45
  }
40
- export declare function Sparkline({ values, type, width, height, color, fill, baseline, lastIsPartial, gap, ariaLabel, className, }: SparklineProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function Sparkline({ values, type, width, height, color, fill, baseline, lastIsPartial, gap, idleColor, ariaLabel, className, }: SparklineProps): import("react/jsx-runtime").JSX.Element;
@@ -21,6 +21,11 @@ export declare const spinners: {
21
21
  delay: number;
22
22
  frames: string[];
23
23
  };
24
+ "blinking-cursor": {
25
+ viewBox: string;
26
+ delay: number;
27
+ frames: string[];
28
+ };
24
29
  "circle-open-close": {
25
30
  viewBox: string;
26
31
  delay: number;
@@ -86,6 +91,16 @@ export declare const spinners: {
86
91
  delay: number;
87
92
  frames: string[];
88
93
  };
94
+ "search-as-you-type": {
95
+ viewBox: string;
96
+ delay: number;
97
+ frames: string[];
98
+ };
99
+ searching: {
100
+ viewBox: string;
101
+ delay: number;
102
+ frames: string[];
103
+ };
89
104
  sliders: {
90
105
  viewBox: string;
91
106
  delay: number;
@@ -126,6 +141,11 @@ export declare const spinners: {
126
141
  delay: number;
127
142
  frames: string[];
128
143
  };
144
+ typing: {
145
+ viewBox: string;
146
+ delay: number;
147
+ frames: string[];
148
+ };
129
149
  "wi-fi": {
130
150
  viewBox: string;
131
151
  delay: number;
@@ -0,0 +1,37 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ /**
3
+ * The pixl grid is 7 cells by 5, so an icon is crisp at a width that is a multiple of 7: 14, 21,
4
+ * 28, 35. The value is set at 24px; 28 wide (20 tall) sits on its cap height.
5
+ */
6
+ export declare const STAT_ICON_SIZE = 28;
7
+ export interface StatProps {
8
+ /** What the number is: "Searches", "Click-through". */
9
+ label: ReactNode;
10
+ /** The number, formatted; or a chip, for a state. */
11
+ value: ReactNode;
12
+ /** A pixl icon before the value, for a state ("Up", "Key set"): drawn at STAT_ICON_SIZE in the value's colour. */
13
+ icon?: ReactElement<{
14
+ size?: number | string;
15
+ color?: string;
16
+ }>;
17
+ /** The value's colour, and the icon's: the signal red for a state that is wrong. A good state stays in the ink; the icon says it. */
18
+ color?: string;
19
+ /** Shown on the label, which gets a dotted underline to say there is more. */
20
+ hint?: string;
21
+ /** A line under the value: a change against the previous period, a unit, a note. */
22
+ children?: ReactNode;
23
+ className?: string;
24
+ }
25
+ /** One number with its label, on the Base surface: a KPI, a count, a state. Put several in a StatGroup. */
26
+ export declare function Stat({ label, value, icon, color, hint, children, className }: StatProps): import("react/jsx-runtime").JSX.Element;
27
+ export interface StatGroupProps {
28
+ children: ReactNode;
29
+ /**
30
+ * How many across on a wide screen. Without it, as many as fit at 180px each. With it, more
31
+ * than three step down to three under 1100px, and anything to two on a phone, where a last odd
32
+ * one spans the row.
33
+ */
34
+ columns?: number;
35
+ className?: string;
36
+ }
37
+ export declare function StatGroup({ children, columns, className }: StatGroupProps): import("react/jsx-runtime").JSX.Element;