@tecof/theme-editor 0.0.33 → 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,952 +333,1101 @@ function useTecof() {
333
333
  }
334
334
  return ctx;
335
335
  }
336
- var EMPTY_PAGE = { content: [], root: { props: {} }, zones: {} };
337
- var ComponentDrawerItem = ({
338
- name: name3,
339
- apiClient,
340
- children
341
- }) => {
342
- const [imgSrc, setImgSrc] = React__default.useState(null);
343
- const [loading, setLoading] = React__default.useState(false);
344
- const [error2, setError] = React__default.useState(false);
345
- const fetchedRef = React__default.useRef(false);
346
- const handleMouseEnter = React__default.useCallback(async () => {
347
- if (fetchedRef.current) return;
348
- fetchedRef.current = true;
349
- setLoading(true);
350
- try {
351
- const domain = typeof window !== "undefined" ? window.location.hostname : "";
352
- const blobUrl = await apiClient.getComponentPreview(domain, name3);
353
- if (blobUrl) {
354
- setImgSrc(blobUrl);
355
- } else {
356
- setError(true);
357
- }
358
- } catch {
359
- setError(true);
360
- } finally {
361
- setLoading(false);
362
- }
363
- }, [name3, apiClient]);
364
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-item-group group", onMouseEnter: handleMouseEnter, children: [
365
- children,
366
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover", children: [
367
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover-header", children: [
368
- name3,
369
- " \xD6nizleme"
370
- ] }),
371
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover-body", children: [
372
- (loading || !imgSrc && !error2) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-skeleton" }),
373
- imgSrc && /* @__PURE__ */ jsxRuntime.jsx(
374
- "img",
375
- {
376
- src: imgSrc,
377
- alt: `${name3} preview`,
378
- className: "tecof-drawer-img"
379
- }
380
- ),
381
- error2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-preview-error", children: "\xD6nizleme y\xFCklenemedi" })
382
- ] })
383
- ] })
384
- ] });
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);
385
355
  };
