@tecof/theme-editor 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -333,6 +333,342 @@ function useTecof() {
333
333
  }
334
334
  return ctx;
335
335
  }
336
+
337
+ // node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
338
+ var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
339
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
340
+ }).join(" ").trim();
341
+
342
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
343
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
344
+
345
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
346
+ var toCamelCase = (string) => string.replace(
347
+ /^([A-Z])|[\s-_]+(\w)/g,
348
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
349
+ );
350
+
351
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
352
+ var toPascalCase = (string) => {
353
+ const camelCase = toCamelCase(string);
354
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
355
+ };
356
+
357
+ // node_modules/lucide-react/dist/esm/defaultAttributes.js
358
+ var defaultAttributes = {
359
+ xmlns: "http://www.w3.org/2000/svg",
360
+ width: 24,
361
+ height: 24,
362
+ viewBox: "0 0 24 24",
363
+ fill: "none",
364
+ stroke: "currentColor",
365
+ strokeWidth: 2,
366
+ strokeLinecap: "round",
367
+ strokeLinejoin: "round"
368
+ };
369
+
370
+ // node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
371
+ var hasA11yProp = (props) => {
372
+ for (const prop in props) {
373
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
374
+ return true;
375
+ }
376
+ }
377
+ return false;
378
+ };
379
+ var LucideContext = React__default.createContext({});
380
+ var useLucideContext = () => React__default.useContext(LucideContext);
381
+
382
+ // node_modules/lucide-react/dist/esm/Icon.js
383
+ var Icon = React__default.forwardRef(
384
+ ({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
385
+ const {
386
+ size: contextSize = 24,
387
+ strokeWidth: contextStrokeWidth = 2,
388
+ absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
389
+ color: contextColor = "currentColor",
390
+ className: contextClass = ""
391
+ } = useLucideContext() ?? {};
392
+ const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
393
+ return React__default.createElement(
394
+ "svg",
395
+ {
396
+ ref,
397
+ ...defaultAttributes,
398
+ width: size ?? contextSize ?? defaultAttributes.width,
399
+ height: size ?? contextSize ?? defaultAttributes.height,
400
+ stroke: color ?? contextColor,
401
+ strokeWidth: calculatedStrokeWidth,
402
+ className: mergeClasses("lucide", contextClass, className),
403
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
404
+ ...rest
405
+ },
406
+ [
407
+ ...iconNode.map(([tag, attrs]) => React__default.createElement(tag, attrs)),
408
+ ...Array.isArray(children) ? children : [children]
409
+ ]
410
+ );
411
+ }
412
+ );
413
+
414
+ // node_modules/lucide-react/dist/esm/createLucideIcon.js
415
+ var createLucideIcon = (iconName, iconNode) => {
416
+ const Component2 = React__default.forwardRef(
417
+ ({ className, ...props }, ref) => React__default.createElement(Icon, {
418
+ ref,
419
+ iconNode,
420
+ className: mergeClasses(
421
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
422
+ `lucide-${iconName}`,
423
+ className
424
+ ),
425
+ ...props
426
+ })
427
+ );
428
+ Component2.displayName = toPascalCase(iconName);
429
+ return Component2;
430
+ };
431
+
432
+ // node_modules/lucide-react/dist/esm/icons/arrow-down.js
433
+ var __iconNode = [
434
+ ["path", { d: "M12 5v14", key: "s699le" }],
435
+ ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
436
+ ];
437
+ var ArrowDown = createLucideIcon("arrow-down", __iconNode);
438
+
439
+ // node_modules/lucide-react/dist/esm/icons/arrow-up.js
440
+ var __iconNode2 = [
441
+ ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
442
+ ["path", { d: "M12 19V5", key: "x0mq9r" }]
443
+ ];
444
+ var ArrowUp = createLucideIcon("arrow-up", __iconNode2);
445
+
446
+ // node_modules/lucide-react/dist/esm/icons/check.js
447
+ var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
448
+ var Check = createLucideIcon("check", __iconNode3);
449
+
450
+ // node_modules/lucide-react/dist/esm/icons/chevron-down.js
451
+ var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
452
+ var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
453
+
454
+ // node_modules/lucide-react/dist/esm/icons/chevron-right.js
455
+ var __iconNode5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
456
+ var ChevronRight = createLucideIcon("chevron-right", __iconNode5);
457
+
458
+ // node_modules/lucide-react/dist/esm/icons/code.js
459
+ var __iconNode6 = [
460
+ ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
461
+ ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
462
+ ];
463
+ var Code = createLucideIcon("code", __iconNode6);
464
+
465
+ // node_modules/lucide-react/dist/esm/icons/copy.js
466
+ var __iconNode7 = [
467
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
468
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
469
+ ];
470
+ var Copy = createLucideIcon("copy", __iconNode7);
471
+
472
+ // node_modules/lucide-react/dist/esm/icons/database.js
473
+ var __iconNode8 = [
474
+ ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
475
+ ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
476
+ ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
477
+ ];
478
+ var Database = createLucideIcon("database", __iconNode8);
479
+
480
+ // node_modules/lucide-react/dist/esm/icons/external-link.js
481
+ var __iconNode9 = [
482
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
483
+ ["path", { d: "M10 14 21 3", key: "gplh6r" }],
484
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
485
+ ];
486
+ var ExternalLink = createLucideIcon("external-link", __iconNode9);
487
+
488
+ // node_modules/lucide-react/dist/esm/icons/file-text.js
489
+ var __iconNode10 = [
490
+ [
491
+ "path",
492
+ {
493
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
494
+ key: "1oefj6"
495
+ }
496
+ ],
497
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
498
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
499
+ ["path", { d: "M16 13H8", key: "t4e002" }],
500
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
501
+ ];
502
+ var FileText = createLucideIcon("file-text", __iconNode10);
503
+
504
+ // node_modules/lucide-react/dist/esm/icons/file.js
505
+ var __iconNode11 = [
506
+ [
507
+ "path",
508
+ {
509
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
510
+ key: "1oefj6"
511
+ }
512
+ ],
513
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
514
+ ];
515
+ var File2 = createLucideIcon("file", __iconNode11);
516
+
517
+ // node_modules/lucide-react/dist/esm/icons/folder-open.js
518
+ var __iconNode12 = [
519
+ [
520
+ "path",
521
+ {
522
+ d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
523
+ key: "usdka0"
524
+ }
525
+ ]
526
+ ];
527
+ var FolderOpen = createLucideIcon("folder-open", __iconNode12);
528
+
529
+ // node_modules/lucide-react/dist/esm/icons/globe.js
530
+ var __iconNode13 = [
531
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
532
+ ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
533
+ ["path", { d: "M2 12h20", key: "9i4pu4" }]
534
+ ];
535
+ var Globe = createLucideIcon("globe", __iconNode13);
536
+
537
+ // node_modules/lucide-react/dist/esm/icons/grip-vertical.js
538
+ var __iconNode14 = [
539
+ ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
540
+ ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
541
+ ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
542
+ ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
543
+ ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
544
+ ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
545
+ ];
546
+ var GripVertical = createLucideIcon("grip-vertical", __iconNode14);
547
+
548
+ // node_modules/lucide-react/dist/esm/icons/image-plus.js
549
+ var __iconNode15 = [
550
+ ["path", { d: "M16 5h6", key: "1vod17" }],
551
+ ["path", { d: "M19 2v6", key: "4bpg5p" }],
552
+ ["path", { d: "M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5", key: "1ue2ih" }],
553
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
554
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
555
+ ];
556
+ var ImagePlus = createLucideIcon("image-plus", __iconNode15);
557
+
558
+ // node_modules/lucide-react/dist/esm/icons/image.js
559
+ var __iconNode16 = [
560
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
561
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
562
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
563
+ ];
564
+ var Image2 = createLucideIcon("image", __iconNode16);
565
+
566
+ // node_modules/lucide-react/dist/esm/icons/languages.js
567
+ var __iconNode17 = [
568
+ ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
569
+ ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
570
+ ["path", { d: "M2 5h12", key: "or177f" }],
571
+ ["path", { d: "M7 2h1", key: "1t2jsx" }],
572
+ ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
573
+ ["path", { d: "M14 18h6", key: "1m8k6r" }]
574
+ ];
575
+ var Languages = createLucideIcon("languages", __iconNode17);
576
+
577
+ // node_modules/lucide-react/dist/esm/icons/link-2.js
578
+ var __iconNode18 = [
579
+ ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
580
+ ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
581
+ ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
582
+ ];
583
+ var Link2 = createLucideIcon("link-2", __iconNode18);
584
+
585
+ // node_modules/lucide-react/dist/esm/icons/link.js
586
+ var __iconNode19 = [
587
+ ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
588
+ ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
589
+ ];
590
+ var Link = createLucideIcon("link", __iconNode19);
591
+
592
+ // node_modules/lucide-react/dist/esm/icons/loader-circle.js
593
+ var __iconNode20 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
594
+ var LoaderCircle = createLucideIcon("loader-circle", __iconNode20);
595
+
596
+ // node_modules/lucide-react/dist/esm/icons/pencil.js
597
+ var __iconNode21 = [
598
+ [
599
+ "path",
600
+ {
601
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
602
+ key: "1a8usu"
603
+ }
604
+ ],
605
+ ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
606
+ ];
607
+ var Pencil = createLucideIcon("pencil", __iconNode21);
608
+
609
+ // node_modules/lucide-react/dist/esm/icons/plus.js
610
+ var __iconNode22 = [
611
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
612
+ ["path", { d: "M12 5v14", key: "s699le" }]
613
+ ];
614
+ var Plus = createLucideIcon("plus", __iconNode22);
615
+
616
+ // node_modules/lucide-react/dist/esm/icons/refresh-ccw.js
617
+ var __iconNode23 = [
618
+ ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
619
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
620
+ ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
621
+ ["path", { d: "M16 16h5v5", key: "ccwih5" }]
622
+ ];
623
+ var RefreshCcw = createLucideIcon("refresh-ccw", __iconNode23);
624
+
625
+ // node_modules/lucide-react/dist/esm/icons/refresh-cw.js
626
+ var __iconNode24 = [
627
+ ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
628
+ ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
629
+ ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
630
+ ["path", { d: "M8 16H3v5", key: "1cv678" }]
631
+ ];
632
+ var RefreshCw = createLucideIcon("refresh-cw", __iconNode24);
633
+
634
+ // node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
635
+ var __iconNode25 = [
636
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
637
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
638
+ ];
639
+ var RotateCcw = createLucideIcon("rotate-ccw", __iconNode25);
640
+
641
+ // node_modules/lucide-react/dist/esm/icons/search.js
642
+ var __iconNode26 = [
643
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
644
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
645
+ ];
646
+ var Search = createLucideIcon("search", __iconNode26);
647
+
648
+ // node_modules/lucide-react/dist/esm/icons/trash-2.js
649
+ var __iconNode27 = [
650
+ ["path", { d: "M10 11v6", key: "nco0om" }],
651
+ ["path", { d: "M14 11v6", key: "outv1u" }],
652
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
653
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
654
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
655
+ ];
656
+ var Trash2 = createLucideIcon("trash-2", __iconNode27);
657
+
658
+ // node_modules/lucide-react/dist/esm/icons/upload.js
659
+ var __iconNode28 = [
660
+ ["path", { d: "M12 3v12", key: "1x0j5s" }],
661
+ ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
662
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
663
+ ];
664
+ var Upload = createLucideIcon("upload", __iconNode28);
665
+
666
+ // node_modules/lucide-react/dist/esm/icons/x.js
667
+ var __iconNode29 = [
668
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
669
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
670
+ ];
671
+ var X = createLucideIcon("x", __iconNode29);
336
672
  var EMPTY_PAGE = { content: [], root: { props: {} }, zones: {} };
337
673
  var ComponentDrawerItem = ({
338
674
  name: name3,
@@ -383,6 +719,93 @@ var ComponentDrawerItem = ({
383
719
  ] })
384
720
  ] });
