@nuasite/cms 0.9.1 → 0.9.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/dist/editor.js +12 -1
- package/package.json +1 -1
- package/src/editor/components/toolbar.tsx +18 -3
package/dist/editor.js
CHANGED
|
@@ -33653,7 +33653,7 @@ const ER = ({ id: t, message: e, type: n, onRemove: r }) => {
|
|
|
33653
33653
|
onMouseDown: h,
|
|
33654
33654
|
onClick: h,
|
|
33655
33655
|
children: /* @__PURE__ */ p("div", { class: "flex items-center justify-between sm:justify-start gap-2 sm:gap-1.5 px-2 sm:px-2 py-2 sm:py-2 bg-cms-dark rounded-cms-xl shadow-[0_8px_32px_rgba(0,0,0,0.3)] border border-white/10", children: [
|
|
33656
|
-
|
|
33656
|
+
b && !r && t.onToggleHighlights && /* @__PURE__ */ p(
|
|
33657
33657
|
Eu,
|
|
33658
33658
|
{
|
|
33659
33659
|
onClick: () => {
|
|
@@ -33722,6 +33722,17 @@ const ER = ({ id: t, message: e, type: n, onRemove: r }) => {
|
|
|
33722
33722
|
title: "Done editing",
|
|
33723
33723
|
children: /* @__PURE__ */ p("svg", { class: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ p("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
33724
33724
|
}
|
|
33725
|
+
) : g ? /* @__PURE__ */ p(
|
|
33726
|
+
"button",
|
|
33727
|
+
{
|
|
33728
|
+
onClick: (w) => {
|
|
33729
|
+
var C;
|
|
33730
|
+
w.stopPropagation(), (C = t.onSelectElement) == null || C.call(t);
|
|
33731
|
+
},
|
|
33732
|
+
class: "w-10 h-10 flex items-center justify-center rounded-full text-white/60 hover:text-white hover:bg-white/10 transition-all duration-150 cursor-pointer",
|
|
33733
|
+
title: "Done selecting",
|
|
33734
|
+
children: /* @__PURE__ */ p("svg", { class: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ p("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
33735
|
+
}
|
|
33725
33736
|
) : /* @__PURE__ */ p("div", { class: "relative", children: [
|
|
33726
33737
|
/* @__PURE__ */ p(
|
|
33727
33738
|
"button",
|
package/package.json
CHANGED
|
@@ -217,8 +217,8 @@ export const Toolbar = ({ callbacks, collectionDefinitions }: ToolbarProps) => {
|
|
|
217
217
|
onClick={stopPropagation}
|
|
218
218
|
>
|
|
219
219
|
<div class="flex items-center justify-between sm:justify-start gap-2 sm:gap-1.5 px-2 sm:px-2 py-2 sm:py-2 bg-cms-dark rounded-cms-xl shadow-[0_8px_32px_rgba(0,0,0,0.3)] border border-white/10">
|
|
220
|
-
{/* Outlines toggle - visible in toolbar when editing */}
|
|
221
|
-
{
|
|
220
|
+
{/* Outlines toggle - visible in toolbar when editing or selecting */}
|
|
221
|
+
{isToolbarOpen && !showingOriginal && callbacks.onToggleHighlights && (
|
|
222
222
|
<ToolbarButton
|
|
223
223
|
onClick={() => callbacks.onToggleHighlights?.()}
|
|
224
224
|
class={'flex gap-2.5 bg-white/10 text-white/80 hover:bg-white/20 hover:text-white py-2! pr-1.5!'}
|
|
@@ -290,7 +290,22 @@ export const Toolbar = ({ callbacks, collectionDefinitions }: ToolbarProps) => {
|
|
|
290
290
|
</svg>
|
|
291
291
|
</button>
|
|
292
292
|
)
|
|
293
|
-
:
|
|
293
|
+
: isSelectMode
|
|
294
|
+
? (
|
|
295
|
+
<button
|
|
296
|
+
onClick={(e) => {
|
|
297
|
+
e.stopPropagation()
|
|
298
|
+
callbacks.onSelectElement?.()
|
|
299
|
+
}}
|
|
300
|
+
class="w-10 h-10 flex items-center justify-center rounded-full text-white/60 hover:text-white hover:bg-white/10 transition-all duration-150 cursor-pointer"
|
|
301
|
+
title="Done selecting"
|
|
302
|
+
>
|
|
303
|
+
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
304
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
305
|
+
</svg>
|
|
306
|
+
</button>
|
|
307
|
+
)
|
|
308
|
+
: (
|
|
294
309
|
<div class="relative">
|
|
295
310
|
<button
|
|
296
311
|
onClick={(e) => {
|