intlayer-editor 7.5.9 → 7.5.11

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.
Files changed (30) hide show
  1. package/client/dist/assets/{CodeBlockShiki-DOHz3hxi.js → CodeBlockShiki-EiAndB3z.js} +3 -3
  2. package/client/dist/assets/{bundle-web-BeYtMvYb.js → bundle-web-6lGPc2DD.js} +1 -1
  3. package/client/dist/assets/{index-ROdmYOAM.css → index-BQYneYFo.css} +123 -8
  4. package/client/dist/assets/{index-BfDGXG1A.js → index-r91_MxC4.js} +701 -501
  5. package/client/dist/index.html +2 -2
  6. package/package.json +19 -21
  7. package/server/dist/controllers/configuration.controller.cjs +3 -5
  8. package/server/dist/controllers/configuration.controller.cjs.map +1 -1
  9. package/server/dist/controllers/configuration.controller.d.ts +2 -2
  10. package/server/dist/controllers/configuration.controller.mjs +3 -5
  11. package/server/dist/controllers/configuration.controller.mjs.map +1 -1
  12. package/server/dist/controllers/dictionary.controller.cjs +13 -17
  13. package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
  14. package/server/dist/controllers/dictionary.controller.d.ts +6 -5
  15. package/server/dist/controllers/dictionary.controller.mjs +7 -11
  16. package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
  17. package/server/dist/index.cjs +45 -30
  18. package/server/dist/index.cjs.map +1 -1
  19. package/server/dist/index.mjs +38 -25
  20. package/server/dist/index.mjs.map +1 -1
  21. package/server/dist/routes/config.routes.cjs +3 -3
  22. package/server/dist/routes/config.routes.cjs.map +1 -1
  23. package/server/dist/routes/config.routes.d.ts +2 -2
  24. package/server/dist/routes/config.routes.mjs +3 -3
  25. package/server/dist/routes/config.routes.mjs.map +1 -1
  26. package/server/dist/routes/dictionary.routes.cjs +4 -4
  27. package/server/dist/routes/dictionary.routes.cjs.map +1 -1
  28. package/server/dist/routes/dictionary.routes.d.ts +2 -2
  29. package/server/dist/routes/dictionary.routes.mjs +4 -4
  30. package/server/dist/routes/dictionary.routes.mjs.map +1 -1
@@ -12571,6 +12571,11 @@ const getAppLogger = (configuration2, globalDetails) => (content2, details) => l
12571
12571
  ...details?.config ?? {}
12572
12572
  }
12573
12573
  });
12574
+ const colorize = (s2, color2, reset) => color2 ? `${color2}${s2}${reset ? typeof reset === "boolean" ? ANSIColors.RESET : reset : ANSIColors.RESET}` : s2;
12575
+ const colorizeKey = (keyPath, color2 = ANSIColors.BEIGE, reset = ANSIColors.RESET) => [keyPath].flat().map((key2) => colorize(key2, color2, reset)).join(`, `);
12576
+ colorize("✗", ANSIColors.RED);
12577
+ colorize("✓", ANSIColors.GREEN);
12578
+ colorize("⏲", ANSIColors.BLUE);
12574
12579
  var __defProp$2 = Object.defineProperty;