385
721
  };
722
+ var AutoFieldsOnSelect = () => {
723
+ const { selectedItem, dispatch } = core.usePuck();
724
+ const prevSelectedRef = React__default.useRef(null);
725
+ React__default.useEffect(() => {
726
+ const currentId = selectedItem?.props?.id || null;
727
+ if (currentId && currentId !== prevSelectedRef.current) {
728
+ dispatch({
729
+ type: "setUi",
730
+ ui: { plugin: { current: "fields" } }
731
+ });
732
+ }
733
+ prevSelectedRef.current = currentId;
734
+ }, [selectedItem, dispatch]);
735
+ return null;
736
+ };
737
+ var CustomActionBar = ({ children, label }) => {
738
+ const { appState, dispatch, getSelectorForId, selectedItem } = core.usePuck();
739
+ const canMoveUp = React__default.useMemo(() => {
740
+ if (!selectedItem || !selectedItem.props?.id) return false;
741
+ const selector = getSelectorForId(selectedItem.props.id);
742
+ if (!selector) return false;
743
+ return selector.index > 0;
744
+ }, [selectedItem, getSelectorForId]);
745
+ const canMoveDown = React__default.useMemo(() => {
746
+ if (!selectedItem || !selectedItem.props?.id) return false;
747
+ const selector = getSelectorForId(selectedItem.props.id);
748
+ if (!selector) return false;
749
+ const { index: index2, zone } = selector;
750
+ const items = zone ? appState.data.zones?.[zone] || [] : appState.data.content || [];
751
+ return index2 < items.length - 1;
752
+ }, [selectedItem, getSelectorForId, appState.data]);
753
+ const handleMove = React__default.useCallback((direction) => {
754
+ if (!selectedItem || !selectedItem.props?.id) return;
755
+ const selector = getSelectorForId(selectedItem.props.id);
756
+ if (!selector) return;
757
+ const { index: index2, zone } = selector;
758
+ let items = zone ? [...appState.data.zones?.[zone] || []] : [...appState.data.content || []];
759
+ const targetIndex = direction === "up" ? index2 - 1 : index2 + 1;
760
+ if (targetIndex < 0 || targetIndex >= items.length) return;
761
+ const temp = items[index2];
762
+ items[index2] = items[targetIndex];
763
+ items[targetIndex] = temp;
764
+ if (zone) {
765
+ dispatch({
766
+ type: "setData",
767
+ data: {
768
+ ...appState.data,
769
+ zones: {
770
+ ...appState.data.zones,
771
+ [zone]: items
772
+ }
773
+ }
774
+ });
775
+ dispatch({
776
+ type: "setUi",
777
+ ui: {
778
+ itemSelector: {
779
+ index: targetIndex,
780
+ zone
781
+ }
782
+ }
783
+ });
784
+ } else {
785
+ dispatch({
786
+ type: "setData",
787
+ data: {
788
+ ...appState.data,
789
+ content: items
790
+ }
791
+ });
792
+ dispatch({
793
+ type: "setUi",
794
+ ui: {
795
+ itemSelector: {
796
+ index: targetIndex
797
+ }
798
+ }
799
+ });
800
+ }
801
+ }, [selectedItem, getSelectorForId, appState.data, dispatch]);
802
+ return /* @__PURE__ */ jsxRuntime.jsx(core.ActionBar, { label, children: /* @__PURE__ */ jsxRuntime.jsxs(core.ActionBar.Group, { children: [
803
+ /* @__PURE__ */ jsxRuntime.jsx(core.ActionBar.Action, { onClick: () => handleMove("up"), disabled: !canMoveUp, label: "Yukar\u0131 Ta\u015F\u0131", children: /* @__PURE__ */ jsxRuntime.jsx(ArrowUp, { size: 14 }) }),
804
+ /* @__PURE__ */ jsxRuntime.jsx(core.ActionBar.Action, { onClick: () => handleMove("down"), disabled: !canMoveDown, label: "A\u015Fa\u011F\u0131 Ta\u015F\u0131", children: /* @__PURE__ */ jsxRuntime.jsx(ArrowDown, { size: 14 }) }),
805
+ /* @__PURE__ */ jsxRuntime.jsx(core.ActionBar.Separator, {}),
806
+ children
807
+ ] }) });
808
+ };
386
809
  var TecofEditor = ({
387
810
  pageId,
388
811
  config: config3,
@@ -398,6 +821,7 @@ var TecofEditor = ({
398
821
  const [loading, setLoading] = React__default.useState(true);
399
822
  const [saving, setSaving] = React__default.useState(false);
400
823
  const [saveStatus, setSaveStatus] = React__default.useState("idle");
824
+ const [searchQuery, setSearchQuery] = React__default.useState("");
401
825
  const draftDataRef = React__default.useRef(null);
402
826
  const isEmbedded = typeof window !== "undefined" && window.parent !== window;
403
827
  React__default.useEffect(() => {
@@ -525,9 +949,56 @@ var TecofEditor = ({
525
949
  ];
526
950
  const mergedOverrides = {
527
951
  header: () => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
952
+ drawer: ({ children }) => {
953
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-wrapper-layout", children: [
954
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-search-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-search-box", children: [
955
+ /* @__PURE__ */ jsxRuntime.jsx(Search, { size: 14, color: "#71717a" }),
956
+ /* @__PURE__ */ jsxRuntime.jsx(
957
+ "input",
958
+ {
959
+ type: "text",
960
+ placeholder: "Blok ara...",
961
+ value: searchQuery,
962
+ onChange: (e3) => setSearchQuery(e3.target.value),
963
+ className: "tecof-drawer-search-input"
964
+ }
965
+ ),
966
+ searchQuery && /* @__PURE__ */ jsxRuntime.jsx(
967
+ "button",
968
+ {
969
+ type: "button",
970
+ onClick: () => setSearchQuery(""),
971
+ className: "tecof-drawer-clear-btn",
972
+ title: "Temizle",
973
+ children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 14 })
974
+ }
975
+ )
976
+ ] }) }),
977
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-list-layout", children })
978
+ ] });
979
+ },
528
980
  drawerItem: ({ children, name: name3 }) => {
981
+ const componentConfig = config3.components?.[name3];
982
+ const label = componentConfig?.label || name3;
983
+ if (searchQuery.trim()) {
984
+ const query = searchQuery.toLowerCase();
985
+ const matchesName = name3.toLowerCase().includes(query);
986
+ const matchesLabel = label.toLowerCase().includes(query);
987
+ if (!matchesName && !matchesLabel) {
988
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
989
+ }
990
+ }
529
991
  return /* @__PURE__ */ jsxRuntime.jsx(ComponentDrawerItem, { name: name3, apiClient, children });
530
992
  },
