@gfazioli/mantine-json-tree 3.1.0 → 3.2.1
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/cjs/JsonTree.cjs +10 -5
- package/dist/cjs/JsonTree.cjs.map +1 -1
- package/dist/esm/JsonTree.mjs +10 -5
- package/dist/esm/JsonTree.mjs.map +1 -1
- package/dist/types/JsonTree.d.ts +21 -1
- package/package.json +1 -1
package/dist/types/JsonTree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Factory, MantineRadius, MantineSize, StylesApiProps, type BoxProps, type StyleProp, type TooltipProps } from '@mantine/core';
|
|
2
|
+
import { Factory, MantineRadius, MantineSize, type TextInputProps, StylesApiProps, type BoxProps, type StyleProp, type TooltipProps } from '@mantine/core';
|
|
3
3
|
export type JsonTreeStylesNames = 'root' | 'paper' | 'header' | 'toolbar' | 'controls' | 'expandCollapse' | 'keyCountBadge' | 'copyAllButton' | 'searchToggle' | 'searchBar' | 'searchInput' | 'searchHighlight' | 'key' | 'keyValueSeparator' | 'value' | 'bracket' | 'ellipsis' | 'itemsCount' | 'indentGuide' | 'copyButton' | 'lineNumber';
|
|
4
4
|
export type JsonTreeCssVariables = {
|
|
5
5
|
root: '--json-tree-font-family' | '--json-tree-font-size';
|
|
@@ -107,6 +107,26 @@ export interface JsonTreeBaseProps {
|
|
|
107
107
|
onSearchChange?: (query: string) => void;
|
|
108
108
|
/** Debounce delay for search in ms @default 300 */
|
|
109
109
|
searchDebounce?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Props forwarded to the internal search `TextInput`. Use this to fully customize
|
|
112
|
+
* the search input via Mantine's native `classNames`, `styles`, `vars`, `variant`,
|
|
113
|
+
* `radius`, `size`, etc. — no specificity workarounds required.
|
|
114
|
+
*
|
|
115
|
+
* `value`, `defaultValue`, and `onChange` are intentionally excluded:
|
|
116
|
+
* `JsonTree` owns the search state. To control or observe it, use the
|
|
117
|
+
* top-level `searchQuery` and `onSearchChange` props.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```tsx
|
|
121
|
+
* <JsonTree
|
|
122
|
+
* withSearch
|
|
123
|
+
* searchInputProps={{
|
|
124
|
+
* styles: { input: { backgroundColor: 'var(--mantine-color-dark-7)' } },
|
|
125
|
+
* }}
|
|
126
|
+
* />
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
searchInputProps?: Omit<TextInputProps, 'value' | 'defaultValue' | 'onChange'>;
|
|
110
130
|
}
|
|
111
131
|
/** Display mode for functions in JSON data */
|
|
112
132
|
export type JsonTreeFunctionDisplay = 'as-string' | 'hide' | 'as-object';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfazioli/mantine-json-tree",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "A Mantine extension component that renders interactive JSON trees with syntax highlighting, collapsible nodes, copy-to-clipboard, and configurable expansion depth.",
|
|
5
5
|
"homepage": "https://gfazioli.github.io/mantine-json-tree/",
|
|
6
6
|
"packageManager": "yarn@4.0.1",
|