easy-email-pro-theme 1.59.3 → 1.59.5

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/lib/index.js CHANGED
@@ -8443,7 +8443,7 @@ const BlockSideBar = ({ height }) => {
8443
8443
  destroyOnHide: true,
8444
8444
  key: "AI-Agent",
8445
8445
  className: "easy-email-pro-block-sidebar-ai-agent",
8446
- title: /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-block-sidebar-ai-agent-title" }, t("AI"))
8446
+ title: /* @__PURE__ */ React__default.createElement("div", { className: "easy-email-pro-block-sidebar-ai-agent-title" }, t("Agent"))
8447
8447
  },
8448
8448
  /* @__PURE__ */ React__default.createElement(
8449
8449
  SharedComponents.FullHeightOverlayScrollbars,
@@ -10070,55 +10070,55 @@ const createLucideIcon = (iconName, iconNode) => {
10070
10070
  * This source code is licensed under the ISC license.
10071
10071
  * See the LICENSE file in the root directory of this source tree.
10072
10072
  */
10073
- const __iconNode$q = [
10073
+ const __iconNode$r = [
10074
10074
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
10075
10075
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
10076
10076
  ];
10077
- const Clock = createLucideIcon("Clock", __iconNode$q);
10077
+ const Clock = createLucideIcon("Clock", __iconNode$r);
10078
10078
  /**
10079
10079
  * @license lucide-react v0.483.0 - ISC
10080
10080
  *
10081
10081
  * This source code is licensed under the ISC license.
10082
10082
  * See the LICENSE file in the root directory of this source tree.
10083
10083
  */
10084
- const __iconNode$p = [
10084
+ const __iconNode$q = [
10085
10085
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
10086
10086
  ["path", { d: "M12 3v18", key: "108xh3" }]
10087
10087
  ];
10088
- const Columns2 = createLucideIcon("Columns2", __iconNode$p);
10088
+ const Columns2 = createLucideIcon("Columns2", __iconNode$q);
10089
10089
  /**
10090
10090
  * @license lucide-react v0.483.0 - ISC
10091
10091
  *
10092
10092
  * This source code is licensed under the ISC license.
10093
10093
  * See the LICENSE file in the root directory of this source tree.
10094
10094
  */
10095
- const __iconNode$o = [
10095
+ const __iconNode$p = [
10096
10096
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
10097
10097
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
10098
10098
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
10099
10099
  ];
10100
- const Ellipsis = createLucideIcon("Ellipsis", __iconNode$o);
10100
+ const Ellipsis = createLucideIcon("Ellipsis", __iconNode$p);
10101
10101
  /**
10102
10102
  * @license lucide-react v0.483.0 - ISC
10103
10103
  *
10104
10104
  * This source code is licensed under the ISC license.
10105
10105
  * See the LICENSE file in the root directory of this source tree.
10106
10106
  */
10107
- const __iconNode$n = [
10107
+ const __iconNode$o = [
10108
10108
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
10109
10109
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
10110
10110
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
10111
10111
  ["path", { d: "M16 13H8", key: "t4e002" }],
10112
10112
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
10113
10113
  ];
10114
- const FileText = createLucideIcon("FileText", __iconNode$n);
10114
+ const FileText = createLucideIcon("FileText", __iconNode$o);
10115
10115
  /**
10116
10116
  * @license lucide-react v0.483.0 - ISC
10117
10117
  *
10118
10118
  * This source code is licensed under the ISC license.
10119
10119
  * See the LICENSE file in the root directory of this source tree.
10120
10120
  */
10121
- const __iconNode$m = [
10121
+ const __iconNode$n = [
10122
10122
  ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
10123
10123
  ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
10124
10124
  ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
@@ -10126,151 +10126,151 @@ const __iconNode$m = [
10126
10126
  ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
10127
10127
  ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
10128
10128
  ];
10129
- const GripVertical = createLucideIcon("GripVertical", __iconNode$m);
10129
+ const GripVertical = createLucideIcon("GripVertical", __iconNode$n);
10130
10130
  /**
10131
10131
  * @license lucide-react v0.483.0 - ISC
10132
10132
  *
10133
10133
  * This source code is licensed under the ISC license.
10134
10134
  * See the LICENSE file in the root directory of this source tree.
10135
10135
  */
10136
- const __iconNode$l = [
10136
+ const __iconNode$m = [
10137
10137
  ["path", { d: "M4 12h8", key: "17cfdx" }],
10138
10138
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
10139
10139
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
10140
10140
  ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
10141
10141
  ];
10142
- const Heading1 = createLucideIcon("Heading1", __iconNode$l);
10142
+ const Heading1 = createLucideIcon("Heading1", __iconNode$m);
10143
10143
  /**
10144
10144
  * @license lucide-react v0.483.0 - ISC
10145
10145
  *
10146
10146
  * This source code is licensed under the ISC license.
10147
10147
  * See the LICENSE file in the root directory of this source tree.
10148
10148
  */
10149
- const __iconNode$k = [
10149
+ const __iconNode$l = [
10150
10150
  ["path", { d: "M4 12h8", key: "17cfdx" }],
10151
10151
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
10152
10152
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
10153
10153
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
10154
10154
  ];
10155
- const Heading2 = createLucideIcon("Heading2", __iconNode$k);
10155
+ const Heading2 = createLucideIcon("Heading2", __iconNode$l);
10156
10156
  /**
10157
10157
  * @license lucide-react v0.483.0 - ISC
10158
10158
  *
10159
10159
  * This source code is licensed under the ISC license.
10160
10160
  * See the LICENSE file in the root directory of this source tree.
10161
10161
  */
10162
- const __iconNode$j = [
10162
+ const __iconNode$k = [
10163
10163
  ["path", { d: "M4 12h8", key: "17cfdx" }],
10164
10164
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
10165
10165
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
10166
10166
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
10167
10167
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
10168
10168
  ];
10169
- const Heading3 = createLucideIcon("Heading3", __iconNode$j);
10169
+ const Heading3 = createLucideIcon("Heading3", __iconNode$k);
10170
10170
  /**
10171
10171
  * @license lucide-react v0.483.0 - ISC
10172
10172
  *
10173
10173
  * This source code is licensed under the ISC license.
10174
10174
  * See the LICENSE file in the root directory of this source tree.
10175
10175
  */
10176
- const __iconNode$i = [
10176
+ const __iconNode$j = [
10177
10177
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
10178
10178
  ["path", { d: "M17 10v3a1 1 0 0 0 1 1h3", key: "tj5zdr" }],
10179
10179
  ["path", { d: "M21 10v8", key: "1kdml4" }],
10180
10180
  ["path", { d: "M4 12h8", key: "17cfdx" }],
10181
10181
  ["path", { d: "M4 18V6", key: "1rz3zl" }]
10182
10182
  ];
10183
- const Heading4 = createLucideIcon("Heading4", __iconNode$i);
10183
+ const Heading4 = createLucideIcon("Heading4", __iconNode$j);
10184
10184
  /**
10185
10185
  * @license lucide-react v0.483.0 - ISC
10186
10186
  *
10187
10187
  * This source code is licensed under the ISC license.
10188
10188
  * See the LICENSE file in the root directory of this source tree.
10189
10189
  */
10190
- const __iconNode$h = [
10190
+ const __iconNode$i = [
10191
10191
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
10192
10192
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
10193
10193
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
10194
10194
  ];
10195
- const Image$5 = createLucideIcon("Image", __iconNode$h);
10195
+ const Image$5 = createLucideIcon("Image", __iconNode$i);
10196
10196
  /**
10197
10197
  * @license lucide-react v0.483.0 - ISC
10198
10198
  *
10199
10199
  * This source code is licensed under the ISC license.
10200
10200
  * See the LICENSE file in the root directory of this source tree.
10201
10201
  */
10202
- const __iconNode$g = [
10202
+ const __iconNode$h = [
10203
10203
  ["rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5", key: "2e1cvw" }],
10204
10204
  ["path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z", key: "9exkf1" }],
10205
10205
  ["line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5", key: "r4j83e" }]
10206
10206
  ];
10207
- const Instagram = createLucideIcon("Instagram", __iconNode$g);
10207
+ const Instagram = createLucideIcon("Instagram", __iconNode$h);
10208
10208
  /**
10209
10209
  * @license lucide-react v0.483.0 - ISC
10210
10210
  *
10211
10211
  * This source code is licensed under the ISC license.
10212
10212
  * See the LICENSE file in the root directory of this source tree.
10213
10213
  */
10214
- const __iconNode$f = [
10214
+ const __iconNode$g = [
10215
10215
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
10216
10216
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
10217
10217
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
10218
10218
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
10219
10219
  ];
10220
- const LayoutGrid = createLucideIcon("LayoutGrid", __iconNode$f);
10220
+ const LayoutGrid = createLucideIcon("LayoutGrid", __iconNode$g);
10221
10221
  /**
10222
10222
  * @license lucide-react v0.483.0 - ISC
10223
10223
  *
10224
10224
  * This source code is licensed under the ISC license.
10225
10225
  * See the LICENSE file in the root directory of this source tree.
10226
10226
  */
10227
- const __iconNode$e = [
10227
+ const __iconNode$f = [
10228
10228
  ["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
10229
10229
  ["rect", { width: "9", height: "7", x: "3", y: "14", rx: "1", key: "jqznyg" }],
10230
10230
  ["rect", { width: "5", height: "7", x: "16", y: "14", rx: "1", key: "q5h2i8" }]
10231
10231
  ];
10232
- const LayoutTemplate = createLucideIcon("LayoutTemplate", __iconNode$e);
10232
+ const LayoutTemplate = createLucideIcon("LayoutTemplate", __iconNode$f);
10233
10233
  /**
10234
10234
  * @license lucide-react v0.483.0 - ISC
10235
10235
  *
10236
10236
  * This source code is licensed under the ISC license.
10237
10237
  * See the LICENSE file in the root directory of this source tree.
10238
10238
  */
10239
- const __iconNode$d = [
10239
+ const __iconNode$e = [
10240
10240
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
10241
10241
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
10242
10242
  ];
10243
- const Link$2 = createLucideIcon("Link", __iconNode$d);
10243
+ const Link$2 = createLucideIcon("Link", __iconNode$e);
10244
10244
  /**
10245
10245
  * @license lucide-react v0.483.0 - ISC
10246
10246
  *
10247
10247
  * This source code is licensed under the ISC license.
10248
10248
  * See the LICENSE file in the root directory of this source tree.
10249
10249
  */
10250
- const __iconNode$c = [
10250
+ const __iconNode$d = [
10251
10251
  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
10252
10252
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
10253
10253
  ];
10254
- const Mail = createLucideIcon("Mail", __iconNode$c);
10254
+ const Mail = createLucideIcon("Mail", __iconNode$d);
10255
10255
  /**
10256
10256
  * @license lucide-react v0.483.0 - ISC
10257
10257
  *
10258
10258
  * This source code is licensed under the ISC license.
10259
10259
  * See the LICENSE file in the root directory of this source tree.
10260
10260
  */
10261
- const __iconNode$b = [
10261
+ const __iconNode$c = [
10262
10262
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
10263
10263
  ["path", { d: "M3 9h18", key: "1pudct" }],
10264
10264
  ["path", { d: "M9 21V9", key: "1oto5p" }]
10265
10265
  ];
10266
- const PanelsTopLeft = createLucideIcon("PanelsTopLeft", __iconNode$b);
10266
+ const PanelsTopLeft = createLucideIcon("PanelsTopLeft", __iconNode$c);
10267
10267
  /**
10268
10268
  * @license lucide-react v0.483.0 - ISC
10269
10269
  *
10270
10270
  * This source code is licensed under the ISC license.
10271
10271
  * See the LICENSE file in the root directory of this source tree.
10272
10272
  */
10273
- const __iconNode$a = [
10273
+ const __iconNode$b = [
10274
10274
  ["rect", { width: "5", height: "5", x: "3", y: "3", rx: "1", key: "1tu5fj" }],
10275
10275
  ["rect", { width: "5", height: "5", x: "16", y: "3", rx: "1", key: "1v8r4q" }],
10276
10276
  ["rect", { width: "5", height: "5", x: "3", y: "16", rx: "1", key: "1x03jg" }],
@@ -10284,51 +10284,51 @@ const __iconNode$a = [
10284
10284
  ["path", { d: "M21 12v.01", key: "1lwtk9" }],
10285
10285
  ["path", { d: "M12 21v-1", key: "1880an" }]
10286
10286
  ];
10287
- const QrCode = createLucideIcon("QrCode", __iconNode$a);
10287
+ const QrCode = createLucideIcon("QrCode", __iconNode$b);
10288
10288
  /**
10289
10289
  * @license lucide-react v0.483.0 - ISC
10290
10290
  *
10291
10291
  * This source code is licensed under the ISC license.
10292
10292
  * See the LICENSE file in the root directory of this source tree.
10293
10293
  */
10294
- const __iconNode$9 = [
10294
+ const __iconNode$a = [
10295
10295
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
10296
10296
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
10297
10297
  ];
10298
- const RotateCcw = createLucideIcon("RotateCcw", __iconNode$9);
10298
+ const RotateCcw = createLucideIcon("RotateCcw", __iconNode$a);
10299
10299
  /**
10300
10300
  * @license lucide-react v0.483.0 - ISC
10301
10301
  *
10302
10302
  * This source code is licensed under the ISC license.
10303
10303
  * See the LICENSE file in the root directory of this source tree.
10304
10304
  */
10305
- const __iconNode$8 = [
10305
+ const __iconNode$9 = [
10306
10306
  ["line", { x1: "3", x2: "21", y1: "12", y2: "12", key: "10d38w" }],
10307
10307
  ["polyline", { points: "8 8 12 4 16 8", key: "zo8t4w" }],
10308
10308
  ["polyline", { points: "16 16 12 20 8 16", key: "1oyrid" }]
10309
10309
  ];
10310
- const SeparatorHorizontal = createLucideIcon("SeparatorHorizontal", __iconNode$8);
10310
+ const SeparatorHorizontal = createLucideIcon("SeparatorHorizontal", __iconNode$9);
10311
10311
  /**
10312
10312
  * @license lucide-react v0.483.0 - ISC
10313
10313
  *
10314
10314
  * This source code is licensed under the ISC license.
10315
10315
  * See the LICENSE file in the root directory of this source tree.
10316
10316
  */
10317
- const __iconNode$7 = [
10317
+ const __iconNode$8 = [
10318
10318
  ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
10319
10319
  ["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
10320
10320
  ["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
10321
10321
  ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
10322
10322
  ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
10323
10323
  ];
10324
- const Share2 = createLucideIcon("Share2", __iconNode$7);
10324
+ const Share2 = createLucideIcon("Share2", __iconNode$8);
10325
10325
  /**
10326
10326
  * @license lucide-react v0.483.0 - ISC
10327
10327
  *
10328
10328
  * This source code is licensed under the ISC license.
10329
10329
  * See the LICENSE file in the root directory of this source tree.
10330
10330
  */
10331
- const __iconNode$6 = [
10331
+ const __iconNode$7 = [
10332
10332
  [
10333
10333
  "path",
10334
10334
  {
@@ -10346,42 +10346,56 @@ const __iconNode$6 = [
10346
10346
  ["path", { d: "M21 9v2", key: "p14lih" }],
10347
10347
  ["path", { d: "M3 14v1", key: "vnatye" }]
10348
10348
  ];
10349
- const SquareDashedMousePointer = createLucideIcon("SquareDashedMousePointer", __iconNode$6);
10349
+ const SquareDashedMousePointer = createLucideIcon("SquareDashedMousePointer", __iconNode$7);
10350
10350
  /**
10351
10351
  * @license lucide-react v0.483.0 - ISC
10352
10352
  *
10353
10353
  * This source code is licensed under the ISC license.
10354
10354
  * See the LICENSE file in the root directory of this source tree.
10355
10355
  */
10356
- const __iconNode$5 = [
10356
+ const __iconNode$6 = [
10357
10357
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
10358
10358
  ["path", { d: "M7 8h10", key: "1jw688" }],
10359
10359
  ["path", { d: "M7 12h10", key: "b7w52i" }],
10360
10360
  ["path", { d: "M7 16h10", key: "wp8him" }]
10361
10361
  ];
10362
- const SquareMenu = createLucideIcon("SquareMenu", __iconNode$5);
10362
+ const SquareMenu = createLucideIcon("SquareMenu", __iconNode$6);
10363
10363
  /**
10364
10364
  * @license lucide-react v0.483.0 - ISC
10365
10365
  *
10366
10366
  * This source code is licensed under the ISC license.
10367
10367
  * See the LICENSE file in the root directory of this source tree.
10368
10368
  */
10369
- const __iconNode$4 = [
10369
+ const __iconNode$5 = [
10370
10370
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
10371
10371
  ["path", { d: "M8 12h8", key: "1wcyev" }],
10372
10372
  ["path", { d: "M12 8v8", key: "napkw2" }]
10373
10373
  ];
10374
- const SquarePlus = createLucideIcon("SquarePlus", __iconNode$4);
10374
+ const SquarePlus = createLucideIcon("SquarePlus", __iconNode$5);
10375
10375
  /**
10376
10376
  * @license lucide-react v0.483.0 - ISC
10377
10377
  *
10378
10378
  * This source code is licensed under the ISC license.
10379
10379
  * See the LICENSE file in the root directory of this source tree.
10380
10380
  */
10381
- const __iconNode$3 = [
10381
+ const __iconNode$4 = [
10382
10382
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
10383
10383
  ];
10384
- const Square = createLucideIcon("Square", __iconNode$3);
10384
+ const Square = createLucideIcon("Square", __iconNode$4);
10385
+ /**
10386
+ * @license lucide-react v0.483.0 - ISC
10387
+ *
10388
+ * This source code is licensed under the ISC license.
10389
+ * See the LICENSE file in the root directory of this source tree.
10390
+ */
10391
+ const __iconNode$3 = [
10392
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
10393
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
10394
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
10395
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
10396
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
10397
+ ];
10398
+ const Trash2 = createLucideIcon("Trash2", __iconNode$3);
10385
10399
  /**
10386
10400
  * @license lucide-react v0.483.0 - ISC
10387
10401
  *
@@ -40904,6 +40918,13 @@ const StandaloneElementSaveButtonPortal = (props) => {
40904
40918
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
40905
40919
  };
40906
40920
  const styles$2 = "";
40921
+ function isImeComposing(event) {
40922
+ var _a;
40923
+ return Boolean(((_a = event.nativeEvent) == null ? void 0 : _a.isComposing) || event.keyCode === 229);
40924
+ }
40925
+ function shouldSubmitOnEnter(event) {
40926
+ return event.key === "Enter" && !event.shiftKey && !isImeComposing(event);
40927
+ }
40907
40928
  function copyImageUrl(attachment) {
40908
40929
  return __async(this, null, function* () {
40909
40930
  const value = attachment.url || attachment.dataUrl;
@@ -41101,6 +41122,10 @@ function quickActionLabel(action2) {
41101
41122
  function quickActionPrompt(action2) {
41102
41123
  return typeof action2 === "string" ? action2 : action2.prompt;
41103
41124
  }
41125
+ function quickActionTitle(action2) {
41126
+ const prompt = quickActionPrompt(action2).trim();
41127
+ return prompt || quickActionLabel(action2);
41128
+ }
41104
41129
  function fileToAttachment(file) {
41105
41130
  return new Promise((resolve, reject) => {
41106
41131
  const reader = new FileReader();
@@ -41183,6 +41208,7 @@ function EasyEmailProAiAgent({
41183
41208
  activity,
41184
41209
  disabled = false,
41185
41210
  sendDisabled = false,
41211
+ selectedElement,
41186
41212
  quickActions = getDefaultQuickActions(),
41187
41213
  pendingAction,
41188
41214
  pendingDecision,
@@ -41192,9 +41218,10 @@ function EasyEmailProAiAgent({
41192
41218
  onChooseDecision,
41193
41219
  onCancelDecision,
41194
41220
  onRestoreSnapshot,
41195
- onQuickAction
41221
+ onQuickAction,
41222
+ onClearHistory
41196
41223
  }) {
41197
- var _a;
41224
+ var _a, _b, _c;
41198
41225
  assertAiAgentFeatureEnabled();
41199
41226
  const [draft, setDraft] = useState("");
41200
41227
  const [attachments, setAttachments] = useState([]);
@@ -41213,10 +41240,18 @@ function EasyEmailProAiAgent({
41213
41240
  const activityState = status === "running" || /applying|updating|generating|connecting|sending|uploading|reading|analyzing|preparing|processing|正在|读取|分析|准备|处理中|更新中|生成中|上传中/i.test(activity || "") ? "working" : /not applied|failed|error|失败|未应用/i.test(activity || "") ? "warning" : /updated|applied|generated|ready|完成|已更新|已应用|已生成/i.test(activity || "") ? "success" : "idle";
41214
41241
  const visibleActivity = activityState === "success" ? "" : activity;
41215
41242
  const lastSuccessfulAssistantMessageId = activityState === "success" ? (_a = [...messages].reverse().find((message) => message.role === "assistant" && message.status !== "error")) == null ? void 0 : _a.id : null;
41243
+ const selectedElementMeta = selectedElement ? [
41244
+ selectedElement.type,
41245
+ ((_b = selectedElement.path) == null ? void 0 : _b.length) ? `path: ${selectedElement.path.join(".")}` : null,
41246
+ selectedElement.width || selectedElement.height ? `${t("Size")}: ${selectedElement.width || "-"} x ${selectedElement.height || "-"}` : null,
41247
+ selectedElement.imageSrc ? `${t("URL")}: ${selectedElement.imageSrc}` : null,
41248
+ selectedElement.id ? `id: ${selectedElement.id}` : null,
41249
+ selectedElement.uid ? `uid: ${selectedElement.uid}` : null
41250
+ ].filter(Boolean).join(" · ") : "";
41216
41251
  function scrollThreadToBottom() {
41217
41252
  const scroll2 = () => {
41218
- var _a2, _b;
41219
- const container2 = (_b = (_a2 = scrollbarsRef.current) == null ? void 0 : _a2.osInstance()) == null ? void 0 : _b.getElements().viewport;
41253
+ var _a2, _b2;
41254
+ const container2 = (_b2 = (_a2 = scrollbarsRef.current) == null ? void 0 : _a2.osInstance()) == null ? void 0 : _b2.getElements().viewport;
41220
41255
  if (!container2)
41221
41256
  return;
41222
41257
  container2.scrollTop = container2.scrollHeight;
@@ -41300,6 +41335,22 @@ function EasyEmailProAiAgent({
41300
41335
  yield onSend == null ? void 0 : onSend(prompt, readyAttachments);
41301
41336
  });
41302
41337
  }
41338
+ function submitDecisionDraft(pendingDecision2) {
41339
+ const value = decisionDraft.trim();
41340
+ if (!value)
41341
+ return;
41342
+ const choice = {
41343
+ id: "custom",
41344
+ label: value,
41345
+ prompt: value
41346
+ };
41347
+ void (onChooseDecision == null ? void 0 : onChooseDecision(choice, {
41348
+ decisionId: pendingDecision2.id,
41349
+ choiceId: "custom",
41350
+ label: value,
41351
+ customText: value
41352
+ }));
41353
+ }
41303
41354
  function uploadImageFiles(files) {
41304
41355
  return __async(this, null, function* () {
41305
41356
  if (!files.length || disabled || uploading)
@@ -41365,7 +41416,7 @@ function EasyEmailProAiAgent({
41365
41416
  className: "eep-ai-agent__body-scrollbar"
41366
41417
  },
41367
41418
  /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__body" }, /* @__PURE__ */ React__default.createElement("section", { className: "eep-ai-agent__thread", "aria-label": t("AI conversation") }, messages.map((message) => {
41368
- var _a2, _b;
41419
+ var _a2, _b2;
41369
41420
  return /* @__PURE__ */ React__default.createElement("article", { className: classNames("eep-ai-agent__message", `is-${message.role}`), key: message.id }, ((_a2 = message.attachments) == null ? void 0 : _a2.length) ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__attachments", "aria-label": t("Attachments") }, message.attachments.map((attachment) => /* @__PURE__ */ React__default.createElement(
41370
41421
  "button",
41371
41422
  {
@@ -41397,7 +41448,7 @@ function EasyEmailProAiAgent({
41397
41448
  },
41398
41449
  copiedAttachmentId === attachment.id ? t("Copied") : "⧉"
41399
41450
  )
41400
- ))) : null, /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__bubble" }, message.content), ((_b = message.sources) == null ? void 0 : _b.length) ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__sources", "aria-label": t("Sources") }, message.sources.slice(0, 3).map((source) => /* @__PURE__ */ React__default.createElement(
41451
+ ))) : null, /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__bubble" }, message.content), ((_b2 = message.sources) == null ? void 0 : _b2.length) ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__sources", "aria-label": t("Sources") }, message.sources.slice(0, 3).map((source) => /* @__PURE__ */ React__default.createElement(
41401
41452
  "a",
41402
41453
  {
41403
41454
  href: source.url,
@@ -41469,39 +41520,51 @@ function EasyEmailProAiAgent({
41469
41520
  /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("strong", null, choice.label), choice.description ? /* @__PURE__ */ React__default.createElement("small", null, choice.description) : null)
41470
41521
  ))),
41471
41522
  pendingDecision.allowCustom ? /* @__PURE__ */ React__default.createElement(
41472
- "form",
41523
+ "div",
41473
41524
  {
41474
- className: "eep-ai-agent__decision-custom",
41475
- onSubmit: (event) => {
41476
- event.preventDefault();
41477
- const value = decisionDraft.trim();
41478
- if (!value)
41479
- return;
41480
- const choice = {
41481
- id: "custom",
41482
- label: value,
41483
- prompt: value
41484
- };
41485
- void (onChooseDecision == null ? void 0 : onChooseDecision(choice, {
41486
- decisionId: pendingDecision.id,
41487
- choiceId: "custom",
41488
- label: value,
41489
- customText: value
41490
- }));
41491
- }
41525
+ className: "eep-ai-agent__decision-custom"
41492
41526
  },
41493
41527
  /* @__PURE__ */ React__default.createElement(
41494
41528
  "input",
41495
41529
  {
41496
41530
  value: decisionDraft,
41497
41531
  onChange: (event) => setDecisionDraft(event.target.value),
41532
+ onKeyDown: (event) => {
41533
+ if (!shouldSubmitOnEnter(event))
41534
+ return;
41535
+ event.preventDefault();
41536
+ submitDecisionDraft(pendingDecision);
41537
+ },
41498
41538
  placeholder: t("Or describe what you want...")
41499
41539
  }
41500
41540
  ),
41501
- /* @__PURE__ */ React__default.createElement("button", { type: "submit", disabled: !decisionDraft.trim() }, t("Send"))
41541
+ /* @__PURE__ */ React__default.createElement(
41542
+ "button",
41543
+ {
41544
+ type: "button",
41545
+ disabled: !decisionDraft.trim(),
41546
+ onClick: () => submitDecisionDraft(pendingDecision)
41547
+ },
41548
+ t("Send")
41549
+ )
41502
41550
  ) : null
41503
41551
  )) : null))
41504
- ), /* @__PURE__ */ React__default.createElement("footer", { className: "eep-ai-agent__composer-wrap" }, visibleActivity || uploadError || attachments.length || pendingAction ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-meta" }, attachments.length ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__pending-attachments", "aria-label": t("Pending images") }, attachments.map((attachment) => /* @__PURE__ */ React__default.createElement(
41552
+ ), /* @__PURE__ */ React__default.createElement("footer", { className: "eep-ai-agent__composer-wrap" }, selectedElement ? /* @__PURE__ */ React__default.createElement(
41553
+ "div",
41554
+ {
41555
+ className: "eep-ai-agent__selection",
41556
+ "aria-label": `${t("Selected")} ${t("Element")}`
41557
+ },
41558
+ selectedElement.imageSrc ? /* @__PURE__ */ React__default.createElement(
41559
+ "img",
41560
+ {
41561
+ className: "eep-ai-agent__selection-preview",
41562
+ src: selectedElement.imageSrc,
41563
+ alt: selectedElement.label
41564
+ }
41565
+ ) : /* @__PURE__ */ React__default.createElement("span", { className: "eep-ai-agent__selection-icon", "aria-hidden": "true" }, ((_c = selectedElement.label) == null ? void 0 : _c.slice(0, 1)) || "-"),
41566
+ /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__selection-content" }, /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__selection-title" }, /* @__PURE__ */ React__default.createElement("span", null, t("Selected")), /* @__PURE__ */ React__default.createElement("strong", null, selectedElement.label || "-")), /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__selection-meta", title: selectedElementMeta }, selectedElementMeta))
41567
+ ) : null, visibleActivity || uploadError || attachments.length || pendingAction ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-meta" }, attachments.length ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__pending-attachments", "aria-label": t("Pending images") }, attachments.map((attachment) => /* @__PURE__ */ React__default.createElement(
41505
41568
  "button",
41506
41569
  {
41507
41570
  className: "eep-ai-agent__pending-attachment",
@@ -41567,30 +41630,46 @@ function EasyEmailProAiAgent({
41567
41630
  "aria-label": t("Quick actions")
41568
41631
  },
41569
41632
  quickActionsExpanded && hasMenuQuickActions ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__quick-actions-menu" }, menuQuickActions.map((action2, index2) => /* @__PURE__ */ React__default.createElement(
41570
- "button",
41633
+ Tooltip,
41571
41634
  {
41572
- className: "eep-ai-agent__quick-action-menu-item",
41635
+ content: quickActionTitle(action2),
41573
41636
  key: `${quickActionLabel(action2)}-${index2}`,
41574
- type: "button",
41575
- disabled: disabled || sendDisabled || uploading,
41576
- onClick: () => {
41577
- void runQuickAction(action2);
41578
- }
41637
+ position: "right"
41579
41638
  },
41580
- quickActionLabel(action2)
41639
+ /* @__PURE__ */ React__default.createElement(
41640
+ "button",
41641
+ {
41642
+ className: "eep-ai-agent__quick-action-menu-item",
41643
+ type: "button",
41644
+ "aria-label": `${quickActionLabel(action2)}: ${quickActionTitle(action2)}`,
41645
+ disabled: disabled || sendDisabled || uploading,
41646
+ onClick: () => {
41647
+ void runQuickAction(action2);
41648
+ }
41649
+ },
41650
+ quickActionLabel(action2)
41651
+ )
41581
41652
  ))) : null,
41582
41653
  /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__quick-actions-bar" }, visibleQuickActions.map((action2, index2) => /* @__PURE__ */ React__default.createElement(
41583
- "button",
41654
+ Tooltip,
41584
41655
  {
41585
- className: "eep-ai-agent__quick-action-pill",
41656
+ content: quickActionTitle(action2),
41586
41657
  key: `${quickActionLabel(action2)}-${index2}`,
41587
- type: "button",
41588
- disabled: disabled || sendDisabled || uploading,
41589
- onClick: () => {
41590
- void runQuickAction(action2);
41591
- }
41658
+ position: "top"
41592
41659
  },
41593
- quickActionLabel(action2)
41660
+ /* @__PURE__ */ React__default.createElement(
41661
+ "button",
41662
+ {
41663
+ className: "eep-ai-agent__quick-action-pill",
41664
+ type: "button",
41665
+ "aria-label": `${quickActionLabel(action2)}: ${quickActionTitle(action2)}`,
41666
+ disabled: disabled || sendDisabled || uploading,
41667
+ onClick: () => {
41668
+ void runQuickAction(action2);
41669
+ }
41670
+ },
41671
+ quickActionLabel(action2)
41672
+ )
41594
41673
  )), hasMenuQuickActions ? /* @__PURE__ */ React__default.createElement(
41595
41674
  "button",
41596
41675
  {
@@ -41613,13 +41692,13 @@ function EasyEmailProAiAgent({
41613
41692
  rows: 1,
41614
41693
  onChange: (event) => setDraft(event.target.value),
41615
41694
  onKeyDown: (event) => {
41616
- if (event.key === "Enter" && !event.shiftKey) {
41617
- event.preventDefault();
41618
- submit();
41619
- }
41695
+ if (!shouldSubmitOnEnter(event))
41696
+ return;
41697
+ event.preventDefault();
41698
+ submit();
41620
41699
  }
41621
41700
  }
41622
- ), /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-hint" }, t("Enter to send / Shift + Enter for new line"))), /* @__PURE__ */ React__default.createElement(
41701
+ )), /* @__PURE__ */ React__default.createElement(
41623
41702
  "input",
41624
41703
  {
41625
41704
  ref: inputRef,
@@ -41629,7 +41708,7 @@ function EasyEmailProAiAgent({
41629
41708
  multiple: true,
41630
41709
  onChange: (event) => uploadFiles(event.currentTarget.files)
41631
41710
  }
41632
- ), /* @__PURE__ */ React__default.createElement(
41711
+ ), /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-actions" }, /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-actions-left" }, /* @__PURE__ */ React__default.createElement(
41633
41712
  "button",
41634
41713
  {
41635
41714
  className: "eep-ai-agent__attach",
@@ -41643,6 +41722,35 @@ function EasyEmailProAiAgent({
41643
41722
  },
41644
41723
  /* @__PURE__ */ React__default.createElement(Icon, { name: "attach" })
41645
41724
  ), /* @__PURE__ */ React__default.createElement(
41725
+ Popconfirm,
41726
+ {
41727
+ focusLock: true,
41728
+ title: t("Clear this conversation?"),
41729
+ okText: t("Clear"),
41730
+ cancelText: t("Cancel"),
41731
+ okButtonProps: {
41732
+ status: "danger"
41733
+ },
41734
+ onOk: () => {
41735
+ void (onClearHistory == null ? void 0 : onClearHistory());
41736
+ setDraft("");
41737
+ setAttachments([]);
41738
+ setUploadError("");
41739
+ setQuickActionsExpanded(false);
41740
+ }
41741
+ },
41742
+ /* @__PURE__ */ React__default.createElement(
41743
+ "button",
41744
+ {
41745
+ className: "eep-ai-agent__clear-history",
41746
+ type: "button",
41747
+ disabled,
41748
+ "aria-label": t("Clear conversation"),
41749
+ title: t("Clear conversation")
41750
+ },
41751
+ /* @__PURE__ */ React__default.createElement(Trash2, { size: 15, strokeWidth: 2, "aria-hidden": "true" })
41752
+ )
41753
+ ), /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-hint" }, t("Enter to send / Shift + Enter for new line"))), /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__composer-actions-right" }, /* @__PURE__ */ React__default.createElement(
41646
41754
  "button",
41647
41755
  {
41648
41756
  className: "eep-ai-agent__send",
@@ -41652,7 +41760,7 @@ function EasyEmailProAiAgent({
41652
41760
  "aria-label": t("Send")
41653
41761
  },
41654
41762
  /* @__PURE__ */ React__default.createElement(Icon, { name: "send" })
41655
- ))), previewAttachment ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__lightbox", role: "dialog", "aria-modal": "true", onClick: () => setPreviewAttachment(null) }, /* @__PURE__ */ React__default.createElement(
41763
+ ))))), previewAttachment ? /* @__PURE__ */ React__default.createElement("div", { className: "eep-ai-agent__lightbox", role: "dialog", "aria-modal": "true", onClick: () => setPreviewAttachment(null) }, /* @__PURE__ */ React__default.createElement(
41656
41764
  "button",
41657
41765
  {
41658
41766
  className: "eep-ai-agent__lightbox-close",
@@ -41735,6 +41843,47 @@ function mapGeneratedImageAttachment(attachment) {
41735
41843
  function isRemoteImageUrl(url) {
41736
41844
  return Boolean(url && !url.startsWith("data:"));
41737
41845
  }
41846
+ function isRecord(value) {
41847
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
41848
+ }
41849
+ function targetMatchesRecord(target, record) {
41850
+ if (!target)
41851
+ return false;
41852
+ if ("id" in target)
41853
+ return record.id === target.id;
41854
+ if ("uid" in target)
41855
+ return record.uid === target.uid;
41856
+ return false;
41857
+ }
41858
+ function replaceTargetAttributeInTemplate(template, target, key2, value) {
41859
+ let replaced = false;
41860
+ const visit = (node) => {
41861
+ if (Array.isArray(node))
41862
+ return node.map(visit);
41863
+ if (!isRecord(node))
41864
+ return node;
41865
+ let next = node;
41866
+ if (targetMatchesRecord(target, node)) {
41867
+ const attributes = isRecord(node.attributes) ? node.attributes : {};
41868
+ next = __spreadProps(__spreadValues({}, node), {
41869
+ attributes: __spreadProps(__spreadValues({}, attributes), {
41870
+ [key2]: value
41871
+ })
41872
+ });
41873
+ replaced = true;
41874
+ }
41875
+ let changed = next !== node;
41876
+ const entries = Object.entries(next).map(([entryKey, entryValue]) => {
41877
+ const nextValue = visit(entryValue);
41878
+ if (nextValue !== entryValue)
41879
+ changed = true;
41880
+ return [entryKey, nextValue];
41881
+ });
41882
+ return changed ? Object.fromEntries(entries) : node;
41883
+ };
41884
+ const nextTemplate = visit(template);
41885
+ return replaced ? nextTemplate : null;
41886
+ }
41738
41887
  function imageResultText(payload) {
41739
41888
  const lines = [payload.summary || t("Generated image.")];
41740
41889
  if (payload.revisedPrompt) {
@@ -42134,28 +42283,44 @@ ${errors.join("\n")}` : toolCallsText(__spreadProps(__spreadValues({}, payload),
42134
42283
  activeRun,
42135
42284
  target,
42136
42285
  payload.confidence
42137
- ) && optionsRef.current.onApplyToolCalls) {
42138
- void applyToolCalls(
42139
- activeRun,
42140
- {
42141
- summary: payload.summary || t("Updated the selected image."),
42142
- toolCalls: []
42143
- },
42144
- [
42286
+ ) && (optionsRef.current.onApplyTemplate || optionsRef.current.onApplyToolCalls)) {
42287
+ const attributeKey = imageTargetAttributeKey(
42288
+ activeRun.editorImages,
42289
+ target
42290
+ );
42291
+ const nextTemplate = optionsRef.current.onApplyTemplate && replaceTargetAttributeInTemplate(
42292
+ optionsRef.current.getTemplate(),
42293
+ target,
42294
+ attributeKey,
42295
+ generatedImageUrl
42296
+ );
42297
+ if (nextTemplate) {
42298
+ applyTemplateChange(
42299
+ activeRun,
42300
+ nextTemplate,
42301
+ payload.summary || t("Updated the selected image.")
42302
+ );
42303
+ refreshActiveRunTemplateKey(activeRun);
42304
+ } else if (optionsRef.current.onApplyToolCalls) {
42305
+ void applyToolCalls(
42306
+ activeRun,
42145
42307
  {
42146
- name: "update_attribute",
42147
- target,
42148
- key: imageTargetAttributeKey(
42149
- activeRun.editorImages,
42150
- target
42151
- ),
42152
- value: generatedImageUrl
42153
- }
42154
- ]
42155
- ).then((applied) => {
42156
- if (applied)
42157
- refreshActiveRunTemplateKey(activeRun);
42158
- });
42308
+ summary: payload.summary || t("Updated the selected image."),
42309
+ toolCalls: []
42310
+ },
42311
+ [
42312
+ {
42313
+ name: "update_attribute",
42314
+ target,
42315
+ key: attributeKey,
42316
+ value: generatedImageUrl
42317
+ }
42318
+ ]
42319
+ ).then((applied) => {
42320
+ if (applied)
42321
+ refreshActiveRunTemplateKey(activeRun);
42322
+ });
42323
+ }
42159
42324
  updateMessage(activeRun.assistantMessageId, {
42160
42325
  content: imageResultText(payload),
42161
42326
  attachments: payload.images.map(mapGeneratedImageAttachment),
@@ -42403,6 +42568,19 @@ ${errors.join("\n")}` : toolCallsText(__spreadProps(__spreadValues({}, payload),
42403
42568
  const clearPendingDecision = useCallback(() => {
42404
42569
  setPendingDecision(null);
42405
42570
  }, []);
42571
+ const clearHistory = useCallback(() => {
42572
+ abortStream();
42573
+ activeRunRef.current = null;
42574
+ setPendingDecision(null);
42575
+ setPendingChange(null);
42576
+ setApplyingPendingChange(false);
42577
+ setActivity("");
42578
+ setStatus("ready");
42579
+ commitHistory(
42580
+ () => normalizeHistory(void 0, optionsRef.current.initialMessages),
42581
+ { type: "history.cleared" }
42582
+ );
42583
+ }, [abortStream, commitHistory]);
42406
42584
  const stop = useCallback(() => __async(this, null, function* () {
42407
42585
  abortStream();
42408
42586
  activeRunRef.current = null;
@@ -42425,6 +42603,7 @@ ${errors.join("\n")}` : toolCallsText(__spreadProps(__spreadValues({}, payload),
42425
42603
  applyPendingChange,
42426
42604
  chooseDecision,
42427
42605
  clearPendingDecision,
42606
+ clearHistory,
42428
42607
  restoreSnapshot,
42429
42608
  send,
42430
42609
  stop
@@ -42543,6 +42722,26 @@ function imageAssetTitle(node, source) {
42543
42722
  }
42544
42723
  return t("Image");
42545
42724
  }
42725
+ function selectedElementSummary(node, path2) {
42726
+ if (!node)
42727
+ return null;
42728
+ const type = typeof node.type === "string" ? node.type : void 0;
42729
+ const isImageBlock = type ? IMAGE_BLOCK_TYPES.has(type) : false;
42730
+ const hasBackgroundImage = supportsBackgroundImage(node);
42731
+ const source = isImageBlock ? "image" : "background";
42732
+ const dimensions = getImageDimensions(node);
42733
+ const imageSrc = isImageBlock ? getImageSrc(node) : hasBackgroundImage ? getBackgroundImageSrc(node) : void 0;
42734
+ return {
42735
+ label: isImageBlock || hasBackgroundImage ? imageAssetTitle(node, source) : typeof node.title === "string" && node.title.trim() ? node.title : type || t("Element"),
42736
+ type,
42737
+ id: typeof node.id === "string" ? node.id : void 0,
42738
+ uid: typeof node.uid === "string" ? node.uid : void 0,
42739
+ path: path2,
42740
+ imageSrc,
42741
+ width: dimensions.width,
42742
+ height: dimensions.height
42743
+ };
42744
+ }
42546
42745
  function selectedDescendants(editor, selectedNodePath) {
42547
42746
  if (!selectedNodePath)
42548
42747
  return [];
@@ -42592,6 +42791,13 @@ function AiAgentPanel({
42592
42791
  useEffect(() => {
42593
42792
  selectedRef.current = { selectedNode, selectedNodePath };
42594
42793
  }, [selectedNode, selectedNodePath]);
42794
+ const selectedElement = useMemo(
42795
+ () => selectedElementSummary(
42796
+ selectedNode,
42797
+ selectedNodePath || void 0
42798
+ ),
42799
+ [selectedNode, selectedNodePath]
42800
+ );
42595
42801
  const uploadAttachment = useCallback(
42596
42802
  (file) => __async(this, null, function* () {
42597
42803
  const uploadHandler = uploadOverride || editorUpload;
@@ -42719,6 +42925,7 @@ function AiAgentPanel({
42719
42925
  messages: session.messages,
42720
42926
  status: session.status,
42721
42927
  activity: session.activity,
42928
+ selectedElement,
42722
42929
  disabled,
42723
42930
  sendDisabled: disabled || session.status === "running",
42724
42931
  quickActions,
@@ -42733,6 +42940,7 @@ function AiAgentPanel({
42733
42940
  onUpload: uploadOverride || editorUpload ? uploadAttachment : void 0,
42734
42941
  onChooseDecision: session.chooseDecision,
42735
42942
  onCancelDecision: session.clearPendingDecision,
42943
+ onClearHistory: session.clearHistory,
42736
42944
  onRestoreSnapshot: (snapshotOptions == null ? void 0 : snapshotOptions.onRestore) ? session.restoreSnapshot : void 0
42737
42945
  }
42738
42946
  );
package/lib/style.css CHANGED
@@ -1922,6 +1922,79 @@ THEMES:
1922
1922
  padding: 18px 12px 12px;
1923
1923
  }
1924
1924
 
1925
+ .eep-ai-agent__selection {
1926
+ min-width: 0;
1927
+ display: grid;
1928
+ grid-template-columns: 40px minmax(0, 1fr);
1929
+ gap: 10px;
1930
+ align-items: center;
1931
+ margin-bottom: 10px;
1932
+ padding: 8px 10px;
1933
+ border: 1px solid var(--eep-ai-line);
1934
+ border-radius: 8px;
1935
+ background: rgba(255, 255, 255, 0.72);
1936
+ }
1937
+
1938
+ .eep-ai-agent__selection-preview,
1939
+ .eep-ai-agent__selection-icon {
1940
+ width: 40px;
1941
+ height: 40px;
1942
+ border-radius: 6px;
1943
+ }
1944
+
1945
+ .eep-ai-agent__selection-preview {
1946
+ display: block;
1947
+ object-fit: cover;
1948
+ background: var(--eep-ai-surface-muted);
1949
+ }
1950
+
1951
+ .eep-ai-agent__selection-icon {
1952
+ display: inline-flex;
1953
+ align-items: center;
1954
+ justify-content: center;
1955
+ color: var(--eep-ai-primary-text);
1956
+ background: var(--eep-ai-primary-light);
1957
+ font-size: 15px;
1958
+ font-weight: 600;
1959
+ text-transform: uppercase;
1960
+ }
1961
+
1962
+ .eep-ai-agent__selection-content {
1963
+ min-width: 0;
1964
+ display: grid;
1965
+ gap: 2px;
1966
+ }
1967
+
1968
+ .eep-ai-agent__selection-title {
1969
+ min-width: 0;
1970
+ display: flex;
1971
+ gap: 6px;
1972
+ align-items: baseline;
1973
+ color: var(--eep-ai-muted);
1974
+ font-size: 12px;
1975
+ line-height: 18px;
1976
+ }
1977
+
1978
+ .eep-ai-agent__selection-title strong {
1979
+ min-width: 0;
1980
+ color: var(--eep-ai-text);
1981
+ font-size: 13px;
1982
+ font-weight: 600;
1983
+ overflow: hidden;
1984
+ text-overflow: ellipsis;
1985
+ white-space: nowrap;
1986
+ }
1987
+
1988
+ .eep-ai-agent__selection-meta {
1989
+ min-width: 0;
1990
+ color: var(--eep-ai-muted);
1991
+ font-size: 11px;
1992
+ line-height: 16px;
1993
+ overflow: hidden;
1994
+ text-overflow: ellipsis;
1995
+ white-space: nowrap;
1996
+ }
1997
+
1925
1998
  .eep-ai-agent__thread {
1926
1999
  display: grid;
1927
2000
  gap: 18px;
@@ -2600,13 +2673,12 @@ THEMES:
2600
2673
  }
2601
2674
 
2602
2675
  .eep-ai-agent__composer {
2603
- display: grid;
2604
- grid-template-columns: minmax(0, 1fr) 38px 38px;
2676
+ display: flex;
2677
+ flex-direction: column;
2605
2678
  gap: 8px;
2606
- align-items: end;
2607
2679
  border: 1px solid var(--eep-ai-line-strong);
2608
2680
  border-radius: 8px;
2609
- padding: 9px;
2681
+ padding: 10px;
2610
2682
  background: var(--eep-ai-surface);
2611
2683
  box-shadow: var(--eep-ai-shadow);
2612
2684
  }
@@ -2628,7 +2700,7 @@ THEMES:
2628
2700
  resize: none;
2629
2701
  border: 0;
2630
2702
  outline: 0;
2631
- padding: 6px 4px 2px;
2703
+ padding: 4px 4px 0;
2632
2704
  color: var(--eep-ai-text);
2633
2705
  background: transparent;
2634
2706
  font-size: 13px;
@@ -2640,36 +2712,80 @@ THEMES:
2640
2712
  }
2641
2713
 
2642
2714
  .eep-ai-agent__composer-hint {
2643
- padding: 1px 4px 0;
2715
+ min-width: 0;
2644
2716
  color: var(--eep-ai-subtle);
2645
2717
  font-size: 11px;
2646
2718
  line-height: 1.35;
2719
+ overflow: hidden;
2720
+ text-overflow: ellipsis;
2647
2721
  }
2648
2722
 
2649
2723
  .eep-ai-agent__file-input {
2650
2724
  display: none;
2651
2725
  }
2652
2726
 
2727
+ .eep-ai-agent__composer-actions {
2728
+ display: flex;
2729
+ align-items: center;
2730
+ justify-content: space-between;
2731
+ gap: 10px;
2732
+ min-height: 34px;
2733
+ }
2734
+
2735
+ .eep-ai-agent__composer-actions-left,
2736
+ .eep-ai-agent__composer-actions-right {
2737
+ display: flex;
2738
+ align-items: center;
2739
+ min-width: 0;
2740
+ }
2741
+
2742
+ .eep-ai-agent__composer-actions-left {
2743
+ flex: 1 1 auto;
2744
+ gap: 8px;
2745
+ }
2746
+
2747
+ .eep-ai-agent__composer-actions-right {
2748
+ flex: 0 0 auto;
2749
+ justify-content: flex-end;
2750
+ }
2751
+
2653
2752
  .eep-ai-agent__attach,
2753
+ .eep-ai-agent__clear-history,
2654
2754
  .eep-ai-agent__send {
2655
- width: 38px;
2656
- height: 38px;
2755
+ flex: 0 0 auto;
2756
+ width: 34px;
2757
+ height: 34px;
2657
2758
  border-radius: 8px;
2658
2759
  display: grid;
2659
2760
  place-items: center;
2660
2761
  cursor: pointer;
2661
2762
  }
2662
2763
 
2663
- .eep-ai-agent__attach {
2764
+ .eep-ai-agent__attach,
2765
+ .eep-ai-agent__clear-history {
2664
2766
  border: 1px solid var(--eep-ai-line);
2665
2767
  background: var(--eep-ai-surface);
2666
2768
  color: var(--eep-ai-text);
2667
2769
  }
2668
2770
 
2669
- .eep-ai-agent__attach:hover {
2771
+ .eep-ai-agent__attach:hover,
2772
+ .eep-ai-agent__clear-history:hover {
2670
2773
  background: #f4f4f5;
2671
2774
  }
2672
2775
 
2776
+ .eep-ai-agent__clear-history {
2777
+ color: var(--eep-ai-muted);
2778
+ }
2779
+
2780
+ .eep-ai-agent__clear-history:hover {
2781
+ color: var(--eep-ai-text);
2782
+ }
2783
+
2784
+ .eep-ai-agent__clear-history:disabled {
2785
+ cursor: not-allowed;
2786
+ opacity: 0.55;
2787
+ }
2788
+
2673
2789
  .eep-ai-agent__send {
2674
2790
  border: 0;
2675
2791
  background: var(--eep-ai-primary);
@@ -29,6 +29,16 @@ export type AiAgentAttachment = {
29
29
  dataUrl?: string;
30
30
  size?: number;
31
31
  };
32
+ export type AiAgentSelectedElement = {
33
+ label: string;
34
+ type?: string;
35
+ id?: string;
36
+ uid?: string;
37
+ path?: number[];
38
+ imageSrc?: string;
39
+ width?: number;
40
+ height?: number;
41
+ };
32
42
  export type AiQuickAction = string | {
33
43
  label: string;
34
44
  prompt: string;
@@ -43,6 +53,7 @@ export type EasyEmailProAiAgentProps = {
43
53
  activity?: string;
44
54
  disabled?: boolean;
45
55
  sendDisabled?: boolean;
56
+ selectedElement?: AiAgentSelectedElement | null;
46
57
  quickActions?: AiQuickAction[];
47
58
  pendingAction?: {
48
59
  label: string;
@@ -59,6 +70,7 @@ export type EasyEmailProAiAgentProps = {
59
70
  onRestoreVersion?: (version: AiChangeVersion) => void;
60
71
  onStepVersion?: (version: AiChangeVersion, direction: "previous" | "next") => void;
61
72
  onQuickAction?: (action: string) => void | Promise<void>;
73
+ onClearHistory?: () => void | Promise<void>;
62
74
  onClose?: () => void;
63
75
  };
64
- export declare function EasyEmailProAiAgent({ className, messages, activity, disabled, sendDisabled, quickActions, pendingAction, pendingDecision, placeholder, onSend, onUpload, onChooseDecision, onCancelDecision, onRestoreSnapshot, onQuickAction, }: EasyEmailProAiAgentProps): React.JSX.Element;
76
+ export declare function EasyEmailProAiAgent({ className, messages, activity, disabled, sendDisabled, selectedElement, quickActions, pendingAction, pendingDecision, placeholder, onSend, onUpload, onChooseDecision, onCancelDecision, onRestoreSnapshot, onQuickAction, onClearHistory, }: EasyEmailProAiAgentProps): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ type KeyboardLikeEvent = {
2
+ key?: string;
3
+ shiftKey?: boolean;
4
+ keyCode?: number;
5
+ nativeEvent?: {
6
+ isComposing?: boolean;
7
+ };
8
+ };
9
+ export declare function isImeComposing(event: KeyboardLikeEvent): boolean;
10
+ export declare function shouldSubmitOnEnter(event: KeyboardLikeEvent): boolean;
11
+ export {};
@@ -25,6 +25,8 @@ export type AiAgentHistoryChange = {
25
25
  type: "message.updated";
26
26
  messageId: string;
27
27
  patch: Partial<AiAgentMessage>;
28
+ } | {
29
+ type: "history.cleared";
28
30
  } | {
29
31
  type: "snapshot.created";
30
32
  snapshot: AiAgentSnapshotMeta;
@@ -71,6 +73,7 @@ export declare function useAiAgentSession(options: UseAiAgentSessionOptions): {
71
73
  applyPendingChange: () => Promise<void>;
72
74
  chooseDecision: (choice: AiDecisionChoice, response: AiDecisionResponsePayload) => Promise<void>;
73
75
  clearPendingDecision: () => void;
76
+ clearHistory: () => void;
74
77
  restoreSnapshot: (snapshotId: string) => Promise<void>;
75
78
  send: (message: string, attachments?: AiAgentAttachment[], decisionResponse?: AiDecisionResponsePayload) => Promise<void>;
76
79
  stop: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-theme",
3
- "version": "1.59.3",
3
+ "version": "1.59.5",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"