993
+ actionBar: ({ children, label }) => {
994
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomActionBar, { label, children });
995
+ },
996
+ puck: ({ children }) => {
997
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
998
+ /* @__PURE__ */ jsxRuntime.jsx(AutoFieldsOnSelect, {}),
999
+ children
1000
+ ] });
1001
+ },
531
1002
  ...overrides || {}
532
1003
  };
533
1004
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `tecof-editor-wrapper ${className || ""}`.trim(), children: [
@@ -679,370 +1150,284 @@ var TecofPicture = React__default.memo(({
679
1150
  return null;
680
1151
  });
681
1152
  TecofPicture.displayName = "TecofPicture";
682
- var merchantInfoCache = /* @__PURE__ */ new Map();
683
- var CACHE_TTL = 5 * 60 * 1e3;
684
- function useLanguages() {
685
- const { apiClient, secretKey, apiUrl } = useTecof();
686
- const [merchantInfo, setMerchantInfo] = React__default.useState(null);
687
- const [loading, setLoading] = React__default.useState(true);
688
- const [error2, setError] = React__default.useState(null);
689
- const [activeTab, setActiveTab] = React__default.useState("");
690
- const cacheKey = React__default.useMemo(() => `${apiUrl}::${secretKey}`, [apiUrl, secretKey]);
691
- React__default.useEffect(() => {
692
- let cancelled = false;
693
- const fetchInfo = async () => {
694
- const cached = merchantInfoCache.get(cacheKey);
695
- if (cached && Date.now() - cached.ts < CACHE_TTL) {
696
- setMerchantInfo(cached.data);
697
- if (!activeTab) setActiveTab(cached.data.defaultLanguage);
698
- setLoading(false);
699
- return;
700
- }
701
- setLoading(true);
702
- setError(null);
703
- const res2 = await apiClient.getMerchantInfo();
704
- if (cancelled) return;
705
- if (res2.success && res2.data) {
706
- merchantInfoCache.set(cacheKey, { data: res2.data, ts: Date.now() });
707
- setMerchantInfo(res2.data);
708
- if (!activeTab) setActiveTab(res2.data.defaultLanguage);
709
- } else {
710
- setError(res2.message || "Failed to load languages");
711
- const fallback = { languages: ["tr"], defaultLanguage: "tr" };
712
- setMerchantInfo(fallback);
713
- if (!activeTab) setActiveTab("tr");
714
- }
715
- setLoading(false);
716
- };
717
- fetchInfo();
718
- return () => {
719
- cancelled = true;
720
- };
721
- }, [apiClient, cacheKey]);
722
- return { merchantInfo, loading, error: error2, activeTab, setActiveTab };
723
- }
724
-
725
- // node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
726
- var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
727
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
728
- }).join(" ").trim();
729
-
730
- // node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
731
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
732
-
733
- // node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
734
- var toCamelCase = (string) => string.replace(
735
- /^([A-Z])|[\s-_]+(\w)/g,
736
- (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
737
- );
738
-
739
- // node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
740
- var toPascalCase = (string) => {
741
- const camelCase = toCamelCase(string);
742
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
743
- };
744
-
745
- // node_modules/lucide-react/dist/esm/defaultAttributes.js
746
- var defaultAttributes = {
747
- xmlns: "http://www.w3.org/2000/svg",
748
- width: 24,
749
- height: 24,
750
- viewBox: "0 0 24 24",
751
- fill: "none",
752
- stroke: "currentColor",
753
- strokeWidth: 2,
754
- strokeLinecap: "round",
755
- strokeLinejoin: "round"
756
- };
757
-
758
- // node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
759
- var hasA11yProp = (props) => {
760
- for (const prop in props) {
761
- if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
762
- return true;
763
- }
764
- }
765
- return false;
766
- };
767
- var LucideContext = React__default.createContext({});
768
- var useLucideContext = () => React__default.useContext(LucideContext);
769
-
770
- // node_modules/lucide-react/dist/esm/Icon.js
771
- var Icon = React__default.forwardRef(
772
- ({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
773
- const {
774
- size: contextSize = 24,
775
- strokeWidth: contextStrokeWidth = 2,
776
- absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
777
- color: contextColor = "currentColor",
778
- className: contextClass = ""
779
- } = useLucideContext() ?? {};
780
- const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
781
- return React__default.createElement(
782
- "svg",
783
- {
784
- ref,
785
- ...defaultAttributes,
786
- width: size ?? contextSize ?? defaultAttributes.width,
787
- height: size ?? contextSize ?? defaultAttributes.height,
788
- stroke: color ?? contextColor,
789
- strokeWidth: calculatedStrokeWidth,
790
- className: mergeClasses("lucide", contextClass, className),
791
- ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
792
- ...rest
793
- },
794
- [
795
- ...iconNode.map(([tag, attrs]) => React__default.createElement(tag, attrs)),
796
- ...Array.isArray(children) ? children : [children]
797
- ]
798
- );
799
- }
800
- );
801
-
802
- // node_modules/lucide-react/dist/esm/createLucideIcon.js
803
- var createLucideIcon = (iconName, iconNode) => {
804
- const Component2 = React__default.forwardRef(
805
- ({ className, ...props }, ref) => React__default.createElement(Icon, {
806
- ref,
807
- iconNode,
808
- className: mergeClasses(
809
- `lucide-${toKebabCase(toPascalCase(iconName))}`,
810
- `lucide-${iconName}`,
811
- className
812
- ),
813
- ...props
814
- })
815
- );
816
- Component2.displayName = toPascalCase(iconName);
817
- return Component2;
818
- };
819
-
820
- // node_modules/lucide-react/dist/esm/icons/check.js
821
- var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
822
- var Check = createLucideIcon("check", __iconNode);
823
-
824
- // node_modules/lucide-react/dist/esm/icons/chevron-down.js
825
- var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
826
- var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
827
-
828
- // node_modules/lucide-react/dist/esm/icons/chevron-right.js
829
- var __iconNode3 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
830
- var ChevronRight = createLucideIcon("chevron-right", __iconNode3);
831
-
832
- // node_modules/lucide-react/dist/esm/icons/code.js
833
- var __iconNode4 = [
834
- ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
835
- ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
836
- ];
837
- var Code = createLucideIcon("code", __iconNode4);
838
-
839
- // node_modules/lucide-react/dist/esm/icons/copy.js
840
- var __iconNode5 = [
841
- ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
842
- ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
843
- ];
844
- var Copy = createLucideIcon("copy", __iconNode5);
845
-
846
- // node_modules/lucide-react/dist/esm/icons/database.js
847
- var __iconNode6 = [
848
- ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
849
- ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
850
- ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
851
- ];
852
- var Database = createLucideIcon("database", __iconNode6);
853
-
854
- // node_modules/lucide-react/dist/esm/icons/external-link.js
855
- var __iconNode7 = [
856
- ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
857
- ["path", { d: "M10 14 21 3", key: "gplh6r" }],
858
- ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
859
- ];
860
- var ExternalLink = createLucideIcon("external-link", __iconNode7);
861
-
862
- // node_modules/lucide-react/dist/esm/icons/file-text.js
863
- var __iconNode8 = [
864
- [
865
- "path",
866
- {
867
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
868
- key: "1oefj6"
869
- }
870
- ],
871
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
872
- ["path", { d: "M10 9H8", key: "b1mrlr" }],
873
- ["path", { d: "M16 13H8", key: "t4e002" }],
874
- ["path", { d: "M16 17H8", key: "z1uh3a" }]
875
- ];
876
- var FileText = createLucideIcon("file-text", __iconNode8);
1153
+ var UnderConstruction = ({
1154
+ title,
1155
+ description,
1156
+ subtitle,
1157
+ logoUrl,
1158
+ accentColor = "#2563eb"
1159
+ // Default elegant blue
1160
+ }) => {
1161
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-wrapper", children: [
1162
+ /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: `
1163
+ .tecof-uc-wrapper {
1164
+ min-height: 100vh;
1165
+ display: flex;
1166
+ align-items: center;
1167
+ justify-content: center;
1168
+ background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
1169
+ radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
1170
+ #090d16;
1171
+ color: #f8fafc;
1172
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
1173
+ padding: 2rem 1rem;
1174
+ box-sizing: border-box;
1175
+ position: relative;
1176
+ overflow: hidden;
1177
+ }
877
1178
 
878
- // node_modules/lucide-react/dist/esm/icons/file.js
879
- var __iconNode9 = [
880
- [
881
- "path",
882
- {
883
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
884
- key: "1oefj6"
885
- }
886
- ],
887
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
888
- ];
889
- var File2 = createLucideIcon("file", __iconNode9);
1179
+ /* Ambient glowing circles */
1180
+ .tecof-uc-glow-1 {
1181
+ position: absolute;
1182
+ top: 20%;
1183
+ left: 50%;
1184
+ transform: translate(-50%, -50%);
1185
+ width: 500px;
1186
+ height: 500px;
1187
+ background: ${accentColor};
1188
+ filter: blur(150px);
1189
+ opacity: 0.12;
1190
+ pointer-events: none;
1191
+ z-index: 1;
1192
+ border-radius: 50%;
1193
+ animation: tecof-uc-pulse 8s infinite alternate ease-in-out;
1194
+ }
890
1195
 
891
- // node_modules/lucide-react/dist/esm/icons/folder-open.js
892
- var __iconNode10 = [
893
- [
894
- "path",
895
- {
896
- d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
897
- key: "usdka0"
898
- }
899
- ]
900
- ];
901
- var FolderOpen = createLucideIcon("folder-open", __iconNode10);
1196
+ .tecof-uc-container {
1197
+ position: relative;
1198
+ z-index: 2;
1199
+ max-width: 540px;
1200
+ width: 100%;
1201
+ background: rgba(17, 24, 39, 0.55);
1202
+ backdrop-filter: blur(20px);
1203
+ -webkit-backdrop-filter: blur(20px);
1204
+ border: 1px solid rgba(255, 255, 255, 0.08);
1205
+ border-radius: 24px;
1206
+ padding: 3.5rem 2.5rem;
1207
+ text-align: center;
1208
+ box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
1209
+ inset 0 1px 0 rgba(255, 255, 255, 0.1);
1210
+ animation: tecof-uc-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
1211
+ }
902
1212
 
903
- // node_modules/lucide-react/dist/esm/icons/globe.js
904
- var __iconNode11 = [
905
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
906
- ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
907
- ["path", { d: "M2 12h20", key: "9i4pu4" }]
908
- ];
909
- var Globe = createLucideIcon("globe", __iconNode11);
1213
+ .tecof-uc-logo-area {
1214
+ margin-bottom: 2.5rem;
1215
+ display: flex;
1216
+ justify-content: center;
1217
+ align-items: center;
1218
+ }
910
1219
 
911
- // node_modules/lucide-react/dist/esm/icons/grip-vertical.js
912
- var __iconNode12 = [
913
- ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
914
- ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
915
- ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
916
- ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
917
- ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
918
- ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
919
- ];
920
- var GripVertical = createLucideIcon("grip-vertical", __iconNode12);
1220
+ .tecof-uc-logo {
1221
+ max-height: 56px;
1222
+ max-width: 200px;
1223
+ object-fit: contain;
1224
+ filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
1225
+ }
921
1226
 
922
- // node_modules/lucide-react/dist/esm/icons/image-plus.js
923
- var __iconNode13 = [
924
- ["path", { d: "M16 5h6", key: "1vod17" }],
925
- ["path", { d: "M19 2v6", key: "4bpg5p" }],
926
- ["path", { d: "M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5", key: "1ue2ih" }],
927
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
928
- ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
929
- ];
930
- var ImagePlus = createLucideIcon("image-plus", __iconNode13);
1227
+ .tecof-uc-logo-fallback {
1228
+ font-size: 1.5rem;
1229
+ font-weight: 700;
1230
+ letter-spacing: -0.025em;
1231
+ background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
1232
+ -webkit-background-clip: text;
1233
+ -webkit-text-fill-color: transparent;
1234
+ }
931
1235
 
932
- // node_modules/lucide-react/dist/esm/icons/image.js
933
- var __iconNode14 = [
934
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
935
- ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
936
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
937
- ];
938
- var Image2 = createLucideIcon("image", __iconNode14);
1236
+ .tecof-uc-icon-wrapper {
1237
+ width: 80px;
1238
+ height: 80px;
1239
+ border-radius: 20px;
1240
+ background: rgba(255, 255, 255, 0.03);
1241
+ border: 1px solid rgba(255, 255, 255, 0.08);
1242
+ display: flex;
1243
+ align-items: center;
1244
+ justify-content: center;
1245
+ margin: 0 auto 2.2rem auto;
1246
+ color: ${accentColor};
1247
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
1248
+ position: relative;
1249
+ }
939
1250
 
940
- // node_modules/lucide-react/dist/esm/icons/languages.js
941
- var __iconNode15 = [
942
- ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
943
- ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
944
- ["path", { d: "M2 5h12", key: "or177f" }],
945
- ["path", { d: "M7 2h1", key: "1t2jsx" }],
946
- ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
947
- ["path", { d: "M14 18h6", key: "1m8k6r" }]
948
- ];
949
- var Languages = createLucideIcon("languages", __iconNode15);
1251
+ .tecof-uc-icon-glow {
1252
+ position: absolute;
1253
+ inset: -2px;
1254
+ border-radius: 22px;
1255
+ background: linear-gradient(135deg, ${accentColor}, transparent);
1256
+ opacity: 0.3;
1257
+ z-index: -1;
1258
+ filter: blur(4px);
1259
+ }
950
1260
 
951
- // node_modules/lucide-react/dist/esm/icons/link-2.js
952
- var __iconNode16 = [
953
- ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
954
- ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
955
- ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
956
- ];
957
- var Link2 = createLucideIcon("link-2", __iconNode16);
1261
+ .tecof-uc-icon-wrapper svg {
1262
+ width: 36px;
1263
+ height: 36px;
1264
+ stroke-width: 1.5;
1265
+ animation: tecof-uc-float 4s ease-in-out infinite;
1266
+ }
958
1267
 
959
- // node_modules/lucide-react/dist/esm/icons/link.js
960
- var __iconNode17 = [
961
- ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
962
- ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
963
- ];
964
- var Link = createLucideIcon("link", __iconNode17);
1268
+ .tecof-uc-subtitle {
1269
+ font-size: 0.875rem;
1270
+ font-weight: 600;
1271
+ text-transform: uppercase;
1272
+ letter-spacing: 0.15em;
1273
+ color: ${accentColor};
1274
+ margin-bottom: 0.75rem;
1275
+ }
965
1276
 
966
- // node_modules/lucide-react/dist/esm/icons/loader-circle.js
967
- var __iconNode18 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
968
- var LoaderCircle = createLucideIcon("loader-circle", __iconNode18);
1277
+ .tecof-uc-title {
1278
+ font-size: 2.25rem;
1279
+ font-weight: 800;
1280
+ line-height: 1.2;
1281
+ letter-spacing: -0.025em;
1282
+ color: #ffffff;
1283
+ margin-top: 0;
1284
+ margin-bottom: 1.25rem;
1285
+ background: linear-gradient(to bottom, #ffffff 0%, #cbd5e1 100%);
1286
+ -webkit-background-clip: text;
1287
+ -webkit-text-fill-color: transparent;
1288
+ }
969
1289
 
970
- // node_modules/lucide-react/dist/esm/icons/pencil.js
971
- var __iconNode19 = [
972
- [
973
- "path",
974
- {
975
- d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
976
- key: "1a8usu"
977
- }
978
- ],
979
- ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
980
- ];
981
- var Pencil = createLucideIcon("pencil", __iconNode19);
1290
+ .tecof-uc-description {
1291
+ font-size: 1.05rem;
1292
+ line-height: 1.6;
1293
+ color: #94a3b8;
1294
+ margin: 0 auto 2.5rem auto;
1295
+ max-width: 420px;
1296
+ }
982
1297
 
983
- // node_modules/lucide-react/dist/esm/icons/plus.js
984
- var __iconNode20 = [
985
- ["path", { d: "M5 12h14", key: "1ays0h" }],
986
- ["path", { d: "M12 5v14", key: "s699le" }]
987
- ];
988
- var Plus = createLucideIcon("plus", __iconNode20);
1298
+ .tecof-uc-divider {
1299
+ height: 1px;
1300
+ background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 100%);
1301
+ margin-bottom: 2rem;
1302
+ }
989
1303
 
990
- // node_modules/lucide-react/dist/esm/icons/refresh-ccw.js
991
- var __iconNode21 = [
992
- ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
993
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
994
- ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
995
- ["path", { d: "M16 16h5v5", key: "ccwih5" }]
996
- ];
997
- var RefreshCcw = createLucideIcon("refresh-ccw", __iconNode21);
1304
+ .tecof-uc-badge {
1305
+ display: inline-flex;
1306
+ align-items: center;
1307
+ gap: 0.5rem;
1308
+ background: rgba(255, 255, 255, 0.04);
1309
+ border: 1px solid rgba(255, 255, 255, 0.08);
1310
+ border-radius: 99px;
1311
+ padding: 0.5rem 1.25rem;
1312
+ font-size: 0.825rem;
1313
+ font-weight: 500;
1314
+ color: #94a3b8;
1315
+ text-decoration: none;
1316
+ transition: all 0.2s ease-in-out;
1317
+ }
998
1318
 
999
- // node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1000
- var __iconNode22 = [
1001
- ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1002
- ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
1003
- ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
1004
- ["path", { d: "M8 16H3v5", key: "1cv678" }]
1005
- ];
1006
- var RefreshCw = createLucideIcon("refresh-cw", __iconNode22);
1319
+ .tecof-uc-badge:hover {
1320
+ background: rgba(255, 255, 255, 0.08);
1321
+ border-color: rgba(255, 255, 255, 0.15);
1322
+ color: #f8fafc;
1323
+ transform: translateY(-1px);
1324
+ }
1007
1325
 
1008
- // node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
1009
- var __iconNode23 = [
1010
- ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
1011
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
1012
- ];
1013
- var RotateCcw = createLucideIcon("rotate-ccw", __iconNode23);
1326
+ .tecof-uc-badge-dot {
1327
+ width: 6px;
1328
+ height: 6px;
1329
+ background-color: ${accentColor};
1330
+ border-radius: 50%;
1331
+ box-shadow: 0 0 10px ${accentColor};
1332
+ animation: tecof-uc-blink 1.5s infinite alternate;
1333
+ }
1014
1334
 
1015
- // node_modules/lucide-react/dist/esm/icons/search.js
1016
- var __iconNode24 = [
1017
- ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
1018
- ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
1019
- ];
1020
- var Search = createLucideIcon("search", __iconNode24);
1335
+ /* Animations */
1336
+ @keyframes tecof-uc-pulse {
1337
+ 0% { opacity: 0.08; transform: translate(-50%, -50%) scale(0.95); }
1338
+ 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1.05); }
1339
+ }
1021
1340
 
1022
- // node_modules/lucide-react/dist/esm/icons/trash-2.js
1023
- var __iconNode25 = [
1024
- ["path", { d: "M10 11v6", key: "nco0om" }],
1025
- ["path", { d: "M14 11v6", key: "outv1u" }],
1026
- ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
1027
- ["path", { d: "M3 6h18", key: "d0wm0j" }],
1028
- ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
1029
- ];
1030
- var Trash2 = createLucideIcon("trash-2", __iconNode25);
1341
+ @keyframes tecof-uc-fade-in {
1342
+ 0% { opacity: 0; transform: translateY(20px); }
1343
+ 100% { opacity: 1; transform: translateY(0); }
1344
+ }
1031
1345
 
1032
- // node_modules/lucide-react/dist/esm/icons/upload.js
1033
- var __iconNode26 = [
1034
- ["path", { d: "M12 3v12", key: "1x0j5s" }],
1035
- ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
1036
- ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
1037
- ];
1038
- var Upload = createLucideIcon("upload", __iconNode26);
1346
+ @keyframes tecof-uc-float {
1347
+ 0% { transform: translateY(0px) rotate(0deg); }
1348
+ 50% { transform: translateY(-5px) rotate(3deg); }
1349
+ 100% { transform: translateY(0px) rotate(0deg); }
1350
+ }
1039
1351
 
1040
- // node_modules/lucide-react/dist/esm/icons/x.js
1041
- var __iconNode27 = [
1042
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1043
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1044
- ];
1045
- var X = createLucideIcon("x", __iconNode27);
1352
+ @keyframes tecof-uc-blink {
1353
+ 0% { opacity: 0.3; }
1354
+ 100% { opacity: 1; }
1355
+ }
1356
+
1357
+ @media (max-width: 640px) {
1358
+ .tecof-uc-container {
1359
+ padding: 2.5rem 1.5rem;
1360
+ border-radius: 20px;
1361
+ }
1362
+ .tecof-uc-title {
1363
+ font-size: 1.75rem;
1364
+ }
1365
+ .tecof-uc-description {
1366
+ font-size: 0.95rem;
1367
+ margin-bottom: 2rem;
1368
+ }
1369
+ }
1370
+ ` } }),
1371
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-glow-1" }),
1372
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-container", children: [
1373
+ logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-logo-area", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: "Store Logo", className: "tecof-uc-logo" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-logo-area", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-logo-fallback", children: "TECOF" }) }),
1374
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-icon-wrapper", children: [
1375
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-icon-glow" }),
1376
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z", strokeLinecap: "round", strokeLinejoin: "round" }) })
1377
+ ] }),
1378
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-subtitle", children: subtitle }),
1379
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "tecof-uc-title", children: title }),
1380
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-uc-description", children: description }),
1381
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-divider" }),
1382
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-badge", children: [
1383
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tecof-uc-badge-dot" }),
1384
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Yap\u0131m A\u015Famas\u0131nda" })
1385
+ ] })
1386
+ ] })
1387
+ ] });
1388
+ };
1389
+ var merchantInfoCache = /* @__PURE__ */ new Map();
1390
+ var CACHE_TTL = 5 * 60 * 1e3;
1391
+ function useLanguages() {
1392
+ const { apiClient, secretKey, apiUrl } = useTecof();
1393
+ const [merchantInfo, setMerchantInfo] = React__default.useState(null);
1394
+ const [loading, setLoading] = React__default.useState(true);
1395
+ const [error2, setError] = React__default.useState(null);
1396
+ const [activeTab, setActiveTab] = React__default.useState("");
1397
+ const cacheKey = React__default.useMemo(() => `${apiUrl}::${secretKey}`, [apiUrl, secretKey]);
1398
+ React__default.useEffect(() => {
1399
+ let cancelled = false;
1400
+ const fetchInfo = async () => {
1401
+ const cached = merchantInfoCache.get(cacheKey);
1402
+ if (cached && Date.now() - cached.ts < CACHE_TTL) {
1403
+ setMerchantInfo(cached.data);
1404
+ if (!activeTab) setActiveTab(cached.data.defaultLanguage);
1405
+ setLoading(false);
1406
+ return;
1407
+ }
1408
+ setLoading(true);
1409
+ setError(null);
1410
+ const res2 = await apiClient.getMerchantInfo();
1411
+ if (cancelled) return;
1412
+ if (res2.success && res2.data) {
1413
+ merchantInfoCache.set(cacheKey, { data: res2.data, ts: Date.now() });
1414
+ setMerchantInfo(res2.data);
1415
+ if (!activeTab) setActiveTab(res2.data.defaultLanguage);
1416
+ } else {
1417
+ setError(res2.message || "Failed to load languages");
1418
+ const fallback = { languages: ["tr"], defaultLanguage: "tr" };
1419
+ setMerchantInfo(fallback);
1420
+ if (!activeTab) setActiveTab("tr");
1421
+ }
1422
+ setLoading(false);
1423
+ };
1424
+ fetchInfo();
1425
+ return () => {
1426
+ cancelled = true;
1427
+ };
1428
+ }, [apiClient, cacheKey]);
1429
+ return { merchantInfo, loading, error: error2, activeTab, setActiveTab };
1430
+ }
1046
1431
  var FieldErrorBoundary = class extends React__default.Component {
1047
1432
  constructor(props) {
1048
1433
  super(props);
@@ -4943,7 +5328,7 @@ var MediaDrawer = ({
4943
5328
  alt: file2.name,
4944
5329
  size: "thumbnail",
4945
5330
  className: "tecof-upload-gallery-thumb",
4946
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
5331
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
4947
5332
  }
4948
5333
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 24, color: "#a1a1aa" }) }),
4949
5334
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
@@ -22821,16 +23206,16 @@ var FileItemRenderer = ({
22821
23206
  `${cdnUrl}/${file2.name}`;
22822
23207
  const ext = getFileExtension(file2.name);
22823
23208
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-item", children: [
22824
- file2.type === "image/reference" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-file-icon", style: { backgroundColor: "#eef2ff", color: "#4f46e5" }, children: /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 20 }) }) : isImageType2(file2.type) ? /* @__PURE__ */ jsxRuntime.jsx(
23209
+ file2.type === "image/reference" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-file-icon", style: { backgroundColor: "#f4f4f5", color: "#18181b" }, children: /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 16 }) }) : isImageType2(file2.type) ? /* @__PURE__ */ jsxRuntime.jsx(
22825
23210
  TecofPicture,
22826
23211
  {
22827
23212
  data: file2,
22828
23213
  alt: file2.meta?.originalName || file2.name,
22829
23214
  size: "thumbnail",
22830
23215
  className: "tecof-upload-file-thumb",
22831
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "10px" }
23216
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
22832
23217
  }
22833
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-file-icon", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 20 }) }),
23218
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-file-icon", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 16 }) }),
22834
23219
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-info", children: [
22835
23220
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-file-name", title: file2.meta?.originalName || file2.name, children: file2.meta?.originalName || file2.name }),
22836
23221
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-meta", children: [
@@ -22959,10 +23344,6 @@ var UploadField = ({
22959
23344
  const [drawerOpen, setDrawerOpen] = React__default.useState(false);
22960
23345
  const [showRefInput, setShowRefInput] = React__default.useState(false);
22961
23346
  const [refCode, setRefCode] = React__default.useState("{{ data. }}");
22962
- const [galleryFiles, setGalleryFiles] = React__default.useState([]);
22963
- const [loading, setLoading] = React__default.useState(false);
22964
- const [refreshKey, setRefreshKey] = React__default.useState(0);
22965
- const [gallerySearch, setGallerySearch] = React__default.useState("");
22966
23347
  const sourceToIdRef = React__default.useRef(/* @__PURE__ */ new Map());
22967
23348
  const compressFile = React__default.useCallback(async (file2) => {
22968
23349
  if (!imageCompressionEnabled) return file2;
@@ -23019,16 +23400,6 @@ var UploadField = ({
23019
23400
  setShowRefInput(false);
23020
23401
  setRefCode("{{ data. }}");
23021
23402
  }, [refCode, allowMultiple, value, onChange]);
23022
- React__default.useEffect(() => {
23023
- if (!drawerOpen) return;
23024
- setLoading(true);
23025
- apiClient.getUploads(1, 100).then((res2) => {
23026
- if (res2.success && res2.data) {
23027
- setGalleryFiles(res2.data);
23028
- }
23029
- setLoading(false);
23030
- }).catch(() => setLoading(false));
23031
- }, [drawerOpen, refreshKey, apiClient]);
23032
23403
  const toggleGalleryFile = React__default.useCallback((file2) => {
23033
23404
  if (allowMultiple) {
23034
23405
  const exists = value.some((f2) => f2._id === file2._id);
@@ -23101,9 +23472,6 @@ var UploadField = ({
23101
23472
  }
23102
23473
  };
23103
23474
  const canAddMore = allowMultiple ? value.length < maxFiles : value.length === 0;
23104
- const filteredGallery = gallerySearch.trim() ? galleryFiles.filter(
23105
- (f2) => f2.name?.toLowerCase().includes(gallerySearch.toLowerCase()) || f2.meta?.originalName?.toLowerCase().includes(gallerySearch.toLowerCase())
23106
- ) : galleryFiles;
23107
23475
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-container", children: [
23108
23476
  value.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-list", children: [
23109
23477
  showUploadedFiles && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-uploaded-header", children: [
@@ -23121,52 +23489,50 @@ var UploadField = ({
23121
23489
  file2._id || idx
23122
23490
  ))
23123
23491
  ] }),
23124
- value.length === 0 && !readOnly && canAddMore && !showPond && /* @__PURE__ */ jsxRuntime.jsxs(
23125
- "div",
23126
- {
23127
- className: "tecof-upload-empty-state",
23128
- onClick: () => setDrawerOpen(true),
23129
- children: [
23130
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ImagePlus, { size: 22 }) }),
23131
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-title", children: "Dosya ekleyin" }),
23132
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-desc", children: "Medya k\xFCt\xFCphanesinden se\xE7in veya yeni y\xFCkleyin" })
23133
- ]
23134
- }
23135
- ),
23492
+ value.length === 0 && !readOnly && canAddMore && !showPond && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
23493
+ /* @__PURE__ */ jsxRuntime.jsxs(
23494
+ "div",
23495
+ {
23496
+ className: "tecof-upload-empty-state",
23497
+ onClick: () => setDrawerOpen(true),
23498
+ children: [
23499
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ImagePlus, { size: 16 }) }),
23500
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-title", children: "Dosya ekleyin" }),
23501
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-desc", children: "Medya k\xFCt\xFCphanesinden se\xE7in veya yeni y\xFCkleyin" })
23502
+ ]
23503
+ }
23504
+ ),
23505
+ !showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-main-actions", children: [
23506
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
23507
+ /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 13 }),
23508
+ " Referans Gir"
23509
+ ] }),
23510
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
23511
+ /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 13 }),
23512
+ " Yeni Y\xFCkle"
23513
+ ] })
23514
+ ] })
23515
+ ] }),
23136
23516
  !readOnly && canAddMore && !showPond && value.length > 0 && !showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-main-actions", children: [
