elastic-input 0.3.6 → 0.3.8
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/autocomplete/AutocompleteEngine.d.ts +0 -1
- package/dist/components/AutocompleteDropdown.d.ts +4 -2
- package/dist/components/HighlightedContent.d.ts +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/elastic-input.es.js +5466 -5205
- package/dist/highlighting/parenMatch.d.ts +0 -1
- package/dist/highlighting/rangeHighlight.d.ts +0 -1
- package/dist/highlighting/regexHighlight.d.ts +0 -1
- package/dist/lexer/Lexer.d.ts +0 -1
- package/dist/parser/Parser.d.ts +0 -1
- package/dist/styles/inlineStyles.d.ts +0 -1
- package/dist/types.d.ts +8 -0
- package/dist/utils/expandSelection.d.ts +0 -1
- package/dist/utils/extractValues.d.ts +0 -1
- package/dist/utils/formatQuery.d.ts +0 -1
- package/dist/utils/smartSelect.d.ts +0 -1
- package/dist/utils/textUtils.d.ts +0 -1
- package/dist/validation/Validator.d.ts +0 -1
- package/package.json +4 -7
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Token } from '../lexer/tokens';
|
|
2
2
|
import { ColorConfig } from '../types';
|
|
3
|
-
|
|
4
3
|
export type RegexPartType = 'delimiter' | 'charClass' | 'groupOpen' | 'groupClose' | 'escape' | 'quantifier' | 'anchor' | 'alternation' | 'text';
|
|
5
4
|
export interface RegexPart {
|
|
6
5
|
type: RegexPartType;
|
package/dist/lexer/Lexer.d.ts
CHANGED
package/dist/parser/Parser.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Token } from '../lexer/tokens';
|
|
2
2
|
import { ASTNode, ErrorNode } from './ast';
|
|
3
|
-
|
|
4
3
|
export type CursorContextType = 'FIELD_NAME' | 'FIELD_VALUE' | 'OPERATOR' | 'RANGE' | 'SAVED_SEARCH' | 'HISTORY_REF' | 'EMPTY';
|
|
5
4
|
export interface CursorContext {
|
|
6
5
|
type: CursorContextType;
|
package/dist/types.d.ts
CHANGED
|
@@ -158,6 +158,8 @@ export interface StyleConfig {
|
|
|
158
158
|
fontFamily?: string;
|
|
159
159
|
/** Base font size for the input. */
|
|
160
160
|
fontSize?: string;
|
|
161
|
+
/** Line height for the input text and placeholder. @default '1.5' */
|
|
162
|
+
lineHeight?: string;
|
|
161
163
|
/** Minimum height of the input element. */
|
|
162
164
|
inputMinHeight?: string;
|
|
163
165
|
/** Padding inside the input element. */
|
|
@@ -280,6 +282,12 @@ export interface DropdownConfig {
|
|
|
280
282
|
cursorContext: CursorContext;
|
|
281
283
|
partial: string;
|
|
282
284
|
}) => React.ReactNode | null | undefined;
|
|
285
|
+
/** Controls the type badge shown in dropdown items.
|
|
286
|
+
* - `false` — hide the badge entirely
|
|
287
|
+
* - `true` (default) — show the raw `suggestion.type` string
|
|
288
|
+
* - callback `(type, suggestion) => ReactNode` — custom render per item; return null to hide
|
|
289
|
+
*/
|
|
290
|
+
renderType?: boolean | ((type: string, suggestion: SuggestionItem) => React.ReactNode | null | undefined);
|
|
283
291
|
}
|
|
284
292
|
/**
|
|
285
293
|
* Feature toggles for optional editing behaviors. All default to false except `multiline`.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ASTNode } from '../parser/ast';
|
|
2
2
|
import { FieldConfig, ValidateReturn, ValidateValueContext } from '../types';
|
|
3
3
|
import { ParseDateFn } from './dateValidator';
|
|
4
|
-
|
|
5
4
|
/** Callback type for external value validation. */
|
|
6
5
|
export type ValidateValueFn = (context: ValidateValueContext) => ValidateReturn;
|
|
7
6
|
/** A validation or syntax error with character offsets for squiggly underline display. */
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elastic-input",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Syntax-aware smart autocomplete input for Elastic query syntax",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/krtools/elastic-input.git"
|
|
8
|
+
"url": "git+https://github.com/krtools/elastic-input.git"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://github.com/krtools/elastic-input#readme",
|
|
11
11
|
"bugs": {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"dev": "vite --config vite.demo.config.js",
|
|
41
41
|
"build": "vite build",
|
|
42
42
|
"build:demo": "vite build --config vite.demo.config.js",
|
|
43
|
-
"deploy:pages": "npm run build:demo && gh-pages -d dist-demo",
|
|
44
43
|
"test": "vitest run",
|
|
45
44
|
"test:watch": "vitest",
|
|
46
45
|
"prepack": "npx tsc --noEmit && npm test && vite build"
|
|
@@ -60,15 +59,13 @@
|
|
|
60
59
|
"react-dom": ">=16.8.0"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@changesets/cli": "^2.30.0",
|
|
64
62
|
"@types/react": "^16.14.0",
|
|
65
63
|
"@types/react-dom": "^16.9.0",
|
|
66
|
-
"gh-pages": "^6.3.0",
|
|
67
64
|
"react": "^16.14.0",
|
|
68
65
|
"react-dom": "^16.14.0",
|
|
69
66
|
"typescript": "^5.3.0",
|
|
70
|
-
"vite": "^
|
|
71
|
-
"vite-plugin-dts": "^
|
|
67
|
+
"vite": "^8.0.3",
|
|
68
|
+
"vite-plugin-dts": "^4.5.4",
|
|
72
69
|
"vitest": "^4.1.0"
|
|
73
70
|
}
|
|
74
71
|
}
|