djedi-json
Advanced tools
Comparing version 0.5.8 to 0.5.9
@@ -0,2 +1,3 @@ | ||
import { EditConfig } from '../types'; | ||
export declare const DEFAULT_EDIT_MAP: EditConfig; | ||
export default DEFAULT_EDIT_MAP; |
import React from 'react'; | ||
import { TreeReducerAction } from '../core/Tree/types'; | ||
import { Config, NodeTreeItem } from '../types'; | ||
export declare type CMSContextType = { | ||
@@ -4,0 +5,0 @@ config: Config; |
import React, { RefObject } from 'react'; | ||
import { NodeContentType, NodeTreeItem } from '../types'; | ||
export declare type EditContextType = { | ||
@@ -3,0 +4,0 @@ ref: RefObject<HTMLSpanElement> | null; |
import React from 'react'; | ||
import { ComponentConfig } from '../../types'; | ||
declare type AppendProps = { | ||
@@ -3,0 +4,0 @@ onClick: (type: string) => void; |
import React, { ReactNode } from 'react'; | ||
import { Config, NodeTreeItem } from '../../types'; | ||
export interface CMSProps { | ||
@@ -3,0 +4,0 @@ config: Config; |
/// <reference types="react" /> | ||
import { ComponentConfig, Config } from '../../types'; | ||
export declare const validateConfig: (config: Config) => void; | ||
@@ -8,2 +9,3 @@ export declare const createNodeConfig: (passedConfig: ComponentConfig) => { | ||
removable: boolean; | ||
movable?: boolean; | ||
icon: import("react").ReactChild; | ||
@@ -10,0 +12,0 @@ Component: import("react").FunctionComponent<any>; |
import React, { ReactNode } from 'react'; | ||
import { ComponentConfig, NodeTreeItem } from '../../types'; | ||
/** | ||
@@ -12,5 +13,4 @@ * Editable, wraps the child component with some tooling for talking to the admin. | ||
path: string[]; | ||
movable: boolean; | ||
children?: ReactNode; | ||
}>; | ||
export default Editable; |
@@ -0,1 +1,2 @@ | ||
import { NodeTreeItem } from "../../types"; | ||
export declare const createEmpty: (type: string, o?: Record<string, any>) => NodeTreeItem; |
import React, { ReactNode } from 'react'; | ||
import { NodeTreeItem } from '../../types'; | ||
/** | ||
@@ -12,5 +13,4 @@ * | ||
path?: string[]; | ||
movable?: boolean; | ||
children?: ReactNode; | ||
}>; | ||
export default EditorTree; |
@@ -0,3 +1,4 @@ | ||
import { NodeTreeItem } from '../../types'; | ||
import { TreeReducerAction } from './types'; | ||
export declare const reducer: (state: NodeTreeItem, action: TreeReducerAction) => NodeTreeItem; | ||
export declare const reducer: (state: NodeTreeItem, action: TreeReducerAction) => any; | ||
export default reducer; |
@@ -0,3 +1,4 @@ | ||
import { NodeTreeItem } from "../../types"; | ||
/** clean the tree from faulty nodes */ | ||
export declare const cleanTree: (t: NodeTreeItem) => NodeTreeItem; | ||
export declare function lossyDeepClone<T>(o: T): any; |
@@ -10,3 +10,3 @@ import CMSType from './CMSType'; | ||
import Renderer from './Renderer'; | ||
import './types'; | ||
export * from './types'; | ||
export { CMS, CMSType, Renderer, Preview, createConfig, validateConfig, createEmpty, useCMS, useEdit, CMSContext, }; |
import React from 'react'; | ||
import { Config, LeanConfig, NodeTreeItem } from './types'; | ||
export interface RendererProps { | ||
@@ -3,0 +4,0 @@ tree?: NodeTreeItem; |
/// <reference types="react" /> | ||
declare interface ComponentConfig { | ||
export interface ComponentConfig { | ||
title: string; | ||
@@ -7,2 +7,3 @@ description?: string; | ||
removable?: boolean; | ||
movable?: boolean; | ||
icon?: React.ReactChild; | ||
@@ -14,21 +15,21 @@ Component: React.FunctionComponent<any>; | ||
} | ||
declare interface LeanComponentConfig { | ||
export interface LeanComponentConfig { | ||
Component: React.FunctionComponent<any>; | ||
type: string; | ||
} | ||
declare interface Config { | ||
export interface Config { | ||
components: ComponentConfig[]; | ||
edit: EditConfig; | ||
} | ||
declare interface LeanConfig { | ||
export interface LeanConfig { | ||
components: LeanComponentConfig[]; | ||
} | ||
declare type EditConfigEntry = { | ||
export declare type EditConfigEntry = { | ||
Component: any; | ||
}; | ||
declare type EditConfig = Record<string, EditConfigEntry>; | ||
declare interface NodeContentType extends Record<string, any> { | ||
export declare type EditConfig = Record<string, EditConfigEntry>; | ||
export interface NodeContentType extends Record<string, any> { | ||
children?: NodeTreeItem[] | string; | ||
} | ||
declare type NodeTreeItem = { | ||
export declare type NodeTreeItem = { | ||
content: NodeContentType; | ||
@@ -35,0 +36,0 @@ type: string; |
{ | ||
"name": "djedi-json", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"main": "build/index.js", | ||
@@ -5,0 +5,0 @@ "module": "build/index.esm.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
407424
4082
2