@1urso/generic-editor 0.1.74 → 0.1.76
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/editor/components/AdvancedPropertiesPanel.d.ts +30 -0
- package/dist/editor/components/GlobalHeader.d.ts +11 -0
- package/dist/editor/components/HistoryPanel.d.ts +6 -0
- package/dist/editor/components/OnboardingTour.d.ts +7 -0
- package/dist/editor/components/PropertiesDialog.d.ts +2 -0
- package/dist/editor/components/SimpleLayers.d.ts +2 -0
- package/dist/editor/components/SimpleProperties.d.ts +2 -0
- package/dist/editor/components/SimpleSidebar.d.ts +6 -0
- package/dist/editor/components/WizardDialog.d.ts +12 -0
- package/dist/{src/editor → editor}/context.d.ts +2 -0
- package/dist/editor/utils/colorUtils.d.ts +1 -0
- package/dist/editor/utils/helpers.d.ts +14 -0
- package/dist/generic-editor.css +1 -1
- package/dist/generic-editor.js +21049 -17065
- package/dist/generic-editor.umd.cjs +35 -35
- package/dist/index.d.ts +4 -2
- package/package.json +1 -1
- package/dist/src/editor/components/AssetsPanel.d.ts +0 -2
- package/dist/src/editor/components/ElementAdvancedSettings.d.ts +0 -9
- package/dist/src/editor/components/ElementContextMenu.d.ts +0 -6
- package/dist/src/editor/components/HistoryPanel.d.ts +0 -2
- package/dist/src/editor/components/LayersPanel.d.ts +0 -4
- package/dist/src/editor/utils/helpers.d.ts +0 -3
- package/dist/src/index.d.ts +0 -4
- /package/dist/{src/App.d.ts → App.d.ts} +0 -0
- /package/dist/{src/editor → editor}/components/AlignmentToolbar.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/Canvas.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/ColorPicker.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/DraggableElement.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/EditorSettings.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/ExportDialog.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/Minimap.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/Preview.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/Ruler.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/ShortcutsDialog.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/SmartGuides.d.ts +0 -0
- /package/dist/{src/editor → editor}/components/ViewToolbar.d.ts +0 -0
- /package/dist/{src/editor → editor}/index.d.ts +0 -0
- /package/dist/{src/editor → editor}/types.d.ts +0 -0
- /package/dist/{src/editor → editor}/utils/htmlGenerator.d.ts +0 -0
- /package/dist/{src/editor → editor}/utils/layoutEngine.d.ts +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IElement } from '../context';
|
|
3
|
+
import { IProp } from '../types';
|
|
4
|
+
interface AdvancedPropertiesPanelProps {
|
|
5
|
+
elementId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const AdvancedPropertiesPanel: React.FC<AdvancedPropertiesPanelProps>;
|
|
8
|
+
export declare const AnimationSettings: React.FC<{
|
|
9
|
+
element: IElement;
|
|
10
|
+
updateElement: (id: string, changes: Partial<IElement>) => void;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const FormattingSettings: React.FC<{
|
|
13
|
+
element: IElement;
|
|
14
|
+
updateElement: (id: string, changes: Partial<IElement>) => void;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const StyleSettings: React.FC<{
|
|
17
|
+
element: IElement;
|
|
18
|
+
updateElement: (id: string, changes: Partial<IElement>) => void;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const StyleBindingsSettings: React.FC<{
|
|
21
|
+
element: IElement;
|
|
22
|
+
updateElement: (id: string, changes: Partial<IElement>) => void;
|
|
23
|
+
availableProps: IProp[];
|
|
24
|
+
}>;
|
|
25
|
+
export declare const ConditionalSettings: React.FC<{
|
|
26
|
+
element: IElement;
|
|
27
|
+
updateElement: (id: string, changes: Partial<IElement>) => void;
|
|
28
|
+
availableProps: IProp[];
|
|
29
|
+
}>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITemplate } from '../types';
|
|
3
|
+
interface GlobalHeaderProps {
|
|
4
|
+
onSave?: (json: string) => void;
|
|
5
|
+
templates?: ITemplate[];
|
|
6
|
+
setIsTemplatesOpen: (isOpen: boolean) => void;
|
|
7
|
+
onFinish?: () => void;
|
|
8
|
+
onToggleSidebar?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const GlobalHeader: React.FC<GlobalHeaderProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITemplate } from '../types';
|
|
3
|
+
export interface WizardDialogProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
templates: ITemplate[];
|
|
7
|
+
onSelectTemplate: (template: ITemplate | null) => void;
|
|
8
|
+
initialStep?: number;
|
|
9
|
+
onFinishWizard?: () => void;
|
|
10
|
+
onStartTour?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const WizardDialog: React.FC<WizardDialogProps>;
|
|
@@ -73,6 +73,7 @@ interface IEditorState {
|
|
|
73
73
|
historyDescriptions: string[];
|
|
74
74
|
historyIndex: number;
|
|
75
75
|
clipboard: IElement[];
|
|
76
|
+
isPropertiesPanelOpen: boolean;
|
|
76
77
|
gridSize: number;
|
|
77
78
|
zoom: number;
|
|
78
79
|
pan: {
|
|
@@ -130,6 +131,7 @@ export interface IEditorContext {
|
|
|
130
131
|
jumpToHistory: (index: number) => void;
|
|
131
132
|
copy: () => void;
|
|
132
133
|
paste: () => void;
|
|
134
|
+
setPropertiesPanelOpen: (open: boolean) => void;
|
|
133
135
|
addAsset: (asset: IAsset) => void;
|
|
134
136
|
removeAsset: (id: string) => void;
|
|
135
137
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toHex: (color: string) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IElementFormatting } from '../context';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures the value exists in options for Radix Select (which requires value to match a Select.Item).
|
|
4
|
+
* Returns the value if it's in options, otherwise returns fallback.
|
|
5
|
+
*/
|
|
6
|
+
export declare const normalizeSelectValue: <T extends string>(value: T | undefined | null, options: readonly T[], fallback: T) => T;
|
|
7
|
+
/** Font weight options for Select. Maps 400/normal and 700/bold for consistency. */
|
|
8
|
+
export declare const FONT_WEIGHT_OPTIONS: readonly ["normal", "bold", "100", "300", "900"];
|
|
9
|
+
export declare const FONT_WEIGHT_OPTIONS_FULL: readonly ["100", "300", "400", "500", "600", "700", "900", "normal", "bold"];
|
|
10
|
+
export declare const normalizeFontWeightForSelect: (value: string | number | undefined | null, options?: readonly string[]) => string;
|
|
11
|
+
/** Ensures font is in the list. If not, adds it at the beginning for Radix Select. */
|
|
12
|
+
export declare const ensureFontInOptions: (currentFont: string, fontList: string[]) => string[];
|
|
13
|
+
export declare const formatValue: (value: unknown, formatting: IElementFormatting) => string;
|
|
14
|
+
export declare const checkCondition: (propValue: unknown, operator: string, ruleValue: string) => boolean;
|