UNPKG

@tabula/ui-json-view

Version:
43 lines (42 loc) 1.46 kB
import { ComplexType, JsonPrimitiveValue, JsonValue, Property } from '../../../types'; import { Item, JsonPath, LineItem, ValueItem } from './types'; type ValueLineItemFromOptions = { jsonPath: JsonPath; level: number; path: string; property?: Property; }; export declare function valueLineItemFrom(source: JsonPrimitiveValue, { jsonPath: jsonPathComponents, level, path, property }: ValueLineItemFromOptions): LineItem; type OpenItemFromOptions = { closeSymbol: string; jsonPath: JsonPath; level: number; openSymbol: string; path: string; property?: Property; size: number; type: ComplexType; }; export declare function openItemFrom({ closeSymbol, jsonPath, level, openSymbol, path, property, size, type, }: OpenItemFromOptions): LineItem; type CloseItemFromOptions = { closeSymbol: string; level: number; path: string; size: number; }; export declare function closeItemFrom({ closeSymbol, level, path, size }: CloseItemFromOptions): LineItem; type EmptyItemFromOptions = { level: number; path: string; }; export declare function emptyItemFrom({ level, path }: EmptyItemFromOptions): Item; type ValueItemFromOptions = { index: number; jsonPath: JsonPath; level: number; path: string; property: number | string; value: JsonValue; }; export declare function valueItemFrom({ index, jsonPath, level, path, property, value, }: ValueItemFromOptions): ValueItem; export {};