386
- var TecofEditor = ({
387
- pageId,
388
- config: config3,
389
- accessToken,
390
- onSave,
391
- onChange,
392
- overrides,
393
- plugins: extraPlugins,
394
- className
395
- }) => {
396
- const { apiClient, secretKey } = useTecof();
397
- const [initialData, setInitialData] = React__default.useState(null);
398
- const [loading, setLoading] = React__default.useState(true);
399
- const [saving, setSaving] = React__default.useState(false);
400
- const [saveStatus, setSaveStatus] = React__default.useState("idle");
401
- const draftDataRef = React__default.useRef(null);
402
- const isEmbedded = typeof window !== "undefined" && window.parent !== window;
403
- React__default.useEffect(() => {
404
- let cancelled = false;
405
- const load = async () => {
406
- setLoading(true);
407
- const res2 = await apiClient.getPage(pageId);
408
- if (cancelled) return;
409
- const data3 = res2.success && res2.data?.draftData ? res2.data.draftData : EMPTY_PAGE;
410
- setInitialData(data3);
411
- draftDataRef.current = data3;
412
- setLoading(false);
413
- };
414
- load();
415
- return () => {
416
- cancelled = true;
417
- };
418
- }, [pageId, apiClient]);
419
- const handleSaveDraft = React__default.useCallback(
420
- async (data3) => {
421
- const currentData = data3 || draftDataRef.current;
422
- if (!currentData) return;
423
- const draftData = currentData;
424
- setSaving(true);
425
- setSaveStatus("idle");
426
- const res2 = await apiClient.savePage(pageId, draftData, void 0, accessToken);
427
- if (res2.success) {
428
- setSaveStatus("success");
429
- setTimeout(() => setSaveStatus("idle"), 3e3);
430
- onSave?.(draftData);
431
- if (isEmbedded) window.parent.postMessage({ type: "puck:saved" }, "*");
432
- } else {
433
- setSaveStatus("error");
434
- if (isEmbedded) window.parent.postMessage({ type: "puck:saveError", message: res2.message }, "*");
435
- }
436
- setSaving(false);
437
- },
438
- [pageId, apiClient, isEmbedded, onSave, accessToken]
439
- );
440
- const handleChange = React__default.useCallback(
441
- (data3) => {
442
- draftDataRef.current = data3;
443
- const draftData = data3;
444
- onChange?.(draftData);
445
- if (isEmbedded) window.parent.postMessage({ type: "puck:changed" }, "*");
446
- },
447
- [onChange, isEmbedded]
448
- );
449
- const handlePuckPublish = React__default.useCallback(
450
- (data3) => {
451
- handleSaveDraft(data3);
452
- },
453
- [handleSaveDraft]
454
- );
455
- React__default.useEffect(() => {
456
- if (!isEmbedded) return;
457
- const onMessage = (e3) => {
458
- switch (e3.data?.type) {
459
- case "puck:save": {
460
- handleSaveDraft();
461
- break;
462
- }
463
- case "puck:undo":
464
- document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, bubbles: true }));
465
- break;
466
- case "puck:redo":
467
- document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, shiftKey: true, bubbles: true }));
468
- break;
469
- case "puck:viewport": {
470
- const frame = document.querySelector('[data-testid="puck-frame"]');
471
- if (frame) {
472
- const w = e3.data.width || "100%";
473
- frame.style.maxWidth = w;
474
- frame.style.margin = w === "100%" ? "0" : "0 auto";
475
- frame.style.transition = "max-width 0.3s ease";
476
- }
477
- break;
478
- }
479
- }
480
- };
481
- window.addEventListener("message", onMessage);
482
- return () => window.removeEventListener("message", onMessage);
483
- }, [isEmbedded, handleSaveDraft]);
484
- React__default.useEffect(() => {
485
- if (!isEmbedded) return;
486
- const handleClick = (e3) => {
487
- const target = e3.target;
488
- const puckComponent = target.closest("[data-puck-component]");
489
- if (puckComponent) {
490
- const componentType = puckComponent.getAttribute("data-puck-component");
491
- const draggableId = puckComponent.closest("[data-rfd-draggable-id]")?.getAttribute("data-rfd-draggable-id");
492
- window.parent.postMessage({
493
- type: "puck:itemSelected",
494
- item: {
495
- type: componentType,
496
- id: draggableId || null
497
- }
498
- }, "*");
499
- }
500
- };
501
- const handleDeselect = (e3) => {
502
- const target = e3.target;
503
- if (!target.closest("[data-puck-component]")) {
504
- window.parent.postMessage({ type: "puck:itemDeselected" }, "*");
505
- }
506
- };
507
- document.addEventListener("click", handleClick, true);
508
- document.addEventListener("click", handleDeselect, false);
509
- return () => {
510
- document.removeEventListener("click", handleClick, true);
511
- document.removeEventListener("click", handleDeselect, false);
512
- };
513
- }, [isEmbedded]);
514
- if (loading || !initialData) {
515
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `tecof-editor-loading ${className || ""}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-editor-loading-inner", children: [
516
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-editor-spinner" }),
517
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-editor-loading-text", children: "Loading editor..." })
518
- ] }) });
519
- }
520
- const plugins = [
521
- { ...core.blocksPlugin(), label: "Bloklar" },
522
- { ...core.outlinePlugin(), label: "Anahat" },
523
- { ...core.fieldsPlugin({ desktopSideBar: "right" }), label: "Alanlar" },
524
- ...extraPlugins || []
525
- ];
526
- const mergedOverrides = {
527
- header: () => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}),
528
- drawerItem: ({ children, name: name3 }) => {
529
- return /* @__PURE__ */ jsxRuntime.jsx(ComponentDrawerItem, { name: name3, apiClient, children });
530
- },
531
- ...overrides || {}
532
- };
533
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `tecof-editor-wrapper ${className || ""}`.trim(), children: [
534
- /* @__PURE__ */ jsxRuntime.jsx(
535
- core.Puck,
536
- {
537
- plugins,
538
- config: config3,
539
- data: initialData,
540
- onPublish: handlePuckPublish,
541
- onChange: handleChange,
542
- overrides: mergedOverrides,
543
- metadata: { editMode: true }
544
- }
545
- ),
546
- saving && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-editor-save-indicator", children: saveStatus === "error" ? "Save failed" : "Saving..." })
547
- ] });
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"
548
368
  };
549
- var TecofRender = ({ data: data3, config: config3, className, cmsData }) => {
550
- if (!data3) return null;
551
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
552
- core.Render,
553
- {
554
- config: config3,
555
- data: data3,
556
- metadata: { cmsData: cmsData || null }
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;
557
375
  }
558
- ) });
559
- };
560
- var IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "svg", "avif", "bmp", "tiff", "heic"];
561
- var VIDEO_EXTENSIONS = ["mp4", "webm", "ogg", "avi", "mov", "quicktime"];
562
- var isImage = (type) => {
563
- if (!type) return false;
564
- const t2 = type.toLowerCase();
565
- return IMAGE_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("image/");
566
- };
567
- var isVideo = (type) => {
568
- if (!type) return false;
569
- const t2 = type.toLowerCase();
570
- return VIDEO_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("video/");
571
- };
572
- var getSizes = (size) => {
573
- switch (size) {
574
- case "thumbnail":
575
- return "(max-width: 360px) 100vw, 360px";
576
- case "medium":
577
- return "(max-width: 540px) 100vw, 540px";
578
- case "large":
579
- return "(max-width: 720px) 100vw, 720px";
580
- default:
581
- return "100vw";
582
376
  }
377
+ return false;
583
378
  };
584
- var DEFAULT_BLUR_DATA_URL = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNmM2Y0ZjYiLz48L3N2Zz4=";
585
- var TecofPicture = React__default.memo(({
586
- data: data3,
587
- alt = null,
588
- size = "full",
589
- loading = "lazy",
590
- fill = false,
591
- style,
592
- imgStyle,
593
- className,
594
- imgClassName,
595
- width,
596
- height,
597
- usePlaceholder = true,
598
- blurDataURL = DEFAULT_BLUR_DATA_URL,
599
- fancybox = false,
600
- fancyboxName = "gallery",
601
- ImageComponent,
602
- imageProps = {}
603
- }) => {
604
- const { apiClient } = useTecof();
605
- const cdnUrl = apiClient.cdnUrl;
606
- if (!data3) return null;
607
- const buildPath = (fileName) => data3?.folder && data3.folder !== "/" ? `${data3.folder.replace(/^\//, "")}/${fileName}` : fileName;
608
- const isExternal = data3?.type === "external" || data3?.provider === "external";
609
- const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${buildPath(data3?.name)}`;
610
- const isImageType3 = isExternal ? true : isImage(data3?.type);
611
- const isVideoType = isExternal ? false : isVideo(data3?.type);
612
- if (!fileURL) return null;
613
- const imgWidth = width || data3?.meta?.width || 500;
614
- const imgHeight = height || data3?.meta?.height || 500;
615
- const sizes = getSizes(size);
616
- const renderVideo = () => /* @__PURE__ */ jsxRuntime.jsx(
617
- "video",
618
- {
619
- src: fileURL,
620
- autoPlay: true,
621
- loop: true,
622
- muted: true,
623
- playsInline: true,
624
- className: `tecof-picture-video ${imgClassName || ""}`.trim(),
625
- style: imgStyle
626
- }
627
- );
628
- const renderImg = () => {
629
- const baseImgClass = fill ? "tecof-picture-img-fill" : "tecof-picture-img";
630
- const computedImgClass = `${baseImgClass} ${imgClassName || ""}`.trim();
631
- const altText = alt || data3?.name || "Image";
632
- const commonProps = {
633
- src: fileURL,
634
- alt: altText,
635
- loading,
636
- sizes,
637
- className: computedImgClass,
638
- style: imgStyle
639
- };
640
- if (ImageComponent) {
641
- return /* @__PURE__ */ jsxRuntime.jsx(
642
- ImageComponent,
643
- {
644
- ...commonProps,
645
- width: fill ? void 0 : imgWidth,
646
- height: fill ? void 0 : imgHeight,
647
- ...fill ? { fill: true } : {},
648
- ...imageProps
649
- }
650
- );
651
- }
652
- return /* @__PURE__ */ jsxRuntime.jsx(
653
- "img",
654
- {
655
- ...commonProps,
656
- width: fill ? void 0 : imgWidth,
657
- height: fill ? void 0 : imgHeight
658
- }
659
- );
660
- };
661
- const containerClassName = `tecof-picture-wrapper ${fill ? "fill" : ""} ${className || ""}`.trim();
662
- if (fancybox && (isImageType3 || isVideoType)) {
663
- return /* @__PURE__ */ jsxRuntime.jsx(
664
- "a",
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",
665
395
  {
666
- "data-fancybox": fancyboxName,
667
- href: fileURL,
668
- style: { display: "block", textDecoration: "none" },
669
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: isVideoType ? renderVideo() : renderImg() })
670
- }
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
+ ]
671
410
  );
672
411
  }
673
- if (isVideoType) {
674
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: renderVideo() });
675
- }
676
- if (isImageType3) {
677
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: renderImg() });
678
- }
679
- return null;
680
- });
681
- TecofPicture.displayName = "TecofPicture";
682
- var UnderConstruction = ({
683
- title,
684
- description,
685
- subtitle,
686
- logoUrl,
687
- accentColor = "#2563eb"
688
- // Default elegant blue
689
- }) => {
690
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-wrapper", children: [
691
- /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: `
692
- .tecof-uc-wrapper {
693
- min-height: 100vh;
694
- display: flex;
695
- align-items: center;
696
- justify-content: center;
697
- background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
698
- radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
699
- #090d16;
700
- color: #f8fafc;
701
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
702
- padding: 2rem 1rem;
703
- box-sizing: border-box;
704
- position: relative;
705
- overflow: hidden;
706
- }
412
+ );
707
413
 
708
- /* Ambient glowing circles */
709
- .tecof-uc-glow-1 {
710
- position: absolute;
711
- top: 20%;
712
- left: 50%;
713
- transform: translate(-50%, -50%);
714
- width: 500px;
715
- height: 500px;
716
- background: ${accentColor};
717
- filter: blur(150px);
718
- opacity: 0.12;
719
- pointer-events: none;
720
- z-index: 1;
721
- border-radius: 50%;
722
- animation: tecof-uc-pulse 8s infinite alternate ease-in-out;
723
- }
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);
724
528
 
725
- .tecof-uc-container {
726
- position: relative;
727
- z-index: 2;
728
- max-width: 540px;
729
- width: 100%;
730
- background: rgba(17, 24, 39, 0.55);
731
- backdrop-filter: blur(20px);
732
- -webkit-backdrop-filter: blur(20px);
733
- border: 1px solid rgba(255, 255, 255, 0.08);
734
- border-radius: 24px;
735
- padding: 3.5rem 2.5rem;
736
- text-align: center;
737
- box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
738
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
739
- animation: tecof-uc-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
740
- }
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);
741
536
 
742
- .tecof-uc-logo-area {
743
- margin-bottom: 2.5rem;
744
- display: flex;
745
- justify-content: center;
746
- align-items: center;
747
- }
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);
748
547
 
749
- .tecof-uc-logo {
750
- max-height: 56px;
751
- max-width: 200px;
752
- object-fit: contain;
753
- filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
754
- }
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);
755
557
 