12575
12580
  var __export$1 = (all, symbols) => {
12576
12581
  let target = {};
@@ -12666,9 +12671,9 @@ var editor_exports = /* @__PURE__ */ __export$1({
12666
12671
  });
12667
12672
  const APPLICATION_URL = "";
12668
12673
  const EDITOR_URL = "http://localhost:8000";
12669
- const CMS_URL = "https://intlayer.org";
12670
- const PORT = 8e3;
12674
+ const CMS_URL = "https://app.intlayer.org";
12671
12675
  const BACKEND_URL = "https://back.intlayer.org";
12676
+ const PORT = 8e3;
12672
12677
  const IS_ENABLED = true;
12673
12678
  const LIVE_SYNC = true;
12674
12679
  const DICTIONARY_PRIORITY_STRATEGY = "local_first";
@@ -13805,30 +13810,36 @@ const getEnumeration = (enumerationContent, quantity) => {
13805
13810
  const getInsertion = (content2, values) => content2.replace(/\{\{(.*?)\}\}/g, (_2, key2) => (values[key2] ?? "").toString());
13806
13811
  const internationalization = { "locales": ["en", "en-GB", "fr", "es", "de", "ja", "ko", "zh", "it", "pt", "hi", "ar", "ru"], "defaultLocale": "en" };
13807
13812
  const routing = { "mode": "prefix-no-default", "storage": ["cookie", "header"] };
13808
- const editor$1 = { "applicationURL": "", "editorURL": "http://localhost:8000", "cmsURL": "https://intlayer.org", "backendURL": "https://back.intlayer.org", "port": 8e3, "enabled": true, "dictionaryPriorityStrategy": "local_first", "liveSync": true, "liveSyncPort": 4e3, "liveSyncURL": "http://localhost:4000" };
13813
+ const editor$1 = { "applicationURL": "", "editorURL": "http://localhost:8000", "cmsURL": "https://app.intlayer.org", "backendURL": "https://back.intlayer.org", "port": 8e3, "enabled": true, "dictionaryPriorityStrategy": "local_first", "liveSync": true, "liveSyncPort": 4e3, "liveSyncURL": "http://localhost:4000" };
13809
13814
  const log = { "mode": "default", "prefix": "\x1B[38;5;239m[intlayer] \x1B[0m" };
13810
- const build = { "optimize": true };
13811
13815
  const configuration = {
13812
13816
  internationalization,
13813
13817
  routing,
13814
13818
  editor: editor$1,
13815
- log,
13816
- build
13819
+ log
13817
13820
  };
13818
13821
  const dictionaries = {};
13819
13822
  const getDictionaries = () => dictionaries;
13823
+ const createSafeFallback = (path = "") => {
13824
+ return new Proxy(() => path, {
13825
+ get: (_target, prop) => {
13826
+ if (prop === "toJSON" || prop === Symbol.toPrimitive || prop === "toString") return () => path;
13827
+ if (prop === "then") return;
13828
+ return createSafeFallback(path ? `${path}.${String(prop)}` : String(prop));
13829
+ },
13830
+ apply: () => {
13831
+ return path;
13832
+ }
13833
+ });
13834
+ };
13820
13835
  const getIntlayer = (key2, locale, plugins) => {
13821
- const dictionaries2 = getDictionaries();
13822
- const dictionary = dictionaries2[key2];
13836
+ const dictionary = getDictionaries()[key2];
13823
13837
  if (!dictionary) {
13824
- if (configuration.build.optimize === true || configuration.build.optimize === void 0 && false) {
13825
- getAppLogger(configuration)("Build optimization is enabled, the dictionary may have been purged. You can disable build optimization, or configure the traversePattern to include the current component.", {
13826
- level: "error",
13827
- isVerbose: true
13828
- });
13829
- throw new Error(`Dictionary ${key2} not found - Build optimization is enabled, the dictionary may have been purged. You can disable build optimization, or configure the 'traversePattern' to include the current component.`, dictionaries2);
13830
- }
13831
- throw new Error(`Dictionary ${key2} not found`, dictionaries2);
13838
+ getAppLogger(configuration)(`Dictionary ${colorizeKey(key2)} was not found. Using fallback proxy.`, {
13839
+ level: "warn",
13840
+ isVerbose: true
13841
+ });
13842
+ return createSafeFallback(key2);
13832
13843
  }
13833
13844
  return getDictionary$1(dictionary, locale, plugins);
13834
13845
  };
@@ -20995,7 +21006,7 @@ const containerVariants$1 = cva("flex flex-col text-text backdrop-blur", {
20995
21006
  },
20996
21007
  transparency: {
20997
21008
  none: "bg-card",
20998
- sm: "bg-card/95",
21009
+ sm: "bg-card/90",
20999
21010
  md: "bg-card/70",
21000
21011
  lg: "bg-card/40",
21001
21012
  xl: "bg-card/20",
@@ -21023,13 +21034,14 @@ const containerVariants$1 = cva("flex flex-col text-text backdrop-blur", {
21023
21034
  primary: "border-primary",
21024
21035
  secondary: "border-secondary",
21025
21036
  neutral: "border-neutral",
21037
+ card: "border-card",
21026
21038
  text: "border-text",
21027
21039
  error: "border-error",
21028
21040
  warning: "border-warning",
21029
21041
  success: "border-success"
21030
21042
  },
21031
21043
  background: {
21032
- none: "bg-inherit",
21044
+ none: "",
21033
21045
  hoverable: "bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur",
21034
21046
  with: ""
21035
21047
  },
@@ -21050,7 +21062,11 @@ const containerVariants$1 = cva("flex flex-col text-text backdrop-blur", {
21050
21062
  padding: "none",
21051
21063
  separator: "without",
21052
21064
  gap: "none"
21053
- }
21065
+ },
21066
+ compoundVariants: [{
21067
+ background: "none",
21068
+ class: "bg-transparent"
21069
+ }]
21054
21070
  });
21055
21071
  let ContainerRoundedSize = /* @__PURE__ */ (function(ContainerRoundedSize$1) {
21056
21072
  ContainerRoundedSize$1["NONE"] = "none";
@@ -21352,7 +21368,7 @@ const Button = ({ variant, size: size2, color: color2, children, Icon: Icon2, Ic
21352
21368
  "aria-hidden": "true"
21353
21369
  }),
21354
21370
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
21355
- className: cn$2("flex w-0 items-center justify-center transition-[width] duration-300", isLoading && size2 === ButtonSize.SM && "w-3", isLoading && size2 === ButtonSize.MD && "w-4", isLoading && size2 === ButtonSize.LG && "w-5", isLoading && size2 === ButtonSize.XL && "w-6"),
21371
+ className: cn$2("flex items-center justify-center transition-[width] duration-300", isLoading && size2 === ButtonSize.SM && "w-3", isLoading && size2 === ButtonSize.MD && "w-4", isLoading && size2 === ButtonSize.LG && "w-5", isLoading && size2 === ButtonSize.XL && "w-6"),
21356
21372
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {
21357
21373
  className: buttonIconVariants({
21358
21374
  size: size2,
@@ -21905,6 +21921,16 @@ const linkVariants = cva("gap-3 transition-all duration-300 focus-visible:outlin
21905
21921
  }
21906
21922
  },
21907
21923
  compoundVariants: [
21924
+ {
21925
+ variant: LinkVariant.BUTTON,
21926
+ color: LinkColor.TEXT_INVERSE,
21927
+ class: "*:text-text"
21928
+ },
21929
+ {
21930
+ variant: LinkVariant.BUTTON_OUTLINED,
21931
+ color: LinkColor.TEXT_INVERSE,
21932
+ class: "text-text-opposite *:text-text-opposite"
21933
+ },
21908
21934
  {
21909
21935
  variant: [LinkVariant.BUTTON, LinkVariant.BUTTON_OUTLINED],
21910
21936
  size: LinkSize.SM,
@@ -22864,6 +22890,326 @@ const SearchInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExpor
22864
22890
  className: cn$2("pl-8", className)
22865
22891
  })]
22866
22892
  });
22893
+ const getBreakpointFromSize = (breakpoint) => {
22894
+ switch (breakpoint) {
22895
+ case "xs":
22896
+ return 480;
22897
+ case "sm":
22898
+ return 640;
22899
+ case "md":
22900
+ return 768;
22901
+ case "lg":
22902
+ return 1024;
22903
+ case "xl":
22904
+ return 1280;
22905
+ case "2xl":
22906
+ return 1536;
22907
+ default:
22908
+ return breakpoint;
22909
+ }
22910
+ };
22911
+ const checkIsMobileUserAgent = () => {
22912
+ if (typeof window === "undefined") return;
22913
+ const userAgent = window.navigator?.userAgent;
22914
+ if (typeof userAgent === "undefined") return;
22915
+ return /android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(userAgent);
22916
+ };
22917
+ const checkIsIOS = () => {
22918
+ if (typeof window === "undefined") return;
22919
+ const userAgent = window.navigator?.userAgent;
22920
+ if (typeof userAgent === "undefined") return;
22921
+ return /iP(?:hone|ad|od)/.test(userAgent);
22922
+ };
22923
+ const checkIsMac = () => {
22924
+ if (typeof window === "undefined") return;
22925
+ const userAgent = window.navigator?.userAgent;
22926
+ if (typeof userAgent === "undefined") return;
22927
+ return /Macintosh|MacIntel|Mac OS X/.test(userAgent);
22928
+ };
22929
+ const checkIsMobileScreen = (breakpoint) => {
22930
+ if (typeof window === "undefined") return;
22931
+ return (window?.innerWidth ?? 0) <= breakpoint;
22932
+ };
22933
+ const calculateIsMobile = (breakpoint = "md") => {
22934
+ const breakpointValue = getBreakpointFromSize(breakpoint);
22935
+ const isMobileUserAgent = checkIsMobileUserAgent();
22936
+ const isMobileScreen = checkIsMobileScreen(breakpointValue);
22937
+ return {
22938
+ isMobileScreen,
22939
+ isMobileUserAgent,
22940
+ isMobile: isMobileScreen ?? isMobileUserAgent,
22941
+ isIOS: checkIsIOS(),
22942
+ isMac: checkIsMac()
22943
+ };
22944
+ };
22945
+ const useDevice = (breakpoint = "md") => {
22946
+ const [result, setResult] = reactExports.useState(calculateIsMobile(breakpoint));
22947
+ reactExports.useEffect(() => {
22948
+ const handleResize = () => {
22949
+ setResult(calculateIsMobile(breakpoint));
22950
+ };
22951
+ window.addEventListener("resize", handleResize, { passive: true });
22952
+ return () => window.removeEventListener("resize", handleResize);
22953
+ }, [breakpoint]);
22954
+ return result;
22955
+ };
22956
+ const parseShortcut = (shortcut) => {
22957
+ return shortcut.split(" + ").map((key2) => key2.trim());
22958
+ };
22959
+ const normalizeKey = (key2) => {
22960
+ return {
22961
+ "⌘": "Meta",
22962
+ Ctrl: "Control",
22963
+ Control: "Control",
22964
+ Alt: "Alt",
22965
+ "⌥": "Alt",
22966
+ Shift: "Shift",
22967
+ Meta: "Meta",
22968
+ "↑": "ArrowUp",
22969
+ "↓": "ArrowDown",
22970
+ "←": "ArrowLeft",
22971
+ "→": "ArrowRight",
22972
+ ArrowUp: "ArrowUp",
22973
+ ArrowDown: "ArrowDown",
22974
+ ArrowLeft: "ArrowLeft",
22975
+ ArrowRight: "ArrowRight"
22976
+ }[key2] || key2;
22977
+ };
22978
+ const matchesShortcut = (event, keys) => {
22979
+ const normalizedKeys = keys.map(normalizeKey);
22980
+ const hasModifiers = {
22981
+ Meta: normalizedKeys.includes("Meta"),
22982
+ Control: normalizedKeys.includes("Control"),
22983
+ Alt: normalizedKeys.includes("Alt"),
22984
+ Shift: normalizedKeys.includes("Shift")
22985
+ };
22986
+ if (hasModifiers.Meta !== event.metaKey || hasModifiers.Control !== event.ctrlKey || hasModifiers.Alt !== event.altKey || hasModifiers.Shift !== event.shiftKey) return false;
22987
+ const nonModifierKey = keys.find((key2) => ![
22988
+ "⌘",
22989
+ "Ctrl",
22990
+ "Control",
22991
+ "Alt",
22992
+ "⌥",
22993
+ "Shift",
22994
+ "Meta"
22995
+ ].includes(normalizeKey(key2)));
22996
+ if (!nonModifierKey) return false;
22997
+ const normalizedNonModifierKey = normalizeKey(nonModifierKey);
22998
+ if (normalizedNonModifierKey.startsWith("Arrow")) return event.key === normalizedNonModifierKey;
22999
+ return event.key.toLowerCase() === normalizedNonModifierKey.toLowerCase();
23000
+ };
23001
+ const getDisplayKey = (key2) => {
23002
+ return {
23003
+ ArrowUp: "↑",
23004
+ ArrowDown: "↓",
23005
+ ArrowLeft: "←",
23006
+ ArrowRight: "→"
23007
+ }[key2] || key2;
23008
+ };
23009
+ const getDisplayShortcut = (shortcut, isMac) => {
23010
+ let result = shortcut;
23011
+ if (isMac) {
23012
+ result = result.replace(/Ctrl/g, "⌘");
23013
+ result = result.replace(/Alt/g, "⌥");
23014
+ } else {
23015
+ result = result.replace(/⌘/g, "Ctrl");
23016
+ result = result.replace(/⌥/g, "Alt");
23017
+ }
23018
+ result = result.replace(/ArrowUp/g, "↑");
23019
+ result = result.replace(/ArrowDown/g, "↓");
23020
+ result = result.replace(/ArrowLeft/g, "←");
23021
+ result = result.replace(/ArrowRight/g, "→");
23022
+ return result;
23023
+ };
23024
+ const KeyboardShortcut = ({ shortcut, onTriggered, display = true, disabled = false, className, size: size2 = "md" }) => {
23025
+ const { isMac } = useDevice();
23026
+ const keys = parseShortcut(getDisplayShortcut(shortcut, isMac ?? false));
23027
+ const [pressedKeys, setPressedKeys] = reactExports.useState(/* @__PURE__ */ new Set());
23028
+ reactExports.useEffect(() => {
23029
+ const handleKeyDown = (event) => {
23030
+ const target = event.target;
23031
+ const isInputField = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
23032
+ const currentKey = event.key;
23033
+ const normalizedEventKeys = /* @__PURE__ */ new Set();
23034
+ if (event.metaKey) normalizedEventKeys.add("⌘");
23035
+ if (event.ctrlKey) normalizedEventKeys.add("Ctrl");
23036
+ if (event.altKey) normalizedEventKeys.add(isMac ? "⌥" : "Alt");
23037
+ if (event.shiftKey) normalizedEventKeys.add("Shift");
23038
+ if (currentKey.startsWith("Arrow")) {
23039
+ normalizedEventKeys.add(currentKey);
23040
+ normalizedEventKeys.add(getDisplayKey(currentKey));
23041
+ } else normalizedEventKeys.add(currentKey.toUpperCase());
23042
+ setPressedKeys(normalizedEventKeys);
23043
+ if (!disabled && onTriggered && matchesShortcut(event, keys)) {
23044
+ const isEscapeShortcut = keys.includes("Escape");
23045
+ if (isInputField && !isEscapeShortcut) return;
23046
+ event.preventDefault();
23047
+ onTriggered();
23048
+ }
23049
+ };
23050
+ const handleKeyUp = () => {
23051
+ setPressedKeys(/* @__PURE__ */ new Set());
23052
+ };
23053
+ window.addEventListener("keydown", handleKeyDown);
23054
+ window.addEventListener("keyup", handleKeyUp);
23055
+ window.addEventListener("blur", handleKeyUp);
23056
+ return () => {
23057
+ window.removeEventListener("keydown", handleKeyDown);
23058
+ window.removeEventListener("keyup", handleKeyUp);
23059
+ window.removeEventListener("blur", handleKeyUp);
23060
+ };
23061
+ }, [
23062
+ keys,
23063
+ onTriggered,
23064
+ isMac,
23065
+ disabled
23066
+ ]);
23067
+ if (!display) return null;
23068
+ const isKeyPressed = (key2) => {
23069
+ const upperKey = key2.toUpperCase();
23070
+ const normalizedKey = normalizeKey(key2);
23071
+ return pressedKeys.has(key2) || pressedKeys.has(upperKey) || pressedKeys.has(normalizedKey) || key2 === "⌘" && pressedKeys.has("Meta") || key2 === "Ctrl" && pressedKeys.has("Control") || key2 === "⌥" && pressedKeys.has("Alt") || key2 === "Alt" && pressedKeys.has("Alt") || key2 === "←" && pressedKeys.has("ArrowLeft") || key2 === "→" && pressedKeys.has("ArrowRight") || key2 === "↑" && pressedKeys.has("ArrowUp") || key2 === "↓" && pressedKeys.has("ArrowDown");
23072
+ };
23073
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("kbd", {
23074
+ className: cn$2("inline-flex items-center justify-center gap-0.5 p-0.5", "rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl", "font-medium font-sans", "border-1 border-neutral/20 text-neutral", size2 === "sm" && "text-xs", size2 === "md" && "text-sm", size2 === "lg" && "text-base", className),
23075
+ children: keys.map((key2, index2) => {
23076
+ const keyId = `${key2}-${index2}-${shortcut}`;
23077
+ const displayKey = getDisplayKey(key2);
23078
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
23079
+ className: "inline-flex items-center",
23080
+ children: [index2 > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23081
+ className: "text-neutral/50",
23082
+ children: "+"
23083
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
23084
+ className: cn$2("min-w-4 px-0.5", isKeyPressed(key2) && "scale-120 font-bold text-text"),
23085
+ suppressHydrationWarning: true,
23086
+ children: displayKey
23087
+ })]
23088
+ }, keyId);
23089
+ })
23090
+ });
23091
+ };
23092
+ let PopoverXAlign = /* @__PURE__ */ (function(PopoverXAlign$1) {
23093
+ PopoverXAlign$1["START"] = "start";
23094
+ PopoverXAlign$1["END"] = "end";
23095
+ return PopoverXAlign$1;
23096
+ })({});
23097
+ let PopoverYAlign = /* @__PURE__ */ (function(PopoverYAlign$1) {
23098
+ PopoverYAlign$1["BELOW"] = "bellow";
23099
+ PopoverYAlign$1["ABOVE"] = "above";
23100
+ return PopoverYAlign$1;
23101
+ })({});
23102
+ const PopoverStatic = ({ children, className, identifier, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
23103
+ className: cn$2("group/popover relative flex cursor-pointer", className),
23104
+ id: `unrollable-panel-button-${identifier}`,
23105
+ "aria-haspopup": true,
23106
+ ...props,
23107
+ children
23108
+ });
23109
+ const Detail$1 = ({ children, isHidden: isHidden2 = void 0, isOverable = true, isFocusable = false, xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, identifier, className, displayArrow = true, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Container, {
23110
+ transparency: "sm",
23111
+ role: "group",
23112
+ "aria-hidden": isHidden2,
23113
+ "aria-labelledby": `unrollable-panel-button-${identifier}`,
23114
+ id: `unrollable-panel-${identifier}`,
23115
+ className: cn$2("absolute z-50 min-w-full rounded-md ring-1 ring-neutral", xAlign === "start" && "left-0", xAlign === "end" && "right-0", yAlign === "bellow" && "top-[calc(100%+1rem)]", yAlign === "above" && "bottom-[calc(100%+1rem)]", displayArrow && 'before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]', displayArrow && xAlign === "start" && "before:left-2", displayArrow && xAlign === "end" && "before:right-2", displayArrow && yAlign === "bellow" && "before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent", displayArrow && yAlign === "above" && "before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent", "overflow-x-visible opacity-0 transition-all duration-400 ease-in-out", isHidden2 !== false ? "invisible" : "visible opacity-100 delay-800", isOverable && "group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800", isFocusable && "group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800", className),
23116
+ ...props,
23117
+ children
23118
+ });
23119
+ PopoverStatic.Detail = Detail$1;
23120
+ const PopoverComponent = (props) => {
23121
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverStatic, { ...props });
23122
+ };
23123
+ const Detail = ({ xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, ...props }) => {
23124
+ const popoverRef = reactExports.useRef(null);
23125
+ const [computedXAlign, setComputedXAlign] = reactExports.useState(xAlign);
23126
+ const [computedYAlign, setComputedYAlign] = reactExports.useState(yAlign);
23127
+ const [maxWidth, setMaxWidth] = reactExports.useState(void 0);
23128
+ reactExports.useEffect(() => {
23129
+ const adjustPosition = () => {
23130
+ if (!popoverRef.current) return;
23131
+ const popoverElement = popoverRef.current;
23132
+ const triggerElement$1 = document.getElementById(`unrollable-panel-button-${props.identifier}`);
23133
+ if (!triggerElement$1) return;
23134
+ const triggerRect = triggerElement$1.getBoundingClientRect();
23135
+ const viewportWidth = window.innerWidth;
23136
+ const viewportHeight = window.innerHeight;
23137
+ const gap = 16;
23138
+ const padding = 16;
23139
+ const maxWidthFromLeft = viewportWidth - triggerRect.left - padding;
23140
+ const maxWidthFromRight = triggerRect.right - padding;
23141
+ setMaxWidth(Math.max(maxWidthFromLeft, maxWidthFromRight));
23142
+ const wasInvisible = popoverElement.classList.contains("invisible");
23143
+ if (wasInvisible) {
23144
+ popoverElement.style.visibility = "hidden";
23145
+ popoverElement.classList.remove("invisible");
23146
+ }
23147
+ requestAnimationFrame(() => {
23148
+ const popoverRect = popoverElement.getBoundingClientRect();
23149
+ if (wasInvisible) {
23150
+ popoverElement.style.visibility = "";
23151
+ popoverElement.classList.add("invisible");
23152
+ }
23153
+ let newYAlign = yAlign;
23154
+ const spaceBelow = viewportHeight - triggerRect.bottom - gap;
23155
+ const spaceAbove = triggerRect.top - gap;
23156
+ if (yAlign === PopoverYAlign.BELOW && spaceBelow < popoverRect.height) {
23157
+ if (spaceAbove >= popoverRect.height) newYAlign = PopoverYAlign.ABOVE;
23158
+ } else if (yAlign === PopoverYAlign.ABOVE && spaceAbove < popoverRect.height) {
23159
+ if (spaceBelow >= popoverRect.height) newYAlign = PopoverYAlign.BELOW;
23160
+ }
23161
+ let newXAlign = xAlign;
23162
+ const spaceRight = viewportWidth - triggerRect.left - padding;
23163
+ const spaceLeft = triggerRect.right - padding;
23164
+ if (xAlign === PopoverXAlign.START && spaceRight < popoverRect.width) {
23165
+ if (spaceLeft >= popoverRect.width) newXAlign = PopoverXAlign.END;
23166
+ } else if (xAlign === PopoverXAlign.END && spaceLeft < popoverRect.width) {
23167
+ if (spaceRight >= popoverRect.width) newXAlign = PopoverXAlign.START;
23168
+ }
23169
+ setComputedYAlign(newYAlign);
23170
+ setComputedXAlign(newXAlign);
23171
+ });
23172
+ };
23173
+ const timeoutId = setTimeout(adjustPosition, 0);
23174
+ const triggerElement = document.getElementById(`unrollable-panel-button-${props.identifier}`);
23175
+ if (triggerElement) {
23176
+ triggerElement.addEventListener("mouseenter", adjustPosition);
23177
+ triggerElement.addEventListener("focusin", adjustPosition);
23178
+ }
23179
+ const resizeObserver = new ResizeObserver(() => {
23180
+ adjustPosition();
23181
+ });
23182
+ if (popoverRef.current) resizeObserver.observe(popoverRef.current);
23183
+ window.addEventListener("resize", adjustPosition);
23184
+ window.addEventListener("scroll", adjustPosition, true);
23185
+ return () => {
23186
+ clearTimeout(timeoutId);
23187
+ if (triggerElement) {
23188
+ triggerElement.removeEventListener("mouseenter", adjustPosition);
23189
+ triggerElement.removeEventListener("focusin", adjustPosition);
23190
+ }
23191
+ resizeObserver.disconnect();
23192
+ window.removeEventListener("resize", adjustPosition);
23193
+ window.removeEventListener("scroll", adjustPosition, true);
23194
+ };
23195
+ }, [
23196
+ props.identifier,
23197
+ xAlign,
23198
+ yAlign
23199
+ ]);
23200
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Detail$1, {
23201
+ ...props,
23202
+ xAlign: computedXAlign,
23203
+ yAlign: computedYAlign,
23204
+ ref: popoverRef,
23205
+ style: {
23206
+ ...props.style,
23207
+ maxWidth: maxWidth ? `${maxWidth}px` : void 0
23208
+ }
23209
+ });
23210
+ };
23211
+ const Popover = PopoverComponent;
23212
+ Popover.Detail = Detail;
22867
23213
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
22868
23214
  return function handleEvent(event) {
22869
23215
  originalEventHandler?.(event);
@@ -28240,6 +28586,43 @@ const getEditorAPI = (authAPIOptions = {}, intlayerConfig) => {
28240
28586
  writeDictionary
28241
28587
  };
28242
28588
  };
