@sijanbhattarai/veda-utils 1.0.35
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/ChartContext.d.ts +13 -0
- package/dist/CreateInterface.d.ts +25 -0
- package/dist/MapContext.d.ts +13 -0
- package/dist/content.d.ts +15 -0
- package/dist/data.d.ts +6 -0
- package/dist/extractImports.d.ts +1 -0
- package/dist/groupElements.d.ts +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1625 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +32 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/inputValidation.d.ts +6 -0
- package/dist/lib/index.d.ts +9 -0
- package/dist/parseTwoColumn.d.ts +1 -0
- package/dist/reserializeMDast.d.ts +1 -0
- package/dist/wrapComponent.d.ts +6 -0
- package/package.json +59 -0
- package/src/ChartContext.tsx +29 -0
- package/src/CreateInterface.tsx +300 -0
- package/src/MapContext.tsx +29 -0
- package/src/content.tsx +18 -0
- package/src/data.tsx +36 -0
- package/src/extractImports.tsx +45 -0
- package/src/groupElements.tsx +90 -0
- package/src/index.ts +13 -0
- package/src/inputValidation.tsx +148 -0
- package/src/lib/index.ts +89 -0
- package/src/parseTwoColumn.tsx +26 -0
- package/src/reserializeMDast.tsx +107 -0
- package/src/wrapComponent.tsx +25 -0
- package/tsconfig.json +25 -0
- package/vite.config.ts +50 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { LexicalEditor, LexicalNode } from 'lexical';
|
3
|
+
|
4
|
+
interface ChartContextValue {
|
5
|
+
parentEditor: LexicalEditor;
|
6
|
+
lexicalNode: LexicalNode;
|
7
|
+
}
|
8
|
+
export declare const ChartContextProvider: ({ children, value, }: {
|
9
|
+
children: React.ReactNode;
|
10
|
+
value: ChartContextValue;
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare const useChartContext: () => ChartContextValue;
|
13
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
|
3
|
+
interface FieldProps {
|
4
|
+
fieldName: string;
|
5
|
+
value: string;
|
6
|
+
hint?: string;
|
7
|
+
onChange: (value: string) => void;
|
8
|
+
isRequired?: boolean;
|
9
|
+
isDate?: boolean;
|
10
|
+
numeric?: boolean;
|
11
|
+
onBlur?: (value: string) => void;
|
12
|
+
onFocus?: (value: string) => void;
|
13
|
+
type?: string;
|
14
|
+
componentProps: any;
|
15
|
+
propName: string;
|
16
|
+
customClass?: string;
|
17
|
+
placeHolder?: string;
|
18
|
+
draftInputs?: any;
|
19
|
+
inputErrors?: any;
|
20
|
+
setDraftInputs?: (value: any) => void;
|
21
|
+
setInputErrors?: (value: any) => void;
|
22
|
+
options?: string[];
|
23
|
+
}
|
24
|
+
export declare const InputField: React.FC<FieldProps>;
|
25
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
import { LexicalEditor, LexicalNode } from 'lexical';
|
3
|
+
|
4
|
+
interface MapContextValue {
|
5
|
+
parentEditor: LexicalEditor;
|
6
|
+
lexicalNode: LexicalNode;
|
7
|
+
}
|
8
|
+
export declare const MapContextProvider: ({ children, value, }: {
|
9
|
+
children: React.ReactNode;
|
10
|
+
value: MapContextValue;
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare const useMapContext: () => MapContextValue;
|
13
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { DatasetData, StoryData } from './lib';
|
2
|
+
|
3
|
+
interface MetadataWithSlug<T> {
|
4
|
+
metadata: T;
|
5
|
+
slug: string;
|
6
|
+
}
|
7
|
+
interface WithContent<T> extends MetadataWithSlug<T> {
|
8
|
+
content: string;
|
9
|
+
}
|
10
|
+
export type DatasetMetadata = MetadataWithSlug<DatasetData>;
|
11
|
+
export type DatasetWithContent = WithContent<DatasetData>;
|
12
|
+
export type StoryMetadata = MetadataWithSlug<StoryData>;
|
13
|
+
export type StoryWithContent = WithContent<StoryData>;
|
14
|
+
export type ContentMetadata = MetadataWithSlug<DatasetData | StoryData>;
|
15
|
+
export {};
|
package/dist/data.d.ts
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
import { DatasetData, StoryData, VedaData } from '@lib';
|
2
|
+
import { DatasetMetadata } from './content';
|
3
|
+
|
4
|
+
export declare function processTaxonomies(data: any): DatasetData | StoryData;
|
5
|
+
export declare const transformToDatasetsList: (content: DatasetMetadata[]) => DatasetData[];
|
6
|
+
export declare const transformToVedaData: (datasets: DatasetMetadata[] | undefined) => VedaData<DatasetData>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const extractImports: (ast: any) => any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const groupByBreakIntoBlocks: (ast: any) => any;
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
export * from './reserializeMDast';
|
2
|
+
export * from './parseTwoColumn';
|
3
|
+
export * from './ChartContext';
|
4
|
+
export * from './MapContext';
|
5
|
+
export * from './CreateInterface';
|
6
|
+
export * from './extractImports';
|
7
|
+
export * from './groupElements';
|
8
|
+
export * from './inputValidation';
|
9
|
+
export * from './wrapComponent';
|
10
|
+
export * from './data';
|
11
|
+
export * from './content';
|
12
|
+
export * from './lib';
|