intlayer-editor 8.5.0 → 8.5.2
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/client/dist/assets/{CodeBlockShiki-D9plzEFQ.js → CodeBlockShiki-DjsiIoFk.js} +1 -1
- package/client/dist/assets/{MarkdownRendererPlugin-Dp6Cig6u.js → MarkdownRendererPlugin-CZjpMlL7.js} +1 -1
- package/client/dist/assets/{index-SO-phafd.css → index-B5Qkzjg3.css} +34 -4
- package/client/dist/assets/{index-CDOIYDRk.js → index-BpMyckzW.js} +289 -172
- package/client/dist/index.html +2 -2
- package/package.json +11 -11
|
@@ -3,7 +3,7 @@ import { a as __toESM } from "./chunk-C0u3WHrm.js";
|
|
|
3
3
|
import { t as require_react } from "./react-BI_C_976.js";
|
|
4
4
|
import { t as require_jsx_runtime } from "./jsx-runtime-BkWmzJHO.js";
|
|
5
5
|
import { t as __vitePreload } from "./preload-helper-B4JcPOPd.js";
|
|
6
|
-
import { t as CodeDefault } from "./index-
|
|
6
|
+
import { t as CodeDefault } from "./index-BpMyckzW.js";
|
|
7
7
|
//#region ../@intlayer/design-system/dist/esm/components/IDE/CodeBlockShiki.mjs
|
|
8
8
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
9
9
|
var import_jsx_runtime = require_jsx_runtime();
|
package/client/dist/assets/{MarkdownRendererPlugin-Dp6Cig6u.js → MarkdownRendererPlugin-CZjpMlL7.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as useMarkdownContext } from "./index-
|
|
1
|
+
import { n as useMarkdownContext } from "./index-BpMyckzW.js";
|
|
2
2
|
//#region ../react-intlayer/dist/esm/markdown/MarkdownRendererPlugin.mjs
|
|
3
3
|
var MarkdownRendererPlugin = (props) => {
|
|
4
4
|
const { children, options, components } = props;
|
|
@@ -585,6 +585,10 @@
|
|
|
585
585
|
inset: calc(var(--spacing) * 0);
|
|
586
586
|
}
|
|
587
587
|
|
|
588
|
+
.inset-y-0 {
|
|
589
|
+
inset-block: calc(var(--spacing) * 0);
|
|
590
|
+
}
|
|
591
|
+
|
|
588
592
|
.start {
|
|
589
593
|
inset-inline-start: var(--spacing);
|
|
590
594
|
}
|
|
@@ -609,10 +613,6 @@
|
|
|
609
613
|
top: calc(var(--spacing) * 2);
|
|
610
614
|
}
|
|
611
615
|
|
|
612
|
-
.top-4 {
|
|
613
|
-
top: calc(var(--spacing) * 4);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
616
|
.top-5 {
|
|
617
617
|
top: calc(var(--spacing) * 5);
|
|
618
618
|
}
|
|
@@ -3006,6 +3006,16 @@
|
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
3008
|
|
|
3009
|
+
.bg-neutral\/40 {
|
|
3010
|
+
background-color: #5d5d5d66;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3014
|
+
.bg-neutral\/40 {
|
|
3015
|
+
background-color: color-mix(in oklab, var(--color-neutral) 40%, transparent);
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3009
3019
|
.bg-orange-100 {
|
|
3010
3020
|
background-color: var(--color-orange-100);
|
|
3011
3021
|
}
|
|
@@ -7019,6 +7029,26 @@
|
|
|
7019
7029
|
color: var(--color-neutral);
|
|
7020
7030
|
}
|
|
7021
7031
|
|
|
7032
|
+
.\[\&_tbody_tr\]\:cursor-pointer tbody tr {
|
|
7033
|
+
cursor: pointer;
|
|
7034
|
+
}
|
|
7035
|
+
|
|
7036
|
+
.\[\&_tbody_tr\]\:transition-colors tbody tr {
|
|
7037
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
|
|
7038
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
7039
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
7040
|
+
}
|
|
7041
|
+
|
|
7042
|
+
.\[\&_tbody_tr\:hover\]\:bg-neutral\/40 tbody tr:hover {
|
|
7043
|
+
background-color: #5d5d5d66;
|
|
7044
|
+
}
|
|
7045
|
+
|
|
7046
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
7047
|
+
.\[\&_tbody_tr\:hover\]\:bg-neutral\/40 tbody tr:hover {
|
|
7048
|
+
background-color: color-mix(in oklab, var(--color-neutral) 40%, transparent);
|
|
7049
|
+
}
|
|
7050
|
+
}
|
|
7051
|
+
|
|
7022
7052
|
.\[\&\+div\]\:text-xs + div {
|
|
7023
7053
|
font-size: var(--text-xs);
|
|
7024
7054
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HTMLRendererPlugin-B6Eld7in.js","assets/chunk-C0u3WHrm.js","assets/react-BI_C_976.js","assets/CodeBlockShiki-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HTMLRendererPlugin-B6Eld7in.js","assets/chunk-C0u3WHrm.js","assets/react-BI_C_976.js","assets/CodeBlockShiki-DjsiIoFk.js","assets/preload-helper-B4JcPOPd.js","assets/jsx-runtime-BkWmzJHO.js","assets/dist-D8J9DkzO.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import { a as __toESM, i as __toCommonJS, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./chunk-C0u3WHrm.js";
|
|
3
3
|
import { t as require_react } from "./react-BI_C_976.js";
|
|
4
4
|
import { t as require_jsx_runtime } from "./jsx-runtime-BkWmzJHO.js";
|
|
@@ -9570,7 +9570,7 @@ var configuration = {
|
|
|
9570
9570
|
},
|
|
9571
9571
|
metadata: {
|
|
9572
9572
|
"name": "Intlayer",
|
|
9573
|
-
"version": "8.5.
|
|
9573
|
+
"version": "8.5.2",
|
|
9574
9574
|
"doc": "https://intlayer.org/docs"
|
|
9575
9575
|
}
|
|
9576
9576
|
};
|
|
@@ -12089,7 +12089,7 @@ var compile = (markdown = "", ctx, options = {}) => {
|
|
|
12089
12089
|
};
|
|
12090
12090
|
//#endregion
|
|
12091
12091
|
//#region ../react-intlayer/dist/esm/plugins.mjs
|
|
12092
|
-
var LazyMarkdownRendererPlugin = (0, import_react.lazy)(() => __vitePreload(() => import("./MarkdownRendererPlugin-
|
|
12092
|
+
var LazyMarkdownRendererPlugin = (0, import_react.lazy)(() => __vitePreload(() => import("./MarkdownRendererPlugin-CZjpMlL7.js").then((m) => ({ default: m.MarkdownRendererPlugin })), []));
|
|
12093
12093
|
var LazyHTMLRendererPlugin = (0, import_react.lazy)(() => __vitePreload(() => import("./HTMLRendererPlugin-B6Eld7in.js").then((m) => ({ default: m.HTMLRendererPlugin })), __vite__mapDeps([0,1,2])));
|
|
12094
12094
|
/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */
|
|
12095
12095
|
var intlayerNodePlugins = {
|
|
@@ -30176,7 +30176,7 @@ var CodeDefault = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
|
30176
30176
|
}, `line-${index}-${line.slice(0, 10)}`)) : children })
|
|
30177
30177
|
})
|
|
30178
30178
|
});
|
|
30179
|
-
var CodeBlockShiki = (0, import_react.lazy)(() => __vitePreload(() => import("./CodeBlockShiki-
|
|
30179
|
+
var CodeBlockShiki = (0, import_react.lazy)(() => __vitePreload(() => import("./CodeBlockShiki-DjsiIoFk.js").then((mod) => ({ default: mod.CodeBlockShiki })), __vite__mapDeps([3,1,4,5,2])));
|
|
30180
30180
|
var CodeBlock = ({ className, onChange, isEditable, children, lang, isDarkMode, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
30181
30181
|
className: cn$2("flex w-full min-w-0 max-w-full overflow-x-auto", className),
|
|
30182
30182
|
...props,
|
|
@@ -34093,11 +34093,14 @@ var code_default = {
|
|
|
34093
34093
|
};
|
|
34094
34094
|
//#endregion
|
|
34095
34095
|
//#region ../@intlayer/design-system/dist/esm/components/IDE/CopyCode.mjs
|
|
34096
|
-
var CopyCode = ({ code }) => {
|
|
34096
|
+
var CopyCode = ({ code, ...props }) => {
|
|
34097
34097
|
const { title, description } = useDictionary(code_default);
|
|
34098
34098
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover, {
|
|
34099
34099
|
identifier: "copy",
|
|
34100
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyButton, {
|
|
34100
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CopyButton, {
|
|
34101
|
+
content: code,
|
|
34102
|
+
...props
|
|
34103
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover.Detail, {
|
|
34101
34104
|
identifier: "copy",
|
|
34102
34105
|
className: "flex min-w-64 flex-col gap-3 p-3 text-sm",
|
|
34103
34106
|
xAlign: PopoverXAlign.END,
|
|
@@ -44498,11 +44501,136 @@ var Modal = ({ children, isOpen, container, onClose, hasCloseButton = false, tit
|
|
|
44498
44501
|
})
|
|
44499
44502
|
}), containerElement);
|
|
44500
44503
|
};
|
|
44504
|
+
var table_default = {
|
|
44505
|
+
key: "table",
|
|
44506
|
+
content: {
|
|
44507
|
+
"nodeType": "translation",
|
|
44508
|
+
"translation": {
|
|
44509
|
+
"en": { "modal": {
|
|
44510
|
+
"title": "Show all table content",
|
|
44511
|
+
"description": "Open the table in a modal to view all data content clearly"
|
|
44512
|
+
} },
|
|
44513
|
+
"en-GB": { "modal": {
|
|
44514
|
+
"title": "Show all table content",
|
|
44515
|
+
"description": "Open the table in a modal to view all data content clearly"
|
|
44516
|
+
} },
|
|
44517
|
+
"fr": { "modal": {
|
|
44518
|
+
"title": "Afficher tout le contenu du tableau",
|
|
44519
|
+
"description": "Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement"
|
|
44520
|
+
} },
|
|
44521
|
+
"es": { "modal": {
|
|
44522
|
+
"title": "Mostrar todo el contenido de la tabla",
|
|
44523
|
+
"description": "Abrir la tabla en una ventana flotante para ver todo el contenido claramente"
|
|
44524
|
+
} },
|
|
44525
|
+
"de": { "modal": {
|
|
44526
|
+
"title": "Alle Tabellendaten anzeigen",
|
|
44527
|
+
"description": "Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen"
|
|
44528
|
+
} },
|
|
44529
|
+
"ja": { "modal": {
|
|
44530
|
+
"title": "テーブルのすべての内容を表示",
|
|
44531
|
+
"description": "テーブルをモーダルで開き、すべてのデータを明確に表示"
|
|
44532
|
+
} },
|
|
44533
|
+
"ko": { "modal": {
|
|
44534
|
+
"title": "테이블의 모든 내용 표시",
|
|
44535
|
+
"description": "테이블을 모달로 열어 모든 데이터를 명확하게 확인"
|
|
44536
|
+
} },
|
|
44537
|
+
"zh": { "modal": {
|
|
44538
|
+
"title": "显示表格的所有内容",
|
|
44539
|
+
"description": "在弹窗中打开表格以清晰地查看所有数据"
|
|
44540
|
+
} },
|
|
44541
|
+
"it": { "modal": {
|
|
44542
|
+
"title": "Mostra tutto il contenuto della tabella",
|
|
44543
|
+
"description": "Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro"
|
|
44544
|
+
} },
|
|
44545
|
+
"pt": { "modal": {
|
|
44546
|
+
"title": "Mostrar todo o conteúdo da tabela",
|
|
44547
|
+
"description": "Abrir a tabela em um modal para ver todo o conteúdo claramente"
|
|
44548
|
+
} },
|
|
44549
|
+
"hi": { "modal": {
|
|
44550
|
+
"title": "सभी तालिका सामग्री दिखाएं",
|
|
44551
|
+
"description": "सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें"
|
|
44552
|
+
} },
|
|
44553
|
+
"ar": { "modal": {
|
|
44554
|
+
"title": "اظهار جميع محتويات الجدول",
|
|
44555
|
+
"description": "افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح"
|
|
44556
|
+
} },
|
|
44557
|
+
"ru": { "modal": {
|
|
44558
|
+
"title": "Показать все данные таблицы",
|
|
44559
|
+
"description": "Открыть таблицу в модальном окне для четкого просмотра всех данных"
|
|
44560
|
+
} }
|
|
44561
|
+
}
|
|
44562
|
+
},
|
|
44563
|
+
localIds: ["table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs"]
|
|
44564
|
+
};
|
|
44501
44565
|
//#endregion
|
|
44502
|
-
//#region ../@intlayer/design-system/dist/esm/components/Table/
|
|
44566
|
+
//#region ../@intlayer/design-system/dist/esm/components/Table/ExpandButton.mjs
|
|
44567
|
+
var ExpandButton = ({ setIsModalOpen }) => {
|
|
44568
|
+
const { modal: modalContent } = useDictionary(table_default);
|
|
44569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
44570
|
+
className: "pointer-events-none absolute inset-y-0 right-4 z-10",
|
|
44571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
44572
|
+
className: "pointer-events-auto sticky top-48 pt-4",
|
|
44573
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover, {
|
|
44574
|
+
identifier: "expand",
|
|
44575
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
44576
|
+
variant: "hoverable",
|
|
44577
|
+
size: "icon-md",
|
|
44578
|
+
onClick: () => {
|
|
44579
|
+
setIsModalOpen(true);
|
|
44580
|
+
},
|
|
44581
|
+
label: modalContent.title,
|
|
44582
|
+
Icon: MoveDiagonal
|
|
44583
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover.Detail, {
|
|
44584
|
+
identifier: "expand",
|
|
44585
|
+
className: "flex min-w-64 flex-col gap-3 p-3 text-sm",
|
|
44586
|
+
xAlign: PopoverXAlign.END,
|
|
44587
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: modalContent.title }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
44588
|
+
className: "text-neutral",
|
|
44589
|
+
children: modalContent.description
|
|
44590
|
+
})]
|
|
44591
|
+
})]
|
|
44592
|
+
})
|
|
44593
|
+
})
|
|
44594
|
+
});
|
|
44595
|
+
};
|
|
44596
|
+
//#endregion
|
|
44597
|
+
//#region ../@intlayer/design-system/dist/esm/components/Table/useTableWidths.mjs
|
|
44503
44598
|
var CHAR_WIDTH_REM = .55;
|
|
44504
44599
|
var MIN_WIDTH_REM = 5;
|
|
44505
44600
|
var MAX_WIDTH_REM = 30;
|
|
44601
|
+
var useTableWidths = (tableRef, modalTableRef, dependencies) => {
|
|
44602
|
+
(0, import_react.useEffect)(() => {
|
|
44603
|
+
if (!tableRef.current) return;
|
|
44604
|
+
const colLengths = [];
|
|
44605
|
+
Array.from(tableRef.current.querySelectorAll("tr")).forEach((row) => {
|
|
44606
|
+
Array.from(row.children).forEach((cell, index) => {
|
|
44607
|
+
const len = cell.textContent?.trim().length ?? 0;
|
|
44608
|
+
if (colLengths[index] === void 0 || len > colLengths[index]) colLengths[index] = len;
|
|
44609
|
+
});
|
|
44610
|
+
});
|
|
44611
|
+
const applyToTable = (table) => {
|
|
44612
|
+
const rows = Array.from(table.querySelectorAll("tr"));
|
|
44613
|
+
if (rows.length === 0) return;
|
|
44614
|
+
const applyColStyle = (el, index) => {
|
|
44615
|
+
const minRem = Math.min(MAX_WIDTH_REM, Math.max(MIN_WIDTH_REM, (colLengths[index] ?? 0) * CHAR_WIDTH_REM));
|
|
44616
|
+
el.style.minWidth = `${minRem}rem`;
|
|
44617
|
+
el.style.maxWidth = `${MAX_WIDTH_REM}rem`;
|
|
44618
|
+
};
|
|
44619
|
+
table.querySelectorAll("th").forEach((th, index) => {
|
|
44620
|
+
applyColStyle(th, index);
|
|
44621
|
+
});
|
|
44622
|
+
rows.forEach((row) => {
|
|
44623
|
+
row.querySelectorAll("td").forEach((td, index) => {
|
|
44624
|
+
applyColStyle(td, index);
|
|
44625
|
+
});
|
|
44626
|
+
});
|
|
44627
|
+
};
|
|
44628
|
+
applyToTable(tableRef.current);
|
|
44629
|
+
if (modalTableRef.current) applyToTable(modalTableRef.current);
|
|
44630
|
+
}, dependencies);
|
|
44631
|
+
};
|
|
44632
|
+
//#endregion
|
|
44633
|
+
//#region ../@intlayer/design-system/dist/esm/components/Table/Table.mjs
|
|
44506
44634
|
/**
|
|
44507
44635
|
* Table component that provides an enhanced table experience with modal expansion and collapsible content
|
|
44508
44636
|
*
|
|
@@ -44640,63 +44768,52 @@ var MAX_WIDTH_REM = 30;
|
|
|
44640
44768
|
* @see {@link Modal} - Component used for full-screen table view
|
|
44641
44769
|
* @see {@link Button} - Component used for the modal trigger button
|
|
44642
44770
|
*/
|
|
44643
|
-
var Table = ({ className, isRollable = false, displayModal, ...props }) => {
|
|
44771
|
+
var Table = ({ className, isRollable = false, displayModal, onClick, ...props }) => {
|
|
44644
44772
|
const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(false);
|
|
44773
|
+
const [highlightedRowIndex, setHighlightedRowIndex] = (0, import_react.useState)(null);
|
|
44645
44774
|
const tableRef = (0, import_react.useRef)(null);
|
|
44646
44775
|
const modalTableRef = (0, import_react.useRef)(null);
|
|
44776
|
+
useTableWidths(tableRef, modalTableRef, [props.children, isModalOpen]);
|
|
44647
44777
|
(0, import_react.useEffect)(() => {
|
|
44648
|
-
if (
|
|
44649
|
-
|
|
44650
|
-
|
|
44651
|
-
|
|
44652
|
-
|
|
44653
|
-
|
|
44654
|
-
});
|
|
44655
|
-
});
|
|
44656
|
-
const applyToTable = (table) => {
|
|
44657
|
-
const rows = Array.from(table.querySelectorAll("tr"));
|
|
44658
|
-
if (rows.length === 0) return;
|
|
44659
|
-
const applyColStyle = (el, index) => {
|
|
44660
|
-
const minRem = Math.min(MAX_WIDTH_REM, Math.max(MIN_WIDTH_REM, (colLengths[index] ?? 0) * CHAR_WIDTH_REM));
|
|
44661
|
-
el.style.minWidth = `${minRem}rem`;
|
|
44662
|
-
el.style.maxWidth = `${MAX_WIDTH_REM}rem`;
|
|
44663
|
-
};
|
|
44664
|
-
table.querySelectorAll("th").forEach((th, index) => {
|
|
44665
|
-
applyColStyle(th, index);
|
|
44666
|
-
});
|
|
44667
|
-
rows.forEach((row) => {
|
|
44668
|
-
row.querySelectorAll("td").forEach((td, index) => {
|
|
44669
|
-
applyColStyle(td, index);
|
|
44778
|
+
if (isModalOpen && highlightedRowIndex !== null && modalTableRef.current) {
|
|
44779
|
+
const row = modalTableRef.current.rows[highlightedRowIndex];
|
|
44780
|
+
if (row) {
|
|
44781
|
+
row.scrollIntoView({
|
|
44782
|
+
behavior: "smooth",
|
|
44783
|
+
block: "center"
|
|
44670
44784
|
});
|
|
44671
|
-
|
|
44672
|
-
|
|
44673
|
-
|
|
44674
|
-
|
|
44675
|
-
}, [
|
|
44785
|
+
row.classList.add("bg-neutral/40", "dark:bg-neutral-dark/40");
|
|
44786
|
+
row.style.transition = "background-color 0.3s ease-in-out";
|
|
44787
|
+
}
|
|
44788
|
+
}
|
|
44789
|
+
}, [isModalOpen, highlightedRowIndex]);
|
|
44790
|
+
(0, import_react.useEffect)(() => {
|
|
44791
|
+
if (!isModalOpen) setHighlightedRowIndex(null);
|
|
44792
|
+
}, [isModalOpen]);
|
|
44793
|
+
const handleTableClick = (e) => {
|
|
44794
|
+
if (displayModal) {
|
|
44795
|
+
const tr = e.target.closest("tr");
|
|
44796
|
+
if (tr?.closest("tbody")) {
|
|
44797
|
+
setHighlightedRowIndex(tr.rowIndex);
|
|
44798
|
+
setIsModalOpen(true);
|
|
44799
|
+
}
|
|
44800
|
+
}
|
|
44801
|
+
onClick?.(e);
|
|
44802
|
+
};
|
|
44676
44803
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
44677
|
-
className: "relative
|
|
44804
|
+
className: "group relative",
|
|
44678
44805
|
children: [
|
|
44679
|
-
displayModal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44680
|
-
className: "sticky top-48 z-10",
|
|
44681
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
44682
|
-
className: "absolute top-4 right-2",
|
|
44683
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
44684
|
-
variant: "hoverable",
|
|
44685
|
-
size: "icon-md",
|
|
44686
|
-
onClick: () => {
|
|
44687
|
-
setIsModalOpen(true);
|
|
44688
|
-
},
|
|
44689
|
-
label: "Move",
|
|
44690
|
-
Icon: MoveDiagonal
|
|
44691
|
-
})
|
|
44692
|
-
})
|
|
44693
|
-
}),
|
|
44806
|
+
displayModal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExpandButton, { setIsModalOpen }),
|
|
44694
44807
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExpandCollapse, {
|
|
44695
44808
|
isRollable,
|
|
44696
|
-
className: "max-w-full overflow-x-auto",
|
|
44809
|
+
className: "max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl",
|
|
44697
44810
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", {
|
|
44698
44811
|
ref: tableRef,
|
|
44699
|
-
className: cn$2("w-full table-auto
|
|
44812
|
+
className: cn$2("w-full table-auto overflow-hidden", displayModal && "[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors", className),
|
|
44813
|
+
onClick: handleTableClick,
|
|
44814
|
+
onKeyDown: (e) => {
|
|
44815
|
+
if (e.key === "Enter" || e.key === " ") handleTableClick(e);
|
|
44816
|
+
},
|
|
44700
44817
|
...props
|
|
44701
44818
|
})
|
|
44702
44819
|
}),
|
|
@@ -45221,106 +45338,6 @@ var renameKey = (obj, oldKey, newKey) => {
|
|
|
45221
45338
|
return newObj;
|
|
45222
45339
|
};
|
|
45223
45340
|
//#endregion
|
|
45224
|
-
//#region ../@intlayer/design-system/dist/esm/components/ContentEditor/ContentEditorInput.mjs
|
|
45225
|
-
/**
|
|
45226
|
-
* ContentEditorInput Component
|
|
45227
|
-
*
|
|
45228
|
-
* An inline editing component for single-line text input with validation,
|
|
45229
|
-
* cancel/save functionality, and support for additional action buttons.
|
|
45230
|
-
*
|
|
45231
|
-
* ## Features
|
|
45232
|
-
* - **Inline Input Editing**: Edit single-line content with immediate feedback
|
|
45233
|
-
* - **Validation Support**: Optional content validation with visual feedback
|
|
45234
|
-
* - **Action Buttons**: Built-in save/cancel with support for additional buttons
|
|
45235
|
-
* - **Keyboard Shortcuts**: Enter to save, Escape to cancel
|
|
45236
|
-
* - **Accessibility**: Full ARIA support and keyboard navigation
|
|
45237
|
-
* - **State Management**: Handles editing states and validation
|
|
45238
|
-
*
|
|
45239
|
-
* ## Accessibility
|
|
45240
|
-
* - Proper ARIA labels and descriptions for all controls
|
|
45241
|
-
* - Keyboard navigation (Tab, Enter, Escape)
|
|
45242
|
-
* - Screen reader support for validation states
|
|
45243
|
-
* - Focus management and visual indicators
|
|
45244
|
-
*
|
|
45245
|
-
* @param children - Current input value
|
|
45246
|
-
* @param onContentChange - Callback when content is saved
|
|
45247
|
-
* @param disabled - Whether the editor is disabled
|
|
45248
|
-
* @param validate - Optional validation function
|
|
45249
|
-
* @param additionalButtons - Extra buttons to display
|
|
45250
|
-
* @param props - Additional Input component props
|
|
45251
|
-
*/
|
|
45252
|
-
var ContentEditorInput$1 = ({ children, onContentChange, disabled, validate, additionalButtons, ...props }) => {
|
|
45253
|
-
const [newValue, setNewValue] = (0, import_react.useState)(children);
|
|
45254
|
-
const [resetIncrementor, setResetIncrementor] = (0, import_react.useState)(0);
|
|
45255
|
-
const isEdited = newValue !== children;
|
|
45256
|
-
const handleCancel = () => {
|
|
45257
|
-
setNewValue(children);
|
|
45258
|
-
setResetIncrementor((prev) => prev + 1);
|
|
45259
|
-
};
|
|
45260
|
-
const handleValid = () => {
|
|
45261
|
-
onContentChange(newValue);
|
|
45262
|
-
};
|
|
45263
|
-
const handleOnContentChange = (e) => {
|
|
45264
|
-
setNewValue(e.currentTarget.value);
|
|
45265
|
-
};
|
|
45266
|
-
const handleKeyDown = (e) => {
|
|
45267
|
-
if (e.key === "Enter" && !disabled && isValid) {
|
|
45268
|
-
e.preventDefault();
|
|
45269
|
-
handleValid();
|
|
45270
|
-
} else if (e.key === "Escape") {
|
|
45271
|
-
e.preventDefault();
|
|
45272
|
-
handleCancel();
|
|
45273
|
-
}
|
|
45274
|
-
};
|
|
45275
|
-
(0, import_react.useEffect)(() => {
|
|
45276
|
-
setNewValue(children);
|
|
45277
|
-
setResetIncrementor((prev) => prev + 1);
|
|
45278
|
-
}, [children]);
|
|
45279
|
-
const isValid = validate?.(newValue) ?? true;
|
|
45280
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45281
|
-
className: "flex size-full flex-col items-center justify-between gap-2",
|
|
45282
|
-
role: "group",
|
|
45283
|
-
"aria-label": "Content editor input",
|
|
45284
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
45285
|
-
onChange: handleOnContentChange,
|
|
45286
|
-
onKeyDown: handleKeyDown,
|
|
45287
|
-
"aria-label": "Editable input value",
|
|
45288
|
-
"aria-describedby": isEdited || additionalButtons ? "content-editor-input-actions" : void 0,
|
|
45289
|
-
"aria-invalid": !isValid,
|
|
45290
|
-
variant: InputVariant.INVISIBLE,
|
|
45291
|
-
className: "size-full",
|
|
45292
|
-
defaultValue: children,
|
|
45293
|
-
disabled,
|
|
45294
|
-
...props
|
|
45295
|
-
}, resetIncrementor), (isEdited || additionalButtons) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45296
|
-
id: "content-editor-input-actions",
|
|
45297
|
-
className: "flex w-full items-center justify-end gap-2",
|
|
45298
|
-
role: "group",
|
|
45299
|
-
"aria-label": "Edit actions",
|
|
45300
|
-
children: [isEdited && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
45301
|
-
Icon: Check,
|
|
45302
|
-
label: `Save changes${!isValid ? " (invalid content)" : ""}`,
|
|
45303
|
-
variant: ButtonVariant.HOVERABLE,
|
|
45304
|
-
color: ButtonColor.TEXT,
|
|
45305
|
-
size: ButtonSize.ICON_SM,
|
|
45306
|
-
className: "cursor-pointer hover:scale-110",
|
|
45307
|
-
disabled: disabled || !isValid,
|
|
45308
|
-
onClick: handleValid,
|
|
45309
|
-
"aria-describedby": !isValid ? "validation-error" : void 0
|
|
45310
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
45311
|
-
Icon: X$1,
|
|
45312
|
-
label: "Cancel changes",
|
|
45313
|
-
variant: ButtonVariant.HOVERABLE,
|
|
45314
|
-
size: ButtonSize.ICON_SM,
|
|
45315
|
-
color: ButtonColor.TEXT,
|
|
45316
|
-
className: "cursor-pointer hover:scale-110",
|
|
45317
|
-
onClick: handleCancel,
|
|
45318
|
-
disabled
|
|
45319
|
-
})] }), additionalButtons]
|
|
45320
|
-
})]
|
|
45321
|
-
}, String(children));
|
|
45322
|
-
};
|
|
45323
|
-
//#endregion
|
|
45324
45341
|
//#region ../../node_modules/.bun/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
45325
45342
|
var Subscribable = class {
|
|
45326
45343
|
constructor() {
|
|
@@ -48792,7 +48809,7 @@ function defineErrorCodes(codes) {
|
|
|
48792
48809
|
}]));
|
|
48793
48810
|
}
|
|
48794
48811
|
//#endregion
|
|
48795
|
-
//#region ../../node_modules/.bun/@better-auth+passkey@1.5.5+
|
|
48812
|
+
//#region ../../node_modules/.bun/@better-auth+passkey@1.5.5+626702e6b890434a/node_modules/@better-auth/passkey/dist/error-codes-Dvu2mv33.mjs
|
|
48796
48813
|
var PASSKEY_ERROR_CODES = defineErrorCodes({
|
|
48797
48814
|
CHALLENGE_NOT_FOUND: "Challenge not found",
|
|
48798
48815
|
YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey",
|
|
@@ -49254,7 +49271,7 @@ async function startAuthentication(options) {
|
|
|
49254
49271
|
};
|
|
49255
49272
|
}
|
|
49256
49273
|
//#endregion
|
|
49257
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49274
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/broadcast-channel.mjs
|
|
49258
49275
|
var kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
|
|
49259
49276
|
var now$1 = () => Math.floor(Date.now() / 1e3);
|
|
49260
49277
|
var WindowBroadcastChannel = class {
|
|
@@ -49297,7 +49314,7 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
|
|
|
49297
49314
|
return globalThis[kBroadcastChannel];
|
|
49298
49315
|
}
|
|
49299
49316
|
//#endregion
|
|
49300
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49317
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
49301
49318
|
var kFocusManager = Symbol.for("better-auth:focus-manager");
|
|
49302
49319
|
var WindowFocusManager = class {
|
|
49303
49320
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -49326,7 +49343,7 @@ function getGlobalFocusManager() {
|
|
|
49326
49343
|
return globalThis[kFocusManager];
|
|
49327
49344
|
}
|
|
49328
49345
|
//#endregion
|
|
49329
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49346
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/online-manager.mjs
|
|
49330
49347
|
var kOnlineManager = Symbol.for("better-auth:online-manager");
|
|
49331
49348
|
var WindowOnlineManager = class {
|
|
49332
49349
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -49358,7 +49375,7 @@ function getGlobalOnlineManager() {
|
|
|
49358
49375
|
return globalThis[kOnlineManager];
|
|
49359
49376
|
}
|
|
49360
49377
|
//#endregion
|
|
49361
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49378
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/parser.mjs
|
|
49362
49379
|
var PROTO_POLLUTION_PATTERNS = {
|
|
49363
49380
|
proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
|
|
49364
49381
|
constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
|
|
@@ -49540,7 +49557,7 @@ var onMount = ($store, initialize) => {
|
|
|
49540
49557
|
});
|
|
49541
49558
|
};
|
|
49542
49559
|
//#endregion
|
|
49543
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49560
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/query.mjs
|
|
49544
49561
|
var isServer = () => typeof window === "undefined";
|
|
49545
49562
|
var useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
49546
49563
|
const value = /* @__PURE__ */ atom({
|
|
@@ -49634,7 +49651,7 @@ var useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
|
49634
49651
|
return value;
|
|
49635
49652
|
};
|
|
49636
49653
|
//#endregion
|
|
49637
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49654
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/session-refresh.mjs
|
|
49638
49655
|
var now = () => Math.floor(Date.now() / 1e3);
|
|
49639
49656
|
/**
|
|
49640
49657
|
* Rate limit: don't refetch on focus if a session request was made within this many seconds
|
|
@@ -49833,7 +49850,7 @@ var BetterAuthError = class extends Error {
|
|
|
49833
49850
|
}
|
|
49834
49851
|
};
|
|
49835
49852
|
//#endregion
|
|
49836
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49853
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/utils/url.mjs
|
|
49837
49854
|
function checkHasPath(url) {
|
|
49838
49855
|
try {
|
|
49839
49856
|
return (new URL(url).pathname.replace(/\/+$/, "") || "/") !== "/";
|
|
@@ -49905,7 +49922,7 @@ function getOrigin(url) {
|
|
|
49905
49922
|
}
|
|
49906
49923
|
}
|
|
49907
49924
|
//#endregion
|
|
49908
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49925
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
49909
49926
|
var redirectPlugin = {
|
|
49910
49927
|
id: "redirect",
|
|
49911
49928
|
name: "Redirect",
|
|
@@ -49920,7 +49937,7 @@ var redirectPlugin = {
|
|
|
49920
49937
|
} }
|
|
49921
49938
|
};
|
|
49922
49939
|
//#endregion
|
|
49923
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
49940
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/session-atom.mjs
|
|
49924
49941
|
function getSessionAtom($fetch, options) {
|
|
49925
49942
|
const $signal = /* @__PURE__ */ atom(false);
|
|
49926
49943
|
const session = useAuthQuery($signal, "/get-session", $fetch, { method: "GET" });
|
|
@@ -50379,7 +50396,7 @@ var betterFetch = async (url, options) => {
|
|
|
50379
50396
|
};
|
|
50380
50397
|
};
|
|
50381
50398
|
//#endregion
|
|
50382
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50399
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/config.mjs
|
|
50383
50400
|
var resolvePublicAuthUrl = (basePath) => {
|
|
50384
50401
|
if (typeof process === "undefined") return void 0;
|
|
50385
50402
|
const path = basePath ?? "/api/auth";
|
|
@@ -50477,12 +50494,12 @@ var getClientConfig = (options, loadEnv) => {
|
|
|
50477
50494
|
};
|
|
50478
50495
|
};
|
|
50479
50496
|
//#endregion
|
|
50480
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50497
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/utils/is-atom.mjs
|
|
50481
50498
|
function isAtom(value) {
|
|
50482
50499
|
return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
|
|
50483
50500
|
}
|
|
50484
50501
|
//#endregion
|
|
50485
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50502
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/proxy.mjs
|
|
50486
50503
|
function getMethod(path, knownPathMethods, args) {
|
|
50487
50504
|
const method = knownPathMethods[path];
|
|
50488
50505
|
const { fetchOptions, query: _query, ...body } = args || {};
|
|
@@ -50562,7 +50579,7 @@ function capitalizeFirstLetter(str) {
|
|
|
50562
50579
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
50563
50580
|
}
|
|
50564
50581
|
//#endregion
|
|
50565
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50582
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/client/vanilla.mjs
|
|
50566
50583
|
function createAuthClient(options) {
|
|
50567
50584
|
const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
|
|
50568
50585
|
const resolvedHooks = {};
|
|
@@ -50575,7 +50592,7 @@ function createAuthClient(options) {
|
|
|
50575
50592
|
}, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
|
|
50576
50593
|
}
|
|
50577
50594
|
//#endregion
|
|
50578
|
-
//#region ../../node_modules/.bun/@better-auth+passkey@1.5.5+
|
|
50595
|
+
//#region ../../node_modules/.bun/@better-auth+passkey@1.5.5+626702e6b890434a/node_modules/@better-auth/passkey/dist/client.mjs
|
|
50579
50596
|
var getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
|
|
50580
50597
|
const signInPasskey = async (opts, options) => {
|
|
50581
50598
|
const response = await $fetch("/passkey/generate-authenticate-options", {
|
|
@@ -50717,7 +50734,7 @@ var passkeyClient = () => {
|
|
|
50717
50734
|
};
|
|
50718
50735
|
};
|
|
50719
50736
|
//#endregion
|
|
50720
|
-
//#region ../../node_modules/.bun/@better-auth+sso@1.5.5+
|
|
50737
|
+
//#region ../../node_modules/.bun/@better-auth+sso@1.5.5+1b68b95562468c1a/node_modules/@better-auth/sso/dist/client.mjs
|
|
50721
50738
|
var ssoClient = (options) => {
|
|
50722
50739
|
return {
|
|
50723
50740
|
id: "sso-client",
|
|
@@ -50729,7 +50746,7 @@ var ssoClient = (options) => {
|
|
|
50729
50746
|
};
|
|
50730
50747
|
};
|
|
50731
50748
|
//#endregion
|
|
50732
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50749
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/plugins/magic-link/client.mjs
|
|
50733
50750
|
var magicLinkClient = () => {
|
|
50734
50751
|
return {
|
|
50735
50752
|
id: "magic-link",
|
|
@@ -50737,7 +50754,7 @@ var magicLinkClient = () => {
|
|
|
50737
50754
|
};
|
|
50738
50755
|
};
|
|
50739
50756
|
//#endregion
|
|
50740
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50757
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
|
|
50741
50758
|
var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
|
|
50742
50759
|
OTP_NOT_ENABLED: "OTP not enabled",
|
|
50743
50760
|
OTP_HAS_EXPIRED: "OTP has expired",
|
|
@@ -50750,7 +50767,7 @@ var TWO_FACTOR_ERROR_CODES = defineErrorCodes({
|
|
|
50750
50767
|
INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie"
|
|
50751
50768
|
});
|
|
50752
50769
|
//#endregion
|
|
50753
|
-
//#region ../../node_modules/.bun/better-auth@1.5.5+
|
|
50770
|
+
//#region ../../node_modules/.bun/better-auth@1.5.5+697ffe47a919e1b6/node_modules/better-auth/dist/plugins/two-factor/client.mjs
|
|
50754
50771
|
var twoFactorClient = (options) => {
|
|
50755
50772
|
return {
|
|
50756
50773
|
id: "two-factor",
|
|
@@ -51130,6 +51147,106 @@ var useWriteDictionary = () => {
|
|
|
51130
51147
|
});
|
|
51131
51148
|
};
|
|
51132
51149
|
//#endregion
|
|
51150
|
+
//#region ../@intlayer/design-system/dist/esm/components/ContentEditor/ContentEditorInput.mjs
|
|
51151
|
+
/**
|
|
51152
|
+
* ContentEditorInput Component
|
|
51153
|
+
*
|
|
51154
|
+
* An inline editing component for single-line text input with validation,
|
|
51155
|
+
* cancel/save functionality, and support for additional action buttons.
|
|
51156
|
+
*
|
|
51157
|
+
* ## Features
|
|
51158
|
+
* - **Inline Input Editing**: Edit single-line content with immediate feedback
|
|
51159
|
+
* - **Validation Support**: Optional content validation with visual feedback
|
|
51160
|
+
* - **Action Buttons**: Built-in save/cancel with support for additional buttons
|
|
51161
|
+
* - **Keyboard Shortcuts**: Enter to save, Escape to cancel
|
|
51162
|
+
* - **Accessibility**: Full ARIA support and keyboard navigation
|
|
51163
|
+
* - **State Management**: Handles editing states and validation
|
|
51164
|
+
*
|
|
51165
|
+
* ## Accessibility
|
|
51166
|
+
* - Proper ARIA labels and descriptions for all controls
|
|
51167
|
+
* - Keyboard navigation (Tab, Enter, Escape)
|
|
51168
|
+
* - Screen reader support for validation states
|
|
51169
|
+
* - Focus management and visual indicators
|
|
51170
|
+
*
|
|
51171
|
+
* @param children - Current input value
|
|
51172
|
+
* @param onContentChange - Callback when content is saved
|
|
51173
|
+
* @param disabled - Whether the editor is disabled
|
|
51174
|
+
* @param validate - Optional validation function
|
|
51175
|
+
* @param additionalButtons - Extra buttons to display
|
|
51176
|
+
* @param props - Additional Input component props
|
|
51177
|
+
*/
|
|
51178
|
+
var ContentEditorInput$1 = ({ children, onContentChange, disabled, validate, additionalButtons, ...props }) => {
|
|
51179
|
+
const [newValue, setNewValue] = (0, import_react.useState)(children);
|
|
51180
|
+
const [resetIncrementor, setResetIncrementor] = (0, import_react.useState)(0);
|
|
51181
|
+
const isEdited = newValue !== children;
|
|
51182
|
+
const handleCancel = () => {
|
|
51183
|
+
setNewValue(children);
|
|
51184
|
+
setResetIncrementor((prev) => prev + 1);
|
|
51185
|
+
};
|
|
51186
|
+
const handleValid = () => {
|
|
51187
|
+
onContentChange(newValue);
|
|
51188
|
+
};
|
|
51189
|
+
const handleOnContentChange = (e) => {
|
|
51190
|
+
setNewValue(e.currentTarget.value);
|
|
51191
|
+
};
|
|
51192
|
+
const handleKeyDown = (e) => {
|
|
51193
|
+
if (e.key === "Enter" && !disabled && isValid) {
|
|
51194
|
+
e.preventDefault();
|
|
51195
|
+
handleValid();
|
|
51196
|
+
} else if (e.key === "Escape") {
|
|
51197
|
+
e.preventDefault();
|
|
51198
|
+
handleCancel();
|
|
51199
|
+
}
|
|
51200
|
+
};
|
|
51201
|
+
(0, import_react.useEffect)(() => {
|
|
51202
|
+
setNewValue(children);
|
|
51203
|
+
setResetIncrementor((prev) => prev + 1);
|
|
51204
|
+
}, [children]);
|
|
51205
|
+
const isValid = validate?.(newValue) ?? true;
|
|
51206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
51207
|
+
className: "flex size-full flex-col items-center justify-between gap-2",
|
|
51208
|
+
role: "group",
|
|
51209
|
+
"aria-label": "Content editor input",
|
|
51210
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
|
|
51211
|
+
onChange: handleOnContentChange,
|
|
51212
|
+
onKeyDown: handleKeyDown,
|
|
51213
|
+
"aria-label": "Editable input value",
|
|
51214
|
+
"aria-describedby": isEdited || additionalButtons ? "content-editor-input-actions" : void 0,
|
|
51215
|
+
"aria-invalid": !isValid,
|
|
51216
|
+
variant: InputVariant.INVISIBLE,
|
|
51217
|
+
className: "size-full",
|
|
51218
|
+
defaultValue: children,
|
|
51219
|
+
disabled,
|
|
51220
|
+
...props
|
|
51221
|
+
}, resetIncrementor), (isEdited || additionalButtons) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
51222
|
+
id: "content-editor-input-actions",
|
|
51223
|
+
className: "flex w-full items-center justify-end gap-2",
|
|
51224
|
+
role: "group",
|
|
51225
|
+
"aria-label": "Edit actions",
|
|
51226
|
+
children: [isEdited && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
51227
|
+
Icon: Check,
|
|
51228
|
+
label: `Save changes${!isValid ? " (invalid content)" : ""}`,
|
|
51229
|
+
variant: ButtonVariant.HOVERABLE,
|
|
51230
|
+
color: ButtonColor.TEXT,
|
|
51231
|
+
size: ButtonSize.ICON_SM,
|
|
51232
|
+
className: "cursor-pointer hover:scale-110",
|
|
51233
|
+
disabled: disabled || !isValid,
|
|
51234
|
+
onClick: handleValid,
|
|
51235
|
+
"aria-describedby": !isValid ? "validation-error" : void 0
|
|
51236
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
51237
|
+
Icon: X$1,
|
|
51238
|
+
label: "Cancel changes",
|
|
51239
|
+
variant: ButtonVariant.HOVERABLE,
|
|
51240
|
+
size: ButtonSize.ICON_SM,
|
|
51241
|
+
color: ButtonColor.TEXT,
|
|
51242
|
+
className: "cursor-pointer hover:scale-110",
|
|
51243
|
+
onClick: handleCancel,
|
|
51244
|
+
disabled
|
|
51245
|
+
})] }), additionalButtons]
|
|
51246
|
+
})]
|
|
51247
|
+
}, String(children));
|
|
51248
|
+
};
|
|
51249
|
+
//#endregion
|
|
51133
51250
|
//#region ../@intlayer/design-system/dist/esm/hooks/useUser/index.mjs
|
|
51134
51251
|
var useUser = () => {
|
|
51135
51252
|
const { session, revalidateSession, setSession } = useAuth();
|
package/client/dist/index.html
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BpMyckzW.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-C0u3WHrm.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-B4JcPOPd.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-BkWmzJHO.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/react-BI_C_976.js">
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B5Qkzjg3.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,17 +93,17 @@
|
|
|
93
93
|
"@fastify/formbody": "8.0.2",
|
|
94
94
|
"@fastify/helmet": "13.0.2",
|
|
95
95
|
"@fastify/static": "9.0.0",
|
|
96
|
-
"@intlayer/chokidar": "8.5.
|
|
97
|
-
"@intlayer/config": "8.5.
|
|
98
|
-
"@intlayer/unmerged-dictionaries-entry": "8.5.
|
|
96
|
+
"@intlayer/chokidar": "8.5.2",
|
|
97
|
+
"@intlayer/config": "8.5.2",
|
|
98
|
+
"@intlayer/unmerged-dictionaries-entry": "8.5.2",
|
|
99
99
|
"fastify": "5.8.2",
|
|
100
|
-
"fastify-intlayer": "8.5.
|
|
100
|
+
"fastify-intlayer": "8.5.2",
|
|
101
101
|
"mime": "4.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@intlayer/design-system": "8.5.
|
|
105
|
-
"@intlayer/editor-react": "8.5.
|
|
106
|
-
"@intlayer/types": "8.5.
|
|
104
|
+
"@intlayer/design-system": "8.5.2",
|
|
105
|
+
"@intlayer/editor-react": "8.5.2",
|
|
106
|
+
"@intlayer/types": "8.5.2",
|
|
107
107
|
"@tailwindcss/vite": "4.2.2",
|
|
108
108
|
"@tanstack/react-query": "5.95.2",
|
|
109
109
|
"@types/node": "25.5.0",
|
|
@@ -117,18 +117,18 @@
|
|
|
117
117
|
"framer-motion": "12.38.0",
|
|
118
118
|
"fuse.js": "7.1.0",
|
|
119
119
|
"globals": "17.4.0",
|
|
120
|
-
"intlayer": "8.5.
|
|
120
|
+
"intlayer": "8.5.2",
|
|
121
121
|
"lucide-react": "1.0.1",
|
|
122
122
|
"react": "19.2.4",
|
|
123
123
|
"react-dom": "19.2.4",
|
|
124
|
-
"react-intlayer": "8.5.
|
|
124
|
+
"react-intlayer": "8.5.2",
|
|
125
125
|
"react-router-dom": "7.13.1",
|
|
126
126
|
"tailwind-merge": "3.5.0",
|
|
127
127
|
"tailwindcss": "4.2.2",
|
|
128
128
|
"tsdown": "0.21.4",
|
|
129
129
|
"typescript": "6.0.2",
|
|
130
130
|
"vite": "8.0.2",
|
|
131
|
-
"vite-intlayer": "8.5.
|
|
131
|
+
"vite-intlayer": "8.5.2",
|
|
132
132
|
"vitest": "4.1.1"
|
|
133
133
|
},
|
|
134
134
|
"engines": {
|