modern-json-react 1.0.1 → 1.1.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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1 from 'react';
1
+ import React$1, { RefObject } from 'react';
2
2
 
3
3
  /** Severity level for validation messages */
4
4
  type ValidationSeverity = 'error' | 'warning' | 'info';
@@ -437,4 +437,11 @@ interface UseSearchResult {
437
437
  */
438
438
  declare function useSearch(text: string): UseSearchResult;
439
439
 
440
- export { type ContextMenuItem, type CursorPosition, type CustomValidator, type EditorMode, type EditorState, type IndentationType, type JSONSchema, JsonEditor, type JsonEditorProps, type JsonNodeType, type ParseError, type SelectionRange, type ThemeConfig, type TreeAction, type TreeNode, type ValidationError, type ValidationMode, type ValidationResult, type ValidationSeverity, buildPath, computeStats, darkTheme, deleteByPath, formatJson, getByPath, isValidJson, lightTheme, minifyJson, parseJson, parsePath, runCustomValidators, setByPath, sortJsonKeys, stringifyJson, useJsonParser, useSearch, useUndoRedo, validateSchema };
440
+ /**
441
+ * Observes the width of a container element using ResizeObserver.
442
+ * Returns the current width so components can adapt their layout
443
+ * based on actual available space (container queries approach).
444
+ */
445
+ declare function useContainerWidth(ref: RefObject<HTMLElement | null>): number;
446
+
447
+ export { type ContextMenuItem, type CursorPosition, type CustomValidator, type EditorMode, type EditorState, type IndentationType, type JSONSchema, JsonEditor, type JsonEditorProps, type JsonNodeType, type ParseError, type SelectionRange, type ThemeConfig, type TreeAction, type TreeNode, type ValidationError, type ValidationMode, type ValidationResult, type ValidationSeverity, buildPath, computeStats, darkTheme, deleteByPath, formatJson, getByPath, isValidJson, lightTheme, minifyJson, parseJson, parsePath, runCustomValidators, setByPath, sortJsonKeys, stringifyJson, useContainerWidth, useJsonParser, useSearch, useUndoRedo, validateSchema };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1 from 'react';
1
+ import React$1, { RefObject } from 'react';
2
2
 
3
3
  /** Severity level for validation messages */
4
4
  type ValidationSeverity = 'error' | 'warning' | 'info';
@@ -437,4 +437,11 @@ interface UseSearchResult {
437
437
  */
438
438
  declare function useSearch(text: string): UseSearchResult;
439
439
 
440
- export { type ContextMenuItem, type CursorPosition, type CustomValidator, type EditorMode, type EditorState, type IndentationType, type JSONSchema, JsonEditor, type JsonEditorProps, type JsonNodeType, type ParseError, type SelectionRange, type ThemeConfig, type TreeAction, type TreeNode, type ValidationError, type ValidationMode, type ValidationResult, type ValidationSeverity, buildPath, computeStats, darkTheme, deleteByPath, formatJson, getByPath, isValidJson, lightTheme, minifyJson, parseJson, parsePath, runCustomValidators, setByPath, sortJsonKeys, stringifyJson, useJsonParser, useSearch, useUndoRedo, validateSchema };
440
+ /**
441
+ * Observes the width of a container element using ResizeObserver.
442
+ * Returns the current width so components can adapt their layout
443
+ * based on actual available space (container queries approach).
444
+ */
445
+ declare function useContainerWidth(ref: RefObject<HTMLElement | null>): number;
446
+
447
+ export { type ContextMenuItem, type CursorPosition, type CustomValidator, type EditorMode, type EditorState, type IndentationType, type JSONSchema, JsonEditor, type JsonEditorProps, type JsonNodeType, type ParseError, type SelectionRange, type ThemeConfig, type TreeAction, type TreeNode, type ValidationError, type ValidationMode, type ValidationResult, type ValidationSeverity, buildPath, computeStats, darkTheme, deleteByPath, formatJson, getByPath, isValidJson, lightTheme, minifyJson, parseJson, parsePath, runCustomValidators, setByPath, sortJsonKeys, stringifyJson, useContainerWidth, useJsonParser, useSearch, useUndoRedo, validateSchema };