@qwanyx/ai-editor 1.4.2 → 1.4.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 +1 @@
1
- {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../src/components/Section.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAkKtD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAqB,EAAE,EAAE,qBAAqB,2CA+D/G;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../src/components/Section.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAmKtD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,aAAqB,EAAE,EAAE,qBAAqB,2CA+D/G;AAED,eAAe,gBAAgB,CAAA"}
@@ -14,6 +14,7 @@ const styles = {
14
14
  position: 'relative',
15
15
  },
16
16
  wrapper: {
17
+ position: 'relative',
17
18
  border: '1px solid transparent',
18
19
  transition: 'border-color 0.2s, box-shadow 0.2s',
19
20
  },
@@ -27,8 +28,8 @@ const styles = {
27
28
  },
28
29
  toolbar: {
29
30
  position: 'absolute',
30
- top: '-40px',
31
- right: '0',
31
+ top: '8px',
32
+ left: '8px',
32
33
  display: 'flex',
33
34
  gap: '0.25rem',
34
35
  backgroundColor: 'white',
@@ -112,6 +113,6 @@ function SectionComponent({ section, index, totalSections, isPreviewMode = false
112
113
  selectSection(section.id);
113
114
  }
114
115
  };
115
- return ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: handleClick, children: [showEditingUI && isHovered && ((0, jsx_runtime_1.jsx)(SectionToolbar, { sectionId: section.id, canMoveUp: index > 0, canMoveDown: index < totalSections - 1 })), (0, jsx_runtime_1.jsx)("div", { style: wrapperStyle, className: section.className, children: (0, jsx_runtime_1.jsx)(LayoutComponent, { section: section, isEditing: showEditingUI, onContentChange: handleContentChange }) })] }));
116
+ return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: handleClick, children: (0, jsx_runtime_1.jsxs)("div", { style: wrapperStyle, className: section.className, children: [showEditingUI && isHovered && ((0, jsx_runtime_1.jsx)(SectionToolbar, { sectionId: section.id, canMoveUp: index > 0, canMoveDown: index < totalSections - 1 })), (0, jsx_runtime_1.jsx)(LayoutComponent, { section: section, isEditing: showEditingUI, onContentChange: handleContentChange })] }) }));
116
117
  }
117
118
  exports.default = SectionComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwanyx/ai-editor",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "AI-powered WYSIWYG rich text editor",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",