@bolttech/template-editor 0.0.1 → 0.0.3

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.
@@ -1,32 +1,37 @@
1
- import React from 'react';
2
-
3
- declare module '@bolttech/template-editor' {
4
- // Types
5
- export type PlaceholderType = 'text' | 'enum' | 'number' | 'boolean' | 'date';
6
-
7
- export interface PlaceholderOption {
8
- label: string;
9
- value: string | number | boolean;
10
- }
11
-
12
- export interface PlaceholderSchema {
13
- key: string;
14
- label: string;
15
- value?: string | number | boolean;
16
- type: PlaceholderType;
17
- options?: (string | PlaceholderOption)[];
18
- }
19
-
20
- export interface PlaceholderData {
21
- [key: string]: string | number | boolean;
22
- }
23
-
24
- export interface TemplateEditorProps {
25
- placeholders?: PlaceholderData;
26
- placeholderSchema?: PlaceholderSchema[];
27
- }
28
-
29
- // Component
30
- export function TemplateEditor(props: TemplateEditorProps): React.JSX.Element;
31
- export default TemplateEditor;
32
- }
1
+ import { CSSProperties } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { TemplatingSdkConfig } from '@bolttech/templating-sdk';
4
+
5
+ export declare interface PlaceholderData {
6
+ [key: string]: string | number | boolean | PlaceholderData;
7
+ }
8
+
9
+ export declare interface PlaceholderOption {
10
+ label: string;
11
+ value: string | number | boolean;
12
+ }
13
+
14
+ export declare interface PlaceholderSchema {
15
+ key: string;
16
+ label: string;
17
+ value: string | number | boolean | PlaceholderData;
18
+ type: PlaceholderType;
19
+ options?: (string | PlaceholderOption)[];
20
+ }
21
+
22
+ export declare type PlaceholderType = 'text' | 'enum' | 'number' | 'boolean' | 'date';
23
+
24
+ declare function TemplateEditor({ templateId, placeholders, placeholderSchema, sdk, width, height, }: TemplateEditorProps): JSX.Element;
25
+ export { TemplateEditor }
26
+ export default TemplateEditor;
27
+
28
+ export declare interface TemplateEditorProps {
29
+ templateId?: string;
30
+ placeholders?: PlaceholderData;
31
+ placeholderSchema?: PlaceholderSchema[];
32
+ sdk?: TemplatingSdkConfig;
33
+ height?: CSSProperties['height'];
34
+ width?: CSSProperties['width'];
35
+ }
36
+
37
+ export { }