756
- .tecof-uc-logo-fallback {
757
- font-size: 1.5rem;
758
- font-weight: 700;
759
- letter-spacing: -0.025em;
760
- background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
761
- -webkit-background-clip: text;
762
- -webkit-text-fill-color: transparent;
763
- }
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);
764
565
 
765
- .tecof-uc-icon-wrapper {
766
- width: 80px;
767
- height: 80px;
768
- border-radius: 20px;
769
- background: rgba(255, 255, 255, 0.03);
770
- border: 1px solid rgba(255, 255, 255, 0.08);
771
- display: flex;
772
- align-items: center;
773
- justify-content: center;
774
- margin: 0 auto 2.2rem auto;
775
- color: ${accentColor};
776
- box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
777
- position: relative;
778
- }
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);
779
576
 
780
- .tecof-uc-icon-glow {
781
- position: absolute;
782
- inset: -2px;
783
- border-radius: 22px;
784
- background: linear-gradient(135deg, ${accentColor}, transparent);
785
- opacity: 0.3;
786
- z-index: -1;
787
- filter: blur(4px);
788
- }
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);
789
584
 
790
- .tecof-uc-icon-wrapper svg {
791
- width: 36px;
792
- height: 36px;
793
- stroke-width: 1.5;
794
- animation: tecof-uc-float 4s ease-in-out infinite;
795
- }
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);
796
591
 
797
- .tecof-uc-subtitle {
798
- font-size: 0.875rem;
799
- font-weight: 600;
800
- text-transform: uppercase;
801
- letter-spacing: 0.15em;
802
- color: ${accentColor};
803
- margin-bottom: 0.75rem;
804
- }
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);
805
595
 
806
- .tecof-uc-title {
807
- font-size: 2.25rem;
808
- font-weight: 800;
809
- line-height: 1.2;
810
- letter-spacing: -0.025em;
811
- color: #ffffff;
812
- margin-top: 0;
813
- margin-bottom: 1.25rem;
814
- background: linear-gradient(to bottom, #ffffff 0%, #cbd5e1 100%);
815
- -webkit-background-clip: text;
816
- -webkit-text-fill-color: transparent;
817
- }
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);
818
608
 
819
- .tecof-uc-description {
820
- font-size: 1.05rem;
821
- line-height: 1.6;
822
- color: #94a3b8;
823
- margin: 0 auto 2.5rem auto;
824
- max-width: 420px;
825
- }
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);
826
615
 
827
- .tecof-uc-divider {
828
- height: 1px;
829
- background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 100%);
830
- margin-bottom: 2rem;
831
- }
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);
832
624
 
833
- .tecof-uc-badge {
834
- display: inline-flex;
835
- align-items: center;
836
- gap: 0.5rem;
837
- background: rgba(255, 255, 255, 0.04);
838
- border: 1px solid rgba(255, 255, 255, 0.08);
839
- border-radius: 99px;
840
- padding: 0.5rem 1.25rem;
841
- font-size: 0.825rem;
842
- font-weight: 500;
843
- color: #94a3b8;
844
- text-decoration: none;
845
- transition: all 0.2s ease-in-out;
846
- }
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);
847
633
 
848
- .tecof-uc-badge:hover {
849
- background: rgba(255, 255, 255, 0.08);
850
- border-color: rgba(255, 255, 255, 0.15);
851
- color: #f8fafc;
852
- transform: translateY(-1px);
853
- }
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);
854
640
 
855
- .tecof-uc-badge-dot {
856
- width: 6px;
857
- height: 6px;
858
- background-color: ${accentColor};
859
- border-radius: 50%;
860
- box-shadow: 0 0 10px ${accentColor};
861
- animation: tecof-uc-blink 1.5s infinite alternate;
862
- }
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);
863
647
 
864
- /* Animations */
865
- @keyframes tecof-uc-pulse {
866
- 0% { opacity: 0.08; transform: translate(-50%, -50%) scale(0.95); }
867
- 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1.05); }
868
- }
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);
869
657
 
870
- @keyframes tecof-uc-fade-in {
871
- 0% { opacity: 0; transform: translateY(20px); }
872
- 100% { opacity: 1; transform: translateY(0); }
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);
672
+ var EMPTY_PAGE = { content: [], root: { props: {} }, zones: {} };
673
+ var ComponentDrawerItem = ({
674
+ name: name3,
675
+ apiClient,
676
+ children
677
+ }) => {
678
+ const [imgSrc, setImgSrc] = React__default.useState(null);
679
+ const [loading, setLoading] = React__default.useState(false);
680
+ const [error2, setError] = React__default.useState(false);
681
+ const fetchedRef = React__default.useRef(false);
682
+ const handleMouseEnter = React__default.useCallback(async () => {
683
+ if (fetchedRef.current) return;
684
+ fetchedRef.current = true;
685
+ setLoading(true);
686
+ try {
687
+ const domain = typeof window !== "undefined" ? window.location.hostname : "";
688
+ const blobUrl = await apiClient.getComponentPreview(domain, name3);
689
+ if (blobUrl) {
690
+ setImgSrc(blobUrl);
691
+ } else {
692
+ setError(true);
693
+ }
694
+ } catch {
695
+ setError(true);
696
+ } finally {
697
+ setLoading(false);
698
+ }
699
+ }, [name3, apiClient]);
700
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-item-group group", onMouseEnter: handleMouseEnter, children: [
701
+ children,
702
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover", children: [
703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover-header", children: [
704
+ name3,
705
+ " \xD6nizleme"
706
+ ] }),
707
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-drawer-popover-body", children: [
708
+ (loading || !imgSrc && !error2) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-skeleton" }),
709
+ imgSrc && /* @__PURE__ */ jsxRuntime.jsx(
710
+ "img",
711
+ {
712
+ src: imgSrc,
713
+ alt: `${name3} preview`,
714
+ className: "tecof-drawer-img"
715
+ }
716
+ ),
717
+ error2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-drawer-preview-error", children: "\xD6nizleme y\xFCklenemedi" })
718
+ ] })
719
+ ] })
720
+ ] });
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
+ }
873
773
  }