28589
+ const getGithubAPI = (authAPIOptions = {}, intlayerConfig) => {
28590
+ const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
28591
+ if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
28592
+ const GITHUB_API_ROUTE = `${backendURL}/api/github`;
28593
+ const getAuthUrl = async (redirectUri, otherOptions = {}) => await fetcher(`${GITHUB_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: { redirectUri } });
28594
+ const authenticate = async (code, otherOptions = {}) => await fetcher(`${GITHUB_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
28595
+ method: "POST",
28596
+ body: { code }
28597
+ });
28598
+ const getRepositories = async (token, otherOptions = {}) => await fetcher(`${GITHUB_API_ROUTE}/repos`, authAPIOptions, otherOptions, { params: token ? { token } : void 0 });
28599
+ const checkIntlayerConfig = async (token, owner, repository, branch = "main", otherOptions = {}) => await fetcher(`${GITHUB_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
28600
+ method: "POST",
28601
+ body: {
28602
+ token: token ?? void 0,
28603
+ owner,
28604
+ repository,
28605
+ branch
28606
+ }
28607
+ });
28608
+ const getConfigFile = async (token, owner, repository, branch = "main", path = "intlayer.config.ts", otherOptions = {}) => await fetcher(`${GITHUB_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
28609
+ method: "POST",
28610
+ body: {
28611
+ token: token ?? void 0,
28612
+ owner,
28613
+ repository,
28614
+ branch,
28615
+ path
28616
+ }
28617
+ });
28618
+ return {
28619
+ getAuthUrl,
28620
+ authenticate,
28621
+ getRepositories,
28622
+ checkIntlayerConfig,
28623
+ getConfigFile
28624
+ };
28625
+ };
28243
28626
  const getOAuthAPI = (intlayerConfig) => {
28244
28627
  const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
28245
28628
  const { clientId, clientSecret } = intlayerConfig?.editor ?? {};
@@ -28339,6 +28722,13 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
28339
28722
  method: "PATCH",
28340
28723
  body: { clientId }
28341
28724
  });
28725
+ const triggerBuild = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/build`, authAPIOptions, otherOptions, { method: "POST" });
28726
+ const triggerWebhook = async (webhookIndex, otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/webhook`, authAPIOptions, otherOptions, {
28727
+ method: "POST",
28728
+ body: { webhookIndex }
28729
+ });
28730
+ const getCIConfig = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "GET" });
28731
+ const pushCIConfig = async (otherOptions = {}) => await fetcher(`${PROJECT_API_ROUTE}/ci`, authAPIOptions, otherOptions, { method: "POST" });
28342
28732
  return {
28343
28733
  getProjects,
28344
28734
  addProject,
@@ -28350,7 +28740,11 @@ const getProjectAPI = (authAPIOptions = {}, intlayerConfig) => {
28350
28740
  unselectProject,
28351
28741
  addNewAccessKey,
28352
28742
  deleteAccessKey,
28353
- refreshAccessKey
28743
+ refreshAccessKey,
28744
+ triggerBuild,
28745
+ triggerWebhook,
28746
+ getCIConfig,
28747
+ pushCIConfig
28354
28748
  };
28355
28749
  };
28356
28750
  const getStripeAPI = (authAPIOptions = {}, intlayerConfig) => {
@@ -28428,6 +28822,90 @@ const getUserAPI = (authAPIOptions = {}, intlayerConfig) => {
28428
28822
  getVerifyEmailStatusURL
28429
28823
  };
28430
28824
  };