23137
23517
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
23138
- /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 15 }),
23518
+ /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 13 }),
23139
23519
  " Referans"
23140
23520
  ] }),
23141
23521
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setDrawerOpen(true), children: [
23142
- /* @__PURE__ */ jsxRuntime.jsx(FolderOpen, { size: 15 }),
23143
- " Medya Se\xE7"
23144
- ] }),
23145
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
23146
- /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 15 }),
23147
- " Yeni Y\xFCkle"
23148
- ] })
23149
- ] }),
23150
- value.length === 0 && !readOnly && canAddMore && !showPond && !showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-main-actions", children: [
23151
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
23152
- /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 15 }),
23153
- " Dinamik Referans Se\xE7"
23522
+ /* @__PURE__ */ jsxRuntime.jsx(FolderOpen, { size: 13 }),
23523
+ " K\xFCt\xFCphane"
23154
23524
  ] }),
23155
23525
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
23156
- /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 15 }),
23157
- " Yeni Y\xFCkle"
23526
+ /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 13 }),
23527
+ " Y\xFCkle"
23158
23528
  ] })
23159
23529
  ] }),
23160
- showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-ref-section", style: { background: "#f8fafc", padding: "12px", borderRadius: "8px", border: "1px solid #e2e8f0", marginTop: "10px" }, children: [
23161
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "8px" }, children: [
23162
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "12px", fontWeight: 500, color: "#475569" }, children: [
23163
- "Dinamik CMS De\u011Fi\u015Fkeni (\xD6rn: ",
23164
- `{{ data.image }}`,
23165
- ")"
23166
- ] }),
23167
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => setShowRefInput(false), style: { background: "none", border: "none", cursor: "pointer", color: "#64748b" }, children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 14 }) })
23530
+ showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-ref-section", style: { background: "#ffffff", padding: "10px", borderRadius: "8px", border: "1px solid #e4e4e7", display: "flex", flexDirection: "column", gap: "8px", marginTop: "4px" }, children: [
23531
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
23532
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "11px", fontWeight: 500, color: "#71717a" }, children: "Dinamik CMS De\u011Fi\u015Fkeni" }),
23533
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => setShowRefInput(false), style: { background: "none", border: "none", cursor: "pointer", color: "#a1a1aa", padding: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 12 }) })
23168
23534
  ] }),
