@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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1087 -1034
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1089 -1036
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +430 -230
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React__default from 'react';
|
|
2
|
-
import React__default__default, { createContext,
|
|
2
|
+
import React__default__default, { createContext, forwardRef, createElement, memo, useRef, useCallback, useContext, useState, useEffect, useMemo, Component, useLayoutEffect } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import { blocksPlugin, outlinePlugin, fieldsPlugin, Puck, Render, FieldLabel } from '@puckeditor/core';
|
|
4
|
+
import { blocksPlugin, outlinePlugin, fieldsPlugin, Puck, Render, FieldLabel, usePuck, ActionBar } from '@puckeditor/core';
|
|
5
5
|
import { useEditor, EditorContent } from '@tiptap/react';
|
|
6
6
|
import Document from '@tiptap/extension-document';
|
|
7
7
|
import Paragraph from '@tiptap/extension-paragraph';
|
|
@@ -294,952 +294,1101 @@ function useTecof() {
|
|
|
294
294
|
}
|
|
295
295
|
return ctx;
|
|
296
296
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
} else {
|
|
317
|
-
setError(true);
|
|
318
|
-
}
|
|
319
|
-
} catch {
|
|
320
|
-
setError(true);
|
|
321
|
-
} finally {
|
|
322
|
-
setLoading(false);
|
|
323
|
-
}
|
|
324
|
-
}, [name3, apiClient]);
|
|
325
|
-
return /* @__PURE__ */ jsxs("div", { className: "tecof-drawer-item-group group", onMouseEnter: handleMouseEnter, children: [
|
|
326
|
-
children,
|
|
327
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover", children: [
|
|
328
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover-header", children: [
|
|
329
|
-
name3,
|
|
330
|
-
" \xD6nizleme"
|
|
331
|
-
] }),
|
|
332
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover-body", children: [
|
|
333
|
-
(loading || !imgSrc && !error2) && /* @__PURE__ */ jsx("div", { className: "tecof-drawer-skeleton" }),
|
|
334
|
-
imgSrc && /* @__PURE__ */ jsx(
|
|
335
|
-
"img",
|
|
336
|
-
{
|
|
337
|
-
src: imgSrc,
|
|
338
|
-
alt: `${name3} preview`,
|
|
339
|
-
className: "tecof-drawer-img"
|
|
340
|
-
}
|
|
341
|
-
),
|
|
342
|
-
error2 && /* @__PURE__ */ jsx("div", { className: "tecof-drawer-preview-error", children: "\xD6nizleme y\xFCklenemedi" })
|
|
343
|
-
] })
|
|
344
|
-
] })
|
|
345
|
-
] });
|
|
297
|
+
|
|
298
|
+
// node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
299
|
+
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
300
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
301
|
+
}).join(" ").trim();
|
|
302
|
+
|
|
303
|
+
// node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
|
|
304
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
305
|
+
|
|
306
|
+
// node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
|
|
307
|
+
var toCamelCase = (string) => string.replace(
|
|
308
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
309
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
310
|
+
);
|
|
311
|
+
|
|
312
|
+
// node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
|
|
313
|
+
var toPascalCase = (string) => {
|
|
314
|
+
const camelCase = toCamelCase(string);
|
|
315
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
346
316
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
const [loading, setLoading] = useState(true);
|
|
360
|
-
const [saving, setSaving] = useState(false);
|
|
361
|
-
const [saveStatus, setSaveStatus] = useState("idle");
|
|
362
|
-
const draftDataRef = useRef(null);
|
|
363
|
-
const isEmbedded = typeof window !== "undefined" && window.parent !== window;
|
|
364
|
-
useEffect(() => {
|
|
365
|
-
let cancelled = false;
|
|
366
|
-
const load = async () => {
|
|
367
|
-
setLoading(true);
|
|
368
|
-
const res2 = await apiClient.getPage(pageId);
|
|
369
|
-
if (cancelled) return;
|
|
370
|
-
const data3 = res2.success && res2.data?.draftData ? res2.data.draftData : EMPTY_PAGE;
|
|
371
|
-
setInitialData(data3);
|
|
372
|
-
draftDataRef.current = data3;
|
|
373
|
-
setLoading(false);
|
|
374
|
-
};
|
|
375
|
-
load();
|
|
376
|
-
return () => {
|
|
377
|
-
cancelled = true;
|
|
378
|
-
};
|
|
379
|
-
}, [pageId, apiClient]);
|
|
380
|
-
const handleSaveDraft = useCallback(
|
|
381
|
-
async (data3) => {
|
|
382
|
-
const currentData = data3 || draftDataRef.current;
|
|
383
|
-
if (!currentData) return;
|
|
384
|
-
const draftData = currentData;
|
|
385
|
-
setSaving(true);
|
|
386
|
-
setSaveStatus("idle");
|
|
387
|
-
const res2 = await apiClient.savePage(pageId, draftData, void 0, accessToken);
|
|
388
|
-
if (res2.success) {
|
|
389
|
-
setSaveStatus("success");
|
|
390
|
-
setTimeout(() => setSaveStatus("idle"), 3e3);
|
|
391
|
-
onSave?.(draftData);
|
|
392
|
-
if (isEmbedded) window.parent.postMessage({ type: "puck:saved" }, "*");
|
|
393
|
-
} else {
|
|
394
|
-
setSaveStatus("error");
|
|
395
|
-
if (isEmbedded) window.parent.postMessage({ type: "puck:saveError", message: res2.message }, "*");
|
|
396
|
-
}
|
|
397
|
-
setSaving(false);
|
|
398
|
-
},
|
|
399
|
-
[pageId, apiClient, isEmbedded, onSave, accessToken]
|
|
400
|
-
);
|
|
401
|
-
const handleChange = useCallback(
|
|
402
|
-
(data3) => {
|
|
403
|
-
draftDataRef.current = data3;
|
|
404
|
-
const draftData = data3;
|
|
405
|
-
onChange?.(draftData);
|
|
406
|
-
if (isEmbedded) window.parent.postMessage({ type: "puck:changed" }, "*");
|
|
407
|
-
},
|
|
408
|
-
[onChange, isEmbedded]
|
|
409
|
-
);
|
|
410
|
-
const handlePuckPublish = useCallback(
|
|
411
|
-
(data3) => {
|
|
412
|
-
handleSaveDraft(data3);
|
|
413
|
-
},
|
|
414
|
-
[handleSaveDraft]
|
|
415
|
-
);
|
|
416
|
-
useEffect(() => {
|
|
417
|
-
if (!isEmbedded) return;
|
|
418
|
-
const onMessage = (e3) => {
|
|
419
|
-
switch (e3.data?.type) {
|
|
420
|
-
case "puck:save": {
|
|
421
|
-
handleSaveDraft();
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
case "puck:undo":
|
|
425
|
-
document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, bubbles: true }));
|
|
426
|
-
break;
|
|
427
|
-
case "puck:redo":
|
|
428
|
-
document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, shiftKey: true, bubbles: true }));
|
|
429
|
-
break;
|
|
430
|
-
case "puck:viewport": {
|
|
431
|
-
const frame = document.querySelector('[data-testid="puck-frame"]');
|
|
432
|
-
if (frame) {
|
|
433
|
-
const w = e3.data.width || "100%";
|
|
434
|
-
frame.style.maxWidth = w;
|
|
435
|
-
frame.style.margin = w === "100%" ? "0" : "0 auto";
|
|
436
|
-
frame.style.transition = "max-width 0.3s ease";
|
|
437
|
-
}
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
window.addEventListener("message", onMessage);
|
|
443
|
-
return () => window.removeEventListener("message", onMessage);
|
|
444
|
-
}, [isEmbedded, handleSaveDraft]);
|
|
445
|
-
useEffect(() => {
|
|
446
|
-
if (!isEmbedded) return;
|
|
447
|
-
const handleClick = (e3) => {
|
|
448
|
-
const target = e3.target;
|
|
449
|
-
const puckComponent = target.closest("[data-puck-component]");
|
|
450
|
-
if (puckComponent) {
|
|
451
|
-
const componentType = puckComponent.getAttribute("data-puck-component");
|
|
452
|
-
const draggableId = puckComponent.closest("[data-rfd-draggable-id]")?.getAttribute("data-rfd-draggable-id");
|
|
453
|
-
window.parent.postMessage({
|
|
454
|
-
type: "puck:itemSelected",
|
|
455
|
-
item: {
|
|
456
|
-
type: componentType,
|
|
457
|
-
id: draggableId || null
|
|
458
|
-
}
|
|
459
|
-
}, "*");
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
const handleDeselect = (e3) => {
|
|
463
|
-
const target = e3.target;
|
|
464
|
-
if (!target.closest("[data-puck-component]")) {
|
|
465
|
-
window.parent.postMessage({ type: "puck:itemDeselected" }, "*");
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
document.addEventListener("click", handleClick, true);
|
|
469
|
-
document.addEventListener("click", handleDeselect, false);
|
|
470
|
-
return () => {
|
|
471
|
-
document.removeEventListener("click", handleClick, true);
|
|
472
|
-
document.removeEventListener("click", handleDeselect, false);
|
|
473
|
-
};
|
|
474
|
-
}, [isEmbedded]);
|
|
475
|
-
if (loading || !initialData) {
|
|
476
|
-
return /* @__PURE__ */ jsx("div", { className: `tecof-editor-loading ${className || ""}`.trim(), children: /* @__PURE__ */ jsxs("div", { className: "tecof-editor-loading-inner", children: [
|
|
477
|
-
/* @__PURE__ */ jsx("div", { className: "tecof-editor-spinner" }),
|
|
478
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-editor-loading-text", children: "Loading editor..." })
|
|
479
|
-
] }) });
|
|
480
|
-
}
|
|
481
|
-
const plugins = [
|
|
482
|
-
{ ...blocksPlugin(), label: "Bloklar" },
|
|
483
|
-
{ ...outlinePlugin(), label: "Anahat" },
|
|
484
|
-
{ ...fieldsPlugin({ desktopSideBar: "right" }), label: "Alanlar" },
|
|
485
|
-
...extraPlugins || []
|
|
486
|
-
];
|
|
487
|
-
const mergedOverrides = {
|
|
488
|
-
header: () => /* @__PURE__ */ jsx(Fragment, {}),
|
|
489
|
-
drawerItem: ({ children, name: name3 }) => {
|
|
490
|
-
return /* @__PURE__ */ jsx(ComponentDrawerItem, { name: name3, apiClient, children });
|
|
491
|
-
},
|
|
492
|
-
...overrides || {}
|
|
493
|
-
};
|
|
494
|
-
return /* @__PURE__ */ jsxs("div", { className: `tecof-editor-wrapper ${className || ""}`.trim(), children: [
|
|
495
|
-
/* @__PURE__ */ jsx(
|
|
496
|
-
Puck,
|
|
497
|
-
{
|
|
498
|
-
plugins,
|
|
499
|
-
config: config3,
|
|
500
|
-
data: initialData,
|
|
501
|
-
onPublish: handlePuckPublish,
|
|
502
|
-
onChange: handleChange,
|
|
503
|
-
overrides: mergedOverrides,
|
|
504
|
-
metadata: { editMode: true }
|
|
505
|
-
}
|
|
506
|
-
),
|
|
507
|
-
saving && /* @__PURE__ */ jsx("div", { className: "tecof-editor-save-indicator", children: saveStatus === "error" ? "Save failed" : "Saving..." })
|
|
508
|
-
] });
|
|
317
|
+
|
|
318
|
+
// node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
319
|
+
var defaultAttributes = {
|
|
320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
321
|
+
width: 24,
|
|
322
|
+
height: 24,
|
|
323
|
+
viewBox: "0 0 24 24",
|
|
324
|
+
fill: "none",
|
|
325
|
+
stroke: "currentColor",
|
|
326
|
+
strokeWidth: 2,
|
|
327
|
+
strokeLinecap: "round",
|
|
328
|
+
strokeLinejoin: "round"
|
|
509
329
|
};
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
{
|
|
515
|
-
|
|
516
|
-
data: data3,
|
|
517
|
-
metadata: { cmsData: cmsData || null }
|
|
330
|
+
|
|
331
|
+
// node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
|
|
332
|
+
var hasA11yProp = (props) => {
|
|
333
|
+
for (const prop in props) {
|
|
334
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
335
|
+
return true;
|
|
518
336
|
}
|
|
519
|
-
) });
|
|
520
|
-
};
|
|
521
|
-
var IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "svg", "avif", "bmp", "tiff", "heic"];
|
|
522
|
-
var VIDEO_EXTENSIONS = ["mp4", "webm", "ogg", "avi", "mov", "quicktime"];
|
|
523
|
-
var isImage = (type) => {
|
|
524
|
-
if (!type) return false;
|
|
525
|
-
const t2 = type.toLowerCase();
|
|
526
|
-
return IMAGE_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("image/");
|
|
527
|
-
};
|
|
528
|
-
var isVideo = (type) => {
|
|
529
|
-
if (!type) return false;
|
|
530
|
-
const t2 = type.toLowerCase();
|
|
531
|
-
return VIDEO_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("video/");
|
|
532
|
-
};
|
|
533
|
-
var getSizes = (size) => {
|
|
534
|
-
switch (size) {
|
|
535
|
-
case "thumbnail":
|
|
536
|
-
return "(max-width: 360px) 100vw, 360px";
|
|
537
|
-
case "medium":
|
|
538
|
-
return "(max-width: 540px) 100vw, 540px";
|
|
539
|
-
case "large":
|
|
540
|
-
return "(max-width: 720px) 100vw, 720px";
|
|
541
|
-
default:
|
|
542
|
-
return "100vw";
|
|
543
337
|
}
|
|
338
|
+
return false;
|
|
544
339
|
};
|
|
545
|
-
var
|
|
546
|
-
var
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
fancyboxName = "gallery",
|
|
562
|
-
ImageComponent,
|
|
563
|
-
imageProps = {}
|
|
564
|
-
}) => {
|
|
565
|
-
const { apiClient } = useTecof();
|
|
566
|
-
const cdnUrl = apiClient.cdnUrl;
|
|
567
|
-
if (!data3) return null;
|
|
568
|
-
const buildPath = (fileName) => data3?.folder && data3.folder !== "/" ? `${data3.folder.replace(/^\//, "")}/${fileName}` : fileName;
|
|
569
|
-
const isExternal = data3?.type === "external" || data3?.provider === "external";
|
|
570
|
-
const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${buildPath(data3?.name)}`;
|
|
571
|
-
const isImageType3 = isExternal ? true : isImage(data3?.type);
|
|
572
|
-
const isVideoType = isExternal ? false : isVideo(data3?.type);
|
|
573
|
-
if (!fileURL) return null;
|
|
574
|
-
const imgWidth = width || data3?.meta?.width || 500;
|
|
575
|
-
const imgHeight = height || data3?.meta?.height || 500;
|
|
576
|
-
const sizes = getSizes(size);
|
|
577
|
-
const renderVideo = () => /* @__PURE__ */ jsx(
|
|
578
|
-
"video",
|
|
579
|
-
{
|
|
580
|
-
src: fileURL,
|
|
581
|
-
autoPlay: true,
|
|
582
|
-
loop: true,
|
|
583
|
-
muted: true,
|
|
584
|
-
playsInline: true,
|
|
585
|
-
className: `tecof-picture-video ${imgClassName || ""}`.trim(),
|
|
586
|
-
style: imgStyle
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
const renderImg = () => {
|
|
590
|
-
const baseImgClass = fill ? "tecof-picture-img-fill" : "tecof-picture-img";
|
|
591
|
-
const computedImgClass = `${baseImgClass} ${imgClassName || ""}`.trim();
|
|
592
|
-
const altText = alt || data3?.name || "Image";
|
|
593
|
-
const commonProps = {
|
|
594
|
-
src: fileURL,
|
|
595
|
-
alt: altText,
|
|
596
|
-
loading,
|
|
597
|
-
sizes,
|
|
598
|
-
className: computedImgClass,
|
|
599
|
-
style: imgStyle
|
|
600
|
-
};
|
|
601
|
-
if (ImageComponent) {
|
|
602
|
-
return /* @__PURE__ */ jsx(
|
|
603
|
-
ImageComponent,
|
|
604
|
-
{
|
|
605
|
-
...commonProps,
|
|
606
|
-
width: fill ? void 0 : imgWidth,
|
|
607
|
-
height: fill ? void 0 : imgHeight,
|
|
608
|
-
...fill ? { fill: true } : {},
|
|
609
|
-
...imageProps
|
|
610
|
-
}
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
return /* @__PURE__ */ jsx(
|
|
614
|
-
"img",
|
|
615
|
-
{
|
|
616
|
-
...commonProps,
|
|
617
|
-
width: fill ? void 0 : imgWidth,
|
|
618
|
-
height: fill ? void 0 : imgHeight
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
};
|
|
622
|
-
const containerClassName = `tecof-picture-wrapper ${fill ? "fill" : ""} ${className || ""}`.trim();
|
|
623
|
-
if (fancybox && (isImageType3 || isVideoType)) {
|
|
624
|
-
return /* @__PURE__ */ jsx(
|
|
625
|
-
"a",
|
|
340
|
+
var LucideContext = createContext({});
|
|
341
|
+
var useLucideContext = () => useContext(LucideContext);
|
|
342
|
+
|
|
343
|
+
// node_modules/lucide-react/dist/esm/Icon.js
|
|
344
|
+
var Icon = forwardRef(
|
|
345
|
+
({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => {
|
|
346
|
+
const {
|
|
347
|
+
size: contextSize = 24,
|
|
348
|
+
strokeWidth: contextStrokeWidth = 2,
|
|
349
|
+
absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
|
|
350
|
+
color: contextColor = "currentColor",
|
|
351
|
+
className: contextClass = ""
|
|
352
|
+
} = useLucideContext() ?? {};
|
|
353
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
354
|
+
return createElement(
|
|
355
|
+
"svg",
|
|
626
356
|
{
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
357
|
+
ref,
|
|
358
|
+
...defaultAttributes,
|
|
359
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
360
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
361
|
+
stroke: color ?? contextColor,
|
|
362
|
+
strokeWidth: calculatedStrokeWidth,
|
|
363
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
364
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
365
|
+
...rest
|
|
366
|
+
},
|
|
367
|
+
[
|
|
368
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
369
|
+
...Array.isArray(children) ? children : [children]
|
|
370
|
+
]
|
|
632
371
|
);
|
|
633
372
|
}
|
|
634
|
-
|
|
635
|
-
return /* @__PURE__ */ jsx("div", { style, className: containerClassName, children: renderVideo() });
|
|
636
|
-
}
|
|
637
|
-
if (isImageType3) {
|
|
638
|
-
return /* @__PURE__ */ jsx("div", { style, className: containerClassName, children: renderImg() });
|
|
639
|
-
}
|
|
640
|
-
return null;
|
|
641
|
-
});
|
|
642
|
-
TecofPicture.displayName = "TecofPicture";
|
|
643
|
-
var UnderConstruction = ({
|
|
644
|
-
title,
|
|
645
|
-
description,
|
|
646
|
-
subtitle,
|
|
647
|
-
logoUrl,
|
|
648
|
-
accentColor = "#2563eb"
|
|
649
|
-
// Default elegant blue
|
|
650
|
-
}) => {
|
|
651
|
-
return /* @__PURE__ */ jsxs("div", { className: "tecof-uc-wrapper", children: [
|
|
652
|
-
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: `
|
|
653
|
-
.tecof-uc-wrapper {
|
|
654
|
-
min-height: 100vh;
|
|
655
|
-
display: flex;
|
|
656
|
-
align-items: center;
|
|
657
|
-
justify-content: center;
|
|
658
|
-
background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
|
|
659
|
-
radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
|
|
660
|
-
#090d16;
|
|
661
|
-
color: #f8fafc;
|
|
662
|
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
663
|
-
padding: 2rem 1rem;
|
|
664
|
-
box-sizing: border-box;
|
|
665
|
-
position: relative;
|
|
666
|
-
overflow: hidden;
|
|
667
|
-
}
|
|
373
|
+
);
|
|
668
374
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
375
|
+
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
376
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
377
|
+
const Component2 = forwardRef(
|
|
378
|
+
({ className, ...props }, ref) => createElement(Icon, {
|
|
379
|
+
ref,
|
|
380
|
+
iconNode,
|
|
381
|
+
className: mergeClasses(
|
|
382
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
383
|
+
`lucide-${iconName}`,
|
|
384
|
+
className
|
|
385
|
+
),
|
|
386
|
+
...props
|
|
387
|
+
})
|
|
388
|
+
);
|
|
389
|
+
Component2.displayName = toPascalCase(iconName);
|
|
390
|
+
return Component2;
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
// node_modules/lucide-react/dist/esm/icons/arrow-down.js
|
|
394
|
+
var __iconNode = [
|
|
395
|
+
["path", { d: "M12 5v14", key: "s699le" }],
|
|
396
|
+
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
397
|
+
];
|
|
398
|
+
var ArrowDown = createLucideIcon("arrow-down", __iconNode);
|
|
399
|
+
|
|
400
|
+
// node_modules/lucide-react/dist/esm/icons/arrow-up.js
|
|
401
|
+
var __iconNode2 = [
|
|
402
|
+
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
403
|
+
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
404
|
+
];
|
|
405
|
+
var ArrowUp = createLucideIcon("arrow-up", __iconNode2);
|
|
406
|
+
|
|
407
|
+
// node_modules/lucide-react/dist/esm/icons/check.js
|
|
408
|
+
var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
409
|
+
var Check = createLucideIcon("check", __iconNode3);
|
|
410
|
+
|
|
411
|
+
// node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
412
|
+
var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
413
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
|
|
414
|
+
|
|
415
|
+
// node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
416
|
+
var __iconNode5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
417
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode5);
|
|
418
|
+
|
|
419
|
+
// node_modules/lucide-react/dist/esm/icons/code.js
|
|
420
|
+
var __iconNode6 = [
|
|
421
|
+
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
422
|
+
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
423
|
+
];
|
|
424
|
+
var Code = createLucideIcon("code", __iconNode6);
|
|
425
|
+
|
|
426
|
+
// node_modules/lucide-react/dist/esm/icons/copy.js
|
|
427
|
+
var __iconNode7 = [
|
|
428
|
+
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
429
|
+
["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" }]
|
|
430
|
+
];
|
|
431
|
+
var Copy = createLucideIcon("copy", __iconNode7);
|
|
432
|
+
|
|
433
|
+
// node_modules/lucide-react/dist/esm/icons/database.js
|
|
434
|
+
var __iconNode8 = [
|
|
435
|
+
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
436
|
+
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
437
|
+
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
438
|
+
];
|
|
439
|
+
var Database = createLucideIcon("database", __iconNode8);
|
|
440
|
+
|
|
441
|
+
// node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
442
|
+
var __iconNode9 = [
|
|
443
|
+
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
444
|
+
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
445
|
+
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
446
|
+
];
|
|
447
|
+
var ExternalLink = createLucideIcon("external-link", __iconNode9);
|
|
448
|
+
|
|
449
|
+
// node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
450
|
+
var __iconNode10 = [
|
|
451
|
+
[
|
|
452
|
+
"path",
|
|
453
|
+
{
|
|
454
|
+
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",
|
|
455
|
+
key: "1oefj6"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
459
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
460
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
461
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
462
|
+
];
|
|
463
|
+
var FileText = createLucideIcon("file-text", __iconNode10);
|
|
464
|
+
|
|
465
|
+
// node_modules/lucide-react/dist/esm/icons/file.js
|
|
466
|
+
var __iconNode11 = [
|
|
467
|
+
[
|
|
468
|
+
"path",
|
|
469
|
+
{
|
|
470
|
+
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",
|
|
471
|
+
key: "1oefj6"
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
475
|
+
];
|
|
476
|
+
var File2 = createLucideIcon("file", __iconNode11);
|
|
477
|
+
|
|
478
|
+
// node_modules/lucide-react/dist/esm/icons/folder-open.js
|
|
479
|
+
var __iconNode12 = [
|
|
480
|
+
[
|
|
481
|
+
"path",
|
|
482
|
+
{
|
|
483
|
+
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",
|
|
484
|
+
key: "usdka0"
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
];
|
|
488
|
+
var FolderOpen = createLucideIcon("folder-open", __iconNode12);
|
|
685
489
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
-webkit-backdrop-filter: blur(20px);
|
|
694
|
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
695
|
-
border-radius: 24px;
|
|
696
|
-
padding: 3.5rem 2.5rem;
|
|
697
|
-
text-align: center;
|
|
698
|
-
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
|
|
699
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
700
|
-
animation: tecof-uc-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
701
|
-
}
|
|
490
|
+
// node_modules/lucide-react/dist/esm/icons/globe.js
|
|
491
|
+
var __iconNode13 = [
|
|
492
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
493
|
+
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
494
|
+
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
495
|
+
];
|
|
496
|
+
var Globe = createLucideIcon("globe", __iconNode13);
|
|
702
497
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
498
|
+
// node_modules/lucide-react/dist/esm/icons/grip-vertical.js
|
|
499
|
+
var __iconNode14 = [
|
|
500
|
+
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
501
|
+
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
502
|
+
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
503
|
+
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
504
|
+
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
505
|
+
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
506
|
+
];
|
|
507
|
+
var GripVertical = createLucideIcon("grip-vertical", __iconNode14);
|
|
709
508
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
509
|
+
// node_modules/lucide-react/dist/esm/icons/image-plus.js
|
|
510
|
+
var __iconNode15 = [
|
|
511
|
+
["path", { d: "M16 5h6", key: "1vod17" }],
|
|
512
|
+
["path", { d: "M19 2v6", key: "4bpg5p" }],
|
|
513
|
+
["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" }],
|
|
514
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
|
|
515
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
|
|
516
|
+
];
|
|
517
|
+
var ImagePlus = createLucideIcon("image-plus", __iconNode15);
|
|
716
518
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}
|
|
519
|
+
// node_modules/lucide-react/dist/esm/icons/image.js
|
|
520
|
+
var __iconNode16 = [
|
|
521
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
522
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
523
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
524
|
+
];
|
|
525
|
+
var Image2 = createLucideIcon("image", __iconNode16);
|
|
725
526
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
color: ${accentColor};
|
|
737
|
-
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
|
|
738
|
-
position: relative;
|
|
739
|
-
}
|
|
527
|
+
// node_modules/lucide-react/dist/esm/icons/languages.js
|
|
528
|
+
var __iconNode17 = [
|
|
529
|
+
["path", { d: "m5 8 6 6", key: "1wu5hv" }],
|
|
530
|
+
["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
|
|
531
|
+
["path", { d: "M2 5h12", key: "or177f" }],
|
|
532
|
+
["path", { d: "M7 2h1", key: "1t2jsx" }],
|
|
533
|
+
["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
|
|
534
|
+
["path", { d: "M14 18h6", key: "1m8k6r" }]
|
|
535
|
+
];
|
|
536
|
+
var Languages = createLucideIcon("languages", __iconNode17);
|
|
740
537
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
filter: blur(4px);
|
|
749
|
-
}
|
|
538
|
+
// node_modules/lucide-react/dist/esm/icons/link-2.js
|
|
539
|
+
var __iconNode18 = [
|
|
540
|
+
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
541
|
+
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
542
|
+
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
543
|
+
];
|
|
544
|
+
var Link2 = createLucideIcon("link-2", __iconNode18);
|
|
750
545
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
546
|
+
// node_modules/lucide-react/dist/esm/icons/link.js
|
|
547
|
+
var __iconNode19 = [
|
|
548
|
+
["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" }],
|
|
549
|
+
["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" }]
|
|
550
|
+
];
|
|
551
|
+
var Link = createLucideIcon("link", __iconNode19);
|
|
757
552
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
text-transform: uppercase;
|
|
762
|
-
letter-spacing: 0.15em;
|
|
763
|
-
color: ${accentColor};
|
|
764
|
-
margin-bottom: 0.75rem;
|
|
765
|
-
}
|
|
553
|
+
// node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
554
|
+
var __iconNode20 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
555
|
+
var LoaderCircle = createLucideIcon("loader-circle", __iconNode20);
|
|
766
556
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
557
|
+
// node_modules/lucide-react/dist/esm/icons/pencil.js
|
|
558
|
+
var __iconNode21 = [
|
|
559
|
+
[
|
|
560
|
+
"path",
|
|
561
|
+
{
|
|
562
|
+
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",
|
|
563
|
+
key: "1a8usu"
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
567
|
+
];
|
|
568
|
+
var Pencil = createLucideIcon("pencil", __iconNode21);
|
|
779
569
|
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
570
|
+
// node_modules/lucide-react/dist/esm/icons/plus.js
|
|
571
|
+
var __iconNode22 = [
|
|
572
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
573
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
574
|
+
];
|
|
575
|
+
var Plus = createLucideIcon("plus", __iconNode22);
|
|
787
576
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
577
|
+
// node_modules/lucide-react/dist/esm/icons/refresh-ccw.js
|
|
578
|
+
var __iconNode23 = [
|
|
579
|
+
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
|
|
580
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
581
|
+
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
|
|
582
|
+
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
583
|
+
];
|
|
584
|
+
var RefreshCcw = createLucideIcon("refresh-ccw", __iconNode23);
|
|
793
585
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
font-size: 0.825rem;
|
|
803
|
-
font-weight: 500;
|
|
804
|
-
color: #94a3b8;
|
|
805
|
-
text-decoration: none;
|
|
806
|
-
transition: all 0.2s ease-in-out;
|
|
807
|
-
}
|
|
586
|
+
// node_modules/lucide-react/dist/esm/icons/refresh-cw.js
|
|
587
|
+
var __iconNode24 = [
|
|
588
|
+
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
589
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
590
|
+
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
591
|
+
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
592
|
+
];
|
|
593
|
+
var RefreshCw = createLucideIcon("refresh-cw", __iconNode24);
|
|
808
594
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
595
|
+
// node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
596
|
+
var __iconNode25 = [
|
|
597
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
598
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
599
|
+
];
|
|
600
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode25);
|
|
815
601
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
animation: tecof-uc-blink 1.5s infinite alternate;
|
|
823
|
-
}
|
|
602
|
+
// node_modules/lucide-react/dist/esm/icons/search.js
|
|
603
|
+
var __iconNode26 = [
|
|
604
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
605
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
606
|
+
];
|
|
607
|
+
var Search = createLucideIcon("search", __iconNode26);
|
|
824
608
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
609
|
+
// node_modules/lucide-react/dist/esm/icons/trash-2.js
|
|
610
|
+
var __iconNode27 = [
|
|
611
|
+
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
612
|
+
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
613
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
614
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
615
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
616
|
+
];
|
|
617
|
+
var Trash2 = createLucideIcon("trash-2", __iconNode27);
|
|
830
618
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
619
|
+
// node_modules/lucide-react/dist/esm/icons/upload.js
|
|
620
|
+
var __iconNode28 = [
|
|
621
|
+
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
622
|
+
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
623
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
624
|
+
];
|
|
625
|
+
var Upload = createLucideIcon("upload", __iconNode28);
|
|
626
|
+
|
|
627
|
+
// node_modules/lucide-react/dist/esm/icons/x.js
|
|
628
|
+
var __iconNode29 = [
|
|
629
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
630
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
631
|
+
];
|
|
632
|
+
var X = createLucideIcon("x", __iconNode29);
|
|
633
|
+
var EMPTY_PAGE = { content: [], root: { props: {} }, zones: {} };
|
|
634
|
+
var ComponentDrawerItem = ({
|
|
635
|
+
name: name3,
|
|
636
|
+
apiClient,
|
|
637
|
+
children
|
|
638
|
+
}) => {
|
|
639
|
+
const [imgSrc, setImgSrc] = useState(null);
|
|
640
|
+
const [loading, setLoading] = useState(false);
|
|
641
|
+
const [error2, setError] = useState(false);
|
|
642
|
+
const fetchedRef = useRef(false);
|
|
643
|
+
const handleMouseEnter = useCallback(async () => {
|
|
644
|
+
if (fetchedRef.current) return;
|
|
645
|
+
fetchedRef.current = true;
|
|
646
|
+
setLoading(true);
|
|
647
|
+
try {
|
|
648
|
+
const domain = typeof window !== "undefined" ? window.location.hostname : "";
|
|
649
|
+
const blobUrl = await apiClient.getComponentPreview(domain, name3);
|
|
650
|
+
if (blobUrl) {
|
|
651
|
+
setImgSrc(blobUrl);
|
|
652
|
+
} else {
|
|
653
|
+
setError(true);
|
|
654
|
+
}
|
|
655
|
+
} catch {
|
|
656
|
+
setError(true);
|
|
657
|
+
} finally {
|
|
658
|
+
setLoading(false);
|
|
659
|
+
}
|
|
660
|
+
}, [name3, apiClient]);
|
|
661
|
+
return /* @__PURE__ */ jsxs("div", { className: "tecof-drawer-item-group group", onMouseEnter: handleMouseEnter, children: [
|
|
662
|
+
children,
|
|
663
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover", children: [
|
|
664
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover-header", children: [
|
|
665
|
+
name3,
|
|
666
|
+
" \xD6nizleme"
|
|
667
|
+
] }),
|
|
668
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-drawer-popover-body", children: [
|
|
669
|
+
(loading || !imgSrc && !error2) && /* @__PURE__ */ jsx("div", { className: "tecof-drawer-skeleton" }),
|
|
670
|
+
imgSrc && /* @__PURE__ */ jsx(
|
|
671
|
+
"img",
|
|
672
|
+
{
|
|
673
|
+
src: imgSrc,
|
|
674
|
+
alt: `${name3} preview`,
|
|
675
|
+
className: "tecof-drawer-img"
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
error2 && /* @__PURE__ */ jsx("div", { className: "tecof-drawer-preview-error", children: "\xD6nizleme y\xFCklenemedi" })
|
|
679
|
+
] })
|
|
680
|
+
] })
|
|
681
|
+
] });
|
|
682
|
+
};
|
|
683
|
+
var AutoFieldsOnSelect = () => {
|
|
684
|
+
const { selectedItem, dispatch } = usePuck();
|
|
685
|
+
const prevSelectedRef = useRef(null);
|
|
686
|
+
useEffect(() => {
|
|
687
|
+
const currentId = selectedItem?.props?.id || null;
|
|
688
|
+
if (currentId && currentId !== prevSelectedRef.current) {
|
|
689
|
+
dispatch({
|
|
690
|
+
type: "setUi",
|
|
691
|
+
ui: { plugin: { current: "fields" } }
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
prevSelectedRef.current = currentId;
|
|
695
|
+
}, [selectedItem, dispatch]);
|
|
696
|
+
return null;
|
|
697
|
+
};
|
|
698
|
+
var CustomActionBar = ({ children, label }) => {
|
|
699
|
+
const { appState, dispatch, getSelectorForId, selectedItem } = usePuck();
|
|
700
|
+
const canMoveUp = useMemo(() => {
|
|
701
|
+
if (!selectedItem || !selectedItem.props?.id) return false;
|
|
702
|
+
const selector = getSelectorForId(selectedItem.props.id);
|
|
703
|
+
if (!selector) return false;
|
|
704
|
+
return selector.index > 0;
|
|
705
|
+
}, [selectedItem, getSelectorForId]);
|
|
706
|
+
const canMoveDown = useMemo(() => {
|
|
707
|
+
if (!selectedItem || !selectedItem.props?.id) return false;
|
|
708
|
+
const selector = getSelectorForId(selectedItem.props.id);
|
|
709
|
+
if (!selector) return false;
|
|
710
|
+
const { index: index2, zone } = selector;
|
|
711
|
+
const items = zone ? appState.data.zones?.[zone] || [] : appState.data.content || [];
|
|
712
|
+
return index2 < items.length - 1;
|
|
713
|
+
}, [selectedItem, getSelectorForId, appState.data]);
|
|
714
|
+
const handleMove = useCallback((direction) => {
|
|
715
|
+
if (!selectedItem || !selectedItem.props?.id) return;
|
|
716
|
+
const selector = getSelectorForId(selectedItem.props.id);
|
|
717
|
+
if (!selector) return;
|
|
718
|
+
const { index: index2, zone } = selector;
|
|
719
|
+
let items = zone ? [...appState.data.zones?.[zone] || []] : [...appState.data.content || []];
|
|
720
|
+
const targetIndex = direction === "up" ? index2 - 1 : index2 + 1;
|
|
721
|
+
if (targetIndex < 0 || targetIndex >= items.length) return;
|
|
722
|
+
const temp = items[index2];
|
|
723
|
+
items[index2] = items[targetIndex];
|
|
724
|
+
items[targetIndex] = temp;
|
|
725
|
+
if (zone) {
|
|
726
|
+
dispatch({
|
|
727
|
+
type: "setData",
|
|
728
|
+
data: {
|
|
729
|
+
...appState.data,
|
|
730
|
+
zones: {
|
|
731
|
+
...appState.data.zones,
|
|
732
|
+
[zone]: items
|
|
733
|
+
}
|
|
834
734
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
735
|
+
});
|
|
736
|
+
dispatch({
|
|
737
|
+
type: "setUi",
|
|
738
|
+
ui: {
|
|
739
|
+
itemSelector: {
|
|
740
|
+
index: targetIndex,
|
|
741
|
+
zone
|
|
742
|
+
}
|
|
840
743
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
744
|
+
});
|
|
745
|
+
} else {
|
|
746
|
+
dispatch({
|
|
747
|
+
type: "setData",
|
|
748
|
+
data: {
|
|
749
|
+
...appState.data,
|
|
750
|
+
content: items
|
|
845
751
|
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
.tecof-uc-title {
|
|
853
|
-
font-size: 1.75rem;
|
|
854
|
-
}
|
|
855
|
-
.tecof-uc-description {
|
|
856
|
-
font-size: 0.95rem;
|
|
857
|
-
margin-bottom: 2rem;
|
|
752
|
+
});
|
|
753
|
+
dispatch({
|
|
754
|
+
type: "setUi",
|
|
755
|
+
ui: {
|
|
756
|
+
itemSelector: {
|
|
757
|
+
index: targetIndex
|
|
858
758
|
}
|
|
859
759
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
/* @__PURE__ */ jsx("h1", { className: "tecof-uc-title", children: title }),
|
|
870
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-uc-description", children: description }),
|
|
871
|
-
/* @__PURE__ */ jsx("div", { className: "tecof-uc-divider" }),
|
|
872
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-uc-badge", children: [
|
|
873
|
-
/* @__PURE__ */ jsx("span", { className: "tecof-uc-badge-dot" }),
|
|
874
|
-
/* @__PURE__ */ jsx("span", { children: "Yap\u0131m A\u015Famas\u0131nda" })
|
|
875
|
-
] })
|
|
876
|
-
] })
|
|
877
|
-
] });
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
}, [selectedItem, getSelectorForId, appState.data, dispatch]);
|
|
763
|
+
return /* @__PURE__ */ jsx(ActionBar, { label, children: /* @__PURE__ */ jsxs(ActionBar.Group, { children: [
|
|
764
|
+
/* @__PURE__ */ jsx(ActionBar.Action, { onClick: () => handleMove("up"), disabled: !canMoveUp, label: "Yukar\u0131 Ta\u015F\u0131", children: /* @__PURE__ */ jsx(ArrowUp, { size: 14 }) }),
|
|
765
|
+
/* @__PURE__ */ jsx(ActionBar.Action, { onClick: () => handleMove("down"), disabled: !canMoveDown, label: "A\u015Fa\u011F\u0131 Ta\u015F\u0131", children: /* @__PURE__ */ jsx(ArrowDown, { size: 14 }) }),
|
|
766
|
+
/* @__PURE__ */ jsx(ActionBar.Separator, {}),
|
|
767
|
+
children
|
|
768
|
+
] }) });
|
|
878
769
|
};
|
|
879
|
-
var
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
770
|
+
var TecofEditor = ({
|
|
771
|
+
pageId,
|
|
772
|
+
config: config3,
|
|
773
|
+
accessToken,
|
|
774
|
+
onSave,
|
|
775
|
+
onChange,
|
|
776
|
+
overrides,
|
|
777
|
+
plugins: extraPlugins,
|
|
778
|
+
className
|
|
779
|
+
}) => {
|
|
780
|
+
const { apiClient, secretKey } = useTecof();
|
|
781
|
+
const [initialData, setInitialData] = useState(null);
|
|
884
782
|
const [loading, setLoading] = useState(true);
|
|
885
|
-
const [
|
|
886
|
-
const [
|
|
887
|
-
const
|
|
783
|
+
const [saving, setSaving] = useState(false);
|
|
784
|
+
const [saveStatus, setSaveStatus] = useState("idle");
|
|
785
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
786
|
+
const draftDataRef = useRef(null);
|
|
787
|
+
const isEmbedded = typeof window !== "undefined" && window.parent !== window;
|
|
888
788
|
useEffect(() => {
|
|
889
789
|
let cancelled = false;
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
790
|
+
const load = async () => {
|
|
791
|
+
setLoading(true);
|
|
792
|
+
const res2 = await apiClient.getPage(pageId);
|
|
793
|
+
if (cancelled) return;
|
|
794
|
+
const data3 = res2.success && res2.data?.draftData ? res2.data.draftData : EMPTY_PAGE;
|
|
795
|
+
setInitialData(data3);
|
|
796
|
+
draftDataRef.current = data3;
|
|
797
|
+
setLoading(false);
|
|
798
|
+
};
|
|
799
|
+
load();
|
|
800
|
+
return () => {
|
|
801
|
+
cancelled = true;
|
|
802
|
+
};
|
|
803
|
+
}, [pageId, apiClient]);
|
|
804
|
+
const handleSaveDraft = useCallback(
|
|
805
|
+
async (data3) => {
|
|
806
|
+
const currentData = data3 || draftDataRef.current;
|
|
807
|
+
if (!currentData) return;
|
|
808
|
+
const draftData = currentData;
|
|
809
|
+
setSaving(true);
|
|
810
|
+
setSaveStatus("idle");
|
|
811
|
+
const res2 = await apiClient.savePage(pageId, draftData, void 0, accessToken);
|
|
812
|
+
if (res2.success) {
|
|
813
|
+
setSaveStatus("success");
|
|
814
|
+
setTimeout(() => setSaveStatus("idle"), 3e3);
|
|
815
|
+
onSave?.(draftData);
|
|
816
|
+
if (isEmbedded) window.parent.postMessage({ type: "puck:saved" }, "*");
|
|
817
|
+
} else {
|
|
818
|
+
setSaveStatus("error");
|
|
819
|
+
if (isEmbedded) window.parent.postMessage({ type: "puck:saveError", message: res2.message }, "*");
|
|
820
|
+
}
|
|
821
|
+
setSaving(false);
|
|
822
|
+
},
|
|
823
|
+
[pageId, apiClient, isEmbedded, onSave, accessToken]
|
|
824
|
+
);
|
|
825
|
+
const handleChange = useCallback(
|
|
826
|
+
(data3) => {
|
|
827
|
+
draftDataRef.current = data3;
|
|
828
|
+
const draftData = data3;
|
|
829
|
+
onChange?.(draftData);
|
|
830
|
+
if (isEmbedded) window.parent.postMessage({ type: "puck:changed" }, "*");
|
|
831
|
+
},
|
|
832
|
+
[onChange, isEmbedded]
|
|
833
|
+
);
|
|
834
|
+
const handlePuckPublish = useCallback(
|
|
835
|
+
(data3) => {
|
|
836
|
+
handleSaveDraft(data3);
|
|
837
|
+
},
|
|
838
|
+
[handleSaveDraft]
|
|
839
|
+
);
|
|
840
|
+
useEffect(() => {
|
|
841
|
+
if (!isEmbedded) return;
|
|
842
|
+
const onMessage = (e3) => {
|
|
843
|
+
switch (e3.data?.type) {
|
|
844
|
+
case "puck:save": {
|
|
845
|
+
handleSaveDraft();
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
case "puck:undo":
|
|
849
|
+
document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, bubbles: true }));
|
|
850
|
+
break;
|
|
851
|
+
case "puck:redo":
|
|
852
|
+
document.dispatchEvent(new KeyboardEvent("keydown", { key: "z", code: "KeyZ", ctrlKey: true, shiftKey: true, bubbles: true }));
|
|
853
|
+
break;
|
|
854
|
+
case "puck:viewport": {
|
|
855
|
+
const frame = document.querySelector('[data-testid="puck-frame"]');
|
|
856
|
+
if (frame) {
|
|
857
|
+
const w = e3.data.width || "100%";
|
|
858
|
+
frame.style.maxWidth = w;
|
|
859
|
+
frame.style.margin = w === "100%" ? "0" : "0 auto";
|
|
860
|
+
frame.style.transition = "max-width 0.3s ease";
|
|
861
|
+
}
|
|
862
|
+
break;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
window.addEventListener("message", onMessage);
|
|
867
|
+
return () => window.removeEventListener("message", onMessage);
|
|
868
|
+
}, [isEmbedded, handleSaveDraft]);
|
|
869
|
+
useEffect(() => {
|
|
870
|
+
if (!isEmbedded) return;
|
|
871
|
+
const handleClick = (e3) => {
|
|
872
|
+
const target = e3.target;
|
|
873
|
+
const puckComponent = target.closest("[data-puck-component]");
|
|
874
|
+
if (puckComponent) {
|
|
875
|
+
const componentType = puckComponent.getAttribute("data-puck-component");
|
|
876
|
+
const draggableId = puckComponent.closest("[data-rfd-draggable-id]")?.getAttribute("data-rfd-draggable-id");
|
|
877
|
+
window.parent.postMessage({
|
|
878
|
+
type: "puck:itemSelected",
|
|
879
|
+
item: {
|
|
880
|
+
type: componentType,
|
|
881
|
+
id: draggableId || null
|
|
882
|
+
}
|
|
883
|
+
}, "*");
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
const handleDeselect = (e3) => {
|
|
887
|
+
const target = e3.target;
|
|
888
|
+
if (!target.closest("[data-puck-component]")) {
|
|
889
|
+
window.parent.postMessage({ type: "puck:itemDeselected" }, "*");
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
document.addEventListener("click", handleClick, true);
|
|
893
|
+
document.addEventListener("click", handleDeselect, false);
|
|
894
|
+
return () => {
|
|
895
|
+
document.removeEventListener("click", handleClick, true);
|
|
896
|
+
document.removeEventListener("click", handleDeselect, false);
|
|
897
|
+
};
|
|
898
|
+
}, [isEmbedded]);
|
|
899
|
+
if (loading || !initialData) {
|
|
900
|
+
return /* @__PURE__ */ jsx("div", { className: `tecof-editor-loading ${className || ""}`.trim(), children: /* @__PURE__ */ jsxs("div", { className: "tecof-editor-loading-inner", children: [
|
|
901
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-editor-spinner" }),
|
|
902
|
+
/* @__PURE__ */ jsx("p", { className: "tecof-editor-loading-text", children: "Loading editor..." })
|
|
903
|
+
] }) });
|
|
904
|
+
}
|
|
905
|
+
const plugins = [
|
|
906
|
+
{ ...blocksPlugin(), label: "Bloklar" },
|
|
907
|
+
{ ...outlinePlugin(), label: "Anahat" },
|
|
908
|
+
{ ...fieldsPlugin({ desktopSideBar: "right" }), label: "Alanlar" },
|
|
909
|
+
...extraPlugins || []
|
|
910
|
+
];
|
|
911
|
+
const mergedOverrides = {
|
|
912
|
+
header: () => /* @__PURE__ */ jsx(Fragment, {}),
|
|
913
|
+
drawer: ({ children }) => {
|
|
914
|
+
return /* @__PURE__ */ jsxs("div", { className: "tecof-drawer-wrapper-layout", children: [
|
|
915
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-drawer-search-wrapper", children: /* @__PURE__ */ jsxs("div", { className: "tecof-drawer-search-box", children: [
|
|
916
|
+
/* @__PURE__ */ jsx(Search, { size: 14, color: "#71717a" }),
|
|
917
|
+
/* @__PURE__ */ jsx(
|
|
918
|
+
"input",
|
|
919
|
+
{
|
|
920
|
+
type: "text",
|
|
921
|
+
placeholder: "Blok ara...",
|
|
922
|
+
value: searchQuery,
|
|
923
|
+
onChange: (e3) => setSearchQuery(e3.target.value),
|
|
924
|
+
className: "tecof-drawer-search-input"
|
|
925
|
+
}
|
|
926
|
+
),
|
|
927
|
+
searchQuery && /* @__PURE__ */ jsx(
|
|
928
|
+
"button",
|
|
929
|
+
{
|
|
930
|
+
type: "button",
|
|
931
|
+
onClick: () => setSearchQuery(""),
|
|
932
|
+
className: "tecof-drawer-clear-btn",
|
|
933
|
+
title: "Temizle",
|
|
934
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
935
|
+
}
|
|
936
|
+
)
|
|
937
|
+
] }) }),
|
|
938
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-drawer-list-layout", children })
|
|
939
|
+
] });
|
|
940
|
+
},
|
|
941
|
+
drawerItem: ({ children, name: name3 }) => {
|
|
942
|
+
const componentConfig = config3.components?.[name3];
|
|
943
|
+
const label = componentConfig?.label || name3;
|
|
944
|
+
if (searchQuery.trim()) {
|
|
945
|
+
const query = searchQuery.toLowerCase();
|
|
946
|
+
const matchesName = name3.toLowerCase().includes(query);
|
|
947
|
+
const matchesLabel = label.toLowerCase().includes(query);
|
|
948
|
+
if (!matchesName && !matchesLabel) {
|
|
949
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
950
|
+
}
|
|
897
951
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
952
|
+
return /* @__PURE__ */ jsx(ComponentDrawerItem, { name: name3, apiClient, children });
|
|
953
|
+
},
|
|
954
|
+
actionBar: ({ children, label }) => {
|
|
955
|
+
return /* @__PURE__ */ jsx(CustomActionBar, { label, children });
|
|
956
|
+
},
|
|
957
|
+
puck: ({ children }) => {
|
|
958
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
959
|
+
/* @__PURE__ */ jsx(AutoFieldsOnSelect, {}),
|
|
960
|
+
children
|
|
961
|
+
] });
|
|
962
|
+
},
|
|
963
|
+
...overrides || {}
|
|
964
|
+
};
|
|
965
|
+
return /* @__PURE__ */ jsxs("div", { className: `tecof-editor-wrapper ${className || ""}`.trim(), children: [
|
|
966
|
+
/* @__PURE__ */ jsx(
|
|
967
|
+
Puck,
|
|
968
|
+
{
|
|
969
|
+
plugins,
|
|
970
|
+
config: config3,
|
|
971
|
+
data: initialData,
|
|
972
|
+
onPublish: handlePuckPublish,
|
|
973
|
+
onChange: handleChange,
|
|
974
|
+
overrides: mergedOverrides,
|
|
975
|
+
metadata: { editMode: true }
|
|
911
976
|
}
|
|
912
|
-
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
return () => {
|
|
916
|
-
cancelled = true;
|
|
917
|
-
};
|
|
918
|
-
}, [apiClient, cacheKey]);
|
|
919
|
-
return { merchantInfo, loading, error: error2, activeTab, setActiveTab };
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
923
|
-
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
924
|
-
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
925
|
-
}).join(" ").trim();
|
|
926
|
-
|
|
927
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
|
|
928
|
-
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
929
|
-
|
|
930
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
|
|
931
|
-
var toCamelCase = (string) => string.replace(
|
|
932
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
933
|
-
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
934
|
-
);
|
|
935
|
-
|
|
936
|
-
// node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
|
|
937
|
-
var toPascalCase = (string) => {
|
|
938
|
-
const camelCase = toCamelCase(string);
|
|
939
|
-
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
// node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
943
|
-
var defaultAttributes = {
|
|
944
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
945
|
-
width: 24,
|
|
946
|
-
height: 24,
|
|
947
|
-
viewBox: "0 0 24 24",
|
|
948
|
-
fill: "none",
|
|
949
|
-
stroke: "currentColor",
|
|
950
|
-
strokeWidth: 2,
|
|
951
|
-
strokeLinecap: "round",
|
|
952
|
-
strokeLinejoin: "round"
|
|
977
|
+
),
|
|
978
|
+
saving && /* @__PURE__ */ jsx("div", { className: "tecof-editor-save-indicator", children: saveStatus === "error" ? "Save failed" : "Saving..." })
|
|
979
|
+
] });
|
|
953
980
|
};
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
981
|
+
var TecofRender = ({ data: data3, config: config3, className, cmsData }) => {
|
|
982
|
+
if (!data3) return null;
|
|
983
|
+
return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(
|
|
984
|
+
Render,
|
|
985
|
+
{
|
|
986
|
+
config: config3,
|
|
987
|
+
data: data3,
|
|
988
|
+
metadata: { cmsData: cmsData || null }
|
|
960
989
|
}
|
|
961
|
-
}
|
|
962
|
-
return false;
|
|
990
|
+
) });
|
|
963
991
|
};
|
|
964
|
-
var
|
|
965
|
-
var
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
(
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
"
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
strokeWidth: calculatedStrokeWidth,
|
|
987
|
-
className: mergeClasses("lucide", contextClass, className),
|
|
988
|
-
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
989
|
-
...rest
|
|
990
|
-
},
|
|
991
|
-
[
|
|
992
|
-
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
993
|
-
...Array.isArray(children) ? children : [children]
|
|
994
|
-
]
|
|
995
|
-
);
|
|
992
|
+
var IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "svg", "avif", "bmp", "tiff", "heic"];
|
|
993
|
+
var VIDEO_EXTENSIONS = ["mp4", "webm", "ogg", "avi", "mov", "quicktime"];
|
|
994
|
+
var isImage = (type) => {
|
|
995
|
+
if (!type) return false;
|
|
996
|
+
const t2 = type.toLowerCase();
|
|
997
|
+
return IMAGE_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("image/");
|
|
998
|
+
};
|
|
999
|
+
var isVideo = (type) => {
|
|
1000
|
+
if (!type) return false;
|
|
1001
|
+
const t2 = type.toLowerCase();
|
|
1002
|
+
return VIDEO_EXTENSIONS.some((ext) => t2.includes(ext)) || t2.startsWith("video/");
|
|
1003
|
+
};
|
|
1004
|
+
var getSizes = (size) => {
|
|
1005
|
+
switch (size) {
|
|
1006
|
+
case "thumbnail":
|
|
1007
|
+
return "(max-width: 360px) 100vw, 360px";
|
|
1008
|
+
case "medium":
|
|
1009
|
+
return "(max-width: 540px) 100vw, 540px";
|
|
1010
|
+
case "large":
|
|
1011
|
+
return "(max-width: 720px) 100vw, 720px";
|
|
1012
|
+
default:
|
|
1013
|
+
return "100vw";
|
|
996
1014
|
}
|
|
997
|
-
);
|
|
998
|
-
|
|
999
|
-
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1000
|
-
var createLucideIcon = (iconName, iconNode) => {
|
|
1001
|
-
const Component2 = forwardRef(
|
|
1002
|
-
({ className, ...props }, ref) => createElement(Icon, {
|
|
1003
|
-
ref,
|
|
1004
|
-
iconNode,
|
|
1005
|
-
className: mergeClasses(
|
|
1006
|
-
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
1007
|
-
`lucide-${iconName}`,
|
|
1008
|
-
className
|
|
1009
|
-
),
|
|
1010
|
-
...props
|
|
1011
|
-
})
|
|
1012
|
-
);
|
|
1013
|
-
Component2.displayName = toPascalCase(iconName);
|
|
1014
|
-
return Component2;
|
|
1015
1015
|
};
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
// node_modules/lucide-react/dist/esm/icons/external-link.js
|
|
1052
|
-
var __iconNode7 = [
|
|
1053
|
-
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
1054
|
-
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
1055
|
-
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
1056
|
-
];
|
|
1057
|
-
var ExternalLink = createLucideIcon("external-link", __iconNode7);
|
|
1058
|
-
|
|
1059
|
-
// node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
1060
|
-
var __iconNode8 = [
|
|
1061
|
-
[
|
|
1062
|
-
"path",
|
|
1016
|
+
var DEFAULT_BLUR_DATA_URL = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNmM2Y0ZjYiLz48L3N2Zz4=";
|
|
1017
|
+
var TecofPicture = memo(({
|
|
1018
|
+
data: data3,
|
|
1019
|
+
alt = null,
|
|
1020
|
+
size = "full",
|
|
1021
|
+
loading = "lazy",
|
|
1022
|
+
fill = false,
|
|
1023
|
+
style,
|
|
1024
|
+
imgStyle,
|
|
1025
|
+
className,
|
|
1026
|
+
imgClassName,
|
|
1027
|
+
width,
|
|
1028
|
+
height,
|
|
1029
|
+
usePlaceholder = true,
|
|
1030
|
+
blurDataURL = DEFAULT_BLUR_DATA_URL,
|
|
1031
|
+
fancybox = false,
|
|
1032
|
+
fancyboxName = "gallery",
|
|
1033
|
+
ImageComponent,
|
|
1034
|
+
imageProps = {}
|
|
1035
|
+
}) => {
|
|
1036
|
+
const { apiClient } = useTecof();
|
|
1037
|
+
const cdnUrl = apiClient.cdnUrl;
|
|
1038
|
+
if (!data3) return null;
|
|
1039
|
+
const buildPath = (fileName) => data3?.folder && data3.folder !== "/" ? `${data3.folder.replace(/^\//, "")}/${fileName}` : fileName;
|
|
1040
|
+
const isExternal = data3?.type === "external" || data3?.provider === "external";
|
|
1041
|
+
const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${buildPath(data3?.name)}`;
|
|
1042
|
+
const isImageType3 = isExternal ? true : isImage(data3?.type);
|
|
1043
|
+
const isVideoType = isExternal ? false : isVideo(data3?.type);
|
|
1044
|
+
if (!fileURL) return null;
|
|
1045
|
+
const imgWidth = width || data3?.meta?.width || 500;
|
|
1046
|
+
const imgHeight = height || data3?.meta?.height || 500;
|
|
1047
|
+
const sizes = getSizes(size);
|
|
1048
|
+
const renderVideo = () => /* @__PURE__ */ jsx(
|
|
1049
|
+
"video",
|
|
1063
1050
|
{
|
|
1064
|
-
|
|
1065
|
-
|
|
1051
|
+
src: fileURL,
|
|
1052
|
+
autoPlay: true,
|
|
1053
|
+
loop: true,
|
|
1054
|
+
muted: true,
|
|
1055
|
+
playsInline: true,
|
|
1056
|
+
className: `tecof-picture-video ${imgClassName || ""}`.trim(),
|
|
1057
|
+
style: imgStyle
|
|
1058
|
+
}
|
|
1059
|
+
);
|
|
1060
|
+
const renderImg = () => {
|
|
1061
|
+
const baseImgClass = fill ? "tecof-picture-img-fill" : "tecof-picture-img";
|
|
1062
|
+
const computedImgClass = `${baseImgClass} ${imgClassName || ""}`.trim();
|
|
1063
|
+
const altText = alt || data3?.name || "Image";
|
|
1064
|
+
const commonProps = {
|
|
1065
|
+
src: fileURL,
|
|
1066
|
+
alt: altText,
|
|
1067
|
+
loading,
|
|
1068
|
+
sizes,
|
|
1069
|
+
className: computedImgClass,
|
|
1070
|
+
style: imgStyle
|
|
1071
|
+
};
|
|
1072
|
+
if (ImageComponent) {
|
|
1073
|
+
return /* @__PURE__ */ jsx(
|
|
1074
|
+
ImageComponent,
|
|
1075
|
+
{
|
|
1076
|
+
...commonProps,
|
|
1077
|
+
width: fill ? void 0 : imgWidth,
|
|
1078
|
+
height: fill ? void 0 : imgHeight,
|
|
1079
|
+
...fill ? { fill: true } : {},
|
|
1080
|
+
...imageProps
|
|
1081
|
+
}
|
|
1082
|
+
);
|
|
1066
1083
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1084
|
+
return /* @__PURE__ */ jsx(
|
|
1085
|
+
"img",
|
|
1086
|
+
{
|
|
1087
|
+
...commonProps,
|
|
1088
|
+
width: fill ? void 0 : imgWidth,
|
|
1089
|
+
height: fill ? void 0 : imgHeight
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
};
|
|
1093
|
+
const containerClassName = `tecof-picture-wrapper ${fill ? "fill" : ""} ${className || ""}`.trim();
|
|
1094
|
+
if (fancybox && (isImageType3 || isVideoType)) {
|
|
1095
|
+
return /* @__PURE__ */ jsx(
|
|
1096
|
+
"a",
|
|
1097
|
+
{
|
|
1098
|
+
"data-fancybox": fancyboxName,
|
|
1099
|
+
href: fileURL,
|
|
1100
|
+
style: { display: "block", textDecoration: "none" },
|
|
1101
|
+
children: /* @__PURE__ */ jsx("div", { style, className: containerClassName, children: isVideoType ? renderVideo() : renderImg() })
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
if (isVideoType) {
|
|
1106
|
+
return /* @__PURE__ */ jsx("div", { style, className: containerClassName, children: renderVideo() });
|
|
1107
|
+
}
|
|
1108
|
+
if (isImageType3) {
|
|
1109
|
+
return /* @__PURE__ */ jsx("div", { style, className: containerClassName, children: renderImg() });
|
|
1110
|
+
}
|
|
1111
|
+
return null;
|
|
1112
|
+
});
|
|
1113
|
+
TecofPicture.displayName = "TecofPicture";
|
|
1114
|
+
var UnderConstruction = ({
|
|
1115
|
+
title,
|
|
1116
|
+
description,
|
|
1117
|
+
subtitle,
|
|
1118
|
+
logoUrl,
|
|
1119
|
+
accentColor = "#2563eb"
|
|
1120
|
+
// Default elegant blue
|
|
1121
|
+
}) => {
|
|
1122
|
+
return /* @__PURE__ */ jsxs("div", { className: "tecof-uc-wrapper", children: [
|
|
1123
|
+
/* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: `
|
|
1124
|
+
.tecof-uc-wrapper {
|
|
1125
|
+
min-height: 100vh;
|
|
1126
|
+
display: flex;
|
|
1127
|
+
align-items: center;
|
|
1128
|
+
justify-content: center;
|
|
1129
|
+
background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
|
|
1130
|
+
radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
|
|
1131
|
+
#090d16;
|
|
1132
|
+
color: #f8fafc;
|
|
1133
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
1134
|
+
padding: 2rem 1rem;
|
|
1135
|
+
box-sizing: border-box;
|
|
1136
|
+
position: relative;
|
|
1137
|
+
overflow: hidden;
|
|
1138
|
+
}
|
|
1074
1139
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1140
|
+
/* Ambient glowing circles */
|
|
1141
|
+
.tecof-uc-glow-1 {
|
|
1142
|
+
position: absolute;
|
|
1143
|
+
top: 20%;
|
|
1144
|
+
left: 50%;
|
|
1145
|
+
transform: translate(-50%, -50%);
|
|
1146
|
+
width: 500px;
|
|
1147
|
+
height: 500px;
|
|
1148
|
+
background: ${accentColor};
|
|
1149
|
+
filter: blur(150px);
|
|
1150
|
+
opacity: 0.12;
|
|
1151
|
+
pointer-events: none;
|
|
1152
|
+
z-index: 1;
|
|
1153
|
+
border-radius: 50%;
|
|
1154
|
+
animation: tecof-uc-pulse 8s infinite alternate ease-in-out;
|
|
1155
|
+
}
|
|
1087
1156
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1157
|
+
.tecof-uc-container {
|
|
1158
|
+
position: relative;
|
|
1159
|
+
z-index: 2;
|
|
1160
|
+
max-width: 540px;
|
|
1161
|
+
width: 100%;
|
|
1162
|
+
background: rgba(17, 24, 39, 0.55);
|
|
1163
|
+
backdrop-filter: blur(20px);
|
|
1164
|
+
-webkit-backdrop-filter: blur(20px);
|
|
1165
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1166
|
+
border-radius: 24px;
|
|
1167
|
+
padding: 3.5rem 2.5rem;
|
|
1168
|
+
text-align: center;
|
|
1169
|
+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
|
|
1170
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
1171
|
+
animation: tecof-uc-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
1172
|
+
}
|
|
1099
1173
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
var Globe = createLucideIcon("globe", __iconNode11);
|
|
1174
|
+
.tecof-uc-logo-area {
|
|
1175
|
+
margin-bottom: 2.5rem;
|
|
1176
|
+
display: flex;
|
|
1177
|
+
justify-content: center;
|
|
1178
|
+
align-items: center;
|
|
1179
|
+
}
|
|
1107
1180
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
1115
|
-
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
1116
|
-
];
|
|
1117
|
-
var GripVertical = createLucideIcon("grip-vertical", __iconNode12);
|
|
1181
|
+
.tecof-uc-logo {
|
|
1182
|
+
max-height: 56px;
|
|
1183
|
+
max-width: 200px;
|
|
1184
|
+
object-fit: contain;
|
|
1185
|
+
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
|
|
1186
|
+
}
|
|
1118
1187
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
var ImagePlus = createLucideIcon("image-plus", __iconNode13);
|
|
1188
|
+
.tecof-uc-logo-fallback {
|
|
1189
|
+
font-size: 1.5rem;
|
|
1190
|
+
font-weight: 700;
|
|
1191
|
+
letter-spacing: -0.025em;
|
|
1192
|
+
background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
|
|
1193
|
+
-webkit-background-clip: text;
|
|
1194
|
+
-webkit-text-fill-color: transparent;
|
|
1195
|
+
}
|
|
1128
1196
|
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1197
|
+
.tecof-uc-icon-wrapper {
|
|
1198
|
+
width: 80px;
|
|
1199
|
+
height: 80px;
|
|
1200
|
+
border-radius: 20px;
|
|
1201
|
+
background: rgba(255, 255, 255, 0.03);
|
|
1202
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1203
|
+
display: flex;
|
|
1204
|
+
align-items: center;
|
|
1205
|
+
justify-content: center;
|
|
1206
|
+
margin: 0 auto 2.2rem auto;
|
|
1207
|
+
color: ${accentColor};
|
|
1208
|
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
|
|
1209
|
+
position: relative;
|
|
1210
|
+
}
|
|
1136
1211
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
var Languages = createLucideIcon("languages", __iconNode15);
|
|
1212
|
+
.tecof-uc-icon-glow {
|
|
1213
|
+
position: absolute;
|
|
1214
|
+
inset: -2px;
|
|
1215
|
+
border-radius: 22px;
|
|
1216
|
+
background: linear-gradient(135deg, ${accentColor}, transparent);
|
|
1217
|
+
opacity: 0.3;
|
|
1218
|
+
z-index: -1;
|
|
1219
|
+
filter: blur(4px);
|
|
1220
|
+
}
|
|
1147
1221
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
var Link2 = createLucideIcon("link-2", __iconNode16);
|
|
1222
|
+
.tecof-uc-icon-wrapper svg {
|
|
1223
|
+
width: 36px;
|
|
1224
|
+
height: 36px;
|
|
1225
|
+
stroke-width: 1.5;
|
|
1226
|
+
animation: tecof-uc-float 4s ease-in-out infinite;
|
|
1227
|
+
}
|
|
1155
1228
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1229
|
+
.tecof-uc-subtitle {
|
|
1230
|
+
font-size: 0.875rem;
|
|
1231
|
+
font-weight: 600;
|
|
1232
|
+
text-transform: uppercase;
|
|
1233
|
+
letter-spacing: 0.15em;
|
|
1234
|
+
color: ${accentColor};
|
|
1235
|
+
margin-bottom: 0.75rem;
|
|
1236
|
+
}
|
|
1162
1237
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1238
|
+
.tecof-uc-title {
|
|
1239
|
+
font-size: 2.25rem;
|
|
1240
|
+
font-weight: 800;
|
|
1241
|
+
line-height: 1.2;
|
|
1242
|
+
letter-spacing: -0.025em;
|
|
1243
|
+
color: #ffffff;
|
|
1244
|
+
margin-top: 0;
|
|
1245
|
+
margin-bottom: 1.25rem;
|
|
1246
|
+
background: linear-gradient(to bottom, #ffffff 0%, #cbd5e1 100%);
|
|
1247
|
+
-webkit-background-clip: text;
|
|
1248
|
+
-webkit-text-fill-color: transparent;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.tecof-uc-description {
|
|
1252
|
+
font-size: 1.05rem;
|
|
1253
|
+
line-height: 1.6;
|
|
1254
|
+
color: #94a3b8;
|
|
1255
|
+
margin: 0 auto 2.5rem auto;
|
|
1256
|
+
max-width: 420px;
|
|
1257
|
+
}
|
|
1166
1258
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
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",
|
|
1173
|
-
key: "1a8usu"
|
|
1174
|
-
}
|
|
1175
|
-
],
|
|
1176
|
-
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
1177
|
-
];
|
|
1178
|
-
var Pencil = createLucideIcon("pencil", __iconNode19);
|
|
1259
|
+
.tecof-uc-divider {
|
|
1260
|
+
height: 1px;
|
|
1261
|
+
background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 100%);
|
|
1262
|
+
margin-bottom: 2rem;
|
|
1263
|
+
}
|
|
1179
1264
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1265
|
+
.tecof-uc-badge {
|
|
1266
|
+
display: inline-flex;
|
|
1267
|
+
align-items: center;
|
|
1268
|
+
gap: 0.5rem;
|
|
1269
|
+
background: rgba(255, 255, 255, 0.04);
|
|
1270
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1271
|
+
border-radius: 99px;
|
|
1272
|
+
padding: 0.5rem 1.25rem;
|
|
1273
|
+
font-size: 0.825rem;
|
|
1274
|
+
font-weight: 500;
|
|
1275
|
+
color: #94a3b8;
|
|
1276
|
+
text-decoration: none;
|
|
1277
|
+
transition: all 0.2s ease-in-out;
|
|
1278
|
+
}
|
|
1186
1279
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
];
|
|
1194
|
-
var RefreshCcw = createLucideIcon("refresh-ccw", __iconNode21);
|
|
1280
|
+
.tecof-uc-badge:hover {
|
|
1281
|
+
background: rgba(255, 255, 255, 0.08);
|
|
1282
|
+
border-color: rgba(255, 255, 255, 0.15);
|
|
1283
|
+
color: #f8fafc;
|
|
1284
|
+
transform: translateY(-1px);
|
|
1285
|
+
}
|
|
1195
1286
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1287
|
+
.tecof-uc-badge-dot {
|
|
1288
|
+
width: 6px;
|
|
1289
|
+
height: 6px;
|
|
1290
|
+
background-color: ${accentColor};
|
|
1291
|
+
border-radius: 50%;
|
|
1292
|
+
box-shadow: 0 0 10px ${accentColor};
|
|
1293
|
+
animation: tecof-uc-blink 1.5s infinite alternate;
|
|
1294
|
+
}
|
|
1204
1295
|
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode23);
|
|
1296
|
+
/* Animations */
|
|
1297
|
+
@keyframes tecof-uc-pulse {
|
|
1298
|
+
0% { opacity: 0.08; transform: translate(-50%, -50%) scale(0.95); }
|
|
1299
|
+
100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1.05); }
|
|
1300
|
+
}
|
|
1211
1301
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
];
|
|
1217
|
-
var Search = createLucideIcon("search", __iconNode24);
|
|
1302
|
+
@keyframes tecof-uc-fade-in {
|
|
1303
|
+
0% { opacity: 0; transform: translateY(20px); }
|
|
1304
|
+
100% { opacity: 1; transform: translateY(0); }
|
|
1305
|
+
}
|
|
1218
1306
|
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
1225
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
1226
|
-
];
|
|
1227
|
-
var Trash2 = createLucideIcon("trash-2", __iconNode25);
|
|
1307
|
+
@keyframes tecof-uc-float {
|
|
1308
|
+
0% { transform: translateY(0px) rotate(0deg); }
|
|
1309
|
+
50% { transform: translateY(-5px) rotate(3deg); }
|
|
1310
|
+
100% { transform: translateY(0px) rotate(0deg); }
|
|
1311
|
+
}
|
|
1228
1312
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
1234
|
-
];
|
|
1235
|
-
var Upload = createLucideIcon("upload", __iconNode26);
|
|
1313
|
+
@keyframes tecof-uc-blink {
|
|
1314
|
+
0% { opacity: 0.3; }
|
|
1315
|
+
100% { opacity: 1; }
|
|
1316
|
+
}
|
|
1236
1317
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1318
|
+
@media (max-width: 640px) {
|
|
1319
|
+
.tecof-uc-container {
|
|
1320
|
+
padding: 2.5rem 1.5rem;
|
|
1321
|
+
border-radius: 20px;
|
|
1322
|
+
}
|
|
1323
|
+
.tecof-uc-title {
|
|
1324
|
+
font-size: 1.75rem;
|
|
1325
|
+
}
|
|
1326
|
+
.tecof-uc-description {
|
|
1327
|
+
font-size: 0.95rem;
|
|
1328
|
+
margin-bottom: 2rem;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
` } }),
|
|
1332
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-uc-glow-1" }),
|
|
1333
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-uc-container", children: [
|
|
1334
|
+
logoUrl ? /* @__PURE__ */ jsx("div", { className: "tecof-uc-logo-area", children: /* @__PURE__ */ jsx("img", { src: logoUrl, alt: "Store Logo", className: "tecof-uc-logo" }) }) : /* @__PURE__ */ jsx("div", { className: "tecof-uc-logo-area", children: /* @__PURE__ */ jsx("div", { className: "tecof-uc-logo-fallback", children: "TECOF" }) }),
|
|
1335
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-uc-icon-wrapper", children: [
|
|
1336
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-uc-icon-glow" }),
|
|
1337
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ 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" }) })
|
|
1338
|
+
] }),
|
|
1339
|
+
subtitle && /* @__PURE__ */ jsx("div", { className: "tecof-uc-subtitle", children: subtitle }),
|
|
1340
|
+
/* @__PURE__ */ jsx("h1", { className: "tecof-uc-title", children: title }),
|
|
1341
|
+
/* @__PURE__ */ jsx("p", { className: "tecof-uc-description", children: description }),
|
|
1342
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-uc-divider" }),
|
|
1343
|
+
/* @__PURE__ */ jsxs("div", { className: "tecof-uc-badge", children: [
|
|
1344
|
+
/* @__PURE__ */ jsx("span", { className: "tecof-uc-badge-dot" }),
|
|
1345
|
+
/* @__PURE__ */ jsx("span", { children: "Yap\u0131m A\u015Famas\u0131nda" })
|
|
1346
|
+
] })
|
|
1347
|
+
] })
|
|
1348
|
+
] });
|
|
1349
|
+
};
|
|
1350
|
+
var merchantInfoCache = /* @__PURE__ */ new Map();
|
|
1351
|
+
var CACHE_TTL = 5 * 60 * 1e3;
|
|
1352
|
+
function useLanguages() {
|
|
1353
|
+
const { apiClient, secretKey, apiUrl } = useTecof();
|
|
1354
|
+
const [merchantInfo, setMerchantInfo] = useState(null);
|
|
1355
|
+
const [loading, setLoading] = useState(true);
|
|
1356
|
+
const [error2, setError] = useState(null);
|
|
1357
|
+
const [activeTab, setActiveTab] = useState("");
|
|
1358
|
+
const cacheKey = useMemo(() => `${apiUrl}::${secretKey}`, [apiUrl, secretKey]);
|
|
1359
|
+
useEffect(() => {
|
|
1360
|
+
let cancelled = false;
|
|
1361
|
+
const fetchInfo = async () => {
|
|
1362
|
+
const cached = merchantInfoCache.get(cacheKey);
|
|
1363
|
+
if (cached && Date.now() - cached.ts < CACHE_TTL) {
|
|
1364
|
+
setMerchantInfo(cached.data);
|
|
1365
|
+
if (!activeTab) setActiveTab(cached.data.defaultLanguage);
|
|
1366
|
+
setLoading(false);
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
setLoading(true);
|
|
1370
|
+
setError(null);
|
|
1371
|
+
const res2 = await apiClient.getMerchantInfo();
|
|
1372
|
+
if (cancelled) return;
|
|
1373
|
+
if (res2.success && res2.data) {
|
|
1374
|
+
merchantInfoCache.set(cacheKey, { data: res2.data, ts: Date.now() });
|
|
1375
|
+
setMerchantInfo(res2.data);
|
|
1376
|
+
if (!activeTab) setActiveTab(res2.data.defaultLanguage);
|
|
1377
|
+
} else {
|
|
1378
|
+
setError(res2.message || "Failed to load languages");
|
|
1379
|
+
const fallback = { languages: ["tr"], defaultLanguage: "tr" };
|
|
1380
|
+
setMerchantInfo(fallback);
|
|
1381
|
+
if (!activeTab) setActiveTab("tr");
|
|
1382
|
+
}
|
|
1383
|
+
setLoading(false);
|
|
1384
|
+
};
|
|
1385
|
+
fetchInfo();
|
|
1386
|
+
return () => {
|
|
1387
|
+
cancelled = true;
|
|
1388
|
+
};
|
|
1389
|
+
}, [apiClient, cacheKey]);
|
|
1390
|
+
return { merchantInfo, loading, error: error2, activeTab, setActiveTab };
|
|
1391
|
+
}
|
|
1243
1392
|
var FieldErrorBoundary = class extends Component {
|
|
1244
1393
|
constructor(props) {
|
|
1245
1394
|
super(props);
|
|
@@ -5140,7 +5289,7 @@ var MediaDrawer = ({
|
|
|
5140
5289
|
alt: file2.name,
|
|
5141
5290
|
size: "thumbnail",
|
|
5142
5291
|
className: "tecof-upload-gallery-thumb",
|
|
5143
|
-
imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "
|
|
5292
|
+
imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
|
|
5144
5293
|
}
|
|
5145
5294
|
) : /* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsx(File2, { size: 24, color: "#a1a1aa" }) }),
|
|
5146
5295
|
/* @__PURE__ */ jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
|
|
@@ -23018,16 +23167,16 @@ var FileItemRenderer = ({
|
|
|
23018
23167
|
`${cdnUrl}/${file2.name}`;
|
|
23019
23168
|
const ext = getFileExtension(file2.name);
|
|
23020
23169
|
return /* @__PURE__ */ jsxs("div", { className: "tecof-upload-file-item", children: [
|
|
23021
|
-
file2.type === "image/reference" ? /* @__PURE__ */ jsx("div", { className: "tecof-upload-file-icon", style: { backgroundColor: "#
|
|
23170
|
+
file2.type === "image/reference" ? /* @__PURE__ */ jsx("div", { className: "tecof-upload-file-icon", style: { backgroundColor: "#f4f4f5", color: "#18181b" }, children: /* @__PURE__ */ jsx(Code, { size: 16 }) }) : isImageType2(file2.type) ? /* @__PURE__ */ jsx(
|
|
23022
23171
|
TecofPicture,
|
|
23023
23172
|
{
|
|
23024
23173
|
data: file2,
|
|
23025
23174
|
alt: file2.meta?.originalName || file2.name,
|
|
23026
23175
|
size: "thumbnail",
|
|
23027
23176
|
className: "tecof-upload-file-thumb",
|
|
23028
|
-
imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "
|
|
23177
|
+
imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
|
|
23029
23178
|
}
|
|
23030
|
-
) : /* @__PURE__ */ jsx("div", { className: "tecof-upload-file-icon", children: /* @__PURE__ */ jsx(File2, { size:
|
|
23179
|
+
) : /* @__PURE__ */ jsx("div", { className: "tecof-upload-file-icon", children: /* @__PURE__ */ jsx(File2, { size: 16 }) }),
|
|
23031
23180
|
/* @__PURE__ */ jsxs("div", { className: "tecof-upload-file-info", children: [
|
|
23032
23181
|
/* @__PURE__ */ jsx("p", { className: "tecof-upload-file-name", title: file2.meta?.originalName || file2.name, children: file2.meta?.originalName || file2.name }),
|
|
23033
23182
|
/* @__PURE__ */ jsxs("div", { className: "tecof-upload-file-meta", children: [
|
|
@@ -23156,10 +23305,6 @@ var UploadField = ({
|
|
|
23156
23305
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
23157
23306
|
const [showRefInput, setShowRefInput] = useState(false);
|
|
23158
23307
|
const [refCode, setRefCode] = useState("{{ data. }}");
|
|
23159
|
-
const [galleryFiles, setGalleryFiles] = useState([]);
|
|
23160
|
-
const [loading, setLoading] = useState(false);
|
|
23161
|
-
const [refreshKey, setRefreshKey] = useState(0);
|
|
23162
|
-
const [gallerySearch, setGallerySearch] = useState("");
|
|
23163
23308
|
const sourceToIdRef = useRef(/* @__PURE__ */ new Map());
|
|
23164
23309
|
const compressFile = useCallback(async (file2) => {
|
|
23165
23310
|
if (!imageCompressionEnabled) return file2;
|
|
@@ -23216,16 +23361,6 @@ var UploadField = ({
|
|
|
23216
23361
|
setShowRefInput(false);
|
|
23217
23362
|
setRefCode("{{ data. }}");
|
|
23218
23363
|
}, [refCode, allowMultiple, value, onChange]);
|
|
23219
|
-
useEffect(() => {
|
|
23220
|
-
if (!drawerOpen) return;
|
|
23221
|
-
setLoading(true);
|
|
23222
|
-
apiClient.getUploads(1, 100).then((res2) => {
|
|
23223
|
-
if (res2.success && res2.data) {
|
|
23224
|
-
setGalleryFiles(res2.data);
|
|
23225
|
-
}
|
|
23226
|
-
setLoading(false);
|
|
23227
|
-
}).catch(() => setLoading(false));
|
|
23228
|
-
}, [drawerOpen, refreshKey, apiClient]);
|
|
23229
23364
|
const toggleGalleryFile = useCallback((file2) => {
|
|
23230
23365
|
if (allowMultiple) {
|
|
23231
23366
|
const exists = value.some((f2) => f2._id === file2._id);
|
|
@@ -23298,9 +23433,6 @@ var UploadField = ({
|
|
|
23298
23433
|
}
|
|
23299
23434
|
};
|
|
23300
23435
|
const canAddMore = allowMultiple ? value.length < maxFiles : value.length === 0;
|
|
23301
|
-
const filteredGallery = gallerySearch.trim() ? galleryFiles.filter(
|
|
23302
|
-
(f2) => f2.name?.toLowerCase().includes(gallerySearch.toLowerCase()) || f2.meta?.originalName?.toLowerCase().includes(gallerySearch.toLowerCase())
|
|
23303
|
-
) : galleryFiles;
|
|
23304
23436
|
return /* @__PURE__ */ jsxs("div", { className: "tecof-upload-container", children: [
|
|
23305
23437
|
value.length > 0 && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-file-list", children: [
|
|
23306
23438
|
showUploadedFiles && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-uploaded-header", children: [
|
|
@@ -23318,52 +23450,50 @@ var UploadField = ({
|
|
|
23318
23450
|
file2._id || idx
|
|
23319
23451
|
))
|
|
23320
23452
|
] }),
|
|
23321
|
-
value.length === 0 && !readOnly && canAddMore && !showPond && /* @__PURE__ */ jsxs(
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
|
|
23332
|
-
|
|
23453
|
+
value.length === 0 && !readOnly && canAddMore && !showPond && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
23454
|
+
/* @__PURE__ */ jsxs(
|
|
23455
|
+
"div",
|
|
23456
|
+
{
|
|
23457
|
+
className: "tecof-upload-empty-state",
|
|
23458
|
+
onClick: () => setDrawerOpen(true),
|
|
23459
|
+
children: [
|
|
23460
|
+
/* @__PURE__ */ jsx("div", { className: "tecof-upload-empty-icon", children: /* @__PURE__ */ jsx(ImagePlus, { size: 16 }) }),
|
|
23461
|
+
/* @__PURE__ */ jsx("p", { className: "tecof-upload-empty-title", children: "Dosya ekleyin" }),
|
|
23462
|
+
/* @__PURE__ */ jsx("p", { className: "tecof-upload-empty-desc", children: "Medya k\xFCt\xFCphanesinden se\xE7in veya yeni y\xFCkleyin" })
|
|
23463
|
+
]
|
|
23464
|
+
}
|
|
23465
|
+
),
|
|
23466
|
+
!showRefInput && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-main-actions", children: [
|
|
23467
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
|
|
23468
|
+
/* @__PURE__ */ jsx(Code, { size: 13 }),
|
|
23469
|
+
" Referans Gir"
|
|
23470
|
+
] }),
|
|
23471
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
|
|
23472
|
+
/* @__PURE__ */ jsx(Upload, { size: 13 }),
|
|
23473
|
+
" Yeni Y\xFCkle"
|
|
23474
|
+
] })
|
|
23475
|
+
] })
|
|
23476
|
+
] }),
|
|
23333
23477
|
!readOnly && canAddMore && !showPond && value.length > 0 && !showRefInput && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-main-actions", children: [
|
|
23334
23478
|
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
|
|
23335
|
-
/* @__PURE__ */ jsx(Code, { size:
|
|
23479
|
+
/* @__PURE__ */ jsx(Code, { size: 13 }),
|
|
23336
23480
|
" Referans"
|
|
23337
23481
|
] }),
|
|
23338
23482
|
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setDrawerOpen(true), children: [
|
|
23339
|
-
/* @__PURE__ */ jsx(FolderOpen, { size:
|
|
23340
|
-
"
|
|
23341
|
-
] }),
|
|
23342
|
-
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
|
|
23343
|
-
/* @__PURE__ */ jsx(Upload, { size: 15 }),
|
|
23344
|
-
" Yeni Y\xFCkle"
|
|
23345
|
-
] })
|
|
23346
|
-
] }),
|
|
23347
|
-
value.length === 0 && !readOnly && canAddMore && !showPond && !showRefInput && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-main-actions", children: [
|
|
23348
|
-
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-secondary", onClick: () => setShowRefInput(true), children: [
|
|
23349
|
-
/* @__PURE__ */ jsx(Code, { size: 15 }),
|
|
23350
|
-
" Dinamik Referans Se\xE7"
|
|
23483
|
+
/* @__PURE__ */ jsx(FolderOpen, { size: 13 }),
|
|
23484
|
+
" K\xFCt\xFCphane"
|
|
23351
23485
|
] }),
|
|
23352
23486
|
/* @__PURE__ */ jsxs("button", { type: "button", className: "tecof-upload-btn-primary", onClick: () => setShowPond(true), children: [
|
|
23353
|
-
/* @__PURE__ */ jsx(Upload, { size:
|
|
23354
|
-
"
|
|
23487
|
+
/* @__PURE__ */ jsx(Upload, { size: 13 }),
|
|
23488
|
+
" Y\xFCkle"
|
|
23355
23489
|
] })
|
|
23356
23490
|
] }),
|
|
23357
|
-
showRefInput && /* @__PURE__ */ jsxs("div", { className: "tecof-upload-ref-section", style: { background: "#
|
|
23358
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between"
|
|
23359
|
-
/* @__PURE__ */
|
|
23360
|
-
|
|
23361
|
-
`{{ data.image }}`,
|
|
23362
|
-
")"
|
|
23363
|
-
] }),
|
|
23364
|
-
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => setShowRefInput(false), style: { background: "none", border: "none", cursor: "pointer", color: "#64748b" }, children: /* @__PURE__ */ jsx(X, { size: 14 }) })
|
|
23491
|
+
showRefInput && /* @__PURE__ */ 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: [
|
|
23492
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
23493
|
+
/* @__PURE__ */ jsx("span", { style: { fontSize: "11px", fontWeight: 500, color: "#71717a" }, children: "Dinamik CMS De\u011Fi\u015Fkeni" }),
|
|
23494
|
+
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => setShowRefInput(false), style: { background: "none", border: "none", cursor: "pointer", color: "#a1a1aa", padding: 0 }, children: /* @__PURE__ */ jsx(X, { size: 12 }) })
|
|
23365
23495
|
] }),
|
|
23366
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "
|
|
23496
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
|
|
23367
23497
|
/* @__PURE__ */ jsx(
|
|
23368
23498
|
"input",
|
|
23369
23499
|
{
|
|
@@ -23371,7 +23501,7 @@ var UploadField = ({
|
|
|
23371
23501
|
value: refCode,
|
|
23372
23502
|
onChange: (e3) => setRefCode(e3.target.value),
|
|
23373
23503
|
placeholder: "{{ data. }}",
|
|
23374
|
-
style: { flex: 1, padding: "8px
|
|
23504
|
+
style: { flex: 1, padding: "6px 8px", fontSize: "12px", borderRadius: "6px", border: "1px solid #cbd5e1", outline: "none" },
|
|
23375
23505
|
autoFocus: true,
|
|
23376
23506
|
onKeyDown: (e3) => {
|
|
23377
23507
|
if (e3.key === "Enter") {
|
|
@@ -23386,7 +23516,7 @@ var UploadField = ({
|
|
|
23386
23516
|
{
|
|
23387
23517
|
type: "button",
|
|
23388
23518
|
onClick: handleAddRef,
|
|
23389
|
-
style: { padding: "0
|
|
23519
|
+
style: { padding: "0 10px", background: "#18181b", color: "#fff", fontSize: "11px", fontWeight: 500, borderRadius: "6px", border: "none", cursor: "pointer" },
|
|
23390
23520
|
children: "Ekle"
|
|
23391
23521
|
}
|
|
23392
23522
|
)
|
|
@@ -23430,97 +23560,18 @@ var UploadField = ({
|
|
|
23430
23560
|
}
|
|
23431
23561
|
) })
|
|
23432
23562
|
] }),
|
|
23433
|
-
/* @__PURE__ */ jsx(
|
|
23434
|
-
|
|
23435
|
-
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
|
|
23441
|
-
|
|
23442
|
-
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-upload-drawer-header-actions", children: [
|
|
23446
|
-
/* @__PURE__ */ jsx(
|
|
23447
|
-
"button",
|
|
23448
|
-
{
|
|
23449
|
-
className: "tecof-upload-drawer-action-btn",
|
|
23450
|
-
onClick: () => setRefreshKey((k2) => k2 + 1),
|
|
23451
|
-
disabled: loading,
|
|
23452
|
-
title: "Yenile",
|
|
23453
|
-
children: /* @__PURE__ */ jsx(RefreshCcw, { size: 15, className: loading ? "tecof-upload-spin" : "" })
|
|
23454
|
-
}
|
|
23455
|
-
),
|
|
23456
|
-
/* @__PURE__ */ jsx(
|
|
23457
|
-
"button",
|
|
23458
|
-
{
|
|
23459
|
-
className: "tecof-upload-drawer-action-btn",
|
|
23460
|
-
onClick: () => setDrawerOpen(false),
|
|
23461
|
-
title: "Kapat",
|
|
23462
|
-
children: /* @__PURE__ */ jsx(X, { size: 15 })
|
|
23463
|
-
}
|
|
23464
|
-
)
|
|
23465
|
-
] })
|
|
23466
|
-
] }),
|
|
23467
|
-
/* @__PURE__ */ jsxs("div", { className: "tecof-upload-search-box", children: [
|
|
23468
|
-
/* @__PURE__ */ jsx(Search, { size: 15, color: "#a1a1aa" }),
|
|
23469
|
-
/* @__PURE__ */ jsx(
|
|
23470
|
-
"input",
|
|
23471
|
-
{
|
|
23472
|
-
type: "text",
|
|
23473
|
-
placeholder: "Dosya ara...",
|
|
23474
|
-
value: gallerySearch,
|
|
23475
|
-
onChange: (e3) => setGallerySearch(e3.target.value),
|
|
23476
|
-
className: "tecof-upload-search-input"
|
|
23477
|
-
}
|
|
23478
|
-
),
|
|
23479
|
-
gallerySearch && /* @__PURE__ */ jsx(
|
|
23480
|
-
"button",
|
|
23481
|
-
{
|
|
23482
|
-
type: "button",
|
|
23483
|
-
className: "tecof-upload-action-btn tecof-upload-clear-search-btn",
|
|
23484
|
-
onClick: () => setGallerySearch(""),
|
|
23485
|
-
children: /* @__PURE__ */ jsx(X, { size: 13 })
|
|
23486
|
-
}
|
|
23487
|
-
)
|
|
23488
|
-
] }),
|
|
23489
|
-
loading ? /* @__PURE__ */ jsxs("div", { className: "tecof-upload-gallery-empty", children: [
|
|
23490
|
-
/* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsx(RefreshCcw, { size: 24, color: "#a1a1aa", className: "tecof-upload-spin" }) }),
|
|
23491
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-upload-loading-text", children: "Y\xFCkleniyor..." })
|
|
23492
|
-
] }) : filteredGallery.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "tecof-upload-gallery-empty", children: [
|
|
23493
|
-
/* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-empty-icon", children: /* @__PURE__ */ jsx(Image2, { size: 24, color: "#a1a1aa" }) }),
|
|
23494
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-upload-empty-heading", children: gallerySearch ? "Sonu\xE7 bulunamad\u0131" : "Hen\xFCz dosya yok" }),
|
|
23495
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-upload-empty-subheading", children: gallerySearch ? "Farkl\u0131 bir arama terimi deneyin" : "Dosyalar\u0131n\u0131z burada g\xF6r\xFCnecek" })
|
|
23496
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-grid", children: filteredGallery.map((file2) => {
|
|
23497
|
-
const selected = value.some((v2) => v2._id === file2._id);
|
|
23498
|
-
return /* @__PURE__ */ jsxs(
|
|
23499
|
-
"div",
|
|
23500
|
-
{
|
|
23501
|
-
className: `tecof-upload-gallery-item ${selected ? "selected" : ""}`,
|
|
23502
|
-
onClick: () => toggleGalleryFile(file2),
|
|
23503
|
-
children: [
|
|
23504
|
-
selected && /* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-check", children: /* @__PURE__ */ jsx(Check, { size: 12, strokeWidth: 3 }) }),
|
|
23505
|
-
isImageType2(file2.type) ? /* @__PURE__ */ jsx(
|
|
23506
|
-
TecofPicture,
|
|
23507
|
-
{
|
|
23508
|
-
data: file2,
|
|
23509
|
-
alt: file2.name,
|
|
23510
|
-
size: "thumbnail",
|
|
23511
|
-
className: "tecof-upload-gallery-thumb",
|
|
23512
|
-
imgStyle: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "6px" }
|
|
23513
|
-
}
|
|
23514
|
-
) : /* @__PURE__ */ jsx("div", { className: "tecof-upload-gallery-thumb tecof-upload-gallery-file-icon-wrap", children: /* @__PURE__ */ jsx(File2, { size: 24, color: "#a1a1aa" }) }),
|
|
23515
|
-
/* @__PURE__ */ jsx("p", { className: "tecof-upload-gallery-file-name", children: file2.meta?.originalName || file2.name })
|
|
23516
|
-
]
|
|
23517
|
-
},
|
|
23518
|
-
file2._id
|
|
23519
|
-
);
|
|
23520
|
-
}) })
|
|
23521
|
-
] })
|
|
23522
|
-
] })
|
|
23523
|
-
] }) })
|
|
23563
|
+
/* @__PURE__ */ jsx(
|
|
23564
|
+
MediaDrawer,
|
|
23565
|
+
{
|
|
23566
|
+
open: drawerOpen,
|
|
23567
|
+
onOpenChange: setDrawerOpen,
|
|
23568
|
+
onSelect: toggleGalleryFile,
|
|
23569
|
+
selectedIds: value.map((v2) => v2._id ?? ""),
|
|
23570
|
+
allowMultiple,
|
|
23571
|
+
filterImages: acceptedTypes.length > 0 && acceptedTypes.every((t2) => t2.startsWith("image/")),
|
|
23572
|
+
title: "Medya K\xFCt\xFCphanesi"
|
|
23573
|
+
}
|
|
23574
|
+
)
|
|
23524
23575
|
] });
|
|
23525
23576
|
};
|
|
23526
23577
|
UploadField.displayName = "UploadField";
|
|
@@ -25450,6 +25501,8 @@ lucide-react/dist/esm/shared/src/utils/hasA11yProp.js:
|
|
|
25450
25501
|
lucide-react/dist/esm/context.js:
|
|
25451
25502
|
lucide-react/dist/esm/Icon.js:
|
|
25452
25503
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
25504
|
+
lucide-react/dist/esm/icons/arrow-down.js:
|
|
25505
|
+
lucide-react/dist/esm/icons/arrow-up.js:
|
|
25453
25506
|
lucide-react/dist/esm/icons/check.js:
|
|
25454
25507
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
25455
25508
|
lucide-react/dist/esm/icons/chevron-right.js:
|