28825
+ const getBitbucketAPI = (authAPIOptions = {}, intlayerConfig) => {
28826
+ const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
28827
+ if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
28828
+ const BITBUCKET_API_ROUTE = `${backendURL}/api/bitbucket`;
28829
+ const getAuthUrl = async (redirectUri, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: { redirectUri } });
28830
+ const authenticate = async (code, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
28831
+ method: "POST",
28832
+ body: { code }
28833
+ });
28834
+ const getRepositories = async (token, otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/repos`, authAPIOptions, otherOptions, { params: token ? { token } : void 0 });
28835
+ const checkIntlayerConfig = async (token, workspace, repoSlug, branch = "main", otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
28836
+ method: "POST",
28837
+ body: {
28838
+ token: token ?? void 0,
28839
+ workspace,
28840
+ repoSlug,
28841
+ branch
28842
+ }
28843
+ });
28844
+ const getConfigFile = async (token, workspace, repoSlug, branch = "main", path = "intlayer.config.ts", otherOptions = {}) => await fetcher(`${BITBUCKET_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
28845
+ method: "POST",
28846
+ body: {
28847
+ token: token ?? void 0,
28848
+ workspace,
28849
+ repoSlug,
28850
+ branch,
28851
+ path
28852
+ }
28853
+ });
28854
+ return {
28855
+ getAuthUrl,
28856
+ authenticate,
28857
+ getRepositories,
28858
+ checkIntlayerConfig,
28859
+ getConfigFile
28860
+ };
28861
+ };
28862
+ const getGitlabAPI = (authAPIOptions = {}, intlayerConfig) => {
28863
+ const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
28864
+ if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
28865
+ const GITLAB_API_ROUTE = `${backendURL}/api/gitlab`;
28866
+ const getAuthUrl = async (redirectUri, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/auth-url`, authAPIOptions, otherOptions, { params: {
28867
+ redirectUri,
28868
+ ...instanceUrl && { instanceUrl }
28869
+ } });
28870
+ const authenticate = async (code, redirectUri, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/auth`, authAPIOptions, otherOptions, {
28871
+ method: "POST",
28872
+ body: {
28873
+ code,
28874
+ redirectUri,
28875
+ instanceUrl
28876
+ }
28877
+ });
28878
+ const getProjects = async (token, instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/projects`, authAPIOptions, otherOptions, { params: {
28879
+ ...token && { token },
28880
+ ...instanceUrl && { instanceUrl }
28881
+ } });
28882
+ const checkIntlayerConfig = async (token, projectId, branch = "main", instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/check-config`, authAPIOptions, otherOptions, {
28883
+ method: "POST",
28884
+ body: {
28885
+ token: token ?? void 0,
28886
+ projectId,
28887
+ branch,
28888
+ ...instanceUrl && { instanceUrl }
28889
+ }
28890
+ });
28891
+ const getConfigFile = async (token, projectId, branch = "main", path = "intlayer.config.ts", instanceUrl, otherOptions = {}) => await fetcher(`${GITLAB_API_ROUTE}/get-config-file`, authAPIOptions, otherOptions, {
28892
+ method: "POST",
28893
+ body: {
28894
+ token: token ?? void 0,
28895
+ projectId,
28896
+ branch,
28897
+ path,
28898
+ ...instanceUrl && { instanceUrl }
28899
+ }
28900
+ });
28901
+ return {
28902
+ getAuthUrl,
28903
+ authenticate,
28904
+ getProjects,
28905
+ checkIntlayerConfig,
28906
+ getConfigFile
28907
+ };
28908
+ };
28431
28909
  const getNewsletterAPI = (authAPIOptions = {}, intlayerConfig) => {
28432
28910
  const backendURL = intlayerConfig?.editor?.backendURL ?? configuration?.editor?.backendURL;
28433
28911
  if (!backendURL) throw new Error("Backend URL is not defined in the Intlayer configuration.");
@@ -28469,6 +28947,9 @@ const getIntlayerAPI = (authAPIOptions = {}, intlayerConfig) => ({
28469
28947
  search: getSearchAPI(authAPIOptions, intlayerConfig),
28470
28948
  editor: getEditorAPI(authAPIOptions, intlayerConfig),
28471
28949
  newsletter: getNewsletterAPI(authAPIOptions, intlayerConfig),
28950
+ github: getGithubAPI(authAPIOptions, intlayerConfig),
28951
+ gitlab: getGitlabAPI(authAPIOptions, intlayerConfig),
28952
+ bitbucket: getBitbucketAPI(authAPIOptions, intlayerConfig),
28472
28953
  audit: getAuditAPI(authAPIOptions, intlayerConfig)
28473
28954
  });
28474
28955
  const useOAuth2 = (intlayerConfiguration) => {
@@ -29226,10 +29707,15 @@ function createSessionRefreshManager(opts) {
29226
29707
  if (event?.event === "poll") {
29227
29708
  state.lastSessionRequest = now$1();
29228
29709
  $fetch("/get-session").then((res) => {
29229
- sessionAtom.set({
29710
+ if (res.error) sessionAtom.set({
29711
+ ...currentSession,
29712
+ data: null,
29713
+ error: res.error
29714
+ });
29715
+ else sessionAtom.set({
29230
29716
  ...currentSession,
29231
29717
  data: res.data,
29232
- error: res.error || null
29718
+ error: null
29233
29719
  });
29234
29720
  state.lastSync = now$1();
29235
29721
  sessionSignal.set(!sessionSignal.get());
@@ -29238,10 +29724,10 @@ function createSessionRefreshManager(opts) {
29238
29724
  return;
29239
29725
  }
29240
29726
  if (event?.event === "visibilitychange") {
29241
- if (now$1() - state.lastSessionRequest < FOCUS_REFETCH_RATE_LIMIT_SECONDS && currentSession?.data !== null && currentSession?.data !== void 0) return;
29727
+ if (now$1() - state.lastSessionRequest < FOCUS_REFETCH_RATE_LIMIT_SECONDS) return;
29728
+ state.lastSessionRequest = now$1();
29242
29729
  }
29243
29730
  if (currentSession?.data === null || currentSession?.data === void 0 || event?.event === "visibilitychange") {
29244
- if (event?.event === "visibilitychange") state.lastSessionRequest = now$1();
29245
29731
  state.lastSync = now$1();
29246
29732
  sessionSignal.set(!sessionSignal.get());
29247
29733
  }
@@ -30345,9 +30831,12 @@ function createDynamicPathProxy(routes, client2, knownPathMethods, atoms, atomLi
30345
30831
  if (!atomListeners || options.disableSignal) return;
30346
30832
  const matches = atomListeners.filter((s2) => s2.matcher(routePath));
30347
30833
  if (!matches.length) return;
30834
+ const visited = /* @__PURE__ */ new Set();
30348
30835
  for (const match of matches) {
30349
30836
  const signal = atoms[match.signal];
30350
30837
  if (!signal) return;
30838
+ if (visited.has(match.signal)) continue;
30839
+ visited.add(match.signal);
30351
30840
  const val = signal.get();
30352
30841
  setTimeout(() => {
30353
30842
  signal.set(!val);
@@ -30723,9 +31212,9 @@ function useSession(sessionProp, intlayerConfiguration) {
30723
31212
  queryFn: async () => {
30724
31213
  return (await getAuthAPI(config2).getSession()).data;
30725
31214
  },
30726
- staleTime: 0,
31215
+ staleTime: 60 * 1e3,
30727
31216
  gcTime: 300 * 1e3,
30728
- refetchOnMount: "always",
31217
+ refetchOnMount: true,
30729
31218
  refetchOnWindowFocus: false,
30730
31219
  refetchOnReconnect: false,
30731
31220
  enabled: !sessionProp
@@ -30824,7 +31313,7 @@ const useDeleteDictionary = () => {
30824
31313
  const intlayerOAuth = useIntlayerOAuth();
30825
31314
  return useMutation({
30826
31315
  mutationKey: ["dictionaries"],
30827
- mutationFn: (args) => intlayerOAuth.dictionary.deleteDictionary(args),
31316
+ mutationFn: (args) => intlayerOAuth.dictionary.deleteDictionary(args.dictionaryId),
30828
31317
  meta: { invalidateQueries: [["dictionaries"], ["dictionariesKeys"]] }
30829
31318
  });
30830
31319
  };
@@ -33370,7 +33859,7 @@ const CodeDefault = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div
33370
33859
  }, `line-${index2}-${line.slice(0, 10)}`)) })
33371
33860
  })
33372
33861
  });
33373
- const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-DOHz3hxi.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
33862
+ const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-EiAndB3z.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
33374
33863
  const CodeBlock = ({ className, onChange, isEditable, children, lang, isDarkMode, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
33375
33864
  className: cn$2("flex w-full min-w-0 max-w-full overflow-x-auto", className),
33376
33865
  ...props,
@@ -37049,7 +37538,7 @@ const SelectScrollDownButton = ({ className, ...props }) => /* @__PURE__ */ jsxR
37049
37538
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, {})
37050
37539
  });
37051
37540
  const SelectContent = ({ className, children, position = SelectContentPosition.POPPER, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Content2, {
37052
- className: cn$2("relative z-50 max-h-96 min-w-32 overflow-hidden", "rounded-xl shadow-md", "bg-white dark:bg-neutral-950", "text-text", "border border-neutral-200 dark:border-neutral-800", "data-[state=closed]:animate-out data-[state=open]:animate-in", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1", className),
37541
+ className: cn$2("relative z-50 max-h-96 min-w-32 overflow-hidden", "rounded-xl shadow-md", "bg-white dark:bg-neutral-950", "text-text", "border border-neutral-200 dark:border-neutral-800", "data-[state=closed]:animate-out data-[state=open]:animate-in", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1", className),
37053
37542
  position,
37054
37543
  ...props,
37055
37544
  children: [
@@ -37087,127 +37576,6 @@ Select.Content = SelectContent;
37087
37576
  Select.Label = SelectLabel;
37088
37577
  Select.Item = SelectItem;
37089
37578
  Select.Separator = SelectSeparator;
37090
- let PopoverXAlign = /* @__PURE__ */ (function(PopoverXAlign$1) {
37091
- PopoverXAlign$1["START"] = "start";
37092
- PopoverXAlign$1["END"] = "end";
37093
- return PopoverXAlign$1;
37094
- })({});
37095
- let PopoverYAlign = /* @__PURE__ */ (function(PopoverYAlign$1) {
37096
- PopoverYAlign$1["BELOW"] = "bellow";
37097
- PopoverYAlign$1["ABOVE"] = "above";
37098
- return PopoverYAlign$1;
37099
- })({});
37100
- const PopoverStatic = ({ children, className, identifier, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
37101
- className: cn$2("group/popover relative flex cursor-pointer", className),
37102
- id: `unrollable-panel-button-${identifier}`,
37103
- "aria-haspopup": true,
37104
- ...props,
37105
- children
37106
- });
37107
- const Detail$1 = ({ children, isHidden: isHidden2 = void 0, isOverable = true, isFocusable = false, xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, identifier, className, displayArrow = true, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Container, {
37108
- transparency: "sm",
37109
- role: "group",
37110
- "aria-hidden": isHidden2,
37111
- "aria-labelledby": `unrollable-panel-button-${identifier}`,
37112
- id: `unrollable-panel-${identifier}`,
37113
- className: cn$2("absolute z-50 min-w-full rounded-md ring-1 ring-neutral", xAlign === "start" && "left-0", xAlign === "end" && "right-0", yAlign === "bellow" && "top-[calc(100%+1rem)]", yAlign === "above" && "bottom-[calc(100%+1rem)]", displayArrow && 'before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]', displayArrow && xAlign === "start" && "before:left-2", displayArrow && xAlign === "end" && "before:right-2", displayArrow && yAlign === "bellow" && "before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent", displayArrow && yAlign === "above" && "before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent", "overflow-x-visible opacity-0 transition-all duration-400 ease-in-out", isHidden2 !== false ? "invisible" : "visible opacity-100 delay-800", isOverable && "group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800", isFocusable && "group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800", className),
37114
- ...props,
37115
- children
37116
- });
37117
- PopoverStatic.Detail = Detail$1;
37118
- const PopoverComponent = (props) => {
37119
- return /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverStatic, { ...props });
37120
- };
37121
- const Detail = ({ xAlign = PopoverXAlign.START, yAlign = PopoverYAlign.BELOW, ...props }) => {
37122
- const popoverRef = reactExports.useRef(null);
37123
- const [computedXAlign, setComputedXAlign] = reactExports.useState(xAlign);
37124
- const [computedYAlign, setComputedYAlign] = reactExports.useState(yAlign);
37125
- const [maxWidth, setMaxWidth] = reactExports.useState(void 0);
37126
- reactExports.useEffect(() => {
37127
- const adjustPosition = () => {
37128
- if (!popoverRef.current) return;
37129
- const popoverElement = popoverRef.current;
37130
- const triggerElement$1 = document.getElementById(`unrollable-panel-button-${props.identifier}`);
37131
- if (!triggerElement$1) return;
37132
- const triggerRect = triggerElement$1.getBoundingClientRect();
37133
- const viewportWidth = window.innerWidth;
37134
- const viewportHeight = window.innerHeight;
37135
- const gap = 16;
37136
- const padding = 16;
37137
- const maxWidthFromLeft = viewportWidth - triggerRect.left - padding;
37138
- const maxWidthFromRight = triggerRect.right - padding;
37139
- setMaxWidth(Math.max(maxWidthFromLeft, maxWidthFromRight));
37140
- const wasInvisible = popoverElement.classList.contains("invisible");
37141
- if (wasInvisible) {
37142
- popoverElement.style.visibility = "hidden";
37143
- popoverElement.classList.remove("invisible");
37144
- }
37145
- requestAnimationFrame(() => {
37146
- const popoverRect = popoverElement.getBoundingClientRect();
37147
- if (wasInvisible) {
37148
- popoverElement.style.visibility = "";
37149
- popoverElement.classList.add("invisible");
37150
- }
37151
- let newYAlign = yAlign;
37152
- const spaceBelow = viewportHeight - triggerRect.bottom - gap;
37153
- const spaceAbove = triggerRect.top - gap;
37154
- if (yAlign === PopoverYAlign.BELOW && spaceBelow < popoverRect.height) {
37155
- if (spaceAbove >= popoverRect.height) newYAlign = PopoverYAlign.ABOVE;
37156
- } else if (yAlign === PopoverYAlign.ABOVE && spaceAbove < popoverRect.height) {
37157
- if (spaceBelow >= popoverRect.height) newYAlign = PopoverYAlign.BELOW;
37158
- }
37159
- let newXAlign = xAlign;
37160
- const spaceRight = viewportWidth - triggerRect.left - padding;
37161
- const spaceLeft = triggerRect.right - padding;
37162
- if (xAlign === PopoverXAlign.START && spaceRight < popoverRect.width) {
37163
- if (spaceLeft >= popoverRect.width) newXAlign = PopoverXAlign.END;
37164
- } else if (xAlign === PopoverXAlign.END && spaceLeft < popoverRect.width) {
37165
- if (spaceRight >= popoverRect.width) newXAlign = PopoverXAlign.START;
37166
- }
37167
- setComputedYAlign(newYAlign);
37168
- setComputedXAlign(newXAlign);
37169
- });
37170
- };
37171
- const timeoutId = setTimeout(adjustPosition, 0);
37172
- const triggerElement = document.getElementById(`unrollable-panel-button-${props.identifier}`);
37173
- if (triggerElement) {
37174
- triggerElement.addEventListener("mouseenter", adjustPosition);
37175
- triggerElement.addEventListener("focusin", adjustPosition);
37176
- }
37177
- const resizeObserver = new ResizeObserver(() => {
37178
- adjustPosition();
37179
- });
37180
- if (popoverRef.current) resizeObserver.observe(popoverRef.current);
37181
- window.addEventListener("resize", adjustPosition);
37182
- window.addEventListener("scroll", adjustPosition, true);
37183
- return () => {
37184
- clearTimeout(timeoutId);
37185
- if (triggerElement) {
37186
- triggerElement.removeEventListener("mouseenter", adjustPosition);
37187
- triggerElement.removeEventListener("focusin", adjustPosition);
37188
- }
37189
- resizeObserver.disconnect();
37190
- window.removeEventListener("resize", adjustPosition);
37191
- window.removeEventListener("scroll", adjustPosition, true);
37192
- };
37193
- }, [
37194
- props.identifier,
37195
- xAlign,
37196
- yAlign
37197
- ]);
37198
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Detail$1, {
37199
- ...props,
37200
- xAlign: computedXAlign,
37201
- yAlign: computedYAlign,
37202
- ref: popoverRef,
37203
- style: {
37204
- ...props.style,
37205
- maxWidth: maxWidth ? `${maxWidth}px` : void 0
37206
- }
37207
- });
37208
- };
37209
- const Popover = PopoverComponent;
37210
- Popover.Detail = Detail;
37211
37579
  const CodeContext = reactExports.createContext({
37212
37580
  packageManager: "npm",
37213
37581
  setPackageManager: () => {
@@ -37248,7 +37616,7 @@ const CodeConditionalRender = ({ children, ...props }) => {
37248
37616
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
37249
37617
  };
37250
37618
  const key$d = "code-selectors";
37251
- const content$d = { "nodeType": "translation", "translation": { "en": { "packageManager": { "label": "Select package manager" }, "codeFormat": { "label": "Select code format" }, "contentDeclarationFormat": { "label": "Select dictionary format" } }, "en-GB": { "packageManager": { "label": "Select package manager" }, "codeFormat": { "label": "Select code format" }, "contentDeclarationFormat": { "label": "Select dictionary format" } }, "fr": { "packageManager": { "label": "Sélectionner le gestionnaire de paquets" }, "codeFormat": { "label": "Sélectionner le format de code" }, "contentDeclarationFormat": { "label": "Sélectionner le format de dictionnaire" } }, "es": { "packageManager": { "label": "Seleccionar gestor de paquetes" }, "codeFormat": { "label": "Seleccionar formato de código" }, "contentDeclarationFormat": { "label": "Seleccionar formato de diccionario" } }, "de": { "packageManager": { "label": "Paketmanager auswählen" }, "codeFormat": { "label": "Code-Format auswählen" }, "contentDeclarationFormat": { "label": "Wörterbuchformat auswählen" } }, "ja": { "packageManager": { "label": "パッケージマネージャーを選択" }, "codeFormat": { "label": "コード形式を選択" }, "contentDeclarationFormat": { "label": "辞書形式を選択" } }, "ko": { "packageManager": { "label": "패키지 관리자 선택" }, "codeFormat": { "label": "코드 형식 선택" }, "contentDeclarationFormat": { "label": "사전 형식 선택" } }, "zh": { "packageManager": { "label": "选择包管理器" }, "codeFormat": { "label": "选择代码格式" }, "contentDeclarationFormat": { "label": "选择字典格式" } }, "it": { "packageManager": { "label": "Seleziona il gestore dei pacchetti" }, "codeFormat": { "label": "Seleziona il formato del codice" }, "contentDeclarationFormat": { "label": "Seleziona il formato del dizionario" } }, "pt": { "packageManager": { "label": "Selecionar gerenciador de pacotes" }, "codeFormat": { "label": "Selecionar formato de código" }, "contentDeclarationFormat": { "label": "Selecionar formato de dicionário" } }, "hi": { "packageManager": { "label": "पैकेज प्रबंधक चुनें" }, "codeFormat": { "label": "कोड प्रारूप चुनें" }, "contentDeclarationFormat": { "label": "शब्दकोश प्रारूप चुनें" } }, "ar": { "packageManager": { "label": "اختر مدير الحزم" }, "codeFormat": { "label": "اختر تنسيق الكود" }, "contentDeclarationFormat": { "label": "اختر تنسيق القاموس" } }, "ru": { "packageManager": { "label": "Выбрать менеджер пакетов" }, "codeFormat": { "label": "Выбрать формат кода" }, "contentDeclarationFormat": { "label": "Выбрать формат словаря" } } } };
37619
+ const content$d = { "nodeType": "translation", "translation": { "en": { "packageManager": { "placeholder": "Package Manager", "label": "Select package manager" }, "codeFormat": { "placeholder": "Code Format", "label": "Select code format" }, "contentDeclarationFormat": { "placeholder": "Dictionary Format", "label": "Select dictionary format" } }, "en-GB": { "packageManager": { "placeholder": "Package Manager", "label": "Select package manager" }, "codeFormat": { "placeholder": "Code Format", "label": "Select code format" }, "contentDeclarationFormat": { "placeholder": "Dictionary Format", "label": "Select dictionary format" } }, "fr": { "packageManager": { "placeholder": "Gestionnaire de paquets", "label": "Sélectionner le gestionnaire de paquets" }, "codeFormat": { "placeholder": "Format de code", "label": "Sélectionner le format de code" }, "contentDeclarationFormat": { "placeholder": "Format de dictionnaire", "label": "Sélectionner le format de dictionnaire" } }, "es": { "packageManager": { "placeholder": "Gestor de paquetes", "label": "Seleccionar gestor de paquetes" }, "codeFormat": { "placeholder": "Formato de código", "label": "Seleccionar formato de código" }, "contentDeclarationFormat": { "placeholder": "Formato de diccionario", "label": "Seleccionar formato de diccionario" } }, "de": { "packageManager": { "placeholder": "Paketmanager", "label": "Paketmanager auswählen" }, "codeFormat": { "placeholder": "Code-Format", "label": "Code-Format auswählen" }, "contentDeclarationFormat": { "placeholder": "Wörterbuchformat", "label": "Wörterbuchformat auswählen" } }, "ja": { "packageManager": { "placeholder": "パッケージマネージャー", "label": "パッケージマネージャーを選択" }, "codeFormat": { "placeholder": "コード形式", "label": "コード形式を選択" }, "contentDeclarationFormat": { "placeholder": "辞書形式", "label": "辞書形式を選択" } }, "ko": { "packageManager": { "placeholder": "패키지 관리자", "label": "패키지 관리자 선택" }, "codeFormat": { "placeholder": "코드 형식", "label": "코드 형식 선택" }, "contentDeclarationFormat": { "placeholder": "사전 형식", "label": "사전 형식 선택" } }, "zh": { "packageManager": { "placeholder": "包管理器", "label": "选择包管理器" }, "codeFormat": { "placeholder": "代码格式", "label": "选择代码格式" }, "contentDeclarationFormat": { "placeholder": "字典格式", "label": "选择字典格式" } }, "it": { "packageManager": { "placeholder": "Gestore dei pacchetti", "label": "Seleziona il gestore dei pacchetti" }, "codeFormat": { "placeholder": "Formato del codice", "label": "Seleziona il formato del codice" }, "contentDeclarationFormat": { "placeholder": "Formato del dizionario", "label": "Seleziona il formato del dizionario" } }, "pt": { "packageManager": { "placeholder": "Gerenciador de pacotes", "label": "Selecionar gerenciador de pacotes" }, "codeFormat": { "placeholder": "Formato de código", "label": "Selecionar formato de código" }, "contentDeclarationFormat": { "placeholder": "Formato de dicionário", "label": "Selecionar formato de dicionário" } }, "hi": { "packageManager": { "placeholder": "पैकेज प्रबंधक", "label": "पैकेज प्रबंधक चुनें" }, "codeFormat": { "placeholder": "कोड प्रारूप", "label": "कोड प्रारूप चुनें" }, "contentDeclarationFormat": { "placeholder": "शब्दकोश प्रारूप", "label": "शब्दकोश प्रारूप चुनें" } }, "ar": { "packageManager": { "placeholder": "مدير الحزم", "label": "اختر مدير الحزم" }, "codeFormat": { "placeholder": "تنسيق الكود", "label": "اختر تنسيق الكود" }, "contentDeclarationFormat": { "placeholder": "تنسيق القاموس", "label": "اختر تنسيق القاموس" } }, "ru": { "packageManager": { "placeholder": "Менеджер пакетов", "label": "Выбрать менеджер пакетов" }, "codeFormat": { "placeholder": "Формат кода", "label": "Выбрать формат кода" }, "contentDeclarationFormat": { "placeholder": "Формат словаря", "label": "Выбрать формат словаря" } } } };
37252
37620
  const localIds$d = ["code-selectors::local::../@intlayer/design-system/src/components/IDE/selectors.content.ts"];
37253
37621
  const _VaxfTMdlIxLlHVFaeieC = {
37254
37622
  key: key$d,
@@ -37261,9 +37629,7 @@ const CodeFormatSelector = () => {
37261
37629
  setCodeFormat,
37262
37630
  setContentDeclarationFormat
37263
37631
  } = useCodeContext();
37264
- const {
37265
- codeFormat: codeFormatContent
37266
- } = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37632
+ const content2 = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37267
37633
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, {
37268
37634
  value: codeFormat,
37269
37635
  onValueChange: (value) => {
@@ -37271,10 +37637,10 @@ const CodeFormatSelector = () => {
37271
37637
  setContentDeclarationFormat(value);
37272
37638
  },
37273
37639
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Trigger, {
37274
- className: "py-1",
37275
- "aria-label": codeFormatContent.label,
37640
+ className: "py-1!",
37641
+ "aria-label": content2.codeFormat.label.value,
37276
37642
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Value, {
37277
- placeholder: "Code Format"
37643
+ placeholder: content2.codeFormat.placeholder.value
37278
37644
  })
37279
37645
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Select.Content, {
37280
37646
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, {
@@ -37295,17 +37661,15 @@ const ContentDeclarationFormatSelector = () => {
37295
37661
  contentDeclarationFormat,
37296
37662
  setContentDeclarationFormat
37297
37663
  } = useCodeContext();
37298
- const {
37299
- contentDeclarationFormat: contentDeclarationFormatContent
37300
- } = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37664
+ const content2 = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37301
37665
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, {
37302
37666
  value: contentDeclarationFormat,
37303
37667
  onValueChange: setContentDeclarationFormat,
37304
37668
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Trigger, {
37305
- className: "py-1",
37306
- "aria-label": contentDeclarationFormatContent.label,
37669
+ className: "py-1!",
37670
+ "aria-label": content2.contentDeclarationFormat.label.value,
37307
37671
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Value, {
37308
- placeholder: "Dictionary Format"
37672
+ placeholder: content2.contentDeclarationFormat.placeholder.value
37309
37673
  })
37310
37674
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Select.Content, {
37311
37675
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, {
@@ -37361,17 +37725,16 @@ const PackageManagerSelector = () => {
37361
37725
  packageManager,
37362
37726
  setPackageManager
37363
37727
  } = useCodeContext();
37364
- const {
37365
- packageManager: packageManagerContent
37366
- } = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37728
+ const content2 = useDictionary(_VaxfTMdlIxLlHVFaeieC);
37729
+ useDictionary(_VaxfTMdlIxLlHVFaeieC);
37367
37730
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, {
37368
37731
  value: packageManager,
37369
37732
  onValueChange: setPackageManager,
37370
37733
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Trigger, {
37371
- className: "py-1",
37372
- "aria-label": packageManagerContent.label,
37734
+ className: "py-1!",
37735
+ "aria-label": content2.packageManager.label.value,
37373
37736
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Value, {
37374
- placeholder: "Package Manager"
37737
+ placeholder: content2.packageManager.placeholder.value
37375
37738
  })
37376
37739
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Select.Content, {
37377
37740
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, {
@@ -37456,7 +37819,7 @@ const tabSelectorVariant = cva("relative z-0 flex size-full flex-row items-cente
37456
37819
  } },
37457
37820
  defaultVariants: { color: "primary" }
37458
37821
  });
37459
- const indicatorVariant = cva("-z-1 absolute rounded-lg duration-300 ease-in-out motion-reduce:transition-none", {
37822
+ const indicatorVariant = cva("absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none", {
37460
37823
  variants: {
37461
37824
  color: {
37462
37825
  primary: "bg-primary/10 aria-selected:text-text",
@@ -45229,7 +45592,7 @@ let ModalSize = /* @__PURE__ */ (function(ModalSize$1) {
45229
45592
  ModalSize$1["UNSET"] = "unset";
45230
45593
  return ModalSize$1;
45231
45594
  })({});
45232
- const modalVariants = cva("flex cursor-default flex-col p-3 shadow-sm", {
45595
+ const modalVariants = cva("flex cursor-default flex-col overflow-hidden shadow-sm", {
45233
45596
  variants: { size: {
45234
45597
  sm: "h-auto max-h-[30vh] w-[95vw] max-w-xl",
45235
45598
  md: "h-auto max-h-[50vh] w-[95vw] max-w-xl",
@@ -45239,8 +45602,16 @@ const modalVariants = cva("flex cursor-default flex-col p-3 shadow-sm", {
45239
45602
  } },
45240
45603
  defaultVariants: { size: "unset" }
45241
45604
  });
45605
+ const contentPaddingVariants = {
45606
+ none: "p-0",
45607
+ sm: "px-2 py-4",
45608
+ md: "px-4 py-6",
45609
+ lg: "px-6 py-8",
45610
+ xl: "px-8 py-10",
45611
+ "2xl": "px-10 py-12"
45612
+ };
45242
45613
  const MotionModal = motion.create(Container);
45243
- const Modal = ({ children, isOpen, container, disableScroll = true, onClose, hasCloseButton = false, title, size: size2 = ModalSize.MD, className, ...props }) => {
45614
+ const Modal = ({ children, isOpen, container, disableScroll = true, onClose, hasCloseButton = false, title, size: size2 = ModalSize.MD, className, isScrollable = false, padding = "none", ...props }) => {
45244
45615
  const containerElement = useGetElementOrWindow(container);
45245
45616
  useScrollBlockage({
45246
45617
  key: "modal",
@@ -45257,8 +45628,9 @@ const Modal = ({ children, isOpen, container, disableScroll = true, onClose, has
45257
45628
  }, [isOpen, onClose]);
45258
45629
  if (!containerElement) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
45259
45630
  const hasTitle = typeof title === "string";
45631
+ const contentPaddingClass = contentPaddingVariants[padding || "none"];
45260
45632
  return reactDomExports.createPortal(/* @__PURE__ */ jsxRuntimeExports.jsx(motion.div, {
45261
- className: "invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto bg-background/40 backdrop-blur",
45633
+ className: "invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur",
45262
45634
  animate: isOpen ? "visible" : "invisible",
45263
45635
  variants: {
45264
45636
  visible: {
@@ -45294,12 +45666,13 @@ const Modal = ({ children, isOpen, container, disableScroll = true, onClose, has
45294
45666
  }),
45295
45667
  role: "dialog",
45296
45668
  "aria-modal": true,
45297
- roundedSize: "2xl",
45669
+ roundedSize: "4xl",
45670
+ padding: "none",
45298
45671
  ...props,
45299
45672
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
45300
- className: cn$2("cursor-default", hasCloseButton && hasTitle ? `flex items-start` : hasCloseButton ? `flex justify-end` : hasTitle ? `items-center` : `hidden`),
45673
+ className: cn$2("relative flex-none px-4 pt-4", hasCloseButton && hasTitle ? `flex items-start` : hasCloseButton ? `flex justify-end` : hasTitle ? `items-center` : `hidden`),
45301
45674
  children: [hasTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(H3, {
45302
- className: "mt-2 mb-4 ml-4 flex items-center justify-center font-bold text-lg",
45675
+ className: "mb-2 ml-1 flex items-center justify-center font-bold text-lg",
45303
45676
  children: title
45304
45677
  }), hasCloseButton && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
45305
45678
  variant: ButtonVariant.HOVERABLE,
@@ -45314,8 +45687,11 @@ const Modal = ({ children, isOpen, container, disableScroll = true, onClose, has
45314
45687
  size: ButtonSize.ICON_MD
45315
45688
  })]
45316
45689
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
45317
- className: "flex w-full flex-1 flex-col",
45318
- children
45690
+ className: cn$2("flex min-h-0 w-full flex-1 flex-col", isScrollable === true && "overflow-auto", isScrollable === "y" && "overflow-y-auto overflow-x-hidden", isScrollable === "x" && "overflow-x-auto overflow-y-hidden", !isScrollable && "overflow-visible"),
45691
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
45692
+ className: cn$2("h-full w-full", contentPaddingClass),
45693
+ children
45694
+ })
45319
45695
  })]
45320
45696
  })
45321
45697
  }), containerElement);
@@ -46859,14 +47235,6 @@ const _LjElj9YzZe66ZBgugc8w = {
46859
47235
  content: content$b,
46860
47236
  localIds: localIds$b
46861
47237
  };
46862
- const renameKey = (obj, oldKey, newKey) => {
46863
- const newObj = { ...obj };
46864
- for (const key2 of Object.keys(obj)) if (key2 === oldKey) {
46865
- newObj[newKey] = obj[oldKey];
46866
- delete newObj[oldKey];
46867
- } else newObj[key2] = obj[key2];
46868
- return newObj;
46869
- };
46870
47238
  const ContentEditorInput$1 = ({ children, onContentChange, disabled, validate, additionalButtons, ...props }) => {
46871
47239
  const [newValue, setNewValue] = reactExports.useState(children);
46872
47240
  const [resetIncrementor, setResetIncrementor] = reactExports.useState(0);
@@ -47028,6 +47396,14 @@ const ContentEditorTextArea$1 = ({ children, onContentChange, disabled, validate
47028
47396
  })]
47029
47397
  }, children);
47030
47398
  };
47399
+ const renameKey = (obj, oldKey, newKey) => {
47400
+ const newObj = { ...obj };
47401
+ for (const key2 of Object.keys(obj)) if (key2 === oldKey) {
47402
+ newObj[newKey] = obj[oldKey];
47403
+ delete newObj[oldKey];
47404
+ } else newObj[key2] = obj[key2];
47405
+ return newObj;
47406
+ };
47031
47407
  const extractInitialState = (value) => {
47032
47408
  let comparator;
47033
47409
  let numberValue;
@@ -47218,29 +47594,32 @@ const TranslationTextEditor = ({
47218
47594
  className: "w-full",
47219
47595
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", {
47220
47596
  className: "flex w-full flex-col gap-2",
47221
- children: localesList.map((translationKey) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47222
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47223
- className: "mt-2 w-full p-2 text-xs",
47224
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47225
- className: "flex w-full",
47226
- children: getLocaleName(translationKey, locale)
47227
- })
47228
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47229
- className: "flex",
47230
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47231
- className: "flex w-full",
47232
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47233
- section: content2[translationKey] ?? getEmptyNode(content2[defaultLocale]),
47234
- keyPath: [...keyPath, {
47235
- type: NodeType.Translation,
47236
- key: translationKey
47237
- }],
47238
- dictionary,
47239
- renderSection
47597
+ children: localesList.map((translationKey) => {
47598
+ const uniqueKey = `${JSON.stringify(keyPath)}-translation-${translationKey}`;
47599
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47600
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47601
+ className: "mt-2 w-full p-2 text-xs",
47602
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47603
+ className: "flex w-full",
47604
+ children: getLocaleName(translationKey, locale)
47240
47605
  })
47241
- })
47242
- })]
47243
- }, translationKey))
47606
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47607
+ className: "flex",
47608
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47609
+ className: "flex w-full",
47610
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47611
+ section: content2[translationKey] ?? getEmptyNode(content2[defaultLocale]),
47612
+ keyPath: [...keyPath, {
47613
+ type: NodeType.Translation,
47614
+ key: translationKey
47615
+ }],
47616
+ dictionary,
47617
+ renderSection
47618
+ })
47619
+ })
47620
+ })]
47621
+ }, uniqueKey);
47622
+ })
47244
47623
  })
47245
47624
  });
47246
47625
  };
@@ -47270,6 +47649,7 @@ const EnumerationTextEditor = ({
47270
47649
  type: NodeType.Enumeration,
47271
47650
  key: enumKey
47272
47651
  }];
47652
+ const uniqueKey = `${JSON.stringify(keyPath)}-enumeration-${enumKey}`;
47273
47653
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47274
47654
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47275
47655
  className: "mt-2 w-full",
@@ -47319,7 +47699,7 @@ const EnumerationTextEditor = ({
47319
47699
  })
47320
47700
  })
47321
47701
  })]