874
-
875
- @keyframes tecof-uc-float {
876
- 0% { transform: translateY(0px) rotate(0deg); }
877
- 50% { transform: translateY(-5px) rotate(3deg); }
878
- 100% { transform: translateY(0px) rotate(0deg); }
774
+ });
775
+ dispatch({
776
+ type: "setUi",
777
+ ui: {
778
+ itemSelector: {
779
+ index: targetIndex,
780
+ zone
781
+ }
879
782
  }
880
-
881
- @keyframes tecof-uc-blink {
882
- 0% { opacity: 0.3; }
883
- 100% { opacity: 1; }
783
+ });
784
+ } else {
785
+ dispatch({
786
+ type: "setData",
787
+ data: {
788
+ ...appState.data,
789
+ content: items
884
790
  }
885
-
886
- @media (max-width: 640px) {
887
- .tecof-uc-container {
888
- padding: 2.5rem 1.5rem;
889
- border-radius: 20px;
890
- }
891
- .tecof-uc-title {
892
- font-size: 1.75rem;
893
- }
894
- .tecof-uc-description {
895
- font-size: 0.95rem;
896
- margin-bottom: 2rem;
791
+ });
792
+ dispatch({
793
+ type: "setUi",
794
+ ui: {
795
+ itemSelector: {
796
+ index: targetIndex
897
797
  }
898
798
  }
899
- ` } }),
900
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-glow-1" }),
901
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-container", children: [
902
- 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" }) }),
903
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-icon-wrapper", children: [
904
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-icon-glow" }),
905
- /* @__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" }) })
906
- ] }),
907
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-subtitle", children: subtitle }),
908
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "tecof-uc-title", children: title }),
909
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-uc-description", children: description }),
910
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-uc-divider" }),
911
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-uc-badge", children: [
912
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tecof-uc-badge-dot" }),
913
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Yap\u0131m A\u015Famas\u0131nda" })
914
- ] })
915
- ] })
916
- ] });
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
+ ] }) });
917
808
  };
918
- var merchantInfoCache = /* @__PURE__ */ new Map();
919
- var CACHE_TTL = 5 * 60 * 1e3;
920
- function useLanguages() {
921
- const { apiClient, secretKey, apiUrl } = useTecof();
922
- const [merchantInfo, setMerchantInfo] = React__default.useState(null);
809
+ var TecofEditor = ({
810
+ pageId,
811
+ config: config3,
812
+ accessToken,
813
+ onSave,
814
+ onChange,
815
+ overrides,
816
+ plugins: extraPlugins,
817
+ className
818
+ }) => {
819
+ const { apiClient, secretKey } = useTecof();
820
+ const [initialData, setInitialData] = React__default.useState(null);
923
821
  const [loading, setLoading] = React__default.useState(true);
924
- const [error2, setError] = React__default.useState(null);
925
- const [activeTab, setActiveTab] = React__default.useState("");
926
- const cacheKey = React__default.useMemo(() => `${apiUrl}::${secretKey}`, [apiUrl, secretKey]);
822
+ const [saving, setSaving] = React__default.useState(false);
823
+ const [saveStatus, setSaveStatus] = React__default.useState("idle");
824
+ const [searchQuery, setSearchQuery] = React__default.useState("");
825
+ const draftDataRef = React__default.useRef(null);
826
+ const isEmbedded = typeof window !== "undefined" && window.parent !== window;
927
827
  React__default.useEffect(() => {
928
828
  let cancelled = false;
929
- const fetchInfo = async () => {
930
- const cached = merchantInfoCache.get(cacheKey);
931
- if (cached && Date.now() - cached.ts < CACHE_TTL) {
932
- setMerchantInfo(cached.data);
933
- if (!activeTab) setActiveTab(cached.data.defaultLanguage);
934
- setLoading(false);
935
- return;
829
+ const load = async () => {
830
+ setLoading(true);
831
+ const res2 = await apiClient.getPage(pageId);
832
+ if (cancelled) return;
833
+ const data3 = res2.success && res2.data?.draftData ? res2.data.draftData : EMPTY_PAGE;
834
+ setInitialData(data3);
835
+ draftDataRef.current = data3;
836
+ setLoading(false);
837
+ };
838
+ load();
839
+ return () => {
840
+ cancelled = true;
841
+ };
842
+ }, [pageId, apiClient]);
843
+ const handleSaveDraft = React__default.useCallback(
844
+ async (data3) => {
845
+ const currentData = data3 || draftDataRef.current;
846
+ if (!currentData) return;
847
+ const draftData = currentData;
848
+ setSaving(true);
849
+ setSaveStatus("idle");
850
+ const res2 = await apiClient.savePage(pageId, draftData, void 0, accessToken);
851
+ if (res2.success) {
852
+ setSaveStatus("success");
853
+ setTimeout(() => setSaveStatus("idle"), 3e3);
854
+ onSave?.(draftData);
855
+ if (isEmbedded) window.parent.postMessage({ type: "puck:saved" }, "*");
856
+ } else {
857
+ setSaveStatus("error");
858
+ if (isEmbedded) window.parent.postMessage({ type: "puck:saveError", message: res2.message }, "*");
859
+ }
860
+ setSaving(false);
861
+ },
862
+ [pageId, apiClient, isEmbedded, onSave, accessToken]
863
+ );
864
+ const handleChange = React__default.useCallback(
865
+ (data3) => {
866
+ draftDataRef.current = data3;
867
+ const draftData = data3;
868
+ onChange?.(draftData);
869
+ if (isEmbedded) window.parent.postMessage({ type: "puck:changed" }, "*");
870
+ },
871
+ [onChange, isEmbedded]
872
+ );
873
+ const handlePuckPublish = React__default.useCallback(
874
+ (data3) => {
875
+ handleSaveDraft(data3);
876
+ },
877
+ [handleSaveDraft]
878
+ );
879
+ React__default.useEffect(() => {
880
+ if (!isEmbedded) return;
881
+ const onMessage = (e3) => {
882
+ switch (e3.data?.type) {
883
+ case "puck:save": {
884
+ handleSaveDraft();
885
+ break;
886
+ }
887
+ case "puck:undo":
888
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, bubbles: true }));
889
+ break;
890
+ case "puck:redo":
891
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, shiftKey: true, bubbles: true }));
892
+ break;
893
+ case "puck:viewport": {
894
+ const frame = document.querySelector('[data-testid="puck-frame"]');
895
+ if (frame) {
896
+ const w = e3.data.width || "100%";
897
+ frame.style.maxWidth = w;
898
+ frame.style.margin = w === "100%" ? "0" : "0 auto";
899
+ frame.style.transition = "max-width 0.3s ease";
900
+ }
901
+ break;
902
+ }
903
+ }
904
+ };
905
+ window.addEventListener("message", onMessage);
906
+ return () => window.removeEventListener("message", onMessage);
907
+ }, [isEmbedded, handleSaveDraft]);
908
+ React__default.useEffect(() => {
909
+ if (!isEmbedded) return;
910
+ const handleClick = (e3) => {
911
+ const target = e3.target;
912
+ const puckComponent = target.closest("[data-puck-component]");
913
+ if (puckComponent) {
914
+ const componentType = puckComponent.getAttribute("data-puck-component");
915
+ const draggableId = puckComponent.closest("[data-rfd-draggable-id]")?.getAttribute("data-rfd-draggable-id");
916
+ window.parent.postMessage({
917
+ type: "puck:itemSelected",
918
+ item: {
919
+ type: componentType,
920
+ id: draggableId || null
921
+ }
922
+ }, "*");
923
+ }
924
+ };
925
+ const handleDeselect = (e3) => {
926
+ const target = e3.target;
927
+ if (!target.closest("[data-puck-component]")) {
928
+ window.parent.postMessage({ type: "puck:itemDeselected" }, "*");
929
+ }
930
+ };
931
+ document.addEventListener("click", handleClick, true);
932
+ document.addEventListener("click", handleDeselect, false);
933
+ return () => {
934
+ document.removeEventListener("click", handleClick, true);
935
+ document.removeEventListener("click", handleDeselect, false);
936
+ };
937
+ }, [isEmbedded]);
938
+ if (loading || !initialData) {
939
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `tecof-editor-loading ${className || ""}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-editor-loading-inner", children: [
940
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-editor-spinner" }),
941
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-editor-loading-text", children: "Loading editor..." })
942
+ ] }) });
943
+ }
944
+ const plugins = [
945
+ { ...core.blocksPlugin(), label: "Bloklar" },
946
+ { ...core.outlinePlugin(), label: "Anahat" },
947
+ { ...core.fieldsPlugin({ desktopSideBar: "right" }), label: "Alanlar" },
948
+ ...extraPlugins || []
949
+ ];
950
+ const mergedOverrides = {
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
+ },
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
+ }
936
990
  }
