@lls/vivi 24.1.7-db241c20 → 24.1.7-e05728e4
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/assets/vivi.css +56 -56
- package/lib/index.js +708 -708
- package/package.json +6 -7
package/lib/index.js
CHANGED
|
@@ -294,9 +294,9 @@ var init_mode = __esm({
|
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
|
|
297
|
-
// css-modules:css-modules://
|
|
298
|
-
var
|
|
299
|
-
"css-modules:css-modules://
|
|
297
|
+
// css-modules:css-modules://SiZlRV2YWb1jY5gExVMrYPMZB79ONPQM_B3jhc8NVMM.css
|
|
298
|
+
var init_SiZlRV2YWb1jY5gExVMrYPMZB79ONPQM_B3jhc8NVMM = __esm({
|
|
299
|
+
"css-modules:css-modules://SiZlRV2YWb1jY5gExVMrYPMZB79ONPQM_B3jhc8NVMM.css"() {
|
|
300
300
|
}
|
|
301
301
|
});
|
|
302
302
|
|
|
@@ -305,8 +305,8 @@ var src_components_core_DocumentToolbar_default;
|
|
|
305
305
|
var init_src_components_core_DocumentToolbar = __esm({
|
|
306
306
|
"tmp_esbuild/_src_components_core_DocumentToolbar.module.css"() {
|
|
307
307
|
"use strict";
|
|
308
|
-
|
|
309
|
-
src_components_core_DocumentToolbar_default = { "toggleMenuButton": "vv-JySIna-toggleMenuButton", "
|
|
308
|
+
init_SiZlRV2YWb1jY5gExVMrYPMZB79ONPQM_B3jhc8NVMM();
|
|
309
|
+
src_components_core_DocumentToolbar_default = { "toggleMenuButton": "vv-JySIna-toggleMenuButton", "parentToolbar": "vv-JySIna-parentToolbar", "toolbar": "vv-JySIna-toolbar" };
|
|
310
310
|
}
|
|
311
311
|
});
|
|
312
312
|
|
|
@@ -319,7 +319,7 @@ var init_DocumentToolbar = __esm({
|
|
|
319
319
|
});
|
|
320
320
|
|
|
321
321
|
// src/components/core/DocumentToolbar.tsx
|
|
322
|
-
import {
|
|
322
|
+
import { useCallback, useState } from "react";
|
|
323
323
|
import { Button, Tooltip, Z_DOCUMENT_TOOLBAR } from "@lls/lls-kit";
|
|
324
324
|
import { cx } from "@lls/utils";
|
|
325
325
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -386,50 +386,9 @@ var init_DocumentToolbar2 = __esm({
|
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
|
|
389
|
-
//
|
|
390
|
-
var
|
|
391
|
-
|
|
392
|
-
"src/constants/index.ts"() {
|
|
393
|
-
"use strict";
|
|
394
|
-
VIVI_CLASSNAME = "lls-vivi";
|
|
395
|
-
VIVI_COMPONENT_CLASSNAME_PREFIX = `${VIVI_CLASSNAME}-`;
|
|
396
|
-
DOCUMENT_CLASSNAME = `${VIVI_COMPONENT_CLASSNAME_PREFIX}document-root`;
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
// src/utils/string.ts
|
|
401
|
-
import _8 from "lodash/fp.js";
|
|
402
|
-
var OPENING_TAG_CHAR, ESCAPED_OPENING_TAG_CHAR, CLOSING_TAG_CHAR, removeTrailingNewLines, escapeTags, escapeTagContent;
|
|
403
|
-
var init_string = __esm({
|
|
404
|
-
"src/utils/string.ts"() {
|
|
405
|
-
"use strict";
|
|
406
|
-
OPENING_TAG_CHAR = "<";
|
|
407
|
-
ESCAPED_OPENING_TAG_CHAR = "_<_";
|
|
408
|
-
CLOSING_TAG_CHAR = "</";
|
|
409
|
-
removeTrailingNewLines = _8.replace(/(\r?\n|\r)+$/, "");
|
|
410
|
-
escapeTags = (content) => _8.isString(content) ? content.replace(new RegExp(OPENING_TAG_CHAR, "g"), ESCAPED_OPENING_TAG_CHAR) : content;
|
|
411
|
-
escapeTagContent = (tagName, str) => {
|
|
412
|
-
if (!_8.isString(tagName) || !_8.isString(str))
|
|
413
|
-
return str;
|
|
414
|
-
const tagRegex = /((?:<[^>]+>)|(?:[^<]+))/;
|
|
415
|
-
const tokens = _8.flow(_8.split(tagRegex), _8.compact)(str);
|
|
416
|
-
let out = "";
|
|
417
|
-
let tagDepth = 0;
|
|
418
|
-
for (const token of tokens) {
|
|
419
|
-
if (token.startsWith(`${CLOSING_TAG_CHAR}${tagName}`))
|
|
420
|
-
tagDepth--;
|
|
421
|
-
out += tagDepth > 0 ? escapeTags(token) : token;
|
|
422
|
-
if (token.startsWith(`${OPENING_TAG_CHAR}${tagName}`))
|
|
423
|
-
tagDepth++;
|
|
424
|
-
}
|
|
425
|
-
return out;
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
|
|
430
|
-
// css-modules:css-modules://4JkF5C825c4pv8Vosat9qIwv9j-m3hEXWHpgSlQTM8A.css
|
|
431
|
-
var init_JkF5C825c4pv8Vosat9qIwv9j_m3hEXWHpgSlQTM8A = __esm({
|
|
432
|
-
"css-modules:css-modules://4JkF5C825c4pv8Vosat9qIwv9j-m3hEXWHpgSlQTM8A.css"() {
|
|
389
|
+
// css-modules:css-modules://zZWuUZWdv3guaQJ1cvM0SwHTxY4fYPtYqwbv1rmUg_o.css
|
|
390
|
+
var init_zZWuUZWdv3guaQJ1cvM0SwHTxY4fYPtYqwbv1rmUg_o = __esm({
|
|
391
|
+
"css-modules:css-modules://zZWuUZWdv3guaQJ1cvM0SwHTxY4fYPtYqwbv1rmUg_o.css"() {
|
|
433
392
|
}
|
|
434
393
|
});
|
|
435
394
|
|
|
@@ -438,7 +397,7 @@ var src_components_core_ErrorBoundary_default;
|
|
|
438
397
|
var init_src_components_core_ErrorBoundary = __esm({
|
|
439
398
|
"tmp_esbuild/_src_components_core_ErrorBoundary.module.css"() {
|
|
440
399
|
"use strict";
|
|
441
|
-
|
|
400
|
+
init_zZWuUZWdv3guaQJ1cvM0SwHTxY4fYPtYqwbv1rmUg_o();
|
|
442
401
|
src_components_core_ErrorBoundary_default = { "errorBoundary": "vv-yYzCbG-errorBoundary" };
|
|
443
402
|
}
|
|
444
403
|
});
|
|
@@ -452,7 +411,7 @@ var init_ErrorBoundary = __esm({
|
|
|
452
411
|
});
|
|
453
412
|
|
|
454
413
|
// src/components/core/ErrorBoundary.tsx
|
|
455
|
-
import
|
|
414
|
+
import React from "react";
|
|
456
415
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
457
416
|
var ErrorBoundary, ErrorBoundary_default;
|
|
458
417
|
var init_ErrorBoundary2 = __esm({
|
|
@@ -460,7 +419,7 @@ var init_ErrorBoundary2 = __esm({
|
|
|
460
419
|
"use strict";
|
|
461
420
|
init_mode();
|
|
462
421
|
init_ErrorBoundary();
|
|
463
|
-
ErrorBoundary = class extends
|
|
422
|
+
ErrorBoundary = class extends React.Component {
|
|
464
423
|
constructor(props) {
|
|
465
424
|
super(props);
|
|
466
425
|
this.state = { hasError: false, message: "", componentStack: "" };
|
|
@@ -498,51 +457,68 @@ var init_ErrorBoundary2 = __esm({
|
|
|
498
457
|
}
|
|
499
458
|
});
|
|
500
459
|
|
|
501
|
-
//
|
|
502
|
-
var
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
// tmp_esbuild/_src_components_core_DocumentHtml.module.css
|
|
508
|
-
var src_components_core_DocumentHtml_default;
|
|
509
|
-
var init_src_components_core_DocumentHtml = __esm({
|
|
510
|
-
"tmp_esbuild/_src_components_core_DocumentHtml.module.css"() {
|
|
511
|
-
"use strict";
|
|
512
|
-
init_USCbHsBClfq_o_EYY6_LK_ltjIvQ59gWjolWR2IEo();
|
|
513
|
-
src_components_core_DocumentHtml_default = { "document": "vv-GTaOhq-document" };
|
|
514
|
-
}
|
|
515
|
-
});
|
|
516
|
-
|
|
517
|
-
// src/components/core/DocumentHtml.module.css
|
|
518
|
-
var init_DocumentHtml = __esm({
|
|
519
|
-
"src/components/core/DocumentHtml.module.css"() {
|
|
460
|
+
// src/constants/index.ts
|
|
461
|
+
var VIVI_CLASSNAME, VIVI_COMPONENT_CLASSNAME_PREFIX, DOCUMENT_CLASSNAME;
|
|
462
|
+
var init_constants = __esm({
|
|
463
|
+
"src/constants/index.ts"() {
|
|
520
464
|
"use strict";
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
// css-modules:css-modules://Nn6QZ2dCL6jNXAHejP5TSaMKoN_atqm6Gs_XTxaFR20.css
|
|
526
|
-
var init_Nn6QZ2dCL6jNXAHejP5TSaMKoN_atqm6Gs_XTxaFR20 = __esm({
|
|
527
|
-
"css-modules:css-modules://Nn6QZ2dCL6jNXAHejP5TSaMKoN_atqm6Gs_XTxaFR20.css"() {
|
|
465
|
+
VIVI_CLASSNAME = "lls-vivi";
|
|
466
|
+
VIVI_COMPONENT_CLASSNAME_PREFIX = `${VIVI_CLASSNAME}-`;
|
|
467
|
+
DOCUMENT_CLASSNAME = `${VIVI_COMPONENT_CLASSNAME_PREFIX}document-root`;
|
|
528
468
|
}
|
|
529
469
|
});
|
|
530
470
|
|
|
531
|
-
//
|
|
532
|
-
|
|
533
|
-
var
|
|
534
|
-
|
|
471
|
+
// src/utils/string.ts
|
|
472
|
+
import _8 from "lodash/fp.js";
|
|
473
|
+
var OPENING_TAG_CHAR, ESCAPED_OPENING_TAG_CHAR, CLOSING_TAG_CHAR, removeTrailingNewLines, escapeTags, escapeTagContent;
|
|
474
|
+
var init_string = __esm({
|
|
475
|
+
"src/utils/string.ts"() {
|
|
535
476
|
"use strict";
|
|
536
|
-
|
|
537
|
-
|
|
477
|
+
OPENING_TAG_CHAR = "<";
|
|
478
|
+
ESCAPED_OPENING_TAG_CHAR = "_<_";
|
|
479
|
+
CLOSING_TAG_CHAR = "</";
|
|
480
|
+
removeTrailingNewLines = _8.replace(/(\r?\n|\r)+$/, "");
|
|
481
|
+
escapeTags = (content) => _8.isString(content) ? content.replace(new RegExp(OPENING_TAG_CHAR, "g"), ESCAPED_OPENING_TAG_CHAR) : content;
|
|
482
|
+
escapeTagContent = (tagName, str) => {
|
|
483
|
+
if (!_8.isString(tagName) || !_8.isString(str))
|
|
484
|
+
return str;
|
|
485
|
+
const tagRegex = /((?:<[^>]+>)|(?:[^<]+))/;
|
|
486
|
+
const tokens = _8.flow(_8.split(tagRegex), _8.compact)(str);
|
|
487
|
+
let out = "";
|
|
488
|
+
let tagDepth = 0;
|
|
489
|
+
for (const token of tokens) {
|
|
490
|
+
if (token.startsWith(`${CLOSING_TAG_CHAR}${tagName}`))
|
|
491
|
+
tagDepth--;
|
|
492
|
+
out += tagDepth > 0 ? escapeTags(token) : token;
|
|
493
|
+
if (token.startsWith(`${OPENING_TAG_CHAR}${tagName}`))
|
|
494
|
+
tagDepth++;
|
|
495
|
+
}
|
|
496
|
+
return out;
|
|
497
|
+
};
|
|
538
498
|
}
|
|
539
499
|
});
|
|
540
500
|
|
|
541
|
-
// src/
|
|
542
|
-
var
|
|
543
|
-
|
|
501
|
+
// src/constants/grid.ts
|
|
502
|
+
var GRID_ZONES_COLORS, ILLUSTRATION_ASPECT_RATIO;
|
|
503
|
+
var init_grid = __esm({
|
|
504
|
+
"src/constants/grid.ts"() {
|
|
544
505
|
"use strict";
|
|
545
|
-
|
|
506
|
+
GRID_ZONES_COLORS = [
|
|
507
|
+
"var(--primary-40-color)",
|
|
508
|
+
"var(--secondary-40-color)",
|
|
509
|
+
"var(--premium-40-color)",
|
|
510
|
+
"var(--green-40-color)",
|
|
511
|
+
"var(--purple-40-color)",
|
|
512
|
+
"var(--orange-40-color)",
|
|
513
|
+
"var(--gray-40-color)",
|
|
514
|
+
"var(--primary-70-color)",
|
|
515
|
+
"var(--secondary-70-color)",
|
|
516
|
+
"var(--premium-70-color)",
|
|
517
|
+
"var(--green-70-color)",
|
|
518
|
+
"var(--purple-70-color)",
|
|
519
|
+
"var(--orange-70-color)"
|
|
520
|
+
];
|
|
521
|
+
ILLUSTRATION_ASPECT_RATIO = 3149 / 2126;
|
|
546
522
|
}
|
|
547
523
|
});
|
|
548
524
|
|
|
@@ -557,51 +533,27 @@ var init_url = __esm({
|
|
|
557
533
|
}
|
|
558
534
|
});
|
|
559
535
|
|
|
560
|
-
// css-modules:css-modules://
|
|
561
|
-
var
|
|
562
|
-
"css-modules:css-modules://
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
|
|
566
|
-
// tmp_esbuild/_src_components_primarygrid_ZonesMaker.module.css
|
|
567
|
-
var src_components_primarygrid_ZonesMaker_default;
|
|
568
|
-
var init_src_components_primarygrid_ZonesMaker = __esm({
|
|
569
|
-
"tmp_esbuild/_src_components_primarygrid_ZonesMaker.module.css"() {
|
|
570
|
-
"use strict";
|
|
571
|
-
init_E8q_Xr1n2R9Y3XOpQIwBbolIOMDkNminpn6uEP1O3G4();
|
|
572
|
-
src_components_primarygrid_ZonesMaker_default = { "zoneMaker": "vv-WzhmXa-zoneMaker", "pictureZone": "vv-WzhmXa-pictureZone", "handle": "vv-WzhmXa-handle" };
|
|
536
|
+
// css-modules:css-modules://vFzhiihuB7Z8HMP8oT-qcw0NyCnSgKQtL5TqEfjnBaQ.css
|
|
537
|
+
var init_vFzhiihuB7Z8HMP8oT_qcw0NyCnSgKQtL5TqEfjnBaQ = __esm({
|
|
538
|
+
"css-modules:css-modules://vFzhiihuB7Z8HMP8oT-qcw0NyCnSgKQtL5TqEfjnBaQ.css"() {
|
|
573
539
|
}
|
|
574
540
|
});
|
|
575
541
|
|
|
576
|
-
//
|
|
577
|
-
var
|
|
578
|
-
|
|
542
|
+
// tmp_esbuild/_src_components_primarygrid_EditGrid.module.css
|
|
543
|
+
var src_components_primarygrid_EditGrid_default;
|
|
544
|
+
var init_src_components_primarygrid_EditGrid = __esm({
|
|
545
|
+
"tmp_esbuild/_src_components_primarygrid_EditGrid.module.css"() {
|
|
579
546
|
"use strict";
|
|
580
|
-
|
|
547
|
+
init_vFzhiihuB7Z8HMP8oT_qcw0NyCnSgKQtL5TqEfjnBaQ();
|
|
548
|
+
src_components_primarygrid_EditGrid_default = { "col": "vv-WWJSSq-col", "zonePicture": "vv-WWJSSq-zonePicture", "interface": "vv-WWJSSq-interface", "zone": "vv-WWJSSq-zone", "editGrid": "vv-WWJSSq-editGrid", "layout": "vv-WWJSSq-layout", "addZone": "vv-WWJSSq-addZone", "row": "vv-WWJSSq-row", "interfaceHeader": "vv-WWJSSq-interfaceHeader" };
|
|
581
549
|
}
|
|
582
550
|
});
|
|
583
551
|
|
|
584
|
-
// src/
|
|
585
|
-
var
|
|
586
|
-
|
|
587
|
-
"src/constants/grid.ts"() {
|
|
552
|
+
// src/components/primarygrid/EditGrid.module.css
|
|
553
|
+
var init_EditGrid = __esm({
|
|
554
|
+
"src/components/primarygrid/EditGrid.module.css"() {
|
|
588
555
|
"use strict";
|
|
589
|
-
|
|
590
|
-
"var(--primary-40-color)",
|
|
591
|
-
"var(--secondary-40-color)",
|
|
592
|
-
"var(--premium-40-color)",
|
|
593
|
-
"var(--green-40-color)",
|
|
594
|
-
"var(--purple-40-color)",
|
|
595
|
-
"var(--orange-40-color)",
|
|
596
|
-
"var(--gray-40-color)",
|
|
597
|
-
"var(--primary-70-color)",
|
|
598
|
-
"var(--secondary-70-color)",
|
|
599
|
-
"var(--premium-70-color)",
|
|
600
|
-
"var(--green-70-color)",
|
|
601
|
-
"var(--purple-70-color)",
|
|
602
|
-
"var(--orange-70-color)"
|
|
603
|
-
];
|
|
604
|
-
ILLUSTRATION_ASPECT_RATIO = 3149 / 2126;
|
|
556
|
+
init_src_components_primarygrid_EditGrid();
|
|
605
557
|
}
|
|
606
558
|
});
|
|
607
559
|
|
|
@@ -770,18 +722,42 @@ var init_zoneMaker2 = __esm({
|
|
|
770
722
|
}
|
|
771
723
|
});
|
|
772
724
|
|
|
725
|
+
// css-modules:css-modules://27imZi27_UCk5xmhRkGJbtYm5sGwf0_-1B99-Xe1fxg.css
|
|
726
|
+
var init_imZi27_UCk5xmhRkGJbtYm5sGwf0_1B99_Xe1fxg = __esm({
|
|
727
|
+
"css-modules:css-modules://27imZi27_UCk5xmhRkGJbtYm5sGwf0_-1B99-Xe1fxg.css"() {
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
// tmp_esbuild/_src_components_primarygrid_ZonesMaker.module.css
|
|
732
|
+
var src_components_primarygrid_ZonesMaker_default;
|
|
733
|
+
var init_src_components_primarygrid_ZonesMaker = __esm({
|
|
734
|
+
"tmp_esbuild/_src_components_primarygrid_ZonesMaker.module.css"() {
|
|
735
|
+
"use strict";
|
|
736
|
+
init_imZi27_UCk5xmhRkGJbtYm5sGwf0_1B99_Xe1fxg();
|
|
737
|
+
src_components_primarygrid_ZonesMaker_default = { "handle": "vv-WzhmXa-handle", "zoneMaker": "vv-WzhmXa-zoneMaker", "pictureZone": "vv-WzhmXa-pictureZone" };
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
// src/components/primarygrid/ZonesMaker.module.css
|
|
742
|
+
var init_ZonesMaker = __esm({
|
|
743
|
+
"src/components/primarygrid/ZonesMaker.module.css"() {
|
|
744
|
+
"use strict";
|
|
745
|
+
init_src_components_primarygrid_ZonesMaker();
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
|
|
773
749
|
// src/components/primarygrid/ZonesMaker.tsx
|
|
774
|
-
import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
775
750
|
import { getClientPosition } from "@lls/utils";
|
|
751
|
+
import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
|
|
776
752
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
777
753
|
var ZonesMaker, ZonesMaker_default;
|
|
778
754
|
var init_ZonesMaker2 = __esm({
|
|
779
755
|
"src/components/primarygrid/ZonesMaker.tsx"() {
|
|
780
756
|
"use strict";
|
|
781
|
-
init_ZonesMaker();
|
|
782
757
|
init_grid();
|
|
783
758
|
init_zoneMaker();
|
|
784
759
|
init_zoneMaker2();
|
|
760
|
+
init_ZonesMaker();
|
|
785
761
|
ZonesMaker = ({ pictureUrl, zones, onChangeZone }) => {
|
|
786
762
|
const ref = useRef(null);
|
|
787
763
|
const [transformationData, setTransformationData] = useState2(void 0);
|
|
@@ -878,18 +854,18 @@ var init_ZonesMaker2 = __esm({
|
|
|
878
854
|
});
|
|
879
855
|
|
|
880
856
|
// src/components/primarygrid/EditGrid.tsx
|
|
881
|
-
import { useCallback as useCallback2, useEffect as useEffect3, useState as useState3 } from "react";
|
|
882
857
|
import { Button as Button2, FlexibleGrid, TextField } from "@lls/lls-kit";
|
|
858
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useState as useState3 } from "react";
|
|
883
859
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
884
860
|
var EditGrid, EditGrid_default;
|
|
885
861
|
var init_EditGrid2 = __esm({
|
|
886
862
|
"src/components/primarygrid/EditGrid.tsx"() {
|
|
887
863
|
"use strict";
|
|
864
|
+
init_grid();
|
|
888
865
|
init_store();
|
|
889
|
-
init_EditGrid();
|
|
890
866
|
init_url();
|
|
867
|
+
init_EditGrid();
|
|
891
868
|
init_ZonesMaker2();
|
|
892
|
-
init_grid();
|
|
893
869
|
EditGrid = ({ children, picture }) => {
|
|
894
870
|
const { addPicture, addDocument, updateLayouts, deleteDocument, layouts } = useReadMdRendererProps([
|
|
895
871
|
"layouts",
|
|
@@ -908,7 +884,7 @@ var init_EditGrid2 = __esm({
|
|
|
908
884
|
addPicture(picValue ?? "");
|
|
909
885
|
};
|
|
910
886
|
const onUpdateLayoutItemProp = (id, prop, value) => {
|
|
911
|
-
const parsedValue = parseFloat(value);
|
|
887
|
+
const parsedValue = Number.parseFloat(value);
|
|
912
888
|
setLayoutItems((prev) => ({
|
|
913
889
|
items: prev.items.map((item) => item.id === id ? { ...item, [prop]: Number.isNaN(parsedValue) ? 0 : parsedValue } : item),
|
|
914
890
|
draft: true
|
|
@@ -999,9 +975,9 @@ var init_EditGrid2 = __esm({
|
|
|
999
975
|
}
|
|
1000
976
|
});
|
|
1001
977
|
|
|
1002
|
-
// css-modules:css-modules://
|
|
1003
|
-
var
|
|
1004
|
-
"css-modules:css-modules://
|
|
978
|
+
// css-modules:css-modules://INxu5dk73JTxjtEzrQ83WOJDTfp5b5jZD8ZfkbKQHIA.css
|
|
979
|
+
var init_INxu5dk73JTxjtEzrQ83WOJDTfp5b5jZD8ZfkbKQHIA = __esm({
|
|
980
|
+
"css-modules:css-modules://INxu5dk73JTxjtEzrQ83WOJDTfp5b5jZD8ZfkbKQHIA.css"() {
|
|
1005
981
|
}
|
|
1006
982
|
});
|
|
1007
983
|
|
|
@@ -1010,8 +986,8 @@ var src_components_primarygrid_ViewGrid_default;
|
|
|
1010
986
|
var init_src_components_primarygrid_ViewGrid = __esm({
|
|
1011
987
|
"tmp_esbuild/_src_components_primarygrid_ViewGrid.module.css"() {
|
|
1012
988
|
"use strict";
|
|
1013
|
-
|
|
1014
|
-
src_components_primarygrid_ViewGrid_default = { "
|
|
989
|
+
init_INxu5dk73JTxjtEzrQ83WOJDTfp5b5jZD8ZfkbKQHIA();
|
|
990
|
+
src_components_primarygrid_ViewGrid_default = { "illu": "vv-TauroG-illu", "pictureZone": "vv-TauroG-pictureZone", "viewGrid": "vv-TauroG-viewGrid" };
|
|
1015
991
|
}
|
|
1016
992
|
});
|
|
1017
993
|
|
|
@@ -1029,10 +1005,10 @@ var ViewGrid, ViewGrid_default;
|
|
|
1029
1005
|
var init_ViewGrid2 = __esm({
|
|
1030
1006
|
"src/components/primarygrid/ViewGrid.tsx"() {
|
|
1031
1007
|
"use strict";
|
|
1008
|
+
init_grid();
|
|
1032
1009
|
init_store();
|
|
1033
|
-
init_ViewGrid();
|
|
1034
1010
|
init_url();
|
|
1035
|
-
|
|
1011
|
+
init_ViewGrid();
|
|
1036
1012
|
ViewGrid = ({ children, picture }) => {
|
|
1037
1013
|
const { layouts } = useReadMdRendererProps(["layouts"]);
|
|
1038
1014
|
return /* @__PURE__ */ jsxs5("div", { className: src_components_primarygrid_ViewGrid_default.viewGrid, style: { "--v-grid-picture-aspect-ratio": ILLUSTRATION_ASPECT_RATIO }, children: [
|
|
@@ -1080,8 +1056,32 @@ var init_Grid = __esm({
|
|
|
1080
1056
|
}
|
|
1081
1057
|
});
|
|
1082
1058
|
|
|
1059
|
+
// css-modules:css-modules://8Bws6tfkpio6klj_RtRC_R7kDQ_jPBbqtQQfWJr6y_4.css
|
|
1060
|
+
var init_Bws6tfkpio6klj_RtRC_R7kDQ_jPBbqtQQfWJr6y_4 = __esm({
|
|
1061
|
+
"css-modules:css-modules://8Bws6tfkpio6klj_RtRC_R7kDQ_jPBbqtQQfWJr6y_4.css"() {
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
// tmp_esbuild/_src_components_core_DocumentHtml.module.css
|
|
1066
|
+
var src_components_core_DocumentHtml_default;
|
|
1067
|
+
var init_src_components_core_DocumentHtml = __esm({
|
|
1068
|
+
"tmp_esbuild/_src_components_core_DocumentHtml.module.css"() {
|
|
1069
|
+
"use strict";
|
|
1070
|
+
init_Bws6tfkpio6klj_RtRC_R7kDQ_jPBbqtQQfWJr6y_4();
|
|
1071
|
+
src_components_core_DocumentHtml_default = { "document": "vv-GTaOhq-document" };
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
// src/components/core/DocumentHtml.module.css
|
|
1076
|
+
var init_DocumentHtml = __esm({
|
|
1077
|
+
"src/components/core/DocumentHtml.module.css"() {
|
|
1078
|
+
"use strict";
|
|
1079
|
+
init_src_components_core_DocumentHtml();
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
1083
|
// src/components/core/DocumentHtml.tsx
|
|
1084
|
-
import
|
|
1084
|
+
import React2, { memo, useRef as useRef2 } from "react";
|
|
1085
1085
|
import HtmlToReact from "html-to-react";
|
|
1086
1086
|
import _10 from "lodash/fp.js";
|
|
1087
1087
|
import { cx as cx2 } from "@lls/utils";
|
|
@@ -1091,18 +1091,18 @@ var init_DocumentHtml2 = __esm({
|
|
|
1091
1091
|
"src/components/core/DocumentHtml.tsx"() {
|
|
1092
1092
|
"use strict";
|
|
1093
1093
|
init_DocumentToolbar2();
|
|
1094
|
+
init_ErrorBoundary2();
|
|
1094
1095
|
init_constants();
|
|
1095
1096
|
init_store();
|
|
1096
1097
|
init_dom();
|
|
1097
1098
|
init_memo();
|
|
1098
1099
|
init_string();
|
|
1099
|
-
init_ErrorBoundary2();
|
|
1100
|
-
init_DocumentHtml();
|
|
1101
1100
|
init_Grid();
|
|
1101
|
+
init_DocumentHtml();
|
|
1102
1102
|
htmlToReactParser = new HtmlToReact.Parser({
|
|
1103
1103
|
recognizeSelfClosing: true
|
|
1104
1104
|
});
|
|
1105
|
-
processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions(
|
|
1105
|
+
processNodeDefinitions = new HtmlToReact.ProcessNodeDefinitions(React2);
|
|
1106
1106
|
MemoToolbar = memo(({ toolbarProps: props, docJson }) => {
|
|
1107
1107
|
const compactMode = _10.get("compactMode", props);
|
|
1108
1108
|
const openEditor = _10.get("openEditor", props);
|
|
@@ -1144,7 +1144,7 @@ var init_DocumentHtml2 = __esm({
|
|
|
1144
1144
|
shouldProcessNode: _10.matchesProperty("name", nodeName),
|
|
1145
1145
|
processNode: handler
|
|
1146
1146
|
});
|
|
1147
|
-
const
|
|
1147
|
+
const _shortTag = (name, Component, props = {}, mapAttributes = _10.identity) => {
|
|
1148
1148
|
return tag(name, (node, children, key) => /* @__PURE__ */ jsx7(Component, { ...mapAttributes(node.attribs), children, ...props }, key));
|
|
1149
1149
|
};
|
|
1150
1150
|
return [
|
|
@@ -1177,9 +1177,9 @@ var init_DocumentHtml2 = __esm({
|
|
|
1177
1177
|
}
|
|
1178
1178
|
});
|
|
1179
1179
|
|
|
1180
|
-
// css-modules:css-modules://
|
|
1181
|
-
var
|
|
1182
|
-
"css-modules:css-modules://
|
|
1180
|
+
// css-modules:css-modules://kTdLFWdq92OvhQjGBgoqbpa-uWI0Nagw0W33VXQfA9A.css
|
|
1181
|
+
var init_kTdLFWdq92OvhQjGBgoqbpa_uWI0Nagw0W33VXQfA9A = __esm({
|
|
1182
|
+
"css-modules:css-modules://kTdLFWdq92OvhQjGBgoqbpa-uWI0Nagw0W33VXQfA9A.css"() {
|
|
1183
1183
|
}
|
|
1184
1184
|
});
|
|
1185
1185
|
|
|
@@ -1188,7 +1188,7 @@ var src_components_core_Document_default;
|
|
|
1188
1188
|
var init_src_components_core_Document = __esm({
|
|
1189
1189
|
"tmp_esbuild/_src_components_core_Document.module.css"() {
|
|
1190
1190
|
"use strict";
|
|
1191
|
-
|
|
1191
|
+
init_kTdLFWdq92OvhQjGBgoqbpa_uWI0Nagw0W33VXQfA9A();
|
|
1192
1192
|
src_components_core_Document_default = { "rootDocument": "vv--ZTaFW-rootDocument", "divSearch": "vv--ZTaFW-divSearch" };
|
|
1193
1193
|
}
|
|
1194
1194
|
});
|
|
@@ -1203,7 +1203,7 @@ var init_Document = __esm({
|
|
|
1203
1203
|
|
|
1204
1204
|
// src/components/core/Document.tsx
|
|
1205
1205
|
import _11 from "lodash/fp.js";
|
|
1206
|
-
import
|
|
1206
|
+
import React3 from "react";
|
|
1207
1207
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1208
1208
|
var Document, RootDocument, Document_default;
|
|
1209
1209
|
var init_Document2 = __esm({
|
|
@@ -1215,7 +1215,7 @@ var init_Document2 = __esm({
|
|
|
1215
1215
|
return /* @__PURE__ */ jsx8(DocumentHtml_default, { toolbarProps, mdRendererProps, docJson });
|
|
1216
1216
|
};
|
|
1217
1217
|
Document.displayName = "Document";
|
|
1218
|
-
RootDocument =
|
|
1218
|
+
RootDocument = React3.forwardRef(({ docJson = {}, toolbarProps, mdRendererProps }, ref) => {
|
|
1219
1219
|
const children = _11.getOr([], "children", docJson);
|
|
1220
1220
|
return /* @__PURE__ */ jsx8("div", { className: src_components_core_Document_default.rootDocument, ref, children: /* @__PURE__ */ jsx8(
|
|
1221
1221
|
DocumentHtml_default,
|
|
@@ -1241,9 +1241,9 @@ var init_Document2 = __esm({
|
|
|
1241
1241
|
}
|
|
1242
1242
|
});
|
|
1243
1243
|
|
|
1244
|
-
// css-modules:css-modules://
|
|
1245
|
-
var
|
|
1246
|
-
"css-modules:css-modules://
|
|
1244
|
+
// css-modules:css-modules://Ef1FR8r0TZLJbQLu_YjOXfH5QGvXBuqIuVcDNrn2dlo.css
|
|
1245
|
+
var init_Ef1FR8r0TZLJbQLu_YjOXfH5QGvXBuqIuVcDNrn2dlo = __esm({
|
|
1246
|
+
"css-modules:css-modules://Ef1FR8r0TZLJbQLu_YjOXfH5QGvXBuqIuVcDNrn2dlo.css"() {
|
|
1247
1247
|
}
|
|
1248
1248
|
});
|
|
1249
1249
|
|
|
@@ -1251,7 +1251,7 @@ var init_qc8hHnFyo6Lr96_0ShIiN5V_2JCgy_z_WPzO51QaEM0 = __esm({
|
|
|
1251
1251
|
var init_src_styles_Codemirror = __esm({
|
|
1252
1252
|
"tmp_esbuild/_src_styles_Codemirror.module.css"() {
|
|
1253
1253
|
"use strict";
|
|
1254
|
-
|
|
1254
|
+
init_Ef1FR8r0TZLJbQLu_YjOXfH5QGvXBuqIuVcDNrn2dlo();
|
|
1255
1255
|
}
|
|
1256
1256
|
});
|
|
1257
1257
|
|
|
@@ -1263,9 +1263,9 @@ var init_Codemirror = __esm({
|
|
|
1263
1263
|
}
|
|
1264
1264
|
});
|
|
1265
1265
|
|
|
1266
|
-
// css-modules:css-modules
|
|
1267
|
-
var
|
|
1268
|
-
"css-modules:css-modules
|
|
1266
|
+
// css-modules:css-modules://-ADr1fQ65axwxa_akiSkLSAd8UytGnzX8BkDH_z6IJg.css
|
|
1267
|
+
var init_ADr1fQ65axwxa_akiSkLSAd8UytGnzX8BkDH_z6IJg = __esm({
|
|
1268
|
+
"css-modules:css-modules://-ADr1fQ65axwxa_akiSkLSAd8UytGnzX8BkDH_z6IJg.css"() {
|
|
1269
1269
|
}
|
|
1270
1270
|
});
|
|
1271
1271
|
|
|
@@ -1274,8 +1274,8 @@ var src_components_core_viewer_ViewerMd_default;
|
|
|
1274
1274
|
var init_src_components_core_viewer_ViewerMd = __esm({
|
|
1275
1275
|
"tmp_esbuild/_src_components_core_viewer_ViewerMd.module.css"() {
|
|
1276
1276
|
"use strict";
|
|
1277
|
-
|
|
1278
|
-
src_components_core_viewer_ViewerMd_default = { "
|
|
1277
|
+
init_ADr1fQ65axwxa_akiSkLSAd8UytGnzX8BkDH_z6IJg();
|
|
1278
|
+
src_components_core_viewer_ViewerMd_default = { "viewer": "vv-j3jlxa-viewer kit-themecss", "viewerInner": "vv-j3jlxa-viewerInner" };
|
|
1279
1279
|
}
|
|
1280
1280
|
});
|
|
1281
1281
|
|
|
@@ -1288,9 +1288,9 @@ var init_ViewerMd = __esm({
|
|
|
1288
1288
|
});
|
|
1289
1289
|
|
|
1290
1290
|
// src/components/core/viewer/ViewerMd.tsx
|
|
1291
|
-
import
|
|
1292
|
-
import _12 from "lodash/fp.js";
|
|
1291
|
+
import React4, { useRef as useRef3, useCallback as useCallback3, useMemo } from "react";
|
|
1293
1292
|
import { styleThemeProps } from "@lls/lls-kit";
|
|
1293
|
+
import _12 from "lodash/fp.js";
|
|
1294
1294
|
import { cx as cx3 } from "@lls/utils";
|
|
1295
1295
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1296
1296
|
var getMdRendererProps, ViewerMd, ViewerMd_default;
|
|
@@ -1302,10 +1302,10 @@ var init_ViewerMd2 = __esm({
|
|
|
1302
1302
|
init_template();
|
|
1303
1303
|
init_Document2();
|
|
1304
1304
|
init_Codemirror();
|
|
1305
|
-
init_ViewerMd();
|
|
1306
1305
|
init_constants();
|
|
1306
|
+
init_ViewerMd();
|
|
1307
1307
|
getMdRendererProps = _12.pick(["isOffline", "isTouchable", "wasSsrRendered", "picture"]);
|
|
1308
|
-
ViewerMd =
|
|
1308
|
+
ViewerMd = React4.forwardRef(
|
|
1309
1309
|
({
|
|
1310
1310
|
template = {},
|
|
1311
1311
|
addPicture = _12.noop,
|
|
@@ -1390,7 +1390,7 @@ var init_ViewerMd2 = __esm({
|
|
|
1390
1390
|
});
|
|
1391
1391
|
|
|
1392
1392
|
// src/components/core/editor/EditViewerMd.tsx
|
|
1393
|
-
import
|
|
1393
|
+
import React5, { useCallback as useCallback4 } from "react";
|
|
1394
1394
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1395
1395
|
var EditViewerMd, EditViewerMd_default;
|
|
1396
1396
|
var init_EditViewerMd = __esm({
|
|
@@ -1398,7 +1398,7 @@ var init_EditViewerMd = __esm({
|
|
|
1398
1398
|
"use strict";
|
|
1399
1399
|
init_ViewerMd2();
|
|
1400
1400
|
init_template();
|
|
1401
|
-
EditViewerMd =
|
|
1401
|
+
EditViewerMd = React5.forwardRef(({ template, onChange, ...props }, ref) => {
|
|
1402
1402
|
const addDocument = useCallback4(
|
|
1403
1403
|
(docInfos) => {
|
|
1404
1404
|
onChange((template2) => addDocumentToTemplate(template2, docInfos));
|
|
@@ -1441,54 +1441,342 @@ var init_EditViewerMd = __esm({
|
|
|
1441
1441
|
}
|
|
1442
1442
|
});
|
|
1443
1443
|
|
|
1444
|
-
//
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
var init_useClientMounted = __esm({
|
|
1448
|
-
"src/hooks/useClientMounted.tsx"() {
|
|
1449
|
-
"use strict";
|
|
1450
|
-
useClientMounted = () => {
|
|
1451
|
-
const [mounted, setMounted] = useState4(false);
|
|
1452
|
-
useEffect4(() => {
|
|
1453
|
-
setMounted(true);
|
|
1454
|
-
}, []);
|
|
1455
|
-
return mounted;
|
|
1456
|
-
};
|
|
1457
|
-
useClientMounted_default = useClientMounted;
|
|
1444
|
+
// css-modules:css-modules://muFZYOO33Vml22ha9RBNYCIyflFehN2jLe0x7J_g3tk.css
|
|
1445
|
+
var init_muFZYOO33Vml22ha9RBNYCIyflFehN2jLe0x7J_g3tk = __esm({
|
|
1446
|
+
"css-modules:css-modules://muFZYOO33Vml22ha9RBNYCIyflFehN2jLe0x7J_g3tk.css"() {
|
|
1458
1447
|
}
|
|
1459
1448
|
});
|
|
1460
1449
|
|
|
1461
|
-
//
|
|
1462
|
-
var
|
|
1463
|
-
var
|
|
1464
|
-
"
|
|
1450
|
+
// tmp_esbuild/_home_ec2-user_actions-runner__work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize.module.css
|
|
1451
|
+
var home_ec2_user_actions_runner_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default;
|
|
1452
|
+
var init_home_ec2_user_actions_runner_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize = __esm({
|
|
1453
|
+
"tmp_esbuild/_home_ec2-user_actions-runner__work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize.module.css"() {
|
|
1465
1454
|
"use strict";
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
return { default: m.default.default };
|
|
1469
|
-
}
|
|
1470
|
-
return { default: m.default };
|
|
1471
|
-
};
|
|
1455
|
+
init_muFZYOO33Vml22ha9RBNYCIyflFehN2jLe0x7J_g3tk();
|
|
1456
|
+
home_ec2_user_actions_runner_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default = { "handle": "vv-o5bldq-handle" };
|
|
1472
1457
|
}
|
|
1473
1458
|
});
|
|
1474
1459
|
|
|
1475
|
-
//
|
|
1476
|
-
var
|
|
1477
|
-
"
|
|
1478
|
-
}
|
|
1479
|
-
});
|
|
1480
|
-
|
|
1481
|
-
// tmp_esbuild/_src_components_lazy_CodemirrorEditor.browser.module.css
|
|
1482
|
-
var src_components_lazy_CodemirrorEditor_browser_default;
|
|
1483
|
-
var init_src_components_lazy_CodemirrorEditor_browser = __esm({
|
|
1484
|
-
"tmp_esbuild/_src_components_lazy_CodemirrorEditor.browser.module.css"() {
|
|
1460
|
+
// ../viewer/src/hooks/useDragAndResize.module.css
|
|
1461
|
+
var init_useDragAndResize = __esm({
|
|
1462
|
+
"../viewer/src/hooks/useDragAndResize.module.css"() {
|
|
1485
1463
|
"use strict";
|
|
1486
|
-
|
|
1487
|
-
src_components_lazy_CodemirrorEditor_browser_default = { "codemirrorWrapper": "vv-E1cuPG-codemirrorWrapper" };
|
|
1464
|
+
init_home_ec2_user_actions_runner_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize();
|
|
1488
1465
|
}
|
|
1489
1466
|
});
|
|
1490
1467
|
|
|
1491
|
-
// src/
|
|
1468
|
+
// ../viewer/src/hooks/useDragAndResize.tsx
|
|
1469
|
+
import { useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
|
|
1470
|
+
import _13 from "lodash/fp.js";
|
|
1471
|
+
import { Fragment, jsx as jsx11 } from "react/jsx-runtime";
|
|
1472
|
+
var resizeHandlersProps, useDragAndResize, useDragAndResize_default;
|
|
1473
|
+
var init_useDragAndResize2 = __esm({
|
|
1474
|
+
"../viewer/src/hooks/useDragAndResize.tsx"() {
|
|
1475
|
+
"use strict";
|
|
1476
|
+
init_useDragAndResize();
|
|
1477
|
+
resizeHandlersProps = [
|
|
1478
|
+
{
|
|
1479
|
+
top: "-5px",
|
|
1480
|
+
right: "0",
|
|
1481
|
+
bottom: "calc(100% - 5px)",
|
|
1482
|
+
left: "0",
|
|
1483
|
+
cursor: "row-resize",
|
|
1484
|
+
resizingProps: {
|
|
1485
|
+
shouldSizeX: false,
|
|
1486
|
+
shouldSizeY: true,
|
|
1487
|
+
shouldMoveX: false,
|
|
1488
|
+
shouldMoveY: true
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
top: "0",
|
|
1493
|
+
right: "-5px",
|
|
1494
|
+
bottom: "0",
|
|
1495
|
+
left: "calc(100% - 5px)",
|
|
1496
|
+
cursor: "col-resize",
|
|
1497
|
+
resizingProps: {
|
|
1498
|
+
shouldSizeX: true,
|
|
1499
|
+
shouldSizeY: false,
|
|
1500
|
+
shouldMoveX: false,
|
|
1501
|
+
shouldMoveY: false
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
top: "calc(100% - 5px)",
|
|
1506
|
+
right: "0",
|
|
1507
|
+
bottom: "-5px",
|
|
1508
|
+
left: "0",
|
|
1509
|
+
cursor: "row-resize",
|
|
1510
|
+
resizingProps: {
|
|
1511
|
+
shouldSizeX: false,
|
|
1512
|
+
shouldSizeY: true,
|
|
1513
|
+
shouldMoveX: false,
|
|
1514
|
+
shouldMoveY: false
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
top: "0",
|
|
1519
|
+
right: "calc(100% - 5px)",
|
|
1520
|
+
bottom: "0",
|
|
1521
|
+
left: "-5px",
|
|
1522
|
+
cursor: "col-resize",
|
|
1523
|
+
resizingProps: {
|
|
1524
|
+
shouldSizeX: true,
|
|
1525
|
+
shouldSizeY: false,
|
|
1526
|
+
shouldMoveX: true,
|
|
1527
|
+
shouldMoveY: false
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
// corners
|
|
1531
|
+
{
|
|
1532
|
+
top: "-10px",
|
|
1533
|
+
right: "-10px",
|
|
1534
|
+
bottom: "calc(100% - 10px)",
|
|
1535
|
+
left: "calc(100% - 10px)",
|
|
1536
|
+
cursor: "ne-resize",
|
|
1537
|
+
resizingProps: {
|
|
1538
|
+
shouldSizeX: true,
|
|
1539
|
+
shouldSizeY: true,
|
|
1540
|
+
shouldMoveX: false,
|
|
1541
|
+
shouldMoveY: true
|
|
1542
|
+
}
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
top: "calc(100% - 10px)",
|
|
1546
|
+
right: "-10px",
|
|
1547
|
+
bottom: "-10px",
|
|
1548
|
+
left: "calc(100% - 10px)",
|
|
1549
|
+
cursor: "se-resize",
|
|
1550
|
+
resizingProps: {
|
|
1551
|
+
shouldSizeX: true,
|
|
1552
|
+
shouldSizeY: true,
|
|
1553
|
+
shouldMoveX: false,
|
|
1554
|
+
shouldMoveY: false
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
top: "calc(100% - 10px)",
|
|
1559
|
+
right: "calc(100% - 10px)",
|
|
1560
|
+
bottom: "-10px",
|
|
1561
|
+
left: "-10px",
|
|
1562
|
+
cursor: "sw-resize",
|
|
1563
|
+
resizingProps: {
|
|
1564
|
+
shouldSizeX: true,
|
|
1565
|
+
shouldSizeY: true,
|
|
1566
|
+
shouldMoveX: true,
|
|
1567
|
+
shouldMoveY: false
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
top: "-10px",
|
|
1572
|
+
right: "calc(100% - 10px)",
|
|
1573
|
+
bottom: "calc(100% - 10px)",
|
|
1574
|
+
left: "-10px",
|
|
1575
|
+
cursor: "nw-resize",
|
|
1576
|
+
resizingProps: {
|
|
1577
|
+
shouldSizeX: true,
|
|
1578
|
+
shouldSizeY: true,
|
|
1579
|
+
shouldMoveX: true,
|
|
1580
|
+
shouldMoveY: true
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
];
|
|
1584
|
+
useDragAndResize = ({ defaultPositions, defaultSize = {}, onResize, canResize = true }) => {
|
|
1585
|
+
const rndRef = useRef4(null);
|
|
1586
|
+
const defaultWidth = defaultSize.width || 0;
|
|
1587
|
+
const defaultHeight = defaultSize.height || 0;
|
|
1588
|
+
const [size, setSize] = useState4({
|
|
1589
|
+
height: defaultHeight,
|
|
1590
|
+
width: defaultWidth
|
|
1591
|
+
});
|
|
1592
|
+
const [resizingData, setResizingData] = useState4({
|
|
1593
|
+
isActive: false,
|
|
1594
|
+
shouldSizeX: false,
|
|
1595
|
+
shouldSizeY: false,
|
|
1596
|
+
shouldMoveX: false,
|
|
1597
|
+
shouldMoveY: false
|
|
1598
|
+
});
|
|
1599
|
+
const positionX = _13.getOr(0, "x", defaultPositions);
|
|
1600
|
+
const bodyWidth = _13.getOr(0, "body.offsetWidth", document);
|
|
1601
|
+
const x = positionX + defaultWidth > bodyWidth ? positionX - defaultWidth : positionX;
|
|
1602
|
+
const [translateData, setTranslateData] = useState4({
|
|
1603
|
+
isActive: false,
|
|
1604
|
+
x,
|
|
1605
|
+
y: _13.getOr(0, "y", defaultPositions)
|
|
1606
|
+
});
|
|
1607
|
+
useEffect4(() => {
|
|
1608
|
+
if (translateData.isActive) {
|
|
1609
|
+
const onMouseUp = () => setTranslateData(_13.set("isActive", false));
|
|
1610
|
+
const onMouseMove = (e) => setTranslateData(({ x: x2, y, ...translateData2 }) => ({
|
|
1611
|
+
...translateData2,
|
|
1612
|
+
x: x2 + e.movementX,
|
|
1613
|
+
y: y + e.movementY
|
|
1614
|
+
}));
|
|
1615
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
1616
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
1617
|
+
return () => {
|
|
1618
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
1619
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
}, [translateData]);
|
|
1623
|
+
useEffect4(() => {
|
|
1624
|
+
if (resizingData.isActive) {
|
|
1625
|
+
if (rndRef.current && !(size.height !== 0 && size.width !== 0)) {
|
|
1626
|
+
const { height, width } = rndRef.current.getBoundingClientRect();
|
|
1627
|
+
setSize({
|
|
1628
|
+
height,
|
|
1629
|
+
width
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
const { shouldSizeX, shouldSizeY, shouldMoveX, shouldMoveY } = resizingData;
|
|
1633
|
+
const onMouseUp = () => {
|
|
1634
|
+
setResizingData(_13.set("isActive", false));
|
|
1635
|
+
};
|
|
1636
|
+
const getNewSizeValue = ({
|
|
1637
|
+
shouldMove,
|
|
1638
|
+
shouldSize,
|
|
1639
|
+
value,
|
|
1640
|
+
modifier
|
|
1641
|
+
}) => {
|
|
1642
|
+
switch (true) {
|
|
1643
|
+
case (shouldSize && !shouldMove):
|
|
1644
|
+
return value + modifier;
|
|
1645
|
+
case (shouldSize && shouldMove):
|
|
1646
|
+
return value - modifier;
|
|
1647
|
+
default:
|
|
1648
|
+
return value;
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
const onMouseMove = (e) => {
|
|
1652
|
+
setTranslateData(({ x: x2, y, ...translateData2 }) => {
|
|
1653
|
+
const newX = shouldMoveX ? x2 + e.movementX : x2;
|
|
1654
|
+
const newY = shouldMoveY ? y + e.movementY : y;
|
|
1655
|
+
return {
|
|
1656
|
+
...translateData2,
|
|
1657
|
+
x: newX,
|
|
1658
|
+
y: newY
|
|
1659
|
+
};
|
|
1660
|
+
});
|
|
1661
|
+
setSize(({ height, width }) => {
|
|
1662
|
+
const newSize = {
|
|
1663
|
+
height: getNewSizeValue({
|
|
1664
|
+
shouldMove: shouldMoveY,
|
|
1665
|
+
shouldSize: shouldSizeY,
|
|
1666
|
+
value: height,
|
|
1667
|
+
modifier: e.movementY
|
|
1668
|
+
}),
|
|
1669
|
+
width: getNewSizeValue({
|
|
1670
|
+
shouldMove: shouldMoveX,
|
|
1671
|
+
shouldSize: shouldSizeX,
|
|
1672
|
+
value: width,
|
|
1673
|
+
modifier: e.movementX
|
|
1674
|
+
})
|
|
1675
|
+
};
|
|
1676
|
+
onResize?.(newSize);
|
|
1677
|
+
return newSize;
|
|
1678
|
+
});
|
|
1679
|
+
};
|
|
1680
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
1681
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
1682
|
+
return () => {
|
|
1683
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
1684
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
}, [size, resizingData, onResize]);
|
|
1688
|
+
const launchTranslate = () => setTranslateData(_13.set("isActive", true));
|
|
1689
|
+
const handlersElement = canResize ? /* @__PURE__ */ jsx11("div", { children: resizeHandlersProps.map((handle, key) => {
|
|
1690
|
+
return /* @__PURE__ */ jsx11(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
className: home_ec2_user_actions_runner_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default.handle,
|
|
1694
|
+
style: {
|
|
1695
|
+
"--v-top": handle.top,
|
|
1696
|
+
"--v-right": handle.right,
|
|
1697
|
+
"--v-bottom": handle.bottom,
|
|
1698
|
+
"--v-left": handle.left,
|
|
1699
|
+
"--v-cursor": handle.cursor
|
|
1700
|
+
},
|
|
1701
|
+
..._13.omit("resizingProps", handle),
|
|
1702
|
+
onMouseDown: () => setResizingData({
|
|
1703
|
+
isActive: true,
|
|
1704
|
+
..._13.get("resizingProps", handle)
|
|
1705
|
+
})
|
|
1706
|
+
},
|
|
1707
|
+
key
|
|
1708
|
+
);
|
|
1709
|
+
}) }) : /* @__PURE__ */ jsx11(Fragment, {});
|
|
1710
|
+
const isActive = translateData.isActive || resizingData.isActive;
|
|
1711
|
+
useEffect4(() => {
|
|
1712
|
+
if (!rndRef.current)
|
|
1713
|
+
return;
|
|
1714
|
+
rndRef.current.style.userSelect = isActive ? "none" : "unset";
|
|
1715
|
+
rndRef.current.style.position = "fixed";
|
|
1716
|
+
rndRef.current.style.top = "0";
|
|
1717
|
+
rndRef.current.style.left = "0";
|
|
1718
|
+
rndRef.current.style.transform = `translate3d(${translateData.x}px, ${translateData.y}px, 0)`;
|
|
1719
|
+
rndRef.current.style.height = size.height ? `${size.height}px` : "auto";
|
|
1720
|
+
rndRef.current.style.width = size.width ? `${size.width}px` : "auto";
|
|
1721
|
+
}, [translateData, size, isActive]);
|
|
1722
|
+
return {
|
|
1723
|
+
launchTranslate,
|
|
1724
|
+
handlersElement,
|
|
1725
|
+
rndRef
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
useDragAndResize_default = useDragAndResize;
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1731
|
+
|
|
1732
|
+
// src/hooks/useClientMounted.tsx
|
|
1733
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
1734
|
+
var useClientMounted, useClientMounted_default;
|
|
1735
|
+
var init_useClientMounted = __esm({
|
|
1736
|
+
"src/hooks/useClientMounted.tsx"() {
|
|
1737
|
+
"use strict";
|
|
1738
|
+
useClientMounted = () => {
|
|
1739
|
+
const [mounted, setMounted] = useState5(false);
|
|
1740
|
+
useEffect5(() => {
|
|
1741
|
+
setMounted(true);
|
|
1742
|
+
}, []);
|
|
1743
|
+
return mounted;
|
|
1744
|
+
};
|
|
1745
|
+
useClientMounted_default = useClientMounted;
|
|
1746
|
+
}
|
|
1747
|
+
});
|
|
1748
|
+
|
|
1749
|
+
// src/utils/lazy.ts
|
|
1750
|
+
var lazyInterop;
|
|
1751
|
+
var init_lazy = __esm({
|
|
1752
|
+
"src/utils/lazy.ts"() {
|
|
1753
|
+
"use strict";
|
|
1754
|
+
lazyInterop = (m) => {
|
|
1755
|
+
if ("default" in m && "default" in m.default) {
|
|
1756
|
+
return { default: m.default.default };
|
|
1757
|
+
}
|
|
1758
|
+
return { default: m.default };
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
|
|
1763
|
+
// css-modules:css-modules://ClwWsN3MG80fL5vx9ZgsHtKB5PCE9WSraTwa_GOO_kA.css
|
|
1764
|
+
var init_ClwWsN3MG80fL5vx9ZgsHtKB5PCE9WSraTwa_GOO_kA = __esm({
|
|
1765
|
+
"css-modules:css-modules://ClwWsN3MG80fL5vx9ZgsHtKB5PCE9WSraTwa_GOO_kA.css"() {
|
|
1766
|
+
}
|
|
1767
|
+
});
|
|
1768
|
+
|
|
1769
|
+
// tmp_esbuild/_src_components_lazy_CodemirrorEditor.browser.module.css
|
|
1770
|
+
var src_components_lazy_CodemirrorEditor_browser_default;
|
|
1771
|
+
var init_src_components_lazy_CodemirrorEditor_browser = __esm({
|
|
1772
|
+
"tmp_esbuild/_src_components_lazy_CodemirrorEditor.browser.module.css"() {
|
|
1773
|
+
"use strict";
|
|
1774
|
+
init_ClwWsN3MG80fL5vx9ZgsHtKB5PCE9WSraTwa_GOO_kA();
|
|
1775
|
+
src_components_lazy_CodemirrorEditor_browser_default = { "codemirrorWrapper": "vv-E1cuPG-codemirrorWrapper" };
|
|
1776
|
+
}
|
|
1777
|
+
});
|
|
1778
|
+
|
|
1779
|
+
// src/components/lazy/CodemirrorEditor.browser.module.css
|
|
1492
1780
|
var init_CodemirrorEditor_browser = __esm({
|
|
1493
1781
|
"src/components/lazy/CodemirrorEditor.browser.module.css"() {
|
|
1494
1782
|
"use strict";
|
|
@@ -1501,17 +1789,17 @@ var CodemirrorEditor_browser_exports = {};
|
|
|
1501
1789
|
__export(CodemirrorEditor_browser_exports, {
|
|
1502
1790
|
default: () => CodemirrorEditor_browser_default
|
|
1503
1791
|
});
|
|
1504
|
-
import
|
|
1505
|
-
import { useEffect as
|
|
1506
|
-
import { jsx as
|
|
1792
|
+
import _14 from "lodash/fp.js";
|
|
1793
|
+
import { useEffect as useEffect6, useRef as useRef5, useState as useState6 } from "react";
|
|
1794
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1507
1795
|
var TAGS, completeAfter, completeIfAfterLt, completeIfInTag, xmlValidator, CodemirrorEditor, CodemirrorEditor_browser_default;
|
|
1508
1796
|
var init_CodemirrorEditor_browser2 = __esm({
|
|
1509
1797
|
"src/components/lazy/CodemirrorEditor.browser.tsx"() {
|
|
1510
1798
|
"use strict";
|
|
1511
1799
|
init_constants();
|
|
1800
|
+
init_lazy();
|
|
1512
1801
|
init_template();
|
|
1513
1802
|
init_CodemirrorEditor_browser();
|
|
1514
|
-
init_lazy();
|
|
1515
1803
|
TAGS = {};
|
|
1516
1804
|
completeAfter = (cm, pred) => {
|
|
1517
1805
|
if (!pred || pred()) {
|
|
@@ -1559,15 +1847,15 @@ var init_CodemirrorEditor_browser2 = __esm({
|
|
|
1559
1847
|
};
|
|
1560
1848
|
CodemirrorEditor = ({
|
|
1561
1849
|
readOnly,
|
|
1562
|
-
onChange =
|
|
1850
|
+
onChange = _14.noop,
|
|
1563
1851
|
keyMap,
|
|
1564
|
-
componentDidMount =
|
|
1852
|
+
componentDidMount = _14.noop,
|
|
1565
1853
|
value = "",
|
|
1566
|
-
onError =
|
|
1854
|
+
onError = _14.noop
|
|
1567
1855
|
}) => {
|
|
1568
|
-
const textarea =
|
|
1569
|
-
const [editor, setEditor] =
|
|
1570
|
-
|
|
1856
|
+
const textarea = useRef5(null);
|
|
1857
|
+
const [editor, setEditor] = useState6(null);
|
|
1858
|
+
useEffect6(() => {
|
|
1571
1859
|
const fn = async () => {
|
|
1572
1860
|
const codemirror = (await import("codemirror").then(lazyInterop)).default;
|
|
1573
1861
|
codemirror.registerHelper("lint", "xml", (text) => xmlValidator(codemirror, text, onError));
|
|
@@ -1599,7 +1887,7 @@ var init_CodemirrorEditor_browser2 = __esm({
|
|
|
1599
1887
|
};
|
|
1600
1888
|
fn();
|
|
1601
1889
|
}, [readOnly, keyMap, componentDidMount, onError]);
|
|
1602
|
-
|
|
1890
|
+
useEffect6(() => {
|
|
1603
1891
|
if (!editor) {
|
|
1604
1892
|
return;
|
|
1605
1893
|
}
|
|
@@ -1609,22 +1897,22 @@ var init_CodemirrorEditor_browser2 = __esm({
|
|
|
1609
1897
|
editor.off("change", localChange);
|
|
1610
1898
|
};
|
|
1611
1899
|
}, [editor, onChange]);
|
|
1612
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsx12("div", { className: src_components_lazy_CodemirrorEditor_browser_default.codemirrorWrapper, children: /* @__PURE__ */ jsx12("textarea", { ref: textarea, value, onChange: _14.noop }) });
|
|
1613
1901
|
};
|
|
1614
1902
|
CodemirrorEditor_browser_default = CodemirrorEditor;
|
|
1615
1903
|
}
|
|
1616
1904
|
});
|
|
1617
1905
|
|
|
1618
1906
|
// src/components/core/editor/CodemirrorEditor.tsx
|
|
1619
|
-
import
|
|
1620
|
-
import { jsx as
|
|
1907
|
+
import React6, { Suspense } from "react";
|
|
1908
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1621
1909
|
var LazyEditor, CodemirrorEditor2, CodemirrorEditor_default;
|
|
1622
1910
|
var init_CodemirrorEditor = __esm({
|
|
1623
1911
|
"src/components/core/editor/CodemirrorEditor.tsx"() {
|
|
1624
1912
|
"use strict";
|
|
1625
1913
|
init_useClientMounted();
|
|
1626
1914
|
init_lazy();
|
|
1627
|
-
LazyEditor =
|
|
1915
|
+
LazyEditor = React6.lazy(
|
|
1628
1916
|
() => (
|
|
1629
1917
|
// @ts-ignore TODO fallback is causing type issue
|
|
1630
1918
|
typeof window === "undefined" ? { default: null } : Promise.resolve().then(() => (init_CodemirrorEditor_browser2(), CodemirrorEditor_browser_exports)).then(lazyInterop)
|
|
@@ -1632,15 +1920,15 @@ var init_CodemirrorEditor = __esm({
|
|
|
1632
1920
|
);
|
|
1633
1921
|
CodemirrorEditor2 = (props) => {
|
|
1634
1922
|
const clientMounted = useClientMounted_default();
|
|
1635
|
-
return clientMounted ? /* @__PURE__ */
|
|
1923
|
+
return clientMounted ? /* @__PURE__ */ jsx13(Suspense, { children: /* @__PURE__ */ jsx13(LazyEditor, { ...props }) }) : /* @__PURE__ */ jsx13("div", {});
|
|
1636
1924
|
};
|
|
1637
1925
|
CodemirrorEditor_default = CodemirrorEditor2;
|
|
1638
1926
|
}
|
|
1639
1927
|
});
|
|
1640
1928
|
|
|
1641
|
-
// css-modules:css-modules://
|
|
1642
|
-
var
|
|
1643
|
-
"css-modules:css-modules://
|
|
1929
|
+
// css-modules:css-modules://D1lYSSaRELK-xOpLHrAFrFm44xAz5JpuKh1hj285xI4.css
|
|
1930
|
+
var init_D1lYSSaRELK_xOpLHrAFrFm44xAz5JpuKh1hj285xI4 = __esm({
|
|
1931
|
+
"css-modules:css-modules://D1lYSSaRELK-xOpLHrAFrFm44xAz5JpuKh1hj285xI4.css"() {
|
|
1644
1932
|
}
|
|
1645
1933
|
});
|
|
1646
1934
|
|
|
@@ -1649,7 +1937,7 @@ var src_components_core_editor_EditorHeaderModal_default;
|
|
|
1649
1937
|
var init_src_components_core_editor_EditorHeaderModal = __esm({
|
|
1650
1938
|
"tmp_esbuild/_src_components_core_editor_EditorHeaderModal.module.css"() {
|
|
1651
1939
|
"use strict";
|
|
1652
|
-
|
|
1940
|
+
init_D1lYSSaRELK_xOpLHrAFrFm44xAz5JpuKh1hj285xI4();
|
|
1653
1941
|
src_components_core_editor_EditorHeaderModal_default = { "header": "vv-go3bmq-header" };
|
|
1654
1942
|
}
|
|
1655
1943
|
});
|
|
@@ -1663,14 +1951,14 @@ var init_EditorHeaderModal = __esm({
|
|
|
1663
1951
|
});
|
|
1664
1952
|
|
|
1665
1953
|
// src/components/core/editor/EditorHeaderModal.tsx
|
|
1666
|
-
import { jsx as
|
|
1954
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1667
1955
|
var EditorHeaderModal, EditorHeaderModal_default;
|
|
1668
1956
|
var init_EditorHeaderModal2 = __esm({
|
|
1669
1957
|
"src/components/core/editor/EditorHeaderModal.tsx"() {
|
|
1670
1958
|
"use strict";
|
|
1671
1959
|
init_EditorHeaderModal();
|
|
1672
1960
|
EditorHeaderModal = ({ onClick }) => /* @__PURE__ */ jsxs7("div", { children: [
|
|
1673
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsx14(
|
|
1674
1962
|
"div",
|
|
1675
1963
|
{
|
|
1676
1964
|
className: src_components_core_editor_EditorHeaderModal_default.header,
|
|
@@ -1689,7 +1977,7 @@ var init_EditorHeaderModal2 = __esm({
|
|
|
1689
1977
|
children: "Principale"
|
|
1690
1978
|
}
|
|
1691
1979
|
),
|
|
1692
|
-
/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ jsx14(
|
|
1693
1981
|
"div",
|
|
1694
1982
|
{
|
|
1695
1983
|
className: src_components_core_editor_EditorHeaderModal_default.header,
|
|
@@ -1725,7 +2013,7 @@ var init_EditorHeaderModal2 = __esm({
|
|
|
1725
2013
|
]
|
|
1726
2014
|
}
|
|
1727
2015
|
),
|
|
1728
|
-
/* @__PURE__ */
|
|
2016
|
+
/* @__PURE__ */ jsx14(
|
|
1729
2017
|
"div",
|
|
1730
2018
|
{
|
|
1731
2019
|
className: src_components_core_editor_EditorHeaderModal_default.header,
|
|
@@ -1741,7 +2029,7 @@ var init_EditorHeaderModal2 = __esm({
|
|
|
1741
2029
|
children: "Compl\xE9mentaire 2"
|
|
1742
2030
|
}
|
|
1743
2031
|
),
|
|
1744
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsx14(
|
|
1745
2033
|
"div",
|
|
1746
2034
|
{
|
|
1747
2035
|
className: src_components_core_editor_EditorHeaderModal_default.header,
|
|
@@ -1762,9 +2050,9 @@ var init_EditorHeaderModal2 = __esm({
|
|
|
1762
2050
|
}
|
|
1763
2051
|
});
|
|
1764
2052
|
|
|
1765
|
-
// css-modules:css-modules://
|
|
1766
|
-
var
|
|
1767
|
-
"css-modules:css-modules://
|
|
2053
|
+
// css-modules:css-modules://FAXEjMKr_nbgBeI0HbQm4Hou8oDtA1fDSwLREXIxVJQ.css
|
|
2054
|
+
var init_FAXEjMKr_nbgBeI0HbQm4Hou8oDtA1fDSwLREXIxVJQ = __esm({
|
|
2055
|
+
"css-modules:css-modules://FAXEjMKr_nbgBeI0HbQm4Hou8oDtA1fDSwLREXIxVJQ.css"() {
|
|
1768
2056
|
}
|
|
1769
2057
|
});
|
|
1770
2058
|
|
|
@@ -1773,7 +2061,7 @@ var src_components_core_editor_EditorListModal_default;
|
|
|
1773
2061
|
var init_src_components_core_editor_EditorListModal = __esm({
|
|
1774
2062
|
"tmp_esbuild/_src_components_core_editor_EditorListModal.module.css"() {
|
|
1775
2063
|
"use strict";
|
|
1776
|
-
|
|
2064
|
+
init_FAXEjMKr_nbgBeI0HbQm4Hou8oDtA1fDSwLREXIxVJQ();
|
|
1777
2065
|
src_components_core_editor_EditorListModal_default = { "ul": "vv-CkF5Qq-ul" };
|
|
1778
2066
|
}
|
|
1779
2067
|
});
|
|
@@ -1787,7 +2075,7 @@ var init_EditorListModal = __esm({
|
|
|
1787
2075
|
});
|
|
1788
2076
|
|
|
1789
2077
|
// src/components/core/editor/EditorListModal.tsx
|
|
1790
|
-
import { jsx as
|
|
2078
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1791
2079
|
var generateList, EditorListModal, EditorListModal_default;
|
|
1792
2080
|
var init_EditorListModal2 = __esm({
|
|
1793
2081
|
"src/components/core/editor/EditorListModal.tsx"() {
|
|
@@ -1801,17 +2089,17 @@ var init_EditorListModal2 = __esm({
|
|
|
1801
2089
|
</ul>
|
|
1802
2090
|
`;
|
|
1803
2091
|
EditorListModal = ({ onClick }) => /* @__PURE__ */ jsxs8("div", { children: [
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
/* @__PURE__ */
|
|
1806
|
-
/* @__PURE__ */
|
|
2092
|
+
/* @__PURE__ */ jsx15("ul", { className: src_components_core_editor_EditorListModal_default.ul, onClick: () => onClick(() => generateList("disc")), children: /* @__PURE__ */ jsx15("li", {}) }),
|
|
2093
|
+
/* @__PURE__ */ jsx15("ul", { className: src_components_core_editor_EditorListModal_default.ul, type: "circle", onClick: () => onClick(() => generateList("circle")), children: /* @__PURE__ */ jsx15("li", {}) }),
|
|
2094
|
+
/* @__PURE__ */ jsx15("ul", { className: src_components_core_editor_EditorListModal_default.ul, type: "square", onClick: () => onClick(() => generateList("square")), children: /* @__PURE__ */ jsx15("li", {}) })
|
|
1807
2095
|
] });
|
|
1808
2096
|
EditorListModal_default = EditorListModal;
|
|
1809
2097
|
}
|
|
1810
2098
|
});
|
|
1811
2099
|
|
|
1812
|
-
// css-modules:css-modules://
|
|
1813
|
-
var
|
|
1814
|
-
"css-modules:css-modules://
|
|
2100
|
+
// css-modules:css-modules://iTcvO_EuuRof0S3Q_EadEoweHD1OFDXkCVSSCGPHK5I.css
|
|
2101
|
+
var init_iTcvO_EuuRof0S3Q_EadEoweHD1OFDXkCVSSCGPHK5I = __esm({
|
|
2102
|
+
"css-modules:css-modules://iTcvO_EuuRof0S3Q_EadEoweHD1OFDXkCVSSCGPHK5I.css"() {
|
|
1815
2103
|
}
|
|
1816
2104
|
});
|
|
1817
2105
|
|
|
@@ -1820,7 +2108,7 @@ var src_components_core_editor_EditorMathsModal_default;
|
|
|
1820
2108
|
var init_src_components_core_editor_EditorMathsModal = __esm({
|
|
1821
2109
|
"tmp_esbuild/_src_components_core_editor_EditorMathsModal.module.css"() {
|
|
1822
2110
|
"use strict";
|
|
1823
|
-
|
|
2111
|
+
init_iTcvO_EuuRof0S3Q_EadEoweHD1OFDXkCVSSCGPHK5I();
|
|
1824
2112
|
src_components_core_editor_EditorMathsModal_default = { "mathsElement": "vv-XGJSGG-mathsElement" };
|
|
1825
2113
|
}
|
|
1826
2114
|
});
|
|
@@ -1834,25 +2122,25 @@ var init_EditorMathsModal = __esm({
|
|
|
1834
2122
|
});
|
|
1835
2123
|
|
|
1836
2124
|
// src/components/core/editor/EditorMathsModal.tsx
|
|
1837
|
-
import { jsx as
|
|
2125
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1838
2126
|
var EditorMathsModal, EditorMathsModal_default;
|
|
1839
2127
|
var init_EditorMathsModal2 = __esm({
|
|
1840
2128
|
"src/components/core/editor/EditorMathsModal.tsx"() {
|
|
1841
2129
|
"use strict";
|
|
1842
2130
|
init_EditorMathsModal();
|
|
1843
2131
|
EditorMathsModal = ({ onClick }) => /* @__PURE__ */ jsxs9("div", { children: [
|
|
1844
|
-
/* @__PURE__ */
|
|
1845
|
-
/* @__PURE__ */
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */
|
|
2132
|
+
/* @__PURE__ */ jsx16("div", { className: src_components_core_editor_EditorMathsModal_default.mathsElement, onClick: () => onClick((selectedText) => `<math>${selectedText}</math>`), children: "KaTeX" }),
|
|
2133
|
+
/* @__PURE__ */ jsx16("div", { className: src_components_core_editor_EditorMathsModal_default.mathsElement, onClick: () => onClick((selectedText) => `\\text{${selectedText}}`), children: "\\text {...}" }),
|
|
2134
|
+
/* @__PURE__ */ jsx16("div", { className: src_components_core_editor_EditorMathsModal_default.mathsElement, onClick: () => onClick((selectedText) => `<python inline="true">${selectedText}</python>`), children: "python" }),
|
|
2135
|
+
/* @__PURE__ */ jsx16("div", { className: src_components_core_editor_EditorMathsModal_default.mathsElement, onClick: () => onClick((selectedText) => `<geogebra>${selectedText}</geogebra>`), children: "geogebra" })
|
|
1848
2136
|
] });
|
|
1849
2137
|
EditorMathsModal_default = EditorMathsModal;
|
|
1850
2138
|
}
|
|
1851
2139
|
});
|
|
1852
2140
|
|
|
1853
|
-
// css-modules:css-modules
|
|
1854
|
-
var
|
|
1855
|
-
"css-modules:css-modules
|
|
2141
|
+
// css-modules:css-modules://-Z7nD8VDTTbf2fdFuqZ2hX3q2ctyJaUVhprv-NQnySo.css
|
|
2142
|
+
var init_Z7nD8VDTTbf2fdFuqZ2hX3q2ctyJaUVhprv_NQnySo = __esm({
|
|
2143
|
+
"css-modules:css-modules://-Z7nD8VDTTbf2fdFuqZ2hX3q2ctyJaUVhprv-NQnySo.css"() {
|
|
1856
2144
|
}
|
|
1857
2145
|
});
|
|
1858
2146
|
|
|
@@ -1861,7 +2149,7 @@ var src_components_core_editor_EditorOrderedListModal_default;
|
|
|
1861
2149
|
var init_src_components_core_editor_EditorOrderedListModal = __esm({
|
|
1862
2150
|
"tmp_esbuild/_src_components_core_editor_EditorOrderedListModal.module.css"() {
|
|
1863
2151
|
"use strict";
|
|
1864
|
-
|
|
2152
|
+
init_Z7nD8VDTTbf2fdFuqZ2hX3q2ctyJaUVhprv_NQnySo();
|
|
1865
2153
|
src_components_core_editor_EditorOrderedListModal_default = { "ol": "vv-IbixEG-ol" };
|
|
1866
2154
|
}
|
|
1867
2155
|
});
|
|
@@ -1875,7 +2163,7 @@ var init_EditorOrderedListModal = __esm({
|
|
|
1875
2163
|
});
|
|
1876
2164
|
|
|
1877
2165
|
// src/components/core/editor/EditorOrderedListModal.tsx
|
|
1878
|
-
import { jsx as
|
|
2166
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1879
2167
|
var generateList2, EditorOrderedListModal, EditorOrderedListModal_default;
|
|
1880
2168
|
var init_EditorOrderedListModal2 = __esm({
|
|
1881
2169
|
"src/components/core/editor/EditorOrderedListModal.tsx"() {
|
|
@@ -1890,38 +2178,38 @@ var init_EditorOrderedListModal2 = __esm({
|
|
|
1890
2178
|
`;
|
|
1891
2179
|
EditorOrderedListModal = ({ onClick }) => /* @__PURE__ */ jsxs10("div", { children: [
|
|
1892
2180
|
/* @__PURE__ */ jsxs10("ol", { className: src_components_core_editor_EditorOrderedListModal_default.ol, type: "1", onClick: () => onClick(() => generateList2("1")), children: [
|
|
1893
|
-
/* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
2181
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2182
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2183
|
+
/* @__PURE__ */ jsx17("li", {})
|
|
1896
2184
|
] }),
|
|
1897
2185
|
/* @__PURE__ */ jsxs10("ol", { className: src_components_core_editor_EditorOrderedListModal_default.ol, type: "a", onClick: () => onClick(() => generateList2("a")), children: [
|
|
1898
|
-
/* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
2186
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2187
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2188
|
+
/* @__PURE__ */ jsx17("li", {})
|
|
1901
2189
|
] }),
|
|
1902
2190
|
/* @__PURE__ */ jsxs10("ol", { className: src_components_core_editor_EditorOrderedListModal_default.ol, type: "A", onClick: () => onClick(() => generateList2("A")), children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2192
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2193
|
+
/* @__PURE__ */ jsx17("li", {})
|
|
1906
2194
|
] }),
|
|
1907
2195
|
/* @__PURE__ */ jsxs10("ol", { className: src_components_core_editor_EditorOrderedListModal_default.ol, type: "i", onClick: () => onClick(() => generateList2("i")), children: [
|
|
1908
|
-
/* @__PURE__ */
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
/* @__PURE__ */
|
|
2196
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2197
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2198
|
+
/* @__PURE__ */ jsx17("li", {})
|
|
1911
2199
|
] }),
|
|
1912
2200
|
/* @__PURE__ */ jsxs10("ol", { className: src_components_core_editor_EditorOrderedListModal_default.ol, type: "I", onClick: () => onClick(() => generateList2("I")), children: [
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
2201
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2202
|
+
/* @__PURE__ */ jsx17("li", {}),
|
|
2203
|
+
/* @__PURE__ */ jsx17("li", {})
|
|
1916
2204
|
] })
|
|
1917
2205
|
] });
|
|
1918
2206
|
EditorOrderedListModal_default = EditorOrderedListModal;
|
|
1919
2207
|
}
|
|
1920
2208
|
});
|
|
1921
2209
|
|
|
1922
|
-
// css-modules:css-modules://
|
|
1923
|
-
var
|
|
1924
|
-
"css-modules:css-modules://
|
|
2210
|
+
// css-modules:css-modules://gesVSQDjVmNzyeAM6C2g6PgbgdrauKrOml9XUyf0d1A.css
|
|
2211
|
+
var init_gesVSQDjVmNzyeAM6C2g6PgbgdrauKrOml9XUyf0d1A = __esm({
|
|
2212
|
+
"css-modules:css-modules://gesVSQDjVmNzyeAM6C2g6PgbgdrauKrOml9XUyf0d1A.css"() {
|
|
1925
2213
|
}
|
|
1926
2214
|
});
|
|
1927
2215
|
|
|
@@ -1930,7 +2218,7 @@ var src_components_core_editor_EditorQuestionModal_default;
|
|
|
1930
2218
|
var init_src_components_core_editor_EditorQuestionModal = __esm({
|
|
1931
2219
|
"tmp_esbuild/_src_components_core_editor_EditorQuestionModal.module.css"() {
|
|
1932
2220
|
"use strict";
|
|
1933
|
-
|
|
2221
|
+
init_gesVSQDjVmNzyeAM6C2g6PgbgdrauKrOml9XUyf0d1A();
|
|
1934
2222
|
src_components_core_editor_EditorQuestionModal_default = { "question": "vv-QBK0Ba-question" };
|
|
1935
2223
|
}
|
|
1936
2224
|
});
|
|
@@ -1944,19 +2232,19 @@ var init_EditorQuestionModal = __esm({
|
|
|
1944
2232
|
});
|
|
1945
2233
|
|
|
1946
2234
|
// src/components/core/editor/EditorQuestionModal.tsx
|
|
1947
|
-
import { jsx as
|
|
2235
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1948
2236
|
var EditorQuestionModal, EditorQuestionModal_default;
|
|
1949
2237
|
var init_EditorQuestionModal2 = __esm({
|
|
1950
2238
|
"src/components/core/editor/EditorQuestionModal.tsx"() {
|
|
1951
2239
|
"use strict";
|
|
1952
2240
|
init_EditorQuestionModal();
|
|
1953
2241
|
EditorQuestionModal = ({ onClick }) => /* @__PURE__ */ jsxs11("div", { children: [
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
2242
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick(() => `<qtarea id="" width="90%" />`), children: "Question textarea" }),
|
|
2243
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick((selectedText) => `<qt id="">${selectedText}</qt>`), children: "Question ouverte" }),
|
|
2244
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick((selectedText) => `<qs id="">${selectedText}</qs>`), children: 'Question "select"' }),
|
|
2245
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick(() => '<qc id="" />'), children: "Question checkbox" }),
|
|
2246
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick(() => '<qr id="" value="" />'), children: "Question radio" }),
|
|
2247
|
+
/* @__PURE__ */ jsx18(
|
|
1960
2248
|
"div",
|
|
1961
2249
|
{
|
|
1962
2250
|
className: src_components_core_editor_EditorQuestionModal_default.question,
|
|
@@ -1977,8 +2265,8 @@ var init_EditorQuestionModal2 = __esm({
|
|
|
1977
2265
|
children: "Question DnD"
|
|
1978
2266
|
}
|
|
1979
2267
|
),
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick((selectedText) => `<qmath id="">${selectedText}</qmath>`), children: "Question maths" }),
|
|
2269
|
+
/* @__PURE__ */ jsx18(
|
|
1982
2270
|
"div",
|
|
1983
2271
|
{
|
|
1984
2272
|
className: src_components_core_editor_EditorQuestionModal_default.question,
|
|
@@ -1991,15 +2279,15 @@ var init_EditorQuestionModal2 = __esm({
|
|
|
1991
2279
|
children: "Question maths select"
|
|
1992
2280
|
}
|
|
1993
2281
|
),
|
|
1994
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ jsx18("div", { className: src_components_core_editor_EditorQuestionModal_default.question, onClick: () => onClick(() => `<qdraw2 id=""/>`), children: "Question draw" })
|
|
1995
2283
|
] });
|
|
1996
2284
|
EditorQuestionModal_default = EditorQuestionModal;
|
|
1997
2285
|
}
|
|
1998
2286
|
});
|
|
1999
2287
|
|
|
2000
|
-
// css-modules:css-modules://
|
|
2001
|
-
var
|
|
2002
|
-
"css-modules:css-modules://
|
|
2288
|
+
// css-modules:css-modules://aXP2yBEvDrqZAjdnvRWrB53787qw4y3ToSiBw04uiE8.css
|
|
2289
|
+
var init_aXP2yBEvDrqZAjdnvRWrB53787qw4y3ToSiBw04uiE8 = __esm({
|
|
2290
|
+
"css-modules:css-modules://aXP2yBEvDrqZAjdnvRWrB53787qw4y3ToSiBw04uiE8.css"() {
|
|
2003
2291
|
}
|
|
2004
2292
|
});
|
|
2005
2293
|
|
|
@@ -2008,7 +2296,7 @@ var src_components_core_editor_EditorStampModal_default;
|
|
|
2008
2296
|
var init_src_components_core_editor_EditorStampModal = __esm({
|
|
2009
2297
|
"tmp_esbuild/_src_components_core_editor_EditorStampModal.module.css"() {
|
|
2010
2298
|
"use strict";
|
|
2011
|
-
|
|
2299
|
+
init_aXP2yBEvDrqZAjdnvRWrB53787qw4y3ToSiBw04uiE8();
|
|
2012
2300
|
src_components_core_editor_EditorStampModal_default = { "stamp": "vv-pmaK1a-stamp" };
|
|
2013
2301
|
}
|
|
2014
2302
|
});
|
|
@@ -2022,37 +2310,37 @@ var init_EditorStampModal = __esm({
|
|
|
2022
2310
|
});
|
|
2023
2311
|
|
|
2024
2312
|
// src/components/core/editor/EditorStampModal.tsx
|
|
2025
|
-
import { jsx as
|
|
2313
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2026
2314
|
var EditorStampModal, EditorStampModal_default;
|
|
2027
2315
|
var init_EditorStampModal2 = __esm({
|
|
2028
2316
|
"src/components/core/editor/EditorStampModal.tsx"() {
|
|
2029
2317
|
"use strict";
|
|
2030
2318
|
init_EditorStampModal();
|
|
2031
2319
|
EditorStampModal = ({ onClick }) => /* @__PURE__ */ jsxs12("div", { children: [
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx19("div", { className: src_components_core_editor_EditorStampModal_default.stamp, onClick: () => onClick((selectedText) => `<stamp theme="" size="">${selectedText}</stamp>`), children: "Stamp classique" }),
|
|
2321
|
+
/* @__PURE__ */ jsx19("div", { className: src_components_core_editor_EditorStampModal_default.stamp, onClick: () => onClick(() => `<stamp theme="" icon="" size=""/>`), children: "Stamp avec icon" })
|
|
2034
2322
|
] });
|
|
2035
2323
|
EditorStampModal_default = EditorStampModal;
|
|
2036
2324
|
}
|
|
2037
2325
|
});
|
|
2038
2326
|
|
|
2039
2327
|
// src/utils/table.ts
|
|
2040
|
-
import
|
|
2328
|
+
import _15 from "lodash/fp.js";
|
|
2041
2329
|
var generateTable;
|
|
2042
2330
|
var init_table = __esm({
|
|
2043
2331
|
"src/utils/table.ts"() {
|
|
2044
2332
|
"use strict";
|
|
2045
2333
|
generateTable = ({ column, line }) => {
|
|
2046
|
-
const headLine =
|
|
2047
|
-
const bodyLine =
|
|
2334
|
+
const headLine = _15.times(_15.constant("<th></th>"), column);
|
|
2335
|
+
const bodyLine = _15.times(_15.constant("<td></td>"), column);
|
|
2048
2336
|
const head = `<thead>
|
|
2049
2337
|
<tr>
|
|
2050
|
-
${
|
|
2338
|
+
${_15.join("\n ", headLine)}
|
|
2051
2339
|
</tr>
|
|
2052
2340
|
</thead>`;
|
|
2053
2341
|
const body = `<tbody>
|
|
2054
|
-
${
|
|
2055
|
-
${
|
|
2342
|
+
${_15.times(_15.constant(`<tr>
|
|
2343
|
+
${_15.join("\n ", bodyLine)}
|
|
2056
2344
|
</tr>`), line - 1).join("\n ")}
|
|
2057
2345
|
</tbody>`;
|
|
2058
2346
|
return `<table>
|
|
@@ -2064,9 +2352,9 @@ var init_table = __esm({
|
|
|
2064
2352
|
}
|
|
2065
2353
|
});
|
|
2066
2354
|
|
|
2067
|
-
// css-modules:css-modules://
|
|
2068
|
-
var
|
|
2069
|
-
"css-modules:css-modules://
|
|
2355
|
+
// css-modules:css-modules://l9ewCrSeYzAUJUd9PfLHkZujTTXaJQ-auwa6d-qDY3s.css
|
|
2356
|
+
var init_l9ewCrSeYzAUJUd9PfLHkZujTTXaJQ_auwa6d_qDY3s = __esm({
|
|
2357
|
+
"css-modules:css-modules://l9ewCrSeYzAUJUd9PfLHkZujTTXaJQ-auwa6d-qDY3s.css"() {
|
|
2070
2358
|
}
|
|
2071
2359
|
});
|
|
2072
2360
|
|
|
@@ -2075,8 +2363,8 @@ var src_components_core_editor_EditorTableModal_default;
|
|
|
2075
2363
|
var init_src_components_core_editor_EditorTableModal = __esm({
|
|
2076
2364
|
"tmp_esbuild/_src_components_core_editor_EditorTableModal.module.css"() {
|
|
2077
2365
|
"use strict";
|
|
2078
|
-
|
|
2079
|
-
src_components_core_editor_EditorTableModal_default = { "line": "vv-VbIHYG-line", "cell": "vv-VbIHYG-cell", "
|
|
2366
|
+
init_l9ewCrSeYzAUJUd9PfLHkZujTTXaJQ_auwa6d_qDY3s();
|
|
2367
|
+
src_components_core_editor_EditorTableModal_default = { "line": "vv-VbIHYG-line", "cell": "vv-VbIHYG-cell", "grid": "vv-VbIHYG-grid", "header": "vv-VbIHYG-header" };
|
|
2080
2368
|
}
|
|
2081
2369
|
});
|
|
2082
2370
|
|
|
@@ -2089,9 +2377,9 @@ var init_EditorTableModal = __esm({
|
|
|
2089
2377
|
});
|
|
2090
2378
|
|
|
2091
2379
|
// src/components/core/editor/EditorTableModal.tsx
|
|
2092
|
-
import { useCallback as useCallback5, useState as
|
|
2093
|
-
import
|
|
2094
|
-
import { jsx as
|
|
2380
|
+
import { useCallback as useCallback5, useState as useState7 } from "react";
|
|
2381
|
+
import _16 from "lodash/fp.js";
|
|
2382
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2095
2383
|
var LINE_COUNT, COLUMN_COUNT, CELL_WIDTH, CELL_HEIGHT, CELL_MARGIN, LINE_WIDTH, Cell, EditorTableModal, EditorTableModal_default;
|
|
2096
2384
|
var init_EditorTableModal2 = __esm({
|
|
2097
2385
|
"src/components/core/editor/EditorTableModal.tsx"() {
|
|
@@ -2111,7 +2399,7 @@ var init_EditorTableModal2 = __esm({
|
|
|
2111
2399
|
const onClickCallback = useCallback5(() => {
|
|
2112
2400
|
onClick({ column, line });
|
|
2113
2401
|
}, [column, line, onClick]);
|
|
2114
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ jsx20(
|
|
2115
2403
|
"div",
|
|
2116
2404
|
{
|
|
2117
2405
|
className: src_components_core_editor_EditorTableModal_default.cell,
|
|
@@ -2123,7 +2411,7 @@ var init_EditorTableModal2 = __esm({
|
|
|
2123
2411
|
);
|
|
2124
2412
|
};
|
|
2125
2413
|
EditorTableModal = ({ onClick }) => {
|
|
2126
|
-
const [selected, setSelected] =
|
|
2414
|
+
const [selected, setSelected] = useState7({ line: 0, column: 0 });
|
|
2127
2415
|
const onMouseEnter = useCallback5(({ column, line }) => {
|
|
2128
2416
|
setSelected({ line, column });
|
|
2129
2417
|
}, []);
|
|
@@ -2133,17 +2421,17 @@ var init_EditorTableModal2 = __esm({
|
|
|
2133
2421
|
},
|
|
2134
2422
|
[onClick]
|
|
2135
2423
|
);
|
|
2136
|
-
const selectedLine =
|
|
2137
|
-
const selectedColumn =
|
|
2424
|
+
const selectedLine = _16.getOr(0, "line", selected);
|
|
2425
|
+
const selectedColumn = _16.getOr(0, "column", selected);
|
|
2138
2426
|
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
2139
|
-
/* @__PURE__ */
|
|
2140
|
-
/* @__PURE__ */
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2427
|
+
/* @__PURE__ */ jsx20("div", { className: src_components_core_editor_EditorTableModal_default.header, children: `${selectedLine} x ${selectedColumn}` }),
|
|
2428
|
+
/* @__PURE__ */ jsx20("div", { className: src_components_core_editor_EditorTableModal_default.grid, style: { "--v-line-width": `${LINE_WIDTH}px` }, children: _16.flow(
|
|
2429
|
+
_16.range(1),
|
|
2430
|
+
_16.map((line) => /* @__PURE__ */ jsx20("div", { className: src_components_core_editor_EditorTableModal_default.line, style: { "--v-cell-margin": `${CELL_MARGIN}px` }, children: _16.flow(
|
|
2431
|
+
_16.range(1),
|
|
2432
|
+
_16.map((column) => {
|
|
2145
2433
|
const isselected = line <= selectedLine && column <= selectedColumn;
|
|
2146
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ jsx20(Cell, { isSelected: isselected, onMouseEnter, onClick: createTable, column, line }, column);
|
|
2147
2435
|
})
|
|
2148
2436
|
)(COLUMN_COUNT) }, line))
|
|
2149
2437
|
)(LINE_COUNT) })
|
|
@@ -2153,9 +2441,9 @@ var init_EditorTableModal2 = __esm({
|
|
|
2153
2441
|
}
|
|
2154
2442
|
});
|
|
2155
2443
|
|
|
2156
|
-
// css-modules:css-modules://
|
|
2157
|
-
var
|
|
2158
|
-
"css-modules:css-modules://
|
|
2444
|
+
// css-modules:css-modules://V9YMxBzxg_bf_yrJnoKZc7V_grOZr8Z66I81mib-oQ4.css
|
|
2445
|
+
var init_V9YMxBzxg_bf_yrJnoKZc7V_grOZr8Z66I81mib_oQ4 = __esm({
|
|
2446
|
+
"css-modules:css-modules://V9YMxBzxg_bf_yrJnoKZc7V_grOZr8Z66I81mib-oQ4.css"() {
|
|
2159
2447
|
}
|
|
2160
2448
|
});
|
|
2161
2449
|
|
|
@@ -2164,8 +2452,8 @@ var src_components_core_editor_EditorTitleModal_default;
|
|
|
2164
2452
|
var init_src_components_core_editor_EditorTitleModal = __esm({
|
|
2165
2453
|
"tmp_esbuild/_src_components_core_editor_EditorTitleModal.module.css"() {
|
|
2166
2454
|
"use strict";
|
|
2167
|
-
|
|
2168
|
-
src_components_core_editor_EditorTitleModal_default = { "
|
|
2455
|
+
init_V9YMxBzxg_bf_yrJnoKZc7V_grOZr8Z66I81mib_oQ4();
|
|
2456
|
+
src_components_core_editor_EditorTitleModal_default = { "body3": "vv-_Pgo7W-body3", "title": "vv-_Pgo7W-title", "h2": "vv-_Pgo7W-h2", "h4": "vv-_Pgo7W-h4", "body1": "vv-_Pgo7W-body1", "body2": "vv-_Pgo7W-body2", "h1": "vv-_Pgo7W-h1", "h3": "vv-_Pgo7W-h3" };
|
|
2169
2457
|
}
|
|
2170
2458
|
});
|
|
2171
2459
|
|
|
@@ -2179,28 +2467,28 @@ var init_EditorTitleModal = __esm({
|
|
|
2179
2467
|
|
|
2180
2468
|
// src/components/core/editor/EditorTitleModal.tsx
|
|
2181
2469
|
import { cx as cx4 } from "@lls/utils";
|
|
2182
|
-
import { jsx as
|
|
2470
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2183
2471
|
var EditorTitlesModal, EditorTitleModal_default;
|
|
2184
2472
|
var init_EditorTitleModal2 = __esm({
|
|
2185
2473
|
"src/components/core/editor/EditorTitleModal.tsx"() {
|
|
2186
2474
|
"use strict";
|
|
2187
2475
|
init_EditorTitleModal();
|
|
2188
2476
|
EditorTitlesModal = ({ onClick }) => /* @__PURE__ */ jsxs14("div", { children: [
|
|
2189
|
-
/* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.h1, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<h1>${selectedText}</h1>`), children: "h1" }),
|
|
2478
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.h2, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<h2>${selectedText}</h2>`), children: "h2" }),
|
|
2479
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.h3, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<h3>${selectedText}</h3>`), children: "h3" }),
|
|
2480
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.h4, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<h4>${selectedText}</h4>`), children: "h4" }),
|
|
2481
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.body1, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<body1>${selectedText}</body1>`), children: "body1" }),
|
|
2482
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.body2, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<body2>${selectedText}</body2>`), children: "body2" }),
|
|
2483
|
+
/* @__PURE__ */ jsx21("div", { className: cx4(src_components_core_editor_EditorTitleModal_default.body3, src_components_core_editor_EditorTitleModal_default.title), onClick: () => onClick((selectedText) => `<body3>${selectedText}</body3>`), children: "body3" })
|
|
2196
2484
|
] });
|
|
2197
2485
|
EditorTitleModal_default = EditorTitlesModal;
|
|
2198
2486
|
}
|
|
2199
2487
|
});
|
|
2200
2488
|
|
|
2201
|
-
// css-modules:css-modules://
|
|
2202
|
-
var
|
|
2203
|
-
"css-modules:css-modules://
|
|
2489
|
+
// css-modules:css-modules://lMZNEEJTvWcOpUEI82Y2e_I9O1ERlgdLVk01D1TDHyU.css
|
|
2490
|
+
var init_lMZNEEJTvWcOpUEI82Y2e_I9O1ERlgdLVk01D1TDHyU = __esm({
|
|
2491
|
+
"css-modules:css-modules://lMZNEEJTvWcOpUEI82Y2e_I9O1ERlgdLVk01D1TDHyU.css"() {
|
|
2204
2492
|
}
|
|
2205
2493
|
});
|
|
2206
2494
|
|
|
@@ -2209,8 +2497,8 @@ var src_components_core_editor_EditorToolbar_default;
|
|
|
2209
2497
|
var init_src_components_core_editor_EditorToolbar = __esm({
|
|
2210
2498
|
"tmp_esbuild/_src_components_core_editor_EditorToolbar.module.css"() {
|
|
2211
2499
|
"use strict";
|
|
2212
|
-
|
|
2213
|
-
src_components_core_editor_EditorToolbar_default = { "
|
|
2500
|
+
init_lMZNEEJTvWcOpUEI82Y2e_I9O1ERlgdLVk01D1TDHyU();
|
|
2501
|
+
src_components_core_editor_EditorToolbar_default = { "editorToolbar": "vv-LGQOTG-editorToolbar", "span": "vv-LGQOTG-span" };
|
|
2214
2502
|
}
|
|
2215
2503
|
});
|
|
2216
2504
|
|
|
@@ -2223,10 +2511,10 @@ var init_EditorToolbar = __esm({
|
|
|
2223
2511
|
});
|
|
2224
2512
|
|
|
2225
2513
|
// src/components/core/editor/EditorToolbar.tsx
|
|
2226
|
-
import { forwardRef, useCallback as useCallback6, useState as
|
|
2514
|
+
import { forwardRef, useCallback as useCallback6, useState as useState8 } from "react";
|
|
2227
2515
|
import xmlFormat from "xml-formatter";
|
|
2228
2516
|
import { Button as Button3, ButtonsList, Tooltip as Tooltip2 } from "@lls/lls-kit";
|
|
2229
|
-
import { jsx as
|
|
2517
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2230
2518
|
import { createElement } from "react";
|
|
2231
2519
|
var EDITOR_BUTTONS, Dropdown, EditorToolbar, EditorToolbar_default;
|
|
2232
2520
|
var init_EditorToolbar2 = __esm({
|
|
@@ -2376,369 +2664,81 @@ ${selectedText}
|
|
|
2376
2664
|
{
|
|
2377
2665
|
icon: "music_note",
|
|
2378
2666
|
action: (selectedText = "") => `<audio src="${selectedText}">Titre de l'audio</audio>`,
|
|
2379
|
-
title: "Audio"
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
icon: "assignment",
|
|
2383
|
-
action: (question) => question,
|
|
2384
|
-
dropdown: EditorQuestionModal_default,
|
|
2385
|
-
title: "Question"
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
icon: "functions",
|
|
2389
|
-
dropdown: EditorMathsModal_default,
|
|
2390
|
-
action: (maths) => maths,
|
|
2391
|
-
title: "Maths"
|
|
2392
|
-
},
|
|
2393
|
-
{
|
|
2394
|
-
icon: "view_compact",
|
|
2395
|
-
action: (selectedText = "") => `<genially id="${selectedText}" />`,
|
|
2396
|
-
title: "Genially"
|
|
2397
|
-
},
|
|
2398
|
-
{
|
|
2399
|
-
icon: "superscript",
|
|
2400
|
-
action: (selectedText = "") => `<sup>${selectedText}</sup>`,
|
|
2401
|
-
title: "Superscript"
|
|
2402
|
-
},
|
|
2403
|
-
{
|
|
2404
|
-
icon: "subscript",
|
|
2405
|
-
action: (selectedText = "") => `<sub>${selectedText}</sub>`,
|
|
2406
|
-
title: "Subscript"
|
|
2407
|
-
},
|
|
2408
|
-
{
|
|
2409
|
-
icon: "mic",
|
|
2410
|
-
action: () => "<recorder />",
|
|
2411
|
-
title: "Recorder"
|
|
2412
|
-
},
|
|
2413
|
-
{
|
|
2414
|
-
icon: "format_indent_increase",
|
|
2415
|
-
action: (selectedText = "") => xmlFormat(selectedText),
|
|
2416
|
-
title: "Prettify"
|
|
2417
|
-
}
|
|
2418
|
-
];
|
|
2419
|
-
Dropdown = ({ icon, title, dropdown: Overlay, action }) => {
|
|
2420
|
-
const [visible, setVisible] = useState7(false);
|
|
2421
|
-
const toggleVisible = () => {
|
|
2422
|
-
setVisible((isVisible) => !isVisible);
|
|
2423
|
-
};
|
|
2424
|
-
const onClickOverlay = useCallback6(
|
|
2425
|
-
(params) => {
|
|
2426
|
-
action(params);
|
|
2427
|
-
setVisible(false);
|
|
2428
|
-
},
|
|
2429
|
-
[action]
|
|
2430
|
-
);
|
|
2431
|
-
const listItems = [
|
|
2432
|
-
{
|
|
2433
|
-
type: "component",
|
|
2434
|
-
content: /* @__PURE__ */ jsx21(Overlay, { onClick: onClickOverlay })
|
|
2435
|
-
}
|
|
2436
|
-
];
|
|
2437
|
-
return /* @__PURE__ */ jsxs15("span", { className: src_components_core_editor_EditorToolbar_default.span, onClick: toggleVisible, children: [
|
|
2438
|
-
/* @__PURE__ */ jsx21(Tooltip2, { content: title, children: /* @__PURE__ */ jsx21(Button3, { theme: "gray", icon, children: " " }) }),
|
|
2439
|
-
visible && /* @__PURE__ */ jsx21(ButtonsList, { listItems, className: src_components_core_editor_EditorToolbar_default.absoluteMenuButton, zIndex: 1, withMask: false })
|
|
2440
|
-
] });
|
|
2441
|
-
};
|
|
2442
|
-
EditorToolbar = forwardRef(({ replace }, menuRef) => /* @__PURE__ */ jsx21("div", { className: src_components_core_editor_EditorToolbar_default.editorToolbar, ref: menuRef, children: EDITOR_BUTTONS.map((button, i) => {
|
|
2443
|
-
const { icon, action, title, dropdown } = button;
|
|
2444
|
-
return dropdown ? /* @__PURE__ */ createElement(Dropdown, { ...button, action: (callback) => replace(callback), key: i }) : /* @__PURE__ */ jsx21(Tooltip2, { content: title, children: /* @__PURE__ */ jsx21(Button3, { theme: "gray", onClick: () => replace(action, title), icon, children: " " }, i) });
|
|
2445
|
-
}) }));
|
|
2446
|
-
EditorToolbar.displayName = "EditorToolbar";
|
|
2447
|
-
EditorToolbar_default = EditorToolbar;
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
|
|
2451
|
-
// css-modules:css-modules://gqbJUDvYRnw2EEqRHbuvHhtAP_p2lL0u8k92bx4wMAU.css
|
|
2452
|
-
var init_gqbJUDvYRnw2EEqRHbuvHhtAP_p2lL0u8k92bx4wMAU = __esm({
|
|
2453
|
-
"css-modules:css-modules://gqbJUDvYRnw2EEqRHbuvHhtAP_p2lL0u8k92bx4wMAU.css"() {
|
|
2454
|
-
}
|
|
2455
|
-
});
|
|
2456
|
-
|
|
2457
|
-
// tmp_esbuild/_home_ec2-user_github__work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize.module.css
|
|
2458
|
-
var home_ec2_user_github_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default;
|
|
2459
|
-
var init_home_ec2_user_github_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize = __esm({
|
|
2460
|
-
"tmp_esbuild/_home_ec2-user_github__work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize.module.css"() {
|
|
2461
|
-
"use strict";
|
|
2462
|
-
init_gqbJUDvYRnw2EEqRHbuvHhtAP_p2lL0u8k92bx4wMAU();
|
|
2463
|
-
home_ec2_user_github_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default = { "handle": "vv-gepzXq-handle" };
|
|
2464
|
-
}
|
|
2465
|
-
});
|
|
2466
|
-
|
|
2467
|
-
// ../viewer/src/hooks/useDragAndResize.module.css
|
|
2468
|
-
var init_useDragAndResize = __esm({
|
|
2469
|
-
"../viewer/src/hooks/useDragAndResize.module.css"() {
|
|
2470
|
-
"use strict";
|
|
2471
|
-
init_home_ec2_user_github_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize();
|
|
2472
|
-
}
|
|
2473
|
-
});
|
|
2474
|
-
|
|
2475
|
-
// ../viewer/src/hooks/useDragAndResize.tsx
|
|
2476
|
-
import { useEffect as useEffect6, useRef as useRef5, useState as useState8 } from "react";
|
|
2477
|
-
import _16 from "lodash/fp.js";
|
|
2478
|
-
import { Fragment, jsx as jsx22 } from "react/jsx-runtime";
|
|
2479
|
-
var resizeHandlersProps, useDragAndResize, useDragAndResize_default;
|
|
2480
|
-
var init_useDragAndResize2 = __esm({
|
|
2481
|
-
"../viewer/src/hooks/useDragAndResize.tsx"() {
|
|
2482
|
-
"use strict";
|
|
2483
|
-
init_useDragAndResize();
|
|
2484
|
-
resizeHandlersProps = [
|
|
2485
|
-
{
|
|
2486
|
-
top: "-5px",
|
|
2487
|
-
right: "0",
|
|
2488
|
-
bottom: "calc(100% - 5px)",
|
|
2489
|
-
left: "0",
|
|
2490
|
-
cursor: "row-resize",
|
|
2491
|
-
resizingProps: {
|
|
2492
|
-
shouldSizeX: false,
|
|
2493
|
-
shouldSizeY: true,
|
|
2494
|
-
shouldMoveX: false,
|
|
2495
|
-
shouldMoveY: true
|
|
2496
|
-
}
|
|
2497
|
-
},
|
|
2498
|
-
{
|
|
2499
|
-
top: "0",
|
|
2500
|
-
right: "-5px",
|
|
2501
|
-
bottom: "0",
|
|
2502
|
-
left: "calc(100% - 5px)",
|
|
2503
|
-
cursor: "col-resize",
|
|
2504
|
-
resizingProps: {
|
|
2505
|
-
shouldSizeX: true,
|
|
2506
|
-
shouldSizeY: false,
|
|
2507
|
-
shouldMoveX: false,
|
|
2508
|
-
shouldMoveY: false
|
|
2509
|
-
}
|
|
2510
|
-
},
|
|
2511
|
-
{
|
|
2512
|
-
top: "calc(100% - 5px)",
|
|
2513
|
-
right: "0",
|
|
2514
|
-
bottom: "-5px",
|
|
2515
|
-
left: "0",
|
|
2516
|
-
cursor: "row-resize",
|
|
2517
|
-
resizingProps: {
|
|
2518
|
-
shouldSizeX: false,
|
|
2519
|
-
shouldSizeY: true,
|
|
2520
|
-
shouldMoveX: false,
|
|
2521
|
-
shouldMoveY: false
|
|
2522
|
-
}
|
|
2667
|
+
title: "Audio"
|
|
2523
2668
|
},
|
|
2524
2669
|
{
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
cursor: "col-resize",
|
|
2530
|
-
resizingProps: {
|
|
2531
|
-
shouldSizeX: true,
|
|
2532
|
-
shouldSizeY: false,
|
|
2533
|
-
shouldMoveX: true,
|
|
2534
|
-
shouldMoveY: false
|
|
2535
|
-
}
|
|
2670
|
+
icon: "assignment",
|
|
2671
|
+
action: (question) => question,
|
|
2672
|
+
dropdown: EditorQuestionModal_default,
|
|
2673
|
+
title: "Question"
|
|
2536
2674
|
},
|
|
2537
|
-
// corners
|
|
2538
2675
|
{
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
cursor: "ne-resize",
|
|
2544
|
-
resizingProps: {
|
|
2545
|
-
shouldSizeX: true,
|
|
2546
|
-
shouldSizeY: true,
|
|
2547
|
-
shouldMoveX: false,
|
|
2548
|
-
shouldMoveY: true
|
|
2549
|
-
}
|
|
2676
|
+
icon: "functions",
|
|
2677
|
+
dropdown: EditorMathsModal_default,
|
|
2678
|
+
action: (maths) => maths,
|
|
2679
|
+
title: "Maths"
|
|
2550
2680
|
},
|
|
2551
2681
|
{
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
left: "calc(100% - 10px)",
|
|
2556
|
-
cursor: "se-resize",
|
|
2557
|
-
resizingProps: {
|
|
2558
|
-
shouldSizeX: true,
|
|
2559
|
-
shouldSizeY: true,
|
|
2560
|
-
shouldMoveX: false,
|
|
2561
|
-
shouldMoveY: false
|
|
2562
|
-
}
|
|
2682
|
+
icon: "view_compact",
|
|
2683
|
+
action: (selectedText = "") => `<genially id="${selectedText}" />`,
|
|
2684
|
+
title: "Genially"
|
|
2563
2685
|
},
|
|
2564
2686
|
{
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
left: "-10px",
|
|
2569
|
-
cursor: "sw-resize",
|
|
2570
|
-
resizingProps: {
|
|
2571
|
-
shouldSizeX: true,
|
|
2572
|
-
shouldSizeY: true,
|
|
2573
|
-
shouldMoveX: true,
|
|
2574
|
-
shouldMoveY: false
|
|
2575
|
-
}
|
|
2687
|
+
icon: "superscript",
|
|
2688
|
+
action: (selectedText = "") => `<sup>${selectedText}</sup>`,
|
|
2689
|
+
title: "Superscript"
|
|
2576
2690
|
},
|
|
2577
2691
|
{
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2692
|
+
icon: "subscript",
|
|
2693
|
+
action: (selectedText = "") => `<sub>${selectedText}</sub>`,
|
|
2694
|
+
title: "Subscript"
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
icon: "mic",
|
|
2698
|
+
action: () => "<recorder />",
|
|
2699
|
+
title: "Recorder"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
icon: "format_indent_increase",
|
|
2703
|
+
action: (selectedText = "") => xmlFormat(selectedText),
|
|
2704
|
+
title: "Prettify"
|
|
2589
2705
|
}
|
|
2590
2706
|
];
|
|
2591
|
-
|
|
2592
|
-
const
|
|
2593
|
-
const
|
|
2594
|
-
|
|
2595
|
-
const [size, setSize] = useState8({
|
|
2596
|
-
height: defaultHeight,
|
|
2597
|
-
width: defaultWidth
|
|
2598
|
-
});
|
|
2599
|
-
const [resizingData, setResizingData] = useState8({
|
|
2600
|
-
isActive: false,
|
|
2601
|
-
shouldSizeX: false,
|
|
2602
|
-
shouldSizeY: false,
|
|
2603
|
-
shouldMoveX: false,
|
|
2604
|
-
shouldMoveY: false
|
|
2605
|
-
});
|
|
2606
|
-
const positionX = _16.getOr(0, "x", defaultPositions);
|
|
2607
|
-
const bodyWidth = _16.getOr(0, "body.offsetWidth", document);
|
|
2608
|
-
const x = positionX + defaultWidth > bodyWidth ? positionX - defaultWidth : positionX;
|
|
2609
|
-
const [translateData, setTranslateData] = useState8({
|
|
2610
|
-
isActive: false,
|
|
2611
|
-
x,
|
|
2612
|
-
y: _16.getOr(0, "y", defaultPositions)
|
|
2613
|
-
});
|
|
2614
|
-
useEffect6(() => {
|
|
2615
|
-
if (translateData.isActive) {
|
|
2616
|
-
const onMouseUp = () => setTranslateData(_16.set("isActive", false));
|
|
2617
|
-
const onMouseMove = (e) => setTranslateData(({ x: x2, y, ...translateData2 }) => ({
|
|
2618
|
-
...translateData2,
|
|
2619
|
-
x: x2 + e.movementX,
|
|
2620
|
-
y: y + e.movementY
|
|
2621
|
-
}));
|
|
2622
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
2623
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
2624
|
-
return () => {
|
|
2625
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
2626
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
2627
|
-
};
|
|
2628
|
-
}
|
|
2629
|
-
}, [translateData]);
|
|
2630
|
-
useEffect6(() => {
|
|
2631
|
-
if (resizingData.isActive) {
|
|
2632
|
-
if (rndRef.current && !(size.height !== 0 && size.width !== 0)) {
|
|
2633
|
-
const { height, width } = rndRef.current.getBoundingClientRect();
|
|
2634
|
-
setSize({
|
|
2635
|
-
height,
|
|
2636
|
-
width
|
|
2637
|
-
});
|
|
2638
|
-
}
|
|
2639
|
-
const { shouldSizeX, shouldSizeY, shouldMoveX, shouldMoveY } = resizingData;
|
|
2640
|
-
const onMouseUp = () => {
|
|
2641
|
-
setResizingData(_16.set("isActive", false));
|
|
2642
|
-
};
|
|
2643
|
-
const getNewSizeValue = ({
|
|
2644
|
-
shouldMove,
|
|
2645
|
-
shouldSize,
|
|
2646
|
-
value,
|
|
2647
|
-
modifier
|
|
2648
|
-
}) => {
|
|
2649
|
-
switch (true) {
|
|
2650
|
-
case (shouldSize && !shouldMove):
|
|
2651
|
-
return value + modifier;
|
|
2652
|
-
case (shouldSize && shouldMove):
|
|
2653
|
-
return value - modifier;
|
|
2654
|
-
default:
|
|
2655
|
-
return value;
|
|
2656
|
-
}
|
|
2657
|
-
};
|
|
2658
|
-
const onMouseMove = (e) => {
|
|
2659
|
-
setTranslateData(({ x: x2, y, ...translateData2 }) => {
|
|
2660
|
-
const newX = shouldMoveX ? x2 + e.movementX : x2;
|
|
2661
|
-
const newY = shouldMoveY ? y + e.movementY : y;
|
|
2662
|
-
return {
|
|
2663
|
-
...translateData2,
|
|
2664
|
-
x: newX,
|
|
2665
|
-
y: newY
|
|
2666
|
-
};
|
|
2667
|
-
});
|
|
2668
|
-
setSize(({ height, width }) => {
|
|
2669
|
-
const newSize = {
|
|
2670
|
-
height: getNewSizeValue({
|
|
2671
|
-
shouldMove: shouldMoveY,
|
|
2672
|
-
shouldSize: shouldSizeY,
|
|
2673
|
-
value: height,
|
|
2674
|
-
modifier: e.movementY
|
|
2675
|
-
}),
|
|
2676
|
-
width: getNewSizeValue({
|
|
2677
|
-
shouldMove: shouldMoveX,
|
|
2678
|
-
shouldSize: shouldSizeX,
|
|
2679
|
-
value: width,
|
|
2680
|
-
modifier: e.movementX
|
|
2681
|
-
})
|
|
2682
|
-
};
|
|
2683
|
-
onResize?.(newSize);
|
|
2684
|
-
return newSize;
|
|
2685
|
-
});
|
|
2686
|
-
};
|
|
2687
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
2688
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
2689
|
-
return () => {
|
|
2690
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
2691
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
2692
|
-
};
|
|
2693
|
-
}
|
|
2694
|
-
}, [size, resizingData, onResize]);
|
|
2695
|
-
const launchTranslate = () => setTranslateData(_16.set("isActive", true));
|
|
2696
|
-
const handlersElement = canResize ? /* @__PURE__ */ jsx22("div", { children: resizeHandlersProps.map((handle, key) => {
|
|
2697
|
-
return /* @__PURE__ */ jsx22(
|
|
2698
|
-
"div",
|
|
2699
|
-
{
|
|
2700
|
-
className: home_ec2_user_github_work_monorepo_monorepo_libs_viewer_src_hooks_useDragAndResize_default.handle,
|
|
2701
|
-
style: {
|
|
2702
|
-
"--v-top": handle.top,
|
|
2703
|
-
"--v-right": handle.right,
|
|
2704
|
-
"--v-bottom": handle.bottom,
|
|
2705
|
-
"--v-left": handle.left,
|
|
2706
|
-
"--v-cursor": handle.cursor
|
|
2707
|
-
},
|
|
2708
|
-
..._16.omit("resizingProps", handle),
|
|
2709
|
-
onMouseDown: () => setResizingData({
|
|
2710
|
-
isActive: true,
|
|
2711
|
-
..._16.get("resizingProps", handle)
|
|
2712
|
-
})
|
|
2713
|
-
},
|
|
2714
|
-
key
|
|
2715
|
-
);
|
|
2716
|
-
}) }) : /* @__PURE__ */ jsx22(Fragment, {});
|
|
2717
|
-
const isActive = translateData.isActive || resizingData.isActive;
|
|
2718
|
-
useEffect6(() => {
|
|
2719
|
-
if (!rndRef.current)
|
|
2720
|
-
return;
|
|
2721
|
-
rndRef.current.style.userSelect = isActive ? "none" : "unset";
|
|
2722
|
-
rndRef.current.style.position = "fixed";
|
|
2723
|
-
rndRef.current.style.top = "0";
|
|
2724
|
-
rndRef.current.style.left = "0";
|
|
2725
|
-
rndRef.current.style.transform = `translate3d(${translateData.x}px, ${translateData.y}px, 0)`;
|
|
2726
|
-
rndRef.current.style.height = size.height ? `${size.height}px` : "auto";
|
|
2727
|
-
rndRef.current.style.width = size.width ? `${size.width}px` : "auto";
|
|
2728
|
-
}, [translateData, size, isActive]);
|
|
2729
|
-
return {
|
|
2730
|
-
launchTranslate,
|
|
2731
|
-
handlersElement,
|
|
2732
|
-
rndRef
|
|
2707
|
+
Dropdown = ({ icon, title, dropdown: Overlay, action }) => {
|
|
2708
|
+
const [visible, setVisible] = useState8(false);
|
|
2709
|
+
const toggleVisible = () => {
|
|
2710
|
+
setVisible((isVisible) => !isVisible);
|
|
2733
2711
|
};
|
|
2712
|
+
const onClickOverlay = useCallback6(
|
|
2713
|
+
(params) => {
|
|
2714
|
+
action(params);
|
|
2715
|
+
setVisible(false);
|
|
2716
|
+
},
|
|
2717
|
+
[action]
|
|
2718
|
+
);
|
|
2719
|
+
const listItems = [
|
|
2720
|
+
{
|
|
2721
|
+
type: "component",
|
|
2722
|
+
content: /* @__PURE__ */ jsx22(Overlay, { onClick: onClickOverlay })
|
|
2723
|
+
}
|
|
2724
|
+
];
|
|
2725
|
+
return /* @__PURE__ */ jsxs15("span", { className: src_components_core_editor_EditorToolbar_default.span, onClick: toggleVisible, children: [
|
|
2726
|
+
/* @__PURE__ */ jsx22(Tooltip2, { content: title, children: /* @__PURE__ */ jsx22(Button3, { theme: "gray", icon, children: " " }) }),
|
|
2727
|
+
visible && /* @__PURE__ */ jsx22(ButtonsList, { listItems, className: src_components_core_editor_EditorToolbar_default.absoluteMenuButton, zIndex: 1, withMask: false })
|
|
2728
|
+
] });
|
|
2734
2729
|
};
|
|
2735
|
-
|
|
2730
|
+
EditorToolbar = forwardRef(({ replace }, menuRef) => /* @__PURE__ */ jsx22("div", { className: src_components_core_editor_EditorToolbar_default.editorToolbar, ref: menuRef, children: EDITOR_BUTTONS.map((button, i) => {
|
|
2731
|
+
const { icon, action, title, dropdown } = button;
|
|
2732
|
+
return dropdown ? /* @__PURE__ */ createElement(Dropdown, { ...button, action: (callback) => replace(callback), key: i }) : /* @__PURE__ */ jsx22(Tooltip2, { content: title, children: /* @__PURE__ */ jsx22(Button3, { theme: "gray", onClick: () => replace(action, title), icon, children: " " }, i) });
|
|
2733
|
+
}) }));
|
|
2734
|
+
EditorToolbar.displayName = "EditorToolbar";
|
|
2735
|
+
EditorToolbar_default = EditorToolbar;
|
|
2736
2736
|
}
|
|
2737
2737
|
});
|
|
2738
2738
|
|
|
2739
|
-
// css-modules:css-modules://
|
|
2740
|
-
var
|
|
2741
|
-
"css-modules:css-modules://
|
|
2739
|
+
// css-modules:css-modules://9NNguA--8WOGh41wmBCm8AF1DJWa35r2rfRhLOxgn68.css
|
|
2740
|
+
var init_NNguA_8WOGh41wmBCm8AF1DJWa35r2rfRhLOxgn68 = __esm({
|
|
2741
|
+
"css-modules:css-modules://9NNguA--8WOGh41wmBCm8AF1DJWa35r2rfRhLOxgn68.css"() {
|
|
2742
2742
|
}
|
|
2743
2743
|
});
|
|
2744
2744
|
|
|
@@ -2747,7 +2747,7 @@ var src_components_core_editor_Editor_default;
|
|
|
2747
2747
|
var init_src_components_core_editor_Editor = __esm({
|
|
2748
2748
|
"tmp_esbuild/_src_components_core_editor_Editor.module.css"() {
|
|
2749
2749
|
"use strict";
|
|
2750
|
-
|
|
2750
|
+
init_NNguA_8WOGh41wmBCm8AF1DJWa35r2rfRhLOxgn68();
|
|
2751
2751
|
src_components_core_editor_Editor_default = { "wrapper": "vv-cGAezq-wrapper", "errorBanner": "vv-cGAezq-errorBanner", "rnd": "vv-cGAezq-rnd", "header": "vv-cGAezq-header" };
|
|
2752
2752
|
}
|
|
2753
2753
|
});
|
|
@@ -2769,9 +2769,9 @@ var DEFAULT_WIDTH, DEFAULT_HEIGHT, Editor, Editor_default;
|
|
|
2769
2769
|
var init_Editor2 = __esm({
|
|
2770
2770
|
"src/components/core/editor/Editor.tsx"() {
|
|
2771
2771
|
"use strict";
|
|
2772
|
+
init_useDragAndResize2();
|
|
2772
2773
|
init_CodemirrorEditor();
|
|
2773
2774
|
init_EditorToolbar2();
|
|
2774
|
-
init_useDragAndResize2();
|
|
2775
2775
|
init_Editor();
|
|
2776
2776
|
DEFAULT_WIDTH = 800;
|
|
2777
2777
|
DEFAULT_HEIGHT = 500;
|
|
@@ -2835,9 +2835,9 @@ var init_EditorSsr = __esm({
|
|
|
2835
2835
|
}
|
|
2836
2836
|
});
|
|
2837
2837
|
|
|
2838
|
-
// css-modules:css-modules://
|
|
2839
|
-
var
|
|
2840
|
-
"css-modules:css-modules://
|
|
2838
|
+
// css-modules:css-modules://1MKBW8PG8GbZe8tC6V4ud90v1VdZx3mRrwXlGya-pMc.css
|
|
2839
|
+
var init_MKBW8PG8GbZe8tC6V4ud90v1VdZx3mRrwXlGya_pMc = __esm({
|
|
2840
|
+
"css-modules:css-modules://1MKBW8PG8GbZe8tC6V4ud90v1VdZx3mRrwXlGya-pMc.css"() {
|
|
2841
2841
|
}
|
|
2842
2842
|
});
|
|
2843
2843
|
|
|
@@ -2846,7 +2846,7 @@ var src_hooks_useDragAndResize_default;
|
|
|
2846
2846
|
var init_src_hooks_useDragAndResize = __esm({
|
|
2847
2847
|
"tmp_esbuild/_src_hooks_useDragAndResize.module.css"() {
|
|
2848
2848
|
"use strict";
|
|
2849
|
-
|
|
2849
|
+
init_MKBW8PG8GbZe8tC6V4ud90v1VdZx3mRrwXlGya_pMc();
|
|
2850
2850
|
src_hooks_useDragAndResize_default = { "handle": "vv-Uv6i-a-handle" };
|
|
2851
2851
|
}
|
|
2852
2852
|
});
|
|
@@ -3123,9 +3123,9 @@ var init_useDragAndResize4 = __esm({
|
|
|
3123
3123
|
}
|
|
3124
3124
|
});
|
|
3125
3125
|
|
|
3126
|
-
// css-modules:css-modules://
|
|
3127
|
-
var
|
|
3128
|
-
"css-modules:css-modules://
|
|
3126
|
+
// css-modules:css-modules://Zb1cEYNT4eNwW8io0xWL7zXkOH8P26-7eImYlmla2wA.css
|
|
3127
|
+
var init_Zb1cEYNT4eNwW8io0xWL7zXkOH8P26_7eImYlmla2wA = __esm({
|
|
3128
|
+
"css-modules:css-modules://Zb1cEYNT4eNwW8io0xWL7zXkOH8P26-7eImYlmla2wA.css"() {
|
|
3129
3129
|
}
|
|
3130
3130
|
});
|
|
3131
3131
|
|
|
@@ -3134,8 +3134,8 @@ var src_components_core_editor_MetadataEditor_default;
|
|
|
3134
3134
|
var init_src_components_core_editor_MetadataEditor = __esm({
|
|
3135
3135
|
"tmp_esbuild/_src_components_core_editor_MetadataEditor.module.css"() {
|
|
3136
3136
|
"use strict";
|
|
3137
|
-
|
|
3138
|
-
src_components_core_editor_MetadataEditor_default = { "
|
|
3137
|
+
init_Zb1cEYNT4eNwW8io0xWL7zXkOH8P26_7eImYlmla2wA();
|
|
3138
|
+
src_components_core_editor_MetadataEditor_default = { "field": "vv-ftXTRa-field", "select": "vv-ftXTRa-select", "rnd": "vv-ftXTRa-rnd", "body": "vv-ftXTRa-body", "uuid": "vv-ftXTRa-uuid", "header": "vv-ftXTRa-header", "fieldWrapper": "vv-ftXTRa-fieldWrapper" };
|
|
3139
3139
|
}
|
|
3140
3140
|
});
|
|
3141
3141
|
|
|
@@ -3149,8 +3149,8 @@ var init_MetadataEditor = __esm({
|
|
|
3149
3149
|
|
|
3150
3150
|
// src/components/core/editor/MetadataEditor.tsx
|
|
3151
3151
|
import _19 from "lodash/fp.js";
|
|
3152
|
-
import Select from "react-select";
|
|
3153
3152
|
import { Button as Button5 } from "@lls/lls-kit";
|
|
3153
|
+
import Select from "react-select";
|
|
3154
3154
|
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3155
3155
|
var MetadataEditor, MetadataEditor_default;
|
|
3156
3156
|
var init_MetadataEditor2 = __esm({
|
|
@@ -3277,6 +3277,15 @@ var init_useEditor = __esm({
|
|
|
3277
3277
|
}
|
|
3278
3278
|
});
|
|
3279
3279
|
|
|
3280
|
+
// src/constants/config.ts
|
|
3281
|
+
var IS_PROD;
|
|
3282
|
+
var init_config = __esm({
|
|
3283
|
+
"src/constants/config.ts"() {
|
|
3284
|
+
"use strict";
|
|
3285
|
+
IS_PROD = process.env.CONF_ENV === "prod";
|
|
3286
|
+
}
|
|
3287
|
+
});
|
|
3288
|
+
|
|
3280
3289
|
// src/hooks/useScroll.tsx
|
|
3281
3290
|
import { useMemo as useMemo3 } from "react";
|
|
3282
3291
|
var useScroll, useScroll_default;
|
|
@@ -3300,18 +3309,9 @@ var init_useScroll = __esm({
|
|
|
3300
3309
|
}
|
|
3301
3310
|
});
|
|
3302
3311
|
|
|
3303
|
-
//
|
|
3304
|
-
var
|
|
3305
|
-
|
|
3306
|
-
"src/constants/config.ts"() {
|
|
3307
|
-
"use strict";
|
|
3308
|
-
IS_PROD = process.env.CONF_ENV === "prod";
|
|
3309
|
-
}
|
|
3310
|
-
});
|
|
3311
|
-
|
|
3312
|
-
// css-modules:css-modules://5vBHtYTubWLIkQ7cwq88_cqGbPrRZDxVu51b9VQwno0.css
|
|
3313
|
-
var init_vBHtYTubWLIkQ7cwq88_cqGbPrRZDxVu51b9VQwno0 = __esm({
|
|
3314
|
-
"css-modules:css-modules://5vBHtYTubWLIkQ7cwq88_cqGbPrRZDxVu51b9VQwno0.css"() {
|
|
3312
|
+
// css-modules:css-modules://N7qE5xz-356BL8FwluXb9SO0Q6g8pmP18e18R9y8bEU.css
|
|
3313
|
+
var init_N7qE5xz_356BL8FwluXb9SO0Q6g8pmP18e18R9y8bEU = __esm({
|
|
3314
|
+
"css-modules:css-modules://N7qE5xz-356BL8FwluXb9SO0Q6g8pmP18e18R9y8bEU.css"() {
|
|
3315
3315
|
}
|
|
3316
3316
|
});
|
|
3317
3317
|
|
|
@@ -3320,8 +3320,8 @@ var src_components_lazy_index_editor_default;
|
|
|
3320
3320
|
var init_src_components_lazy_index_editor = __esm({
|
|
3321
3321
|
"tmp_esbuild/_src_components_lazy_index.editor.module.css"() {
|
|
3322
3322
|
"use strict";
|
|
3323
|
-
|
|
3324
|
-
src_components_lazy_index_editor_default = { "
|
|
3323
|
+
init_N7qE5xz_356BL8FwluXb9SO0Q6g8pmP18e18R9y8bEU();
|
|
3324
|
+
src_components_lazy_index_editor_default = { "submit": "vv-RUXZgW-submit", "pageContainer": "vv-RUXZgW-pageContainer", "screen": "vv-RUXZgW-screen", "alert": "vv-RUXZgW-alert", "alertOpenedAnimation": "vv-RUXZgW-alertOpenedAnimation", "exitButton": "vv-RUXZgW-exitButton", "stickyBar": "vv-RUXZgW-stickyBar", "button": "vv-RUXZgW-button" };
|
|
3325
3325
|
}
|
|
3326
3326
|
});
|
|
3327
3327
|
|
|
@@ -3338,7 +3338,7 @@ var index_editor_exports = {};
|
|
|
3338
3338
|
__export(index_editor_exports, {
|
|
3339
3339
|
default: () => index_editor_default
|
|
3340
3340
|
});
|
|
3341
|
-
import
|
|
3341
|
+
import React7, { useCallback as useCallback9, useEffect as useEffect9, useState as useState11 } from "react";
|
|
3342
3342
|
import _21 from "lodash/fp.js";
|
|
3343
3343
|
import { Button as Button6, RadioButton, Snackbar } from "@lls/lls-kit";
|
|
3344
3344
|
import { copyToClipboard } from "@lls/utils";
|
|
@@ -3356,8 +3356,8 @@ var init_index_editor2 = __esm({
|
|
|
3356
3356
|
init_MetadataEditor2();
|
|
3357
3357
|
init_ViewerMd2();
|
|
3358
3358
|
init_useEditor();
|
|
3359
|
-
init_useScroll();
|
|
3360
3359
|
init_config();
|
|
3360
|
+
init_useScroll();
|
|
3361
3361
|
init_mode();
|
|
3362
3362
|
init_index_editor();
|
|
3363
3363
|
Editor2 = isSsr() ? EditorSsr_default : Editor_default;
|
|
@@ -3387,7 +3387,7 @@ var init_index_editor2 = __esm({
|
|
|
3387
3387
|
/* @__PURE__ */ jsx27(CopyButton, { theme: stickyBarTheme, template, setCopied })
|
|
3388
3388
|
] });
|
|
3389
3389
|
};
|
|
3390
|
-
EditorNext =
|
|
3390
|
+
EditorNext = React7.forwardRef(({ template, onChange = _21.noop, onSubmit = _21.noop, notions, ...props }, ref) => {
|
|
3391
3391
|
const [isCompactMode, setIsCompactMode] = useState11(false);
|
|
3392
3392
|
const [mode, setMode] = useState11("edit");
|
|
3393
3393
|
const [copied, setCopied] = useState11(false);
|
|
@@ -3485,7 +3485,7 @@ ${JSON.stringify(
|
|
|
3485
3485
|
} else {
|
|
3486
3486
|
onChange(({ children, ...template2 } = {}) => ({
|
|
3487
3487
|
...template2,
|
|
3488
|
-
children:
|
|
3488
|
+
children: React7.Children.map(children, (child) => typeof child === "object" && child !== null && _21.matches({ uuid }, child) ? doc : child)
|
|
3489
3489
|
}));
|
|
3490
3490
|
}
|
|
3491
3491
|
},
|
|
@@ -3563,9 +3563,9 @@ ${JSON.stringify(
|
|
|
3563
3563
|
});
|
|
3564
3564
|
|
|
3565
3565
|
// src/index.editor.tsx
|
|
3566
|
-
import
|
|
3566
|
+
import React8, { Suspense as Suspense2 } from "react";
|
|
3567
3567
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3568
|
-
var LazyEditor2 =
|
|
3568
|
+
var LazyEditor2 = React8.lazy(() => Promise.resolve().then(() => (init_index_editor2(), index_editor_exports)));
|
|
3569
3569
|
var ViewerEditor = (props) => {
|
|
3570
3570
|
return /* @__PURE__ */ jsx28(Suspense2, { children: /* @__PURE__ */ jsx28(LazyEditor2, { ...props }) });
|
|
3571
3571
|
};
|