@1urso/generic-editor 0.1.63 → 0.1.64

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.
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const AssetsPanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const HistoryPanel: React.FC;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare const LayersPanel: React.FC<{
3
+ onOpenSettings?: (id: string) => void;
4
+ }>;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Minimap: React.FC;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare const Ruler: React.FC<{
3
+ orientation: 'horizontal' | 'vertical';
4
+ }>;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const SmartGuides: React.FC;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const ViewToolbar: React.FC;
@@ -42,6 +42,8 @@ export interface IElement {
42
42
  containerExpansion?: 'vertical' | 'horizontal';
43
43
  animation?: IElementAnimation;
44
44
  styleBindings?: Record<string, string>;
45
+ locked?: boolean;
46
+ hidden?: boolean;
45
47
  }
46
48
  export interface IListSettings {
47
49
  sortProp?: string;
@@ -67,6 +69,7 @@ interface IEditorState {
67
69
  availableFonts: string[];
68
70
  theme: 'light' | 'dark';
69
71
  history: IElement[][];
72
+ historyDescriptions: string[];
70
73
  historyIndex: number;
71
74
  clipboard: IElement[];
72
75
  gridSize: number;
@@ -79,8 +82,16 @@ interface IEditorState {
79
82
  orientation: 'horizontal' | 'vertical';
80
83
  position: number;
81
84
  }[];
85
+ assets: IAsset[];
82
86
  }
83
- interface IEditorContext {
87
+ export interface IAsset {
88
+ id: string;
89
+ name: string;
90
+ url: string;
91
+ width: number;
92
+ height: number;
93
+ }
94
+ export interface IEditorContext {
84
95
  state: IEditorState;
85
96
  setGridSize: (size: number) => void;
86
97
  setZoom: (zoom: number) => void;
@@ -115,9 +126,17 @@ interface IEditorContext {
115
126
  loadState: (savedState: Partial<IEditorState>) => void;
116
127
  undo: () => void;
117
128
  redo: () => void;
129
+ jumpToHistory: (index: number) => void;
118
130
  copy: () => void;
119
131
  paste: () => void;
132
+ addAsset: (asset: IAsset) => void;
133
+ removeAsset: (id: string) => void;
134
+ }
135
+ export interface ISnapGuide {
136
+ type: 'horizontal' | 'vertical';
137
+ position: number;
120
138
  }
139
+ export declare const EditorContext: React.Context<IEditorContext | undefined>;
121
140
  export declare const EditorProvider: React.FC<{
122
141
  children: ReactNode;
123
142
  isList?: boolean;
@@ -1,10 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { ILayout } from './types';
3
- interface EditorProps {
3
+ export interface EditorProps {
4
4
  layout: ILayout;
5
5
  initialState?: unknown;
6
6
  onSave?: (json: string) => void;
7
7
  theme?: 'light' | 'dark';
8
8
  }
9
9
  export declare const GenericEditor: React.FC<EditorProps>;
10
- export {};