937
- setLoading(true);
938
- setError(null);
939
- const res2 = await apiClient.getMerchantInfo();
940
- if (cancelled) return;
941
- if (res2.success && res2.data) {
942
- merchantInfoCache.set(cacheKey, { data: res2.data, ts: Date.now() });
943
- setMerchantInfo(res2.data);
944
- if (!activeTab) setActiveTab(res2.data.defaultLanguage);
945
- } else {
946
- setError(res2.message || "Failed to load languages");
947
- const fallback = { languages: ["tr"], defaultLanguage: "tr" };
948
- setMerchantInfo(fallback);
949
- if (!activeTab) setActiveTab("tr");
991
+ return /* @__PURE__ */ jsxRuntime.jsx(ComponentDrawerItem, { name: name3, apiClient, children });
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
+ },
1002
+ ...overrides || {}
1003
+ };
1004
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `tecof-editor-wrapper ${className || ""}`.trim(), children: [
1005
+ /* @__PURE__ */ jsxRuntime.jsx(
1006
+ core.Puck,
1007
+ {
1008
+ plugins,
1009
+ config: config3,
1010
+ data: initialData,
1011
+ onPublish: handlePuckPublish,
1012
+ onChange: handleChange,
1013
+ overrides: mergedOverrides,
1014
+ metadata: { editMode: true }
950
1015
  }
951
- setLoading(false);
952
- };
953
- fetchInfo();
954
- return () => {
955
- cancelled = true;
956
- };
957
- }, [apiClient, cacheKey]);
958
- return { merchantInfo, loading, error: error2, activeTab, setActiveTab };
959
- }
960
-
961
- // node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
962
- var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
963
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
964
- }).join(" ").trim();
965
-
966
- // node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
967
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
968
-
969
- // node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
970
- var toCamelCase = (string) => string.replace(
971
- /^([A-Z])|[\s-_]+(\w)/g,
972
- (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
973
- );
974
-
975
- // node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
976
- var toPascalCase = (string) => {
977
- const camelCase = toCamelCase(string);
978
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
979
- };
980
-
981
- // node_modules/lucide-react/dist/esm/defaultAttributes.js
982
- var defaultAttributes = {
983
- xmlns: "http://www.w3.org/2000/svg",
984
- width: 24,
985
- height: 24,
986
- viewBox: "0 0 24 24",
987
- fill: "none",
988
- stroke: "currentColor",
989
- strokeWidth: 2,
990
- strokeLinecap: "round",
991
- strokeLinejoin: "round"
1016
+ ),
1017
+ saving && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-editor-save-indicator", children: saveStatus === "error" ? "Save failed" : "Saving..." })
1018
+ ] });
992
1019
  };
993
-
994
- // node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
995
- var hasA11yProp = (props) => {
996
- for (const prop in props) {
997
- if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
998
- return true;
1020
+ var TecofRender = ({ data: data3, config: config3, className, cmsData }) => {
1021
+ if (!data3) return null;
1022
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(
1023
+ core.Render,
1024
+ {
1025
+ config: config3,
1026
+ data: data3,
1027
+ metadata: { cmsData: cmsData || null }
999
1028
  }
1000
- }
1001
- return false;
1029
+ ) });
1002
1030
  };
