Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@imagekit/editor": "1.1.0",
"@imagekit/editor": "1.2.0",
"@types/node": "^20.11.24",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function EditorWrapper({ children }: EditorWrapperProps) {
return (
<Box
position="fixed"
zIndex="modal"
zIndex="2100"
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a magic number (2100) for z-index instead of a named constant or theme token reduces maintainability. Consider defining this value as a constant (e.g., EDITOR_WRAPPER_Z_INDEX = 2100) or documenting why this specific value is necessary, especially since it replaces a semantic theme token 'modal'.

Copilot uses AI. Check for mistakes.
height="100vh"
width="100vw"
top={0}
Expand Down
31 changes: 20 additions & 11 deletions packages/imagekit-editor-dev/src/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
alignItems="center"
flexDirection="row"
px="1rem"
paddingRight="0"
borderBottomWidth="1px"
borderBottomColor="editorBattleshipGrey.100"
gap="4"
flexShrink={0}
>
<Icon
boxSize={"5"}
mr="4"
as={imageList.length === 1 ? PiImageSquare : PiImagesSquare}
/>
<Text>{headerText}</Text>
Expand All @@ -87,23 +88,28 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
aria-label={exportOption.label}
variant="ghost"
fontWeight="normal"
height="full"
borderRadius="0"
px="8"
size="sm"
onClick={() => exportOption.onClick(imageList, currentImage)}
>
{exportOption.label}
</Button>
) : (
<Menu key={`export-menu-${exportOption.label}`}>
<MenuButton>
<Button
leftIcon={exportOption.icon}
aria-label={exportOption.label}
variant="ghost"
fontWeight="normal"
size="sm"
>
{exportOption.label}
</Button>
<MenuButton
as={Button}
leftIcon={exportOption.icon}
aria-label={exportOption.label}
variant="ghost"
fontWeight="normal"
height="full"
borderRadius="0"
px="8"
size="sm"
>
{exportOption.label}
</MenuButton>
<MenuList>
{exportOption.options
Expand Down Expand Up @@ -132,6 +138,9 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
onClick={onClose}
variant="ghost"
fontWeight="normal"
height="full"
borderRadius="0"
px="8"
size="sm"
>
Close
Expand Down
2 changes: 1 addition & 1 deletion packages/imagekit-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@imagekit/editor",
"version": "1.1.0",
"version": "1.2.0",
"description": "Image Editor powered by ImageKit",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ __metadata:
languageName: node
linkType: hard

"@imagekit/editor@npm:1.1.0, @imagekit/editor@workspace:packages/imagekit-editor":
"@imagekit/editor@npm:1.2.0, @imagekit/editor@workspace:packages/imagekit-editor":
version: 0.0.0-use.local
resolution: "@imagekit/editor@workspace:packages/imagekit-editor"
peerDependencies:
Expand Down Expand Up @@ -4188,7 +4188,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "react-example@workspace:examples/react-example"
dependencies:
"@imagekit/editor": "npm:1.1.0"
"@imagekit/editor": "npm:1.2.0"
"@types/node": "npm:^20.11.24"
"@types/react": "npm:^17.0.2"
"@types/react-dom": "npm:^17.0.2"
Expand Down