47322
- }, enumKey);
47702
+ }, uniqueKey);
47323
47703
  })
47324
47704
  })
47325
47705
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
@@ -47349,29 +47729,32 @@ const ConditionTextEditor = ({
47349
47729
  className: "w-full",
47350
47730
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", {
47351
47731
  className: "flex w-full flex-col gap-2",
47352
- children: ["true", "false", "fallback"].map((condKey) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47353
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47354
- className: "mt-2 block w-full p-2 text-xs",
47355
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47356
- className: "flex w-full",
47357
- children: String(condKey)
47358
- })
47359
- }, condKey), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47360
- className: "block w-full",
47361
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47362
- className: "flex w-full",
47363
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47364
- section: content2[condKey] ?? getEmptyNode(content2.true),
47365
- keyPath: [...keyPath, {
47366
- type: NodeType.Condition,
47367
- key: condKey
47368
- }],
47369
- dictionary,
47370
- renderSection
47732
+ children: ["true", "false", "fallback"].map((condKey) => {
47733
+ const uniqueKey = `${JSON.stringify(keyPath)}-condition-${condKey}`;
47734
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47735
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47736
+ className: "mt-2 block w-full p-2 text-xs",
47737
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47738
+ className: "flex w-full",
47739
+ children: String(condKey)
47371
47740
  })
47372
- })
47373
- }, condKey)]
47374
- }, condKey))
47741
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47742
+ className: "block w-full",
47743
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47744
+ className: "flex w-full",
47745
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47746
+ section: content2[condKey] ?? getEmptyNode(content2.true),
47747
+ keyPath: [...keyPath, {
47748
+ type: NodeType.Condition,
47749
+ key: condKey
47750
+ }],
47751
+ dictionary,
47752
+ renderSection
47753
+ })
47754
+ })
47755
+ })]
47756
+ }, uniqueKey);
47757
+ })
47375
47758
  })
47376
47759
  });
47377
47760
  };
@@ -47386,29 +47769,32 @@ const GenderTextEditor = ({
47386
47769
  className: "w-full",
47387
47770
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", {
47388
47771
  className: "flex w-full flex-col gap-2",
47389
- children: ["male", "female", "fallback"].map((condKey) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47390
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47391
- className: "mt-2 block w-full p-2 text-xs",
47392
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47393
- className: "flex w-full",
47394
- children: String(condKey)
47395
- })
47396
- }, condKey), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47397
- className: "block w-full",
47398
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47399
- className: "flex w-full",
47400
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47401
- section: content2[condKey] ?? getEmptyNode(content2.male),
47402
- keyPath: [...keyPath, {
47403
- type: NodeType.Gender,
47404
- key: condKey
47405
- }],
47406
- dictionary,
47407
- renderSection
47772
+ children: ["male", "female", "fallback"].map((condKey) => {
47773
+ const uniqueKey = `${JSON.stringify(keyPath)}-gender-${condKey}`;
47774
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47775
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47776
+ className: "mt-2 block w-full p-2 text-xs",
47777
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47778
+ className: "flex w-full",
47779
+ children: String(condKey)
47408
47780
  })