1003
- var LucideContext = React__default.createContext({});
1004
- var useLucideContext = () => React__default.useContext(LucideContext);
1005
-
1006
- // node_modules/lucide-react/dist/esm/Icon.js
1007
- var Icon = React__default.forwardRef(
1008
- ({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
1009
- const {
1010
- size: contextSize = 24,
1011
- strokeWidth: contextStrokeWidth = 2,
1012
- absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
1013
- color: contextColor = "currentColor",
1014
- className: contextClass = ""
1015
- } = useLucideContext() ?? {};
1016
- const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
1017
- return React__default.createElement(
1018
- "svg",
1019
- {
1020
- ref,
1021
- ...defaultAttributes,
1022
- width: size ?? contextSize ?? defaultAttributes.width,
1023
- height: size ?? contextSize ?? defaultAttributes.height,
1024
- stroke: color ?? contextColor,
1025
- strokeWidth: calculatedStrokeWidth,
1026
- className: mergeClasses("lucide", contextClass, className),
1027
- ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
1028
- ...rest
1029
- },
1030
- [
1031
- ...iconNode.map(([tag, attrs]) => React__default.createElement(tag, attrs)),
1032
- ...Array.isArray(children) ? children : [children]
1033
- ]
1034
- );
1031
+ var IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "svg", "avif", "bmp", "tiff", "heic"];
1032
+ var VIDEO_EXTENSIONS = ["mp4", "webm", "ogg", "avi", "mov", "quicktime"];
1033
+ var isImage = (type) => {
1034
+ if (!type) return false;
1035
+ const t2 = type.toLowerCase();
1036
+ return IMAGE_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("image/");
1037
+ };
1038
+ var isVideo = (type) => {
1039
+ if (!type) return false;
1040
+ const t2 = type.toLowerCase();
1041
+ return VIDEO_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("video/");
1042
+ };
1043
+ var getSizes = (size) => {
1044
+ switch (size) {
1045
+ case "thumbnail":
1046
+ return "(max-width: 360px) 100vw, 360px";
1047
+ case "medium":
1048
+ return "(max-width: 540px) 100vw, 540px";
1049
+ case "large":
1050
+ return "(max-width: 720px) 100vw, 720px";
1051
+ default:
1052
+ return "100vw";
1035
1053
  }
1036
- );
1037
-
1038
- // node_modules/lucide-react/dist/esm/createLucideIcon.js
1039
- var createLucideIcon = (iconName, iconNode) => {
1040
- const Component2 = React__default.forwardRef(
1041
- ({ className, ...props }, ref) => React__default.createElement(Icon, {
1042
- ref,
1043
- iconNode,
1044
- className: mergeClasses(
1045
- `lucide-${toKebabCase(toPascalCase(iconName))}`,
1046
- `lucide-${iconName}`,
1047
- className
1048
- ),
1049
- ...props
1050
- })
1051
- );
1052
- Component2.displayName = toPascalCase(iconName);
1053
- return Component2;
1054
1054
  };
1055
-
1056
- // node_modules/lucide-react/dist/esm/icons/check.js
1057
- var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1058
- var Check = createLucideIcon("check", __iconNode);
1059
-
1060
- // node_modules/lucide-react/dist/esm/icons/chevron-down.js
1061
- var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1062
- var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
1063
-
1064
- // node_modules/lucide-react/dist/esm/icons/chevron-right.js
1065
- var __iconNode3 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1066
- var ChevronRight = createLucideIcon("chevron-right", __iconNode3);
1067
-
1068
- // node_modules/lucide-react/dist/esm/icons/code.js
1069
- var __iconNode4 = [
1070
- ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
1071
- ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
1072
- ];
1073
- var Code = createLucideIcon("code", __iconNode4);
1074
-
1075
- // node_modules/lucide-react/dist/esm/icons/copy.js
1076
- var __iconNode5 = [
1077
- ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1078
- ["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" }]
1079
- ];
1080
- var Copy = createLucideIcon("copy", __iconNode5);
1081
-
1082
- // node_modules/lucide-react/dist/esm/icons/database.js
1083
- var __iconNode6 = [
1084
- ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
1085
- ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
1086
- ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
1087
- ];
1088
- var Database = createLucideIcon("database", __iconNode6);
1089
-
1090
- // node_modules/lucide-react/dist/esm/icons/external-link.js
1091
- var __iconNode7 = [
1092
- ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
1093
- ["path", { d: "M10 14 21 3", key: "gplh6r" }],
1094
- ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
1095
- ];
1096
- var ExternalLink = createLucideIcon("external-link", __iconNode7);
1097
-
1098
- // node_modules/lucide-react/dist/esm/icons/file-text.js
1099
- var __iconNode8 = [
1100
- [
1101
- "path",
1055
+ var DEFAULT_BLUR_DATA_URL = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNmM2Y0ZjYiLz48L3N2Zz4=";
1056
+ var TecofPicture = React__default.memo(({
1057
+ data: data3,
1058
+ alt = null,
1059
+ size = "full",
1060
+ loading = "lazy",
1061
+ fill = false,
1062
+ style,
1063
+ imgStyle,
1064
+ className,
1065
+ imgClassName,
1066
+ width,
1067
+ height,
1068
+ usePlaceholder = true,
1069
+ blurDataURL = DEFAULT_BLUR_DATA_URL,
1070
+ fancybox = false,
1071
+ fancyboxName = "gallery",
1072
+ ImageComponent,
1073
+ imageProps = {}
1074
+ }) => {
1075
+ const { apiClient } = useTecof();
1076
+ const cdnUrl = apiClient.cdnUrl;
1077
+ if (!data3) return null;
1078
+ const buildPath = (fileName) => data3?.folder && data3.folder !== "/" ? `${data3.folder.replace(/^\//, "")}/${fileName}` : fileName;
1079
+ const isExternal = data3?.type === "external" || data3?.provider === "external";
1080
+ const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${buildPath(data3?.name)}`;
1081
+ const isImageType3 = isExternal ? true : isImage(data3?.type);
1082
+ const isVideoType = isExternal ? false : isVideo(data3?.type);
1083
+ if (!fileURL) return null;
1084
+ const imgWidth = width || data3?.meta?.width || 500;
1085
+ const imgHeight = height || data3?.meta?.height || 500;
1086
+ const sizes = getSizes(size);
1087
+ const renderVideo = () => /* @__PURE__ */ jsxRuntime.jsx(
1088
+ "video",
1102
1089
  {
1103
- 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",
1104
- key: "1oefj6"
1090
+ src: fileURL,
1091
+ autoPlay: true,
1092
+ loop: true,
1093
+ muted: true,
1094
+ playsInline: true,
1095
+ className: `tecof-picture-video ${imgClassName || ""}`.trim(),
1096
+ style: imgStyle
1097
+ }
1098
+ );
1099
+ const renderImg = () => {
1100
+ const baseImgClass = fill ? "tecof-picture-img-fill" : "tecof-picture-img";
1101
+ const computedImgClass = `${baseImgClass} ${imgClassName || ""}`.trim();
1102
+ const altText = alt || data3?.name || "Image";
1103
+ const commonProps = {
1104
+ src: fileURL,
1105
+ alt: altText,
1106
+ loading,
1107
+ sizes,
1108
+ className: computedImgClass,
1109
+ style: imgStyle
1110
+ };
1111
+ if (ImageComponent) {
1112
+ return /* @__PURE__ */ jsxRuntime.jsx(
1113
+ ImageComponent,
1114
+ {
1115
+ ...commonProps,
1116
+ width: fill ? void 0 : imgWidth,
1117
+ height: fill ? void 0 : imgHeight,
1118
+ ...fill ? { fill: true } : {},
1119
+ ...imageProps
1120
+ }
1121
+ );
1105
1122
  }
1106
- ],
1107
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
1108
- ["path", { d: "M10 9H8", key: "b1mrlr" }],
1109
- ["path", { d: "M16 13H8", key: "t4e002" }],
1110
- ["path", { d: "M16 17H8", key: "z1uh3a" }]
1111
- ];
1112
- var FileText = createLucideIcon("file-text", __iconNode8);
1123
+ return /* @__PURE__ */ jsxRuntime.jsx(
1124
+ "img",
1125
+ {
1126
+ ...commonProps,
1127
+ width: fill ? void 0 : imgWidth,
1128
+ height: fill ? void 0 : imgHeight
1129
+ }
1130
+ );
1131
+ };
1132
+ const containerClassName = `tecof-picture-wrapper ${fill ? "fill" : ""} ${className || ""}`.trim();
1133
+ if (fancybox && (isImageType3 || isVideoType)) {
1134
+ return /* @__PURE__ */ jsxRuntime.jsx(
1135
+ "a",
1136
+ {
1137
+ "data-fancybox": fancyboxName,
1138
+ href: fileURL,
1139
+ style: { display: "block", textDecoration: "none" },
1140
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: isVideoType ? renderVideo() : renderImg() })
1141
+ }
1142
+ );
1143
+ }
1144
+ if (isVideoType) {
1145
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: renderVideo() });
1146
+ }
1147
+ if (isImageType3) {
1148
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style, className: containerClassName, children: renderImg() });
1149
+ }
1150
+ return null;
1151
+ });
1152
+ TecofPicture.displayName = "TecofPicture";
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
+ }
1113
1178
 
1114
- // node_modules/lucide-react/dist/esm/icons/file.js
1115
- var __iconNode9 = [
1116
- [
1117
- "path",
1118
- {
1119
- 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",
1120
- key: "1oefj6"
1121
- }
1122
- ],
1123
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
1124
- ];
1125
- 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
+ }
1126
1195
 
1127
- // node_modules/lucide-react/dist/esm/icons/folder-open.js
1128
- var __iconNode10 = [
1129
- [
1130
- "path",
1131
- {
1132
- 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",
1133
- key: "usdka0"
1134
- }
1135
- ]
1136
- ];
1137
- 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
+ }
1138
1212
 
1139
- // node_modules/lucide-react/dist/esm/icons/globe.js
1140
- var __iconNode11 = [
1141
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1142
- ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
1143
- ["path", { d: "M2 12h20", key: "9i4pu4" }]
1144
- ];
1145
- 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
+ }
1146
1219
 
1147
- // node_modules/lucide-react/dist/esm/icons/grip-vertical.js
1148
- var __iconNode12 = [
1149
- ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
1150
- ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
1151
- ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
1152
- ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
1153
- ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
1154
- ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
1155
- ];
1156
- 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
+ }
1157
1226
 
1158
- // node_modules/lucide-react/dist/esm/icons/image-plus.js
1159
- var __iconNode13 = [
1160
- ["path", { d: "M16 5h6", key: "1vod17" }],
1161
- ["path", { d: "M19 2v6", key: "4bpg5p" }],
1162
- ["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" }],
1163
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
1164
- ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
1165
- ];
1166
- 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
+ }
1167
1235
 
1168
- // node_modules/lucide-react/dist/esm/icons/image.js
1169
- var __iconNode14 = [
1170
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
1171
- ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
1172
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
1173
- ];
1174
- 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
+ }
1175
1250
 
1176
- // node_modules/lucide-react/dist/esm/icons/languages.js
1177
- var __iconNode15 = [
1178
- ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
1179
- ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
1180
- ["path", { d: "M2 5h12", key: "or177f" }],
1181
- ["path", { d: "M7 2h1", key: "1t2jsx" }],
1182
- ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
1183
- ["path", { d: "M14 18h6", key: "1m8k6r" }]
1184
- ];
1185
- 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
+ }
1186
1260
 
1187
- // node_modules/lucide-react/dist/esm/icons/link-2.js
1188
- var __iconNode16 = [
1189
- ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
1190
- ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
1191
- ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
1192
- ];
1193
- 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
+ }
1194
1267
 
1195
- // node_modules/lucide-react/dist/esm/icons/link.js
1196
- var __iconNode17 = [
1197
- ["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" }],
1198
- ["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" }]
1199
- ];
1200
- 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
+ }
1201
1276
 
1202
- // node_modules/lucide-react/dist/esm/icons/loader-circle.js
1203
- var __iconNode18 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
1204
- 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
+ }
1289
+
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
+ }
1205
1297
 
1206
- // node_modules/lucide-react/dist/esm/icons/pencil.js
1207
- var __iconNode19 = [
1208
- [
1209
- "path",
1210
- {
1211
- 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",
1212
- key: "1a8usu"
1213
- }
1214
- ],
1215
- ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
1216
- ];
1217
- var Pencil = createLucideIcon("pencil", __iconNode19);
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
+ }
1218
1303
 
1219
- // node_modules/lucide-react/dist/esm/icons/plus.js
1220
- var __iconNode20 = [
1221
- ["path", { d: "M5 12h14", key: "1ays0h" }],
1222
- ["path", { d: "M12 5v14", key: "s699le" }]
1223
- ];
1224
- var Plus = createLucideIcon("plus", __iconNode20);
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
+ }
1225
1318
 
1226
- // node_modules/lucide-react/dist/esm/icons/refresh-ccw.js
1227
- var __iconNode21 = [
1228
- ["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
1229
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
1230
- ["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
1231
- ["path", { d: "M16 16h5v5", key: "ccwih5" }]
1232
- ];
1233
- var RefreshCcw = createLucideIcon("refresh-ccw", __iconNode21);
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
+ }
1234
1325
 
1235
- // node_modules/lucide-react/dist/esm/icons/refresh-cw.js
1236
- var __iconNode22 = [
1237
- ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1238
- ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
1239
- ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
1240
- ["path", { d: "M8 16H3v5", key: "1cv678" }]
1241
- ];
1242
- var RefreshCw = createLucideIcon("refresh-cw", __iconNode22);
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
+ }
1243
1334
 
1244
- // node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
1245
- var __iconNode23 = [
1246
- ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
1247
- ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
1248
- ];
1249
- var RotateCcw = createLucideIcon("rotate-ccw", __iconNode23);
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
+ }
1250
1340
 
1251
- // node_modules/lucide-react/dist/esm/icons/search.js
1252
- var __iconNode24 = [
1253
- ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
1254
- ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
1255
- ];
1256
- var Search = createLucideIcon("search", __iconNode24);
1341
+ @keyframes tecof-uc-fade-in {
1342
+ 0% { opacity: 0; transform: translateY(20px); }
1343
+ 100% { opacity: 1; transform: translateY(0); }
1344
+ }
1257
1345
 
1258
- // node_modules/lucide-react/dist/esm/icons/trash-2.js
1259
- var __iconNode25 = [
1260
- ["path", { d: "M10 11v6", key: "nco0om" }],
1261
- ["path", { d: "M14 11v6", key: "outv1u" }],
1262
- ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
1263
- ["path", { d: "M3 6h18", key: "d0wm0j" }],
1264
- ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
1265
- ];
1266
- var Trash2 = createLucideIcon("trash-2", __iconNode25);
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
+ }
1267
1351
 
1268
- // node_modules/lucide-react/dist/esm/icons/upload.js
1269
- var __iconNode26 = [
1270
- ["path", { d: "M12 3v12", key: "1x0j5s" }],
1271
- ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
1272
- ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
1273
- ];
1274
- var Upload = createLucideIcon("upload", __iconNode26);
1352
+ @keyframes tecof-uc-blink {
1353
+ 0% { opacity: 0.3; }
1354
+ 100% { opacity: 1; }
1355
+ }
1275
1356
 
1276
- // node_modules/lucide-react/dist/esm/icons/x.js
1277
- var __iconNode27 = [
1278
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1279
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1280
- ];
1281
- var X = createLucideIcon("x", __iconNode27);
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
+ }
1282
1431
  var FieldErrorBoundary = class extends React__default.Component {
1283
1432
  constructor(props) {
1284
1433
  super(props);
@@ -5179,7 +5328,7 @@ var MediaDrawer = ({
5179
5328
  alt: file2.name,
5180
5329
  size: "thumbnail",
5181
5330
  className: "tecof-upload-gallery-thumb",
5182
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
5331
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
5183
5332
  }
5184
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" }) }),
5185
5334
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
@@ -23057,16 +23206,16 @@ var FileItemRenderer = ({
23057
23206
  `${cdnUrl}/${file2.name}`;
23058
23207
  const ext = getFileExtension(file2.name);
23059
23208
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-item", children: [
23060
- 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(
23061
23210
  TecofPicture,
23062
23211
  {
23063
23212
  data: file2,
23064
23213
  alt: file2.meta?.originalName || file2.name,
23065
23214
  size: "thumbnail",
23066
23215
  className: "tecof-upload-file-thumb",
23067
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "10px" }
23216
+ imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
23068
23217
  }
23069
- ) : /* @__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 }) }),
23070
23219
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-info", children: [
23071
23220
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-file-name", title: file2.meta?.originalName || file2.name, children: file2.meta?.originalName || file2.name }),
23072
23221
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-meta", children: [
@@ -23195,10 +23344,6 @@ var UploadField = ({
23195
23344
  const [drawerOpen, setDrawerOpen] = React__default.useState(false);
23196
23345
  const [showRefInput, setShowRefInput] = React__default.useState(false);
23197
23346
  const [refCode, setRefCode] = React__default.useState("{{ data. }}");
23198
- const [galleryFiles, setGalleryFiles] = React__default.useState([]);
23199
- const [loading, setLoading] = React__default.useState(false);
23200
- const [refreshKey, setRefreshKey] = React__default.useState(0);
23201
- const [gallerySearch, setGallerySearch] = React__default.useState("");
23202
23347
  const sourceToIdRef = React__default.useRef(/* @__PURE__ */ new Map());
23203
23348
  const compressFile = React__default.useCallback(async (file2) => {
23204
23349
  if (!imageCompressionEnabled) return file2;
@@ -23255,16 +23400,6 @@ var UploadField = ({
23255
23400
  setShowRefInput(false);
23256
23401
  setRefCode("{{ data. }}");
23257
23402
  }, [refCode, allowMultiple, value, onChange]);
23258
- React__default.useEffect(() => {
23259
- if (!drawerOpen) return;
23260
- setLoading(true);
23261
- apiClient.getUploads(1, 100).then((res2) => {
23262
- if (res2.success && res2.data) {
23263
- setGalleryFiles(res2.data);
23264
- }
23265
- setLoading(false);
23266
- }).catch(() => setLoading(false));
23267
- }, [drawerOpen, refreshKey, apiClient]);
23268
23403
  const toggleGalleryFile = React__default.useCallback((file2) => {
23269
23404
  if (allowMultiple) {
23270
23405
  const exists = value.some((f2) => f2._id === file2._id);
@@ -23337,9 +23472,6 @@ var UploadField = ({
23337
23472
  }
23338
23473
  };
23339
23474
  const canAddMore = allowMultiple ? value.length < maxFiles : value.length === 0;
23340
- const filteredGallery = gallerySearch.trim() ? galleryFiles.filter(
23341
- (f2) => f2.name?.toLowerCase().includes(gallerySearch.toLowerCase()) || f2.meta?.originalName?.toLowerCase().includes(gallerySearch.toLowerCase())
23342
- ) : galleryFiles;
23343
23475
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-container", children: [
23344
23476
  value.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-file-list", children: [
23345
23477
  showUploadedFiles && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-uploaded-header", children: [
@@ -23357,52 +23489,50 @@ var UploadField = ({
23357
23489
  file2._id || idx
23358
23490
  ))
23359
23491
  ] }),
23360
- value.length === 0 && !readOnly && canAddMore && !showPond && /* @__PURE__ */ jsxRuntime.jsxs(
23361
- "div",
23362
- {
23363
- className: "tecof-upload-empty-state",
23364
- onClick: () => setDrawerOpen(true),
23365
- children: [
23366
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(ImagePlus, { size: 22 }) }),
23367
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-title", children: "Dosya ekleyin" }),
23368
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-desc", children: "Medya k\xFCt\xFCphanesinden se\xE7in veya yeni y\xFCkleyin" })
23369
- ]
23370
- }
23371
- ),
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
+ ] }),
23372
23516
  !readOnly && canAddMore && !showPond && value.length > 0 && !showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-main-actions", children: [
23373
23517
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
23374
- /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 15 }),
23518
+ /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 13 }),
23375
23519
  " Referans"
23376
23520
  ] }),
23377
23521
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setDrawerOpen(true), children: [
23378
- /* @__PURE__ */ jsxRuntime.jsx(FolderOpen, { size: 15 }),
23379
- " Medya Se\xE7"
23380
- ] }),
23381
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
23382
- /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 15 }),
23383
- " Yeni Y\xFCkle"
23384
- ] })
23385
- ] }),
23386
- value.length === 0 && !readOnly && canAddMore && !showPond && !showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-main-actions", children: [
23387
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
23388
- /* @__PURE__ */ jsxRuntime.jsx(Code, { size: 15 }),
23389
- " Dinamik Referans Se\xE7"
23522
+ /* @__PURE__ */ jsxRuntime.jsx(FolderOpen, { size: 13 }),
23523
+ " K\xFCt\xFCphane"
23390
23524
  ] }),
23391
23525
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
23392
- /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 15 }),
23393
- " Yeni Y\xFCkle"
23526
+ /* @__PURE__ */ jsxRuntime.jsx(Upload, { size: 13 }),
23527
+ " Y\xFCkle"
23394
23528
  ] })
23395
23529
  ] }),
23396
- showRefInput && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-ref-section", style: { background: "#f8fafc", padding: "12px", borderRadius: "8px", border: "1px solid #e2e8f0", marginTop: "10px" }, children: [
23397
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "8px" }, children: [
23398
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "12px", fontWeight: 500, color: "#475569" }, children: [
23399
- "Dinamik CMS De\u011Fi\u015Fkeni (\xD6rn: ",
23400
- `{{ data.image }}`,
23401
- ")"
23402
- ] }),
23403
- /* @__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 }) })
23404
23534
  ] }),
23405
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
23535
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
23406
23536
  /* @__PURE__ */ jsxRuntime.jsx(
23407
23537
  "input",
23408
23538
  {
@@ -23410,7 +23540,7 @@ var UploadField = ({
23410
23540
  value: refCode,
23411
23541
  onChange: (e3) => setRefCode(e3.target.value),
23412
23542
  placeholder: "{{ data. }}",
23413
- 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" },
23414
23544
  autoFocus: true,
23415
23545
  onKeyDown: (e3) => {
23416
23546
  if (e3.key === "Enter") {
@@ -23425,7 +23555,7 @@ var UploadField = ({
23425
23555
  {
23426
23556
  type: "button",
23427
23557
  onClick: handleAddRef,
23428
- 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" },
23429
23559
  children: "Ekle"
23430
23560
  }
23431
23561
  )
@@ -23469,97 +23599,18 @@ var UploadField = ({
23469
23599
  }
23470
23600
  ) })
23471
23601
  ] }),
23472
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Root, { open: drawerOpen, onOpenChange: (open) => {
23473
- setDrawerOpen(open);
23474
- if (!open) setGallerySearch("");
23475
- }, children: /* @__PURE__ */ jsxRuntime.jsxs(Drawer.Portal, { children: [
23476
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Overlay, { className: "tecof-upload-drawer-overlay" }),
23477
- /* @__PURE__ */ jsxRuntime.jsxs(Drawer.Content, { className: "tecof-upload-drawer-content", children: [
23478
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Title, { className: "tecof-sr-only", children: "Medya Y\xF6neticisi" }),
23479
- /* @__PURE__ */ jsxRuntime.jsx(Drawer.Description, { className: "tecof-sr-only", children: "Sunucudaki dosyalardan birini se\xE7in veya yeni dosya y\xFCkleyin" }),
23480
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-drawer-handle" }),
23481
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-inner", children: [
23482
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-header", children: [
23483
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "tecof-upload-drawer-title", children: "Medya K\xFCt\xFCphanesi" }),
23484
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-drawer-header-actions", children: [
23485
- /* @__PURE__ */ jsxRuntime.jsx(
23486
- "button",
23487
- {
23488
- className: "tecof-upload-drawer-action-btn",
23489
- onClick: () => setRefreshKey((k2) => k2 + 1),
23490
- disabled: loading,
23491
- title: "Yenile",
23492
- children: /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 15, className: loading ? "tecof-upload-spin" : "" })
23493
- }
23494
- ),
23495
- /* @__PURE__ */ jsxRuntime.jsx(
23496
- "button",
23497
- {
23498
- className: "tecof-upload-drawer-action-btn",
23499
- onClick: () => setDrawerOpen(false),
23500
- title: "Kapat",
23501
- children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 15 })
23502
- }
23503
- )
23504
- ] })
23505
- ] }),
23506
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-search-box", children: [
23507
- /* @__PURE__ */ jsxRuntime.jsx(Search, { size: 15, color: "#a1a1aa" }),
23508
- /* @__PURE__ */ jsxRuntime.jsx(
23509
- "input",
23510
- {
23511
- type: "text",
23512
- placeholder: "Dosya ara...",
23513
- value: gallerySearch,
23514
- onChange: (e3) => setGallerySearch(e3.target.value),
23515
- className: "tecof-upload-search-input"
23516
- }
23517
- ),
23518
- gallerySearch && /* @__PURE__ */ jsxRuntime.jsx(
23519
- "button",
23520
- {
23521
- type: "button",
23522
- className: "tecof-upload-action-btn tecof-upload-clear-search-btn",
23523
- onClick: () => setGallerySearch(""),
23524
- children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 13 })
23525
- }
23526
- )
23527
- ] }),
23528
- loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-gallery-empty", children: [
23529
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 24, color: "#a1a1aa", className: "tecof-upload-spin" }) }),
23530
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-loading-text", children: "Y\xFCkleniyor..." })
23531
- ] }) : filteredGallery.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tecof-upload-gallery-empty", children: [
23532
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsxRuntime.jsx(Image2, { size: 24, color: "#a1a1aa" }) }),
23533
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-heading", children: gallerySearch ? "Sonu\xE7 bulunamad\u0131" : "Hen\xFCz dosya yok" }),
23534
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-empty-subheading", children: gallerySearch ? "Farkl\u0131 bir arama terimi deneyin" : "Dosyalar\u0131n\u0131z burada g\xF6r\xFCnecek" })
23535
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-grid", children: filteredGallery.map((file2) => {
23536
- const selected = value.some((v2) => v2._id === file2._id);
23537
- return /* @__PURE__ */ jsxRuntime.jsxs(
23538
- "div",
23539
- {
23540
- className: `tecof-upload-gallery-item ${selected ? "selected" : ""}`,
23541
- onClick: () => toggleGalleryFile(file2),
23542
- children: [
23543
- selected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-check", children: /* @__PURE__ */ jsxRuntime.jsx(Check, { size: 12, strokeWidth: 3 }) }),
23544
- isImageType2(file2.type) ? /* @__PURE__ */ jsxRuntime.jsx(
23545
- TecofPicture,
23546
- {
23547
- data: file2,
23548
- alt: file2.name,
23549
- size: "thumbnail",
23550
- className: "tecof-upload-gallery-thumb",
23551
- imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
23552
- }
23553
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(File2, { size: 24, color: "#a1a1aa" }) }),
23554
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
23555
- ]
23556
- },
23557
- file2._id
23558
- );
23559
- }) })
23560
- ] })
23561
- ] })
23562
- ] }) })
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
+ )
23563
23614
  ] });
23564
23615
  };
23565
23616
  UploadField.displayName = "UploadField";
@@ -25489,6 +25540,8 @@ lucide-react/dist/esm/shared/src/utils/hasA11yProp.js:
25489
25540
  lucide-react/dist/esm/context.js:
25490
25541
  lucide-react/dist/esm/Icon.js:
25491
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:
25492
25545
  lucide-react/dist/esm/icons/check.js:
25493
25546
  lucide-react/dist/esm/icons/chevron-down.js:
25494
25547
  lucide-react/dist/esm/icons/chevron-right.js: