@promakeai/inspector 1.0.0 → 1.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.
- package/README.md +111 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/__tests__/App.test.d.ts.map +1 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/ControlBox/ContentArea.d.ts.map +1 -0
- package/dist/components/ControlBox/PromptInput.d.ts.map +1 -0
- package/dist/components/ControlBox/index.d.ts.map +1 -0
- package/dist/components/ImageEditor/UploadBox.d.ts.map +1 -0
- package/dist/components/ImageEditor/index.d.ts.map +1 -0
- package/dist/components/Overlay.d.ts.map +1 -0
- package/dist/components/StyleEditor/BorderSection.d.ts.map +1 -0
- package/dist/components/StyleEditor/ColorPicker.d.ts.map +1 -0
- package/dist/components/StyleEditor/DisplaySection.d.ts.map +1 -0
- package/dist/components/StyleEditor/ImageSection.d.ts.map +1 -0
- package/dist/components/StyleEditor/LayoutSection.d.ts.map +1 -0
- package/dist/components/StyleEditor/NumberInput.d.ts.map +1 -0
- package/dist/components/StyleEditor/SliderInput.d.ts.map +1 -0
- package/dist/components/StyleEditor/SpacingSection.d.ts.map +1 -0
- package/dist/components/StyleEditor/TextSection.d.ts.map +1 -0
- package/dist/components/StyleEditor/index.d.ts.map +1 -0
- package/dist/components/TextEditor/index.d.ts.map +1 -0
- package/dist/components/ui/CustomCollapsible.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/color-picker.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/core/highlighter.d.ts.map +1 -0
- package/dist/hooks/useMessageBridge.d.ts.map +1 -0
- package/dist/hooks/useStylePreview.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/store/useInspectorStore.d.ts.map +1 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/utils/colorUtils.d.ts.map +1 -0
- package/dist/utils/elementNames.d.ts.map +1 -0
- package/dist/utils/elementUtils.d.ts.map +1 -0
- package/dist/utils/errorTracker.d.ts.map +1 -0
- package/dist/utils/inputStyles.d.ts.map +1 -0
- package/dist/utils/styleUtils.d.ts.map +1 -0
- package/dist/utils/tailwindMapper.d.ts.map +1 -0
- package/dist/utils/urlTracker.d.ts.map +1 -0
- package/package.json +15 -10
- package/dist/packages/inspector/src/App.d.ts.map +0 -1
- package/dist/packages/inspector/src/__tests__/App.test.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/Badge.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ControlBox/ContentArea.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ControlBox/PromptInput.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ControlBox/index.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ImageEditor/UploadBox.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ImageEditor/index.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/Overlay.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/BorderSection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/ColorPicker.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/DisplaySection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/ImageSection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/LayoutSection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/NumberInput.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/SliderInput.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/SpacingSection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/TextSection.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/StyleEditor/index.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/TextEditor/index.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/CustomCollapsible.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/button.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/color-picker.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/input.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/popover.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/select.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/slider.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/textarea.d.ts.map +0 -1
- package/dist/packages/inspector/src/components/ui/tooltip.d.ts.map +0 -1
- package/dist/packages/inspector/src/core/highlighter.d.ts.map +0 -1
- package/dist/packages/inspector/src/hooks/useMessageBridge.d.ts.map +0 -1
- package/dist/packages/inspector/src/hooks/useStylePreview.d.ts.map +0 -1
- package/dist/packages/inspector/src/index.d.ts.map +0 -1
- package/dist/packages/inspector/src/lib/utils.d.ts.map +0 -1
- package/dist/packages/inspector/src/plugin.d.ts.map +0 -1
- package/dist/packages/inspector/src/store/useInspectorStore.d.ts.map +0 -1
- package/dist/packages/inspector/src/styles.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/colorUtils.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/elementNames.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/elementUtils.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/errorTracker.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/inputStyles.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/styleUtils.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/tailwindMapper.d.ts.map +0 -1
- package/dist/packages/inspector/src/utils/urlTracker.d.ts.map +0 -1
- package/dist/packages/inspector/tsconfig.tsbuildinfo +0 -1
- package/src/App.tsx +0 -912
- package/src/__tests__/App.test.tsx +0 -373
- package/src/assets/fonts/Satoshi-Variable.woff +0 -0
- package/src/assets/fonts/Satoshi-Variable.woff2 +0 -0
- package/src/components/Badge.tsx +0 -118
- package/src/components/ControlBox/ContentArea.tsx +0 -13
- package/src/components/ControlBox/PromptInput.module.css +0 -66
- package/src/components/ControlBox/PromptInput.tsx +0 -104
- package/src/components/ControlBox/index.module.css +0 -81
- package/src/components/ControlBox/index.tsx +0 -409
- package/src/components/ImageEditor/UploadBox.module.css +0 -69
- package/src/components/ImageEditor/UploadBox.tsx +0 -113
- package/src/components/ImageEditor/index.module.css +0 -11
- package/src/components/ImageEditor/index.tsx +0 -84
- package/src/components/Overlay.tsx +0 -157
- package/src/components/StyleEditor/BorderSection.tsx +0 -147
- package/src/components/StyleEditor/ColorPicker.tsx +0 -182
- package/src/components/StyleEditor/DisplaySection.tsx +0 -349
- package/src/components/StyleEditor/ImageSection.tsx +0 -105
- package/src/components/StyleEditor/LayoutSection.tsx +0 -63
- package/src/components/StyleEditor/NumberInput.tsx +0 -138
- package/src/components/StyleEditor/SliderInput.tsx +0 -121
- package/src/components/StyleEditor/SpacingSection.tsx +0 -365
- package/src/components/StyleEditor/TextSection.tsx +0 -381
- package/src/components/StyleEditor/index.module.css +0 -133
- package/src/components/StyleEditor/index.tsx +0 -612
- package/src/components/StyleEditor/shared.module.css +0 -193
- package/src/components/TextEditor/index.module.css +0 -31
- package/src/components/TextEditor/index.tsx +0 -166
- package/src/components/ui/CustomCollapsible.tsx +0 -159
- package/src/components/ui/button.module.css +0 -141
- package/src/components/ui/button.tsx +0 -73
- package/src/components/ui/color-picker.module.css +0 -112
- package/src/components/ui/color-picker.tsx +0 -146
- package/src/components/ui/input.module.css +0 -49
- package/src/components/ui/input.tsx +0 -34
- package/src/components/ui/popover.module.css +0 -42
- package/src/components/ui/popover.tsx +0 -59
- package/src/components/ui/select.module.css +0 -160
- package/src/components/ui/select.tsx +0 -216
- package/src/components/ui/slider.module.css +0 -75
- package/src/components/ui/slider.tsx +0 -60
- package/src/components/ui/textarea.module.css +0 -30
- package/src/components/ui/textarea.tsx +0 -23
- package/src/components/ui/tooltip.module.css +0 -11
- package/src/components/ui/tooltip.tsx +0 -37
- package/src/core/highlighter.ts +0 -197
- package/src/hooks/useMessageBridge.ts +0 -49
- package/src/hooks/useStylePreview.ts +0 -332
- package/src/index.ts +0 -20
- package/src/lib/utils.ts +0 -5
- package/src/plugin.ts +0 -11
- package/src/store/useInspectorStore.ts +0 -235
- package/src/styles/fonts.css +0 -15
- package/src/styles/global.css +0 -138
- package/src/styles/variables.css +0 -151
- package/src/styles.ts +0 -5
- package/src/utils/colorUtils.ts +0 -133
- package/src/utils/elementNames.ts +0 -103
- package/src/utils/elementUtils.ts +0 -90
- package/src/utils/errorTracker.ts +0 -186
- package/src/utils/inputStyles.ts +0 -30
- package/src/utils/styleUtils.ts +0 -226
- package/src/utils/tailwindMapper.ts +0 -554
- package/src/utils/urlTracker.ts +0 -75
- package/src/vite-env.d.ts +0 -7
- /package/dist/{packages/inspector/src/App.d.ts → App.d.ts} +0 -0
- /package/dist/{packages/inspector/src/__tests__ → __tests__}/App.test.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/Badge.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ControlBox/ContentArea.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ControlBox/PromptInput.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ControlBox/index.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ImageEditor/UploadBox.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ImageEditor/index.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/Overlay.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/BorderSection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/ColorPicker.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/DisplaySection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/ImageSection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/LayoutSection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/NumberInput.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/SliderInput.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/SpacingSection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/TextSection.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/StyleEditor/index.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/TextEditor/index.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/CustomCollapsible.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/button.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/color-picker.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/input.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/popover.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/select.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/slider.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/textarea.d.ts +0 -0
- /package/dist/{packages/inspector/src/components → components}/ui/tooltip.d.ts +0 -0
- /package/dist/{packages/inspector/src/core → core}/highlighter.d.ts +0 -0
- /package/dist/{packages/inspector/src/hooks → hooks}/useMessageBridge.d.ts +0 -0
- /package/dist/{packages/inspector/src/hooks → hooks}/useStylePreview.d.ts +0 -0
- /package/dist/{packages/inspector/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{packages/inspector/src/lib → lib}/utils.d.ts +0 -0
- /package/dist/{packages/inspector/src/plugin.d.ts → plugin.d.ts} +0 -0
- /package/dist/{packages/inspector/src/store → store}/useInspectorStore.d.ts +0 -0
- /package/dist/{packages/inspector/src/styles.d.ts → styles.d.ts} +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/colorUtils.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/elementNames.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/elementUtils.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/errorTracker.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/inputStyles.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/styleUtils.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/tailwindMapper.d.ts +0 -0
- /package/dist/{packages/inspector/src/utils → utils}/urlTracker.d.ts +0 -0
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TextSection - Color, Font Size, Font Weight, Font Family, Text Align
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { StyleChanges } from "@promakeai/inspector-types";
|
|
6
|
-
import { ColorPicker } from "./ColorPicker";
|
|
7
|
-
import {
|
|
8
|
-
Select,
|
|
9
|
-
SelectContent,
|
|
10
|
-
SelectItem,
|
|
11
|
-
SelectTrigger,
|
|
12
|
-
SelectValue,
|
|
13
|
-
} from "../ui/select";
|
|
14
|
-
import { Button } from "../ui/button";
|
|
15
|
-
import { AlignLeft, AlignCenter, AlignRight, AlignJustify, RotateCcw } from "lucide-react";
|
|
16
|
-
import { useInspectorStore } from "../../store/useInspectorStore";
|
|
17
|
-
import cssStyles from "./shared.module.css";
|
|
18
|
-
import { cn } from "@/lib/utils";
|
|
19
|
-
|
|
20
|
-
interface TextSectionProps {
|
|
21
|
-
styles: StyleChanges;
|
|
22
|
-
onChange: (property: keyof StyleChanges, value: string) => void;
|
|
23
|
-
originalStyles: StyleChanges;
|
|
24
|
-
onResetProperty: (property: keyof StyleChanges) => void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const FONT_FAMILIES = [
|
|
28
|
-
{ label: "Sans", value: "ui-sans-serif, system-ui, sans-serif" },
|
|
29
|
-
{ label: "Serif", value: "ui-serif, Georgia, serif" },
|
|
30
|
-
{ label: "Mono", value: "ui-monospace, monospace" },
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const TEXT_ALIGNS = [
|
|
34
|
-
{ label: "Left", value: "left", Icon: AlignLeft },
|
|
35
|
-
{ label: "Center", value: "center", Icon: AlignCenter },
|
|
36
|
-
{ label: "Right", value: "right", Icon: AlignRight },
|
|
37
|
-
{ label: "Justify", value: "justify", Icon: AlignJustify },
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
export function TextSection({ styles, onChange, originalStyles, onResetProperty }: TextSectionProps) {
|
|
41
|
-
const { labels, theme } = useInspectorStore();
|
|
42
|
-
|
|
43
|
-
const FONT_SIZES = [
|
|
44
|
-
{ label: labels.fontSizeXS || "XS", value: "0.75rem" },
|
|
45
|
-
{ label: labels.fontSizeSM || "SM", value: "0.875rem" },
|
|
46
|
-
{ label: labels.fontSizeBase || "Base", value: "1rem" },
|
|
47
|
-
{ label: labels.fontSizeLG || "LG", value: "1.125rem" },
|
|
48
|
-
{ label: labels.fontSizeXL || "XL", value: "1.25rem" },
|
|
49
|
-
{ label: labels.fontSize2XL || "2XL", value: "1.5rem" },
|
|
50
|
-
{ label: labels.fontSize3XL || "3XL", value: "1.875rem" },
|
|
51
|
-
{ label: labels.fontSize4XL || "4XL", value: "2.25rem" },
|
|
52
|
-
{ label: labels.fontSize5XL || "5XL", value: "3rem" },
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
const FONT_WEIGHTS = [
|
|
56
|
-
{ label: labels.fontWeightThin || "Thin", value: "100" },
|
|
57
|
-
{ label: labels.fontWeightExtralight || "Extralight", value: "200" },
|
|
58
|
-
{ label: labels.fontWeightNormal || "Normal", value: "400" },
|
|
59
|
-
{ label: labels.fontWeightMedium || "Medium", value: "500" },
|
|
60
|
-
{ label: labels.fontWeightSemibold || "Semibold", value: "600" },
|
|
61
|
-
{ label: labels.fontWeightBold || "Bold", value: "700" },
|
|
62
|
-
{ label: labels.fontWeightExtrabold || "Extrabold", value: "800" },
|
|
63
|
-
{ label: labels.fontWeightBlack || "Black", value: "900" },
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
const TEXT_DECORATIONS = [
|
|
67
|
-
{ label: labels.textDecorationNone || "None", value: "none" },
|
|
68
|
-
{ label: labels.textDecorationUnderline || "Underline", value: "underline" },
|
|
69
|
-
{ label: labels.textDecorationLineThrough || "Line Through", value: "line-through" },
|
|
70
|
-
{ label: labels.textDecorationOverline || "Overline", value: "overline" },
|
|
71
|
-
];
|
|
72
|
-
return (
|
|
73
|
-
<div className={cssStyles.section}>
|
|
74
|
-
{/* Color and Font Size - Side by side */}
|
|
75
|
-
<div className={cssStyles.grid2}>
|
|
76
|
-
<ColorPicker
|
|
77
|
-
label={labels.colorLabel || "Color"}
|
|
78
|
-
value={styles.color || "#000000"}
|
|
79
|
-
onChange={(value) => onChange("color", value)}
|
|
80
|
-
originalValue={originalStyles.color}
|
|
81
|
-
onReset={() => onResetProperty("color")}
|
|
82
|
-
/>
|
|
83
|
-
|
|
84
|
-
{/* Font Size */}
|
|
85
|
-
<div>
|
|
86
|
-
<div className={cssStyles.labelContainer}>
|
|
87
|
-
<label className={cssStyles.label} style={{ color: theme.textColor }}>
|
|
88
|
-
{labels.fontSizeLabel || "Font Size"}
|
|
89
|
-
</label>
|
|
90
|
-
{styles.fontSize !== originalStyles.fontSize && (
|
|
91
|
-
<button
|
|
92
|
-
type="button"
|
|
93
|
-
onClick={() => onResetProperty("fontSize")}
|
|
94
|
-
className={cssStyles.resetIcon}
|
|
95
|
-
style={{ color: theme.secondaryTextColor }}
|
|
96
|
-
title="Reset to original"
|
|
97
|
-
>
|
|
98
|
-
<RotateCcw size={12} />
|
|
99
|
-
</button>
|
|
100
|
-
)}
|
|
101
|
-
</div>
|
|
102
|
-
<div
|
|
103
|
-
className={cssStyles.inputContainer}
|
|
104
|
-
style={{
|
|
105
|
-
backgroundColor: theme.inputBackgroundColor,
|
|
106
|
-
borderColor: theme.inputBorderColor,
|
|
107
|
-
}}
|
|
108
|
-
>
|
|
109
|
-
<Select
|
|
110
|
-
value={styles.fontSize || "1rem"}
|
|
111
|
-
onValueChange={(value) => onChange("fontSize", value)}
|
|
112
|
-
>
|
|
113
|
-
<SelectTrigger
|
|
114
|
-
className={cssStyles.input}
|
|
115
|
-
style={{
|
|
116
|
-
backgroundColor: "transparent",
|
|
117
|
-
color: theme.inputTextColor,
|
|
118
|
-
}}
|
|
119
|
-
size="sm"
|
|
120
|
-
>
|
|
121
|
-
<SelectValue />
|
|
122
|
-
</SelectTrigger>
|
|
123
|
-
<SelectContent
|
|
124
|
-
style={{
|
|
125
|
-
backgroundColor: theme.backgroundColor,
|
|
126
|
-
borderColor: theme.borderColor,
|
|
127
|
-
}}
|
|
128
|
-
>
|
|
129
|
-
{FONT_SIZES.map((size) => (
|
|
130
|
-
<SelectItem
|
|
131
|
-
key={size.value}
|
|
132
|
-
value={size.value}
|
|
133
|
-
style={{
|
|
134
|
-
color: theme.textColor,
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
137
|
-
{size.label}
|
|
138
|
-
</SelectItem>
|
|
139
|
-
))}
|
|
140
|
-
</SelectContent>
|
|
141
|
-
</Select>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
{/* Font Weight and Text Decoration - Side by side */}
|
|
147
|
-
<div className={cssStyles.grid2}>
|
|
148
|
-
{/* Font Weight */}
|
|
149
|
-
<div>
|
|
150
|
-
<div className={cssStyles.labelContainer}>
|
|
151
|
-
<label className={cssStyles.label} style={{ color: theme.textColor }}>
|
|
152
|
-
{labels.fontWeightLabel || "Font Weight"}
|
|
153
|
-
</label>
|
|
154
|
-
{styles.fontWeight !== originalStyles.fontWeight && (
|
|
155
|
-
<button
|
|
156
|
-
type="button"
|
|
157
|
-
onClick={() => onResetProperty("fontWeight")}
|
|
158
|
-
className={cssStyles.resetIcon}
|
|
159
|
-
style={{ color: theme.secondaryTextColor }}
|
|
160
|
-
title="Reset to original"
|
|
161
|
-
>
|
|
162
|
-
<RotateCcw size={12} />
|
|
163
|
-
</button>
|
|
164
|
-
)}
|
|
165
|
-
</div>
|
|
166
|
-
<div
|
|
167
|
-
className={cssStyles.inputContainer}
|
|
168
|
-
style={{
|
|
169
|
-
backgroundColor: theme.inputBackgroundColor,
|
|
170
|
-
borderColor: theme.inputBorderColor,
|
|
171
|
-
}}
|
|
172
|
-
>
|
|
173
|
-
<Select
|
|
174
|
-
value={styles.fontWeight || "400"}
|
|
175
|
-
onValueChange={(value) => onChange("fontWeight", value)}
|
|
176
|
-
>
|
|
177
|
-
<SelectTrigger
|
|
178
|
-
className={cssStyles.input}
|
|
179
|
-
style={{
|
|
180
|
-
backgroundColor: "transparent",
|
|
181
|
-
color: theme.inputTextColor,
|
|
182
|
-
}}
|
|
183
|
-
size="sm"
|
|
184
|
-
>
|
|
185
|
-
<SelectValue />
|
|
186
|
-
</SelectTrigger>
|
|
187
|
-
<SelectContent
|
|
188
|
-
style={{
|
|
189
|
-
backgroundColor: theme.backgroundColor,
|
|
190
|
-
borderColor: theme.borderColor,
|
|
191
|
-
}}
|
|
192
|
-
>
|
|
193
|
-
{FONT_WEIGHTS.map((weight) => (
|
|
194
|
-
<SelectItem
|
|
195
|
-
key={weight.value}
|
|
196
|
-
value={weight.value}
|
|
197
|
-
style={{
|
|
198
|
-
color: theme.textColor,
|
|
199
|
-
}}
|
|
200
|
-
>
|
|
201
|
-
{weight.label}
|
|
202
|
-
</SelectItem>
|
|
203
|
-
))}
|
|
204
|
-
</SelectContent>
|
|
205
|
-
</Select>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
|
|
209
|
-
{/* Text Decoration */}
|
|
210
|
-
<div>
|
|
211
|
-
<div className={cssStyles.labelContainer}>
|
|
212
|
-
<label className={cssStyles.label} style={{ color: theme.textColor }}>
|
|
213
|
-
{labels.textDecorationLabel || "Text Decoration"}
|
|
214
|
-
</label>
|
|
215
|
-
{styles.textDecoration !== originalStyles.textDecoration && (
|
|
216
|
-
<button
|
|
217
|
-
type="button"
|
|
218
|
-
onClick={() => onResetProperty("textDecoration")}
|
|
219
|
-
className={cssStyles.resetIcon}
|
|
220
|
-
style={{ color: theme.secondaryTextColor }}
|
|
221
|
-
title="Reset to original"
|
|
222
|
-
>
|
|
223
|
-
<RotateCcw size={12} />
|
|
224
|
-
</button>
|
|
225
|
-
)}
|
|
226
|
-
</div>
|
|
227
|
-
<div
|
|
228
|
-
className={cssStyles.inputContainer}
|
|
229
|
-
style={{
|
|
230
|
-
backgroundColor: theme.inputBackgroundColor,
|
|
231
|
-
borderColor: theme.inputBorderColor,
|
|
232
|
-
}}
|
|
233
|
-
>
|
|
234
|
-
<Select
|
|
235
|
-
value={styles.textDecoration || "none"}
|
|
236
|
-
onValueChange={(value) => onChange("textDecoration", value)}
|
|
237
|
-
>
|
|
238
|
-
<SelectTrigger
|
|
239
|
-
className={cssStyles.input}
|
|
240
|
-
style={{
|
|
241
|
-
backgroundColor: "transparent",
|
|
242
|
-
color: theme.inputTextColor,
|
|
243
|
-
}}
|
|
244
|
-
size="sm"
|
|
245
|
-
>
|
|
246
|
-
<SelectValue />
|
|
247
|
-
</SelectTrigger>
|
|
248
|
-
<SelectContent
|
|
249
|
-
style={{
|
|
250
|
-
backgroundColor: theme.backgroundColor,
|
|
251
|
-
borderColor: theme.borderColor,
|
|
252
|
-
}}
|
|
253
|
-
>
|
|
254
|
-
{TEXT_DECORATIONS.map((decoration) => (
|
|
255
|
-
<SelectItem
|
|
256
|
-
key={decoration.value}
|
|
257
|
-
value={decoration.value}
|
|
258
|
-
style={{
|
|
259
|
-
color: theme.textColor,
|
|
260
|
-
}}
|
|
261
|
-
>
|
|
262
|
-
{decoration.label}
|
|
263
|
-
</SelectItem>
|
|
264
|
-
))}
|
|
265
|
-
</SelectContent>
|
|
266
|
-
</Select>
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
|
|
271
|
-
{/* Font Family */}
|
|
272
|
-
<div>
|
|
273
|
-
<div className={cssStyles.labelContainer}>
|
|
274
|
-
<label className={cssStyles.label} style={{ color: theme.textColor }}>
|
|
275
|
-
{labels.fontFamilyLabel || "Font Family"}
|
|
276
|
-
</label>
|
|
277
|
-
{styles.fontFamily !== originalStyles.fontFamily && (
|
|
278
|
-
<button
|
|
279
|
-
type="button"
|
|
280
|
-
onClick={() => onResetProperty("fontFamily")}
|
|
281
|
-
className={cssStyles.resetIcon}
|
|
282
|
-
style={{ color: theme.secondaryTextColor }}
|
|
283
|
-
title="Reset to original"
|
|
284
|
-
>
|
|
285
|
-
<RotateCcw size={12} />
|
|
286
|
-
</button>
|
|
287
|
-
)}
|
|
288
|
-
</div>
|
|
289
|
-
<div
|
|
290
|
-
className={cn(
|
|
291
|
-
cssStyles.inputContainer,
|
|
292
|
-
cssStyles.buttonGroupContainer
|
|
293
|
-
)}
|
|
294
|
-
style={{
|
|
295
|
-
backgroundColor: theme.inputBackgroundColor,
|
|
296
|
-
borderColor: theme.inputBorderColor,
|
|
297
|
-
}}
|
|
298
|
-
>
|
|
299
|
-
<div className={cn(cssStyles.flexRow, cssStyles.tabButtons)}>
|
|
300
|
-
{FONT_FAMILIES.map((family) => (
|
|
301
|
-
<Button
|
|
302
|
-
key={family.value}
|
|
303
|
-
variant={
|
|
304
|
-
styles.fontFamily === family.value ? "default" : "ghost"
|
|
305
|
-
}
|
|
306
|
-
onClick={() => onChange("fontFamily", family.value)}
|
|
307
|
-
className={cssStyles.fontButton}
|
|
308
|
-
style={{
|
|
309
|
-
backgroundColor:
|
|
310
|
-
styles.fontFamily === family.value
|
|
311
|
-
? theme.buttonColor
|
|
312
|
-
: "transparent",
|
|
313
|
-
color:
|
|
314
|
-
styles.fontFamily === family.value
|
|
315
|
-
? theme.buttonTextColor
|
|
316
|
-
: theme.textColor,
|
|
317
|
-
}}
|
|
318
|
-
>
|
|
319
|
-
{family.label}
|
|
320
|
-
</Button>
|
|
321
|
-
))}
|
|
322
|
-
</div>
|
|
323
|
-
</div>
|
|
324
|
-
</div>
|
|
325
|
-
|
|
326
|
-
{/* Text Align */}
|
|
327
|
-
<div>
|
|
328
|
-
<div className={cssStyles.labelContainer}>
|
|
329
|
-
<label className={cssStyles.label} style={{ color: theme.textColor }}>
|
|
330
|
-
{labels.textAlignLabel || "Text Align"}
|
|
331
|
-
</label>
|
|
332
|
-
{styles.textAlign !== originalStyles.textAlign && (
|
|
333
|
-
<button
|
|
334
|
-
type="button"
|
|
335
|
-
onClick={() => onResetProperty("textAlign")}
|
|
336
|
-
className={cssStyles.resetIcon}
|
|
337
|
-
style={{ color: theme.secondaryTextColor }}
|
|
338
|
-
title="Reset to original"
|
|
339
|
-
>
|
|
340
|
-
<RotateCcw size={12} />
|
|
341
|
-
</button>
|
|
342
|
-
)}
|
|
343
|
-
</div>
|
|
344
|
-
<div
|
|
345
|
-
className={cn(
|
|
346
|
-
cssStyles.inputContainer,
|
|
347
|
-
cssStyles.buttonGroupContainer
|
|
348
|
-
)}
|
|
349
|
-
style={{
|
|
350
|
-
backgroundColor: theme.inputBackgroundColor,
|
|
351
|
-
borderColor: theme.inputBorderColor,
|
|
352
|
-
}}
|
|
353
|
-
>
|
|
354
|
-
<div className={cssStyles.grid4}>
|
|
355
|
-
{TEXT_ALIGNS.map((align) => (
|
|
356
|
-
<Button
|
|
357
|
-
key={align.value}
|
|
358
|
-
variant={styles.textAlign === align.value ? "default" : "ghost"}
|
|
359
|
-
onClick={() => onChange("textAlign", align.value)}
|
|
360
|
-
title={align.label}
|
|
361
|
-
className={cssStyles.alignButton}
|
|
362
|
-
style={{
|
|
363
|
-
backgroundColor:
|
|
364
|
-
styles.textAlign === align.value
|
|
365
|
-
? theme.buttonColor
|
|
366
|
-
: "transparent",
|
|
367
|
-
color:
|
|
368
|
-
styles.textAlign === align.value
|
|
369
|
-
? theme.buttonTextColor
|
|
370
|
-
: theme.textColor,
|
|
371
|
-
}}
|
|
372
|
-
>
|
|
373
|
-
<align.Icon className={cssStyles.alignIcon} />
|
|
374
|
-
</Button>
|
|
375
|
-
))}
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
);
|
|
381
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
flex: 1;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
min-height: 0;
|
|
6
|
-
max-height: 100%;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.scrollArea {
|
|
12
|
-
overflow-y: auto;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
padding-top: 0;
|
|
15
|
-
padding-bottom: 0;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
max-height: 40vh !important;
|
|
19
|
-
gap: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* Custom scrollbar for style editor */
|
|
23
|
-
.scrollArea::-webkit-scrollbar {
|
|
24
|
-
width: 3px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.scrollArea::-webkit-scrollbar-track {
|
|
28
|
-
background: transparent;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.scrollArea::-webkit-scrollbar-thumb {
|
|
32
|
-
background: var(--color-border);
|
|
33
|
-
border-radius: var(--radius-full);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.scrollArea::-webkit-scrollbar-thumb:hover {
|
|
37
|
-
background: var(--color-muted);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.collapsibleTrigger {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
padding: var(--spacing-3) var(--spacing-2);
|
|
45
|
-
font-family: "Satoshi", var(--font-family-sans);
|
|
46
|
-
font-weight: var(--font-medium);
|
|
47
|
-
border-radius: var(--radius-md);
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
transition: all var(--transition-fast);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.collapsibleTrigger:hover {
|
|
53
|
-
opacity: 0.95;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.collapsibleContent {
|
|
57
|
-
padding: var(--spacing-1) var(--spacing-1-5);
|
|
58
|
-
padding-top: var(--spacing-3);
|
|
59
|
-
padding-bottom: var(--spacing-1);
|
|
60
|
-
border-bottom-left-radius: var(--radius-md);
|
|
61
|
-
border-bottom-right-radius: var(--radius-md);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.chevron {
|
|
65
|
-
width: 1rem;
|
|
66
|
-
height: 1rem;
|
|
67
|
-
flex-shrink: 0;
|
|
68
|
-
transition: transform var(--transition-fast);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.chevronOpen {
|
|
72
|
-
transform: rotate(180deg);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.actionsContainer {
|
|
76
|
-
flex-shrink: 0;
|
|
77
|
-
padding-top: var(--spacing-1-5);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.statusIndicator {
|
|
81
|
-
font-size: var(--text-xs);
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: flex-end;
|
|
85
|
-
gap: var(--spacing-1);
|
|
86
|
-
margin-bottom: var(--spacing-2);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.statusIcon {
|
|
90
|
-
width: var(--spacing-3);
|
|
91
|
-
height: var(--spacing-3);
|
|
92
|
-
fill: currentColor;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.buttonGroup {
|
|
96
|
-
display: flex;
|
|
97
|
-
gap: var(--spacing-2);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.resetButton {
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.applyButton {
|
|
105
|
-
flex: 1;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.savingSpinner {
|
|
109
|
-
width: var(--spacing-3);
|
|
110
|
-
height: var(--spacing-3);
|
|
111
|
-
border: 2px solid currentColor;
|
|
112
|
-
border-top-color: transparent;
|
|
113
|
-
border-radius: var(--radius-full);
|
|
114
|
-
animation: spin 1s linear infinite;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.buttonContent {
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
justify-content: center;
|
|
121
|
-
gap: var(--spacing-1-5);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.buttonIcon {
|
|
125
|
-
width: var(--spacing-4);
|
|
126
|
-
height: var(--spacing-4);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@keyframes spin {
|
|
130
|
-
to {
|
|
131
|
-
transform: rotate(360deg);
|
|
132
|
-
}
|
|
133
|
-
}
|