47409
- })
47410
- }, condKey)]
47411
- }, condKey))
47781
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47782
+ className: "block w-full",
47783
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47784
+ className: "flex w-full",
47785
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47786
+ section: content2[condKey] ?? getEmptyNode(content2.male),
47787
+ keyPath: [...keyPath, {
47788
+ type: NodeType.Gender,
47789
+ key: condKey
47790
+ }],
47791
+ dictionary,
47792
+ renderSection
47793
+ })
47794
+ })
47795
+ })]
47796
+ }, uniqueKey);
47797
+ })
47412
47798
  })
47413
47799
  });
47414
47800
  };
@@ -47431,50 +47817,53 @@ const ArrayTextEditor = ({
47431
47817
  className: "w-full",
47432
47818
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", {
47433
47819
  className: "flex w-full flex-col gap-2",
47434
- children: section.map((subSection, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47435
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47436
- className: "mt-2 w-full p-2",
47437
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47438
- className: "flex w-full",
47439
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
47440
- className: "flex w-full items-center justify-between gap-2",
47441
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
47442
- className: "text-xs",
47443
- children: String(index2)
47444
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
47445
- label: removeElement.label.value,
47446
- variant: "hoverable",
47447
- size: "sm",
47448
- color: "error",
47449
- className: "ml-auto text-neutral hover:text-error",
47450
- onClick: () => {
47451
- const newKeyPath = [...keyPath, {
47452
- type: NodeType.Array,
47453
- key: index2
47454
- }];
47455
- addEditedContent(dictionary.localId, void 0, newKeyPath);
47456
- },
47457
- Icon: Trash,
47458
- children: removeElement.text
47459
- })]
47820
+ children: section.map((subSection, index2) => {
47821
+ const uniqueKey = `${JSON.stringify(keyPath)}-array-${index2}`;
47822
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47823
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47824
+ className: "mt-2 w-full p-2",
47825
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47826
+ className: "flex w-full",
47827
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
47828
+ className: "flex w-full items-center justify-between gap-2",
47829
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
47830
+ className: "text-xs",
47831
+ children: String(index2)
47832
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
47833
+ label: removeElement.label.value,
47834
+ variant: "hoverable",
47835
+ size: "sm",
47836
+ color: "error",
47837
+ className: "ml-auto text-neutral hover:text-error",
47838
+ onClick: () => {
47839
+ const newKeyPath = [...keyPath, {
47840
+ type: NodeType.Array,
47841
+ key: index2
47842
+ }];
47843
+ addEditedContent(dictionary.localId, void 0, newKeyPath);
47844
+ },
47845
+ Icon: Trash,
47846
+ children: removeElement.text
47847
+ })]
47848
+ })
47460
47849
  })
47461
- })
47462
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47463
- className: "block w-full",
47464
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47465
- className: "flex w-full",
47466
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47467
- section: subSection ?? getEmptyNode(section[0]),
47468
- keyPath: [...keyPath, {
47469
- type: NodeType.Array,
47470
- key: index2
47471
- }],
47472
- dictionary,
47473
- renderSection
47850
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47851
+ className: "block w-full",
47852
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47853
+ className: "flex w-full",
47854
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextEditorContainer, {
47855
+ section: subSection ?? getEmptyNode(section[0]),
47856
+ keyPath: [...keyPath, {
47857
+ type: NodeType.Array,
47858
+ key: index2
47859
+ }],
47860
+ dictionary,
47861
+ renderSection
47862
+ })
47474
47863
  })
47475
- })
47476
- })]
47477
- }, JSON.stringify(subSection)))
47864
+ })]
47865
+ }, uniqueKey);
47866
+ })
47478
47867
  })
47479
47868
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
47480
47869
  label: addNewElement.label.value,
@@ -47512,6 +47901,7 @@ const ObjectTextEditor = ({
47512
47901
  const typedSection = section;
47513
47902
  const firstKey = Object.keys(typedSection)[0];
47514
47903
  const subSection = typedSection[key2] ?? getEmptyNode(typedSection[firstKey]);
47904
+ const uniqueKey = `${JSON.stringify(keyPath)}-object-${key2}`;
47515
47905
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
47516
47906
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47517
47907
  className: "mt-2 p-2 text-xs",
@@ -47519,7 +47909,7 @@ const ObjectTextEditor = ({
47519
47909
  className: "flex w-full",
47520
47910
  children: String(key2)
47521
47911
  })
47522
- }, JSON.stringify(subSection)), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47912
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("tr", {
47523
47913
  className: "block w-full",
47524
47914
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", {
47525
47915
  className: "flex w-full",
@@ -47530,8 +47920,8 @@ const ObjectTextEditor = ({
47530
47920
  renderSection
47531
47921
  })
47532
47922
  })
47533
- }, JSON.stringify(subSection))]
47534
- }, key2);
47923
+ })]
47924
+ }, uniqueKey);
47535
47925
  })
47536
47926
  })
47537
47927
  })
@@ -48023,10 +48413,11 @@ const FormItem = ({ id: idProp, ...props }) => {
48023
48413
  const generatedId = reactExports.useId();
48024
48414
  const stableId = idProp ?? generatedId;
48025
48415
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormItemContext, {
48026
- value: reactExports.useMemo(() => ({ id: stableId }), [stableId]),
48416
+ value: { id: stableId },
48027
48417
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
48028
48418
  className: "flex flex-col gap-2 p-2",
48029
48419
  id: stableId,
48420
+ suppressHydrationWarning: true,
48030
48421
  ...props
48031
48422
  })
48032
48423
  });
@@ -52936,6 +53327,7 @@ const FormLabelLayout = ({ children, isRequired, info, htmlFor, className }) =>
52936
53327
  children: [children && /* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabel, {
52937
53328
  htmlFor,
52938
53329
  id: `${htmlFor}-label`,
53330
+ suppressHydrationWarning: true,
52939
53331
  className: clsx("font-bold", className),
52940
53332
  children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredStar, { isRequired })]
52941
53333
  }), info && /* @__PURE__ */ jsxRuntimeExports.jsx(InformationTag, { content: info })]
@@ -55447,7 +55839,7 @@ const ObjectView = ({
55447
55839
  }],
55448
55840
  dictionaryLocalId
55449
55841
  })
55450
- }, key2))
55842
+ }, `${JSON.stringify(keyPath)}-object-${key2}`))
55451
55843
  }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
55452
55844
  label: addNodeButton.label.value,
55453
55845
  variant: ButtonVariant.HOVERABLE,
@@ -55585,203 +55977,6 @@ const DictionaryFieldEditor = ({
55585
55977
  })
55586
55978
  });
55587
55979
  };