23169
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
23535
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
23170
23536
  /* @__PURE__ */ jsxRuntime.jsx(
23171
23537
  "input",
23172
23538
  {
@@ -23174,7 +23540,7 @@ var UploadField = ({
23174
23540
  value: refCode,
23175
23541
  onChange: (e3) => setRefCode(e3.target.value),
23176
23542
  placeholder: "{{ data. }}",
23177
- style: { flex: 1, padding: "8px 10px", fontSize: "13px", borderRadius: "6px", border: "1px solid #cbd5e1", outline: "none" },
23543
+ style: { flex: 1, padding: "6px 8px", fontSize: "12px", borderRadius: "6px", border: "1px solid #cbd5e1", outline: "none" },
23178
23544
  autoFocus: true,
23179
23545
  onKeyDown: (e3) => {
23180
23546
  if (e3.key === "Enter") {
@@ -23189,7 +23555,7 @@ var UploadField = ({
23189
23555
  {
23190
23556
  type: "button",
23191
23557
  onClick: handleAddRef,
23192
- style: { padding: "0 12px", background: "#4f46e5", color: "#fff", fontSize: "12px", fontWeight: 500, borderRadius: "6px", border: "none", cursor: "pointer" },
23558
+ style: { padding: "0 10px", background: "#18181b", color: "#fff", fontSize: "11px", fontWeight: 500, borderRadius: "6px", border: "none", cursor: "pointer" },
23193
23559
  children: "Ekle"
23194
23560
  }
23195
23561
  )
@@ -23233,97 +23599,18 @@ var UploadField = ({
23233
23599
  }
23234
23600
  ) })
23235
23601
  ] }),
23236
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Root, { open: drawerOpen, onOpenChange: (open) => {
23237
- setDrawerOpen(open);
23238
- if (!open) setGallerySearch("");
23239
- }, children: /* @__PURE__ */ jsxRuntime.jsxs(Drawer.Portal, { children: [
23240
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Overlay, { className: "tecof-upload-drawer-overlay" }),
23241
- /* @__PURE__ */ jsxRuntime.jsxs(Drawer.Content, { className: "tecof-upload-drawer-content", children: [
23242
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Title, { className: "tecof-sr-only", children: "Medya Y\xF6neticisi" }),
23243
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Description, { className: "tecof-sr-only", children: "Sunucudaki dosyalardan birini se\xE7in veya yeni dosya y\xFCkleyin" }),
23244
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-drawer-handle" }),
23245
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-inner", children: [
23246
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-header", children: [
23247
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "tecof-upload-drawer-title", children: "Medya K\xFCt\xFCphanesi" }),
23248
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-header-actions", children: [
23249
- /* @__PURE__ */ jsxRuntime.jsx(
23250
- "button",
23251
- {
23252
- className: "tecof-upload-drawer-action-btn",
23253
- onClick: () => setRefreshKey((k2) => k2 + 1),
23254
- disabled: loading,
23255
- title: "Yenile",
23256
- children: /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 15, className: loading ? "tecof-upload-spin" : "" })
23257
- }
23258
- ),
23259
- /* @__PURE__ */ jsxRuntime.jsx(
23260
- "button",
23261
- {
23262
- className: "tecof-upload-drawer-action-btn",
23263
- onClick: () => setDrawerOpen(false),
23264
- title: "Kapat",
23265
- children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 15 })
23266
- }
23267
- )
23268
- ] })
23269
- ] }),
23270
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-search-box", children: [
23271
- /* @__PURE__ */ jsxRuntime.jsx(Search, { size: 15, color: "#a1a1aa" }),
23272
- /* @__PURE__ */ jsxRuntime.jsx(
23273
- "input",
23274
- {
23275
- type: "text",
23276
- placeholder: "Dosya ara...",
23277
- value: gallerySearch,
23278
- onChange: (e3) => setGallerySearch(e3.target.value),
23279
- className: "tecof-upload-search-input"
23280
- }
23281
- ),
23282
- gallerySearch && /* @__PURE__ */ jsxRuntime.jsx(
23283
- "button",
23284
- {
23285
- type: "button",
23286
- className: "tecof-upload-action-btn tecof-upload-clear-search-btn",
23287
- onClick: () => setGallerySearch(""),
23288
- children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 13 })
23289
- }
23290
- )
23291
- ] }),
23292
- loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-gallery-empty", children: [
23293
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 24, color: "#a1a1aa", className: "tecof-upload-spin" }) }),
23294
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-loading-text", children: "Y\xFCkleniyor..." })
23295
- ] }) : filteredGallery.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-gallery-empty", children: [
23296
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(Image2, { size: 24, color: "#a1a1aa" }) }),
23297
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-heading", children: gallerySearch ? "Sonu\xE7 bulunamad\u0131" : "Hen\xFCz dosya yok" }),
23298
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-subheading", children: gallerySearch ? "Farkl\u0131 bir arama terimi deneyin" : "Dosyalar\u0131n\u0131z burada g\xF6r\xFCnecek" })
23299
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-grid", children: filteredGallery.map((file2) => {
23300
- const selected = value.some((v2) => v2._id === file2._id);
23301
- return /* @__PURE__ */ jsxRuntime.jsxs(
23302
- "div",
23303
- {
23304
- className: `tecof-upload-gallery-item ${selected ? "selected" : ""}`,
23305
- onClick: () => toggleGalleryFile(file2),
23306
- children: [
23307
- selected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-check", children: /* @__PURE__ */ jsxRuntime.jsx(Check, { size: 12, strokeWidth: 3 }) }),
23308
- isImageType2(file2.type) ? /* @__PURE__ */ jsxRuntime.jsx(
23309
- TecofPicture,
23310
- {
23311
- data: file2,
23312
- alt: file2.name,
23313
- size: "thumbnail",
23314
- className: "tecof-upload-gallery-thumb",
23315
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
23316
- }
23317
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 24, color: "#a1a1aa" }) }),
23318
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
23319
- ]
23320
- },
23321
- file2._id
23322
- );
23323
- }) })
23324
- ] })
23325
- ] })
23326
- ] }) })
23602
+ /* @__PURE__ */ jsxRuntime.jsx(
23603
+ MediaDrawer,
23604
+ {
23605
+ open: drawerOpen,
23606
+ onOpenChange: setDrawerOpen,
23607
+ onSelect: toggleGalleryFile,
23608
+ selectedIds: value.map((v2) => v2._id ?? ""),
23609
+ allowMultiple,
23610
+ filterImages: acceptedTypes.length > 0 && acceptedTypes.every((t2) => t2.startsWith("image/")),
23611
+ title: "Medya K\xFCt\xFCphanesi"
23612
+ }
23613
+ )
23327
23614
  ] });
