@visual-json/react 0.1.1 → 0.3.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/README.md +0 -4
- package/dist/index.d.mts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +674 -711
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +674 -714
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -10
- package/LICENSE +0 -201
package/README.md
CHANGED
|
@@ -152,10 +152,6 @@ function CustomEditor({ value, onChange }) {
|
|
|
152
152
|
<td><code>Breadcrumbs</code></td>
|
|
153
153
|
<td>Path breadcrumbs with typeahead navigation</td>
|
|
154
154
|
</tr>
|
|
155
|
-
<tr>
|
|
156
|
-
<td><code>PropertyEditor</code></td>
|
|
157
|
-
<td>Single-node key/value/type editor</td>
|
|
158
|
-
</tr>
|
|
159
155
|
<tr>
|
|
160
156
|
<td><code>ContextMenu</code></td>
|
|
161
157
|
<td>Right-click menu for tree operations</td>
|
package/dist/index.d.mts
CHANGED
|
@@ -39,11 +39,6 @@ declare function TreeView({ className, showValues, showCounts, }: TreeViewProps)
|
|
|
39
39
|
|
|
40
40
|
declare function getVisibleNodes(root: TreeNode, isExpanded: (nodeId: string) => boolean): TreeNode[];
|
|
41
41
|
|
|
42
|
-
interface PropertyEditorProps {
|
|
43
|
-
className?: string;
|
|
44
|
-
}
|
|
45
|
-
declare function PropertyEditor({ className }: PropertyEditorProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
|
|
47
42
|
interface BreadcrumbsProps {
|
|
48
43
|
className?: string;
|
|
49
44
|
}
|
|
@@ -88,7 +83,10 @@ declare function DiffView({ originalJson, currentJson, className, }: DiffViewPro
|
|
|
88
83
|
|
|
89
84
|
interface StudioState {
|
|
90
85
|
tree: TreeState;
|
|
91
|
-
|
|
86
|
+
focusedNodeId: string | null;
|
|
87
|
+
selectedNodeIds: Set<string>;
|
|
88
|
+
anchorNodeId: string | null;
|
|
89
|
+
drillDownNodeId: string | null;
|
|
92
90
|
expandedNodeIds: Set<string>;
|
|
93
91
|
schema: JsonSchema | null;
|
|
94
92
|
searchQuery: string;
|
|
@@ -99,6 +97,12 @@ interface StudioState {
|
|
|
99
97
|
interface StudioActions {
|
|
100
98
|
setTree: (tree: TreeState) => void;
|
|
101
99
|
selectNode: (nodeId: string | null) => void;
|
|
100
|
+
selectAndDrillDown: (nodeId: string | null) => void;
|
|
101
|
+
toggleNodeSelection: (nodeId: string) => void;
|
|
102
|
+
selectNodeRange: (toNodeId: string) => void;
|
|
103
|
+
setSelection: (focusedId: string | null, selectedIds: Set<string>, anchorId: string | null) => void;
|
|
104
|
+
setVisibleNodesOverride: (nodes: TreeNode[] | null) => void;
|
|
105
|
+
drillDown: (nodeId: string | null) => void;
|
|
102
106
|
toggleExpand: (nodeId: string) => void;
|
|
103
107
|
expandNode: (nodeId: string) => void;
|
|
104
108
|
collapseNode: (nodeId: string) => void;
|
|
@@ -119,4 +123,4 @@ interface StudioContextValue {
|
|
|
119
123
|
declare const StudioContext: react.Context<StudioContextValue | null>;
|
|
120
124
|
declare function useStudio(): StudioContextValue;
|
|
121
125
|
|
|
122
|
-
export { Breadcrumbs, type BreadcrumbsProps, ContextMenu, type ContextMenuEntry, type ContextMenuProps, DiffView, type DiffViewProps, FormView, type FormViewProps, JsonEditor, type JsonEditorProps,
|
|
126
|
+
export { Breadcrumbs, type BreadcrumbsProps, ContextMenu, type ContextMenuEntry, type ContextMenuProps, DiffView, type DiffViewProps, FormView, type FormViewProps, JsonEditor, type JsonEditorProps, SearchBar, type SearchBarProps, type StudioActions, StudioContext, type StudioContextValue, type StudioState, TreeView, type TreeViewProps, VisualJson, type VisualJsonProps, getVisibleNodes, useStudio };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,11 +39,6 @@ declare function TreeView({ className, showValues, showCounts, }: TreeViewProps)
|
|
|
39
39
|
|
|
40
40
|
declare function getVisibleNodes(root: TreeNode, isExpanded: (nodeId: string) => boolean): TreeNode[];
|
|
41
41
|
|
|
42
|
-
interface PropertyEditorProps {
|
|
43
|
-
className?: string;
|
|
44
|
-
}
|
|
45
|
-
declare function PropertyEditor({ className }: PropertyEditorProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
|
|
47
42
|
interface BreadcrumbsProps {
|
|
48
43
|
className?: string;
|
|
49
44
|
}
|
|
@@ -88,7 +83,10 @@ declare function DiffView({ originalJson, currentJson, className, }: DiffViewPro
|
|
|
88
83
|
|
|
89
84
|
interface StudioState {
|
|
90
85
|
tree: TreeState;
|
|
91
|
-
|
|
86
|
+
focusedNodeId: string | null;
|
|
87
|
+
selectedNodeIds: Set<string>;
|
|
88
|
+
anchorNodeId: string | null;
|
|
89
|
+
drillDownNodeId: string | null;
|
|
92
90
|
expandedNodeIds: Set<string>;
|
|
93
91
|
schema: JsonSchema | null;
|
|
94
92
|
searchQuery: string;
|
|
@@ -99,6 +97,12 @@ interface StudioState {
|
|
|
99
97
|
interface StudioActions {
|
|
100
98
|
setTree: (tree: TreeState) => void;
|
|
101
99
|
selectNode: (nodeId: string | null) => void;
|
|
100
|
+
selectAndDrillDown: (nodeId: string | null) => void;
|
|
101
|
+
toggleNodeSelection: (nodeId: string) => void;
|
|
102
|
+
selectNodeRange: (toNodeId: string) => void;
|
|
103
|
+
setSelection: (focusedId: string | null, selectedIds: Set<string>, anchorId: string | null) => void;
|
|
104
|
+
setVisibleNodesOverride: (nodes: TreeNode[] | null) => void;
|
|
105
|
+
drillDown: (nodeId: string | null) => void;
|
|
102
106
|
toggleExpand: (nodeId: string) => void;
|
|
103
107
|
expandNode: (nodeId: string) => void;
|
|
104
108
|
collapseNode: (nodeId: string) => void;
|
|
@@ -119,4 +123,4 @@ interface StudioContextValue {
|
|
|
119
123
|
declare const StudioContext: react.Context<StudioContextValue | null>;
|
|
120
124
|
declare function useStudio(): StudioContextValue;
|
|
121
125
|
|
|
122
|
-
export { Breadcrumbs, type BreadcrumbsProps, ContextMenu, type ContextMenuEntry, type ContextMenuProps, DiffView, type DiffViewProps, FormView, type FormViewProps, JsonEditor, type JsonEditorProps,
|
|
126
|
+
export { Breadcrumbs, type BreadcrumbsProps, ContextMenu, type ContextMenuEntry, type ContextMenuProps, DiffView, type DiffViewProps, FormView, type FormViewProps, JsonEditor, type JsonEditorProps, SearchBar, type SearchBarProps, type StudioActions, StudioContext, type StudioContextValue, type StudioState, TreeView, type TreeViewProps, VisualJson, type VisualJsonProps, getVisibleNodes, useStudio };
|