55588
- const getBreakpointFromSize = (breakpoint) => {
55589
- switch (breakpoint) {
55590
- case "xs":
55591
- return 480;
55592
- case "sm":
55593
- return 640;
55594
- case "md":
55595
- return 768;
55596
- case "lg":
55597
- return 1024;
55598
- case "xl":
55599
- return 1280;
55600
- case "2xl":
55601
- return 1536;
55602
- default:
55603
- return breakpoint;
55604
- }
55605
- };
55606
- const checkIsMobileUserAgent = () => {
55607
- if (typeof window === "undefined") return;
55608
- const userAgent = window.navigator?.userAgent;
55609
- if (typeof userAgent === "undefined") return;
55610
- return /android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(userAgent);
55611
- };
55612
- const checkIsIOS = () => {
55613
- if (typeof window === "undefined") return;
55614
- const userAgent = window.navigator?.userAgent;
55615
- if (typeof userAgent === "undefined") return;
55616
- return /iP(?:hone|ad|od)/.test(userAgent);
55617
- };
55618
- const checkIsMac = () => {
55619
- if (typeof window === "undefined") return;
55620
- const userAgent = window.navigator?.userAgent;
55621
- if (typeof userAgent === "undefined") return;
55622
- return /Macintosh|MacIntel|Mac OS X/.test(userAgent);
55623
- };
55624
- const checkIsMobileScreen = (breakpoint) => {
55625
- if (typeof window === "undefined") return;
55626
- return (window?.innerWidth ?? 0) <= breakpoint;
55627
- };
55628
- const calculateIsMobile = (breakpoint = "md") => {
55629
- const breakpointValue = getBreakpointFromSize(breakpoint);
55630
- const isMobileUserAgent = checkIsMobileUserAgent();
55631
- const isMobileScreen = checkIsMobileScreen(breakpointValue);
55632
- return {
55633
- isMobileScreen,
55634
- isMobileUserAgent,
55635
- isMobile: isMobileScreen ?? isMobileUserAgent,
55636
- isIOS: checkIsIOS(),
55637
- isMac: checkIsMac()
55638
- };
55639
- };
55640
- const useDevice = (breakpoint = "md") => {
55641
- const [result, setResult] = reactExports.useState(calculateIsMobile(breakpoint));
55642
- reactExports.useEffect(() => {
55643
- const handleResize = () => {
55644
- setResult(calculateIsMobile(breakpoint));
55645
- };
55646
- window.addEventListener("resize", handleResize, { passive: true });
55647
- return () => window.removeEventListener("resize", handleResize);
55648
- }, [breakpoint]);
55649
- return result;
55650
- };
55651
- const parseShortcut = (shortcut) => {
55652
- return shortcut.split(" + ").map((key2) => key2.trim());
55653
- };
55654
- const normalizeKey = (key2) => {
55655
- return {
55656
- "⌘": "Meta",
55657
- Ctrl: "Control",
55658
- Control: "Control",
55659
- Alt: "Alt",
55660
- "⌥": "Alt",
55661
- Shift: "Shift",
55662
- Meta: "Meta",
55663
- "↑": "ArrowUp",
55664
- "↓": "ArrowDown",
55665
- "←": "ArrowLeft",
55666
- "→": "ArrowRight",
55667
- ArrowUp: "ArrowUp",
55668
- ArrowDown: "ArrowDown",
55669
- ArrowLeft: "ArrowLeft",
55670
- ArrowRight: "ArrowRight"
55671
- }[key2] || key2;
55672
- };
55673
- const matchesShortcut = (event, keys) => {
55674
- const normalizedKeys = keys.map(normalizeKey);
55675
- const hasModifiers = {
55676
- Meta: normalizedKeys.includes("Meta"),
55677
- Control: normalizedKeys.includes("Control"),
55678
- Alt: normalizedKeys.includes("Alt"),
55679
- Shift: normalizedKeys.includes("Shift")
55680
- };
55681
- if (hasModifiers.Meta !== event.metaKey || hasModifiers.Control !== event.ctrlKey || hasModifiers.Alt !== event.altKey || hasModifiers.Shift !== event.shiftKey) return false;
55682
- const nonModifierKey = keys.find((key2) => ![
55683
- "⌘",
55684
- "Ctrl",
55685
- "Control",
55686
- "Alt",
55687
- "⌥",
55688
- "Shift",
55689
- "Meta"
55690
- ].includes(normalizeKey(key2)));
55691
- if (!nonModifierKey) return false;
55692
- const normalizedNonModifierKey = normalizeKey(nonModifierKey);
55693
- if (normalizedNonModifierKey.startsWith("Arrow")) return event.key === normalizedNonModifierKey;
55694
- return event.key.toLowerCase() === normalizedNonModifierKey.toLowerCase();
55695
- };
55696
- const getDisplayKey = (key2) => {
55697
- return {
55698
- ArrowUp: "↑",
55699
- ArrowDown: "↓",
55700
- ArrowLeft: "←",
55701
- ArrowRight: "→"
55702
- }[key2] || key2;
55703
- };
55704
- const getDisplayShortcut = (shortcut, isMac) => {
55705
- let result = shortcut;
55706
- if (isMac) {
55707
- result = result.replace(/Ctrl/g, "⌘");
55708
- result = result.replace(/Alt/g, "⌥");
55709
- } else {
55710
- result = result.replace(/⌘/g, "Ctrl");
55711
- result = result.replace(/⌥/g, "Alt");
55712
- }
55713
- result = result.replace(/ArrowUp/g, "↑");
55714
- result = result.replace(/ArrowDown/g, "↓");
55715
- result = result.replace(/ArrowLeft/g, "←");
55716
- result = result.replace(/ArrowRight/g, "→");
55717
- return result;
55718
- };
55719
- const KeyboardShortcut = ({ shortcut, onTriggered, display = true, className, size: size2 = "md" }) => {
55720
- const { isMac } = useDevice();
55721
- const keys = parseShortcut(getDisplayShortcut(shortcut, isMac ?? false));
55722
- const [pressedKeys, setPressedKeys] = reactExports.useState(/* @__PURE__ */ new Set());
55723
- reactExports.useEffect(() => {
55724
- const handleKeyDown = (event) => {
55725
- const target = event.target;
55726
- const isInputField = target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable;
55727
- const currentKey = event.key;
55728
- const normalizedEventKeys = /* @__PURE__ */ new Set();
55729
- if (event.metaKey) normalizedEventKeys.add("⌘");
55730
- if (event.ctrlKey) normalizedEventKeys.add("Ctrl");
55731
- if (event.altKey) normalizedEventKeys.add(isMac ? "⌥" : "Alt");
55732
- if (event.shiftKey) normalizedEventKeys.add("Shift");
55733
- if (currentKey.startsWith("Arrow")) {
55734
- normalizedEventKeys.add(currentKey);
55735
- normalizedEventKeys.add(getDisplayKey(currentKey));
55736
- } else normalizedEventKeys.add(currentKey.toUpperCase());
55737
- setPressedKeys(normalizedEventKeys);
55738
- if (onTriggered && matchesShortcut(event, keys)) {
55739
- const isEscapeShortcut = keys.includes("Escape");
55740
- if (isInputField && !isEscapeShortcut) return;
55741
- event.preventDefault();
55742
- onTriggered();
55743
- }
55744
- };
55745
- const handleKeyUp = () => {
55746
- setPressedKeys(/* @__PURE__ */ new Set());
55747
- };
55748
- window.addEventListener("keydown", handleKeyDown);
55749
- window.addEventListener("keyup", handleKeyUp);
55750
- window.addEventListener("blur", handleKeyUp);
55751
- return () => {
55752
- window.removeEventListener("keydown", handleKeyDown);
55753
- window.removeEventListener("keyup", handleKeyUp);
55754
- window.removeEventListener("blur", handleKeyUp);
55755
- };
55756
- }, [
55757
- keys,
55758
- onTriggered,
55759
- isMac
55760
- ]);
55761
- if (!display) return null;
55762
- const isKeyPressed = (key2) => {
55763
- const upperKey = key2.toUpperCase();
55764
- const normalizedKey = normalizeKey(key2);
55765
- return pressedKeys.has(key2) || pressedKeys.has(upperKey) || pressedKeys.has(normalizedKey) || key2 === "⌘" && pressedKeys.has("Meta") || key2 === "Ctrl" && pressedKeys.has("Control") || key2 === "⌥" && pressedKeys.has("Alt") || key2 === "Alt" && pressedKeys.has("Alt") || key2 === "←" && pressedKeys.has("ArrowLeft") || key2 === "→" && pressedKeys.has("ArrowRight") || key2 === "↑" && pressedKeys.has("ArrowUp") || key2 === "↓" && pressedKeys.has("ArrowDown");
55766
- };
55767
- return /* @__PURE__ */ jsxRuntimeExports.jsx("kbd", {
55768
- className: cn$2("inline-flex items-center justify-center gap-0.5 p-0.5", "rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl", "font-medium font-sans", "border-1 border-neutral/20 text-neutral", size2 === "sm" && "text-xs", size2 === "md" && "text-sm", size2 === "lg" && "text-base", className),
55769
- children: keys.map((key2, index2) => {
55770
- const keyId = `${key2}-${index2}-${shortcut}`;
55771
- const displayKey = getDisplayKey(key2);
55772
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
55773
- className: "inline-flex items-center",
55774
- children: [index2 > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
55775
- className: "text-neutral/50",
55776
- children: "+"
55777
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
55778
- className: cn$2("min-w-4 px-0.5", isKeyPressed(key2) && "scale-120 font-bold text-text"),
55779
- children: displayKey
55780
- })]
55781
- }, keyId);
55782
- })
55783
- });
55784
- };
55785
55980
  const MaxWidthSmoother = ({ children, isHidden: isHidden2, minWidth = 0, align = "left", className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
55786
55981
  className: cn$2("relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out", isHidden2 ? "" : "grid-cols-[1fr]", className),
55787
55982
  "aria-hidden": isHidden2,
@@ -55989,6 +56184,7 @@ let TagRoundedSize = /* @__PURE__ */ (function(TagRoundedSize$1) {
55989
56184
  return TagRoundedSize$1;
55990
56185
  })({});
55991
56186
  let TagColor = /* @__PURE__ */ (function(TagColor$1) {
56187
+ TagColor$1["PRIMARY"] = "primary";
55992
56188
  TagColor$1["SUCCESS"] = "success";
55993
56189
  TagColor$1["ERROR"] = "error";
55994
56190
  TagColor$1["WARNING"] = "warning";
@@ -56038,6 +56234,7 @@ const containerVariants = cva("w-fit backdrop-blur", {
56038
56234
  [`${TagRoundedSize.FULL}`]: "rounded-full"
56039
56235
  },
56040
56236
  color: {
56237
+ [`${TagColor.PRIMARY}`]: "border-primary bg-primary/10 text-primary",
56041
56238
  [`${TagColor.SUCCESS}`]: "border-success bg-success/10 text-success",
56042
56239
  [`${TagColor.ERROR}`]: "border-error bg-error/10 text-error",
56043
56240
  [`${TagColor.WARNING}`]: "border-warning bg-warning/10 text-warning",
@@ -56891,9 +57088,9 @@ const Toaster = () => {
56891
57088
  const defaultQueryOptions = {
56892
57089
  queries: {
56893
57090
  retry: 1,
56894
- staleTime: 0,
57091
+ staleTime: 30 * 1e3,
56895
57092
  gcTime: 300 * 1e3,
56896
- refetchOnMount: "always",
57093
+ refetchOnMount: true,
56897
57094
  refetchOnWindowFocus: false,
56898
57095
  refetchOnReconnect: false
56899
57096
  },
@@ -58049,6 +58246,9 @@ const NoApplicationURLView = () => {
58049
58246
  label: documentationLink.label.value,
58050
58247
  href: "https://intlayer.org/doc/concept/configuration#editor-configuration",
58051
58248
  color: "text",
58249
+ variant: "button",
58250
+ className: "ml-auto",
58251
+ isExternalLink: true,
58052
58252
  children: documentationLink.text
58053
58253
  });
58054
58254
  $2[4] = documentationLink.label.value;
@@ -58119,7 +58319,7 @@ const IframeController = (t0) => {
58119
58319
  if (!editor2.applicationURL) {
58120
58320
  let t42;
58121
58321
  if ($2[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
58122
- t42 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { className: "flex max-w-xl flex-col gap-4 p-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(NoApplicationURLView, {}) }) });
58322
+ t42 = /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { className: "max-w-xl", padding: "xl", roundedSize: "2xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx(NoApplicationURLView, {}) });
58123
58323
  $2[4] = t42;
58124
58324
  } else {
58125
58325
  t42 = $2[4];