23328
23615
  };
23329
23616
  UploadField.displayName = "UploadField";
@@ -25253,6 +25540,8 @@ lucide-react/dist/esm/shared/src/utils/hasA11yProp.js:
25253
25540
  lucide-react/dist/esm/context.js:
25254
25541
  lucide-react/dist/esm/Icon.js:
25255
25542
  lucide-react/dist/esm/createLucideIcon.js:
25543
+ lucide-react/dist/esm/icons/arrow-down.js:
25544
+ lucide-react/dist/esm/icons/arrow-up.js:
25256
25545
  lucide-react/dist/esm/icons/check.js:
25257
25546
  lucide-react/dist/esm/icons/chevron-down.js:
25258
25547
  lucide-react/dist/esm/icons/chevron-right.js:
@@ -25376,6 +25665,7 @@ exports.TecofEditor = TecofEditor;
25376
25665
  exports.TecofPicture = TecofPicture;
25377
25666
  exports.TecofProvider = TecofProvider;
25378
25667
  exports.TecofRender = TecofRender;
25668
+ exports.UnderConstruction = UnderConstruction;
25379
25669
  exports.UploadField = UploadField;
25380
25670
  exports.createCmsCollectionField = createCmsCollectionField;
25381
25671
  exports.createCodeEditorField = createCodeEditorField;