@intlayer/design-system 5.1.1 → 5.1.3

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 (74) hide show
  1. package/dist/.vite/manifest.json +9 -9
  2. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +1 -1
  3. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +1 -1
  4. package/dist/components/Container/index.cjs +4 -1
  5. package/dist/components/Container/index.cjs.map +1 -1
  6. package/dist/components/Container/index.d.ts +1 -1
  7. package/dist/components/Container/index.d.ts.map +1 -1
  8. package/dist/components/Container/index.mjs +4 -1
  9. package/dist/components/Container/index.mjs.map +1 -1
  10. package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +13 -3
  11. package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
  12. package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts +1 -0
  13. package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -1
  14. package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +13 -3
  15. package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
  16. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs +9 -4
  17. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs.map +1 -1
  18. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts +1 -0
  19. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts.map +1 -1
  20. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs +9 -4
  21. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs.map +1 -1
  22. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +47 -12
  23. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +1 -0
  25. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
  26. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +47 -12
  27. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  28. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +5 -3
  29. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  30. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts +5 -1
  31. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
  32. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +5 -3
  33. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  34. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
  35. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
  36. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +1 -1
  37. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  38. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
  39. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  40. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +1 -2
  41. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  42. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  43. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -2
  44. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  45. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +1 -1
  46. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -1
  47. package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +6 -16
  48. package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
  49. package/dist/components/DictionaryFieldEditor/StructureEditor.d.ts.map +1 -1
  50. package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +7 -17
  51. package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
  52. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +6 -5
  53. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
  54. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts +7 -0
  55. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -1
  56. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +9 -8
  57. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
  58. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +2 -1
  59. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  60. package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
  61. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +3 -2
  62. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  63. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  64. package/dist/components/MarkDownRender/index.d.ts +1 -1
  65. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  66. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  67. package/dist/{index-BKE0uywA.js → index-BTDHuTxL.js} +2 -2
  68. package/dist/index-BTDHuTxL.js.map +1 -0
  69. package/dist/{index-CsenS2hX.cjs → index-Db5Dym4h.cjs} +2 -2
  70. package/dist/index-Db5Dym4h.cjs.map +1 -0
  71. package/dist/tailwind.css +1 -1
  72. package/package.json +20 -20
  73. package/dist/index-BKE0uywA.js.map +0 -1
  74. package/dist/index-CsenS2hX.cjs.map +0 -1
@@ -55,8 +55,8 @@
55
55
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts"
56
56
  ]
57
57
  },
58
- "_index-BKE0uywA.js": {
59
- "file": "index-BKE0uywA.js",
58
+ "_index-BTDHuTxL.js": {
59
+ "file": "index-BTDHuTxL.js",
60
60
  "name": "index"
61
61
  },
62
62
  "_index-BUe-qmA0.js": {
@@ -75,8 +75,8 @@
75
75
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts"
76
76
  ]
77
77
  },
78
- "_index-CsenS2hX.cjs": {
79
- "file": "index-CsenS2hX.cjs",
78
+ "_index-Db5Dym4h.cjs": {
79
+ "file": "index-Db5Dym4h.cjs",
80
80
  "name": "index"
81
81
  },
82
82
  "_index-cg9H6eBs.cjs": {
@@ -222,7 +222,7 @@
222
222
  "src": "src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx",
223
223
  "isEntry": true,
224
224
  "imports": [
225
- "_index-CsenS2hX.cjs",
225
+ "_index-Db5Dym4h.cjs",
226
226
  "src/components/Button/Button.tsx",
227
227
  "src/components/Auth/ExternalsLoginButtons/assets/GithubLogo.tsx",
228
228
  "src/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.tsx",
@@ -831,6 +831,7 @@
831
831
  "src/components/SwitchSelector/index.tsx",
832
832
  "src/components/LocaleSwitcherContentDropDown/localeSwitcher.content.ts",
833
833
  "src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx",
834
+ "src/components/MarkDownRender/index.tsx",
834
835
  "src/components/DictionaryFieldEditor/EnumKeyInput.tsx",
835
836
  "src/components/DictionaryFieldEditor/getIsEditableSection.ts",
836
837
  "src/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.ts"
@@ -864,7 +865,7 @@
864
865
  "isEntry": true,
865
866
  "imports": [
866
867
  "src/hooks/intlayerAPIHooks.ts",
867
- "_index-CsenS2hX.cjs",
868
+ "_index-Db5Dym4h.cjs",
868
869
  "src/components/Button/Button.tsx",
869
870
  "src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
870
871
  "src/components/Form/FormBase.tsx",
@@ -919,7 +920,7 @@
919
920
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
920
921
  "src/hooks/useAsync/useAsyncStateStore.tsx",
921
922
  "src/hooks/intlayerAPIHooks.ts",
922
- "_index-CsenS2hX.cjs",
923
+ "_index-Db5Dym4h.cjs",
923
924
  "src/components/Button/Button.tsx",
924
925
  "src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
925
926
  "src/components/Form/FormBase.tsx",
@@ -1060,7 +1061,7 @@
1060
1061
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
1061
1062
  "src/hooks/useAsync/useAsyncStateStore.tsx",
1062
1063
  "src/hooks/intlayerAPIHooks.ts",
1063
- "_index-CsenS2hX.cjs",
1064
+ "_index-Db5Dym4h.cjs",
1064
1065
  "src/components/Button/Button.tsx",
1065
1066
  "src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
1066
1067
  "src/components/Form/FormBase.tsx",
@@ -1099,7 +1100,6 @@
1099
1100
  "src": "src/components/DictionaryFieldEditor/StructureEditor.tsx",
1100
1101
  "isEntry": true,
1101
1102
  "imports": [
1102
- "src/components/Container/index.tsx",
1103
1103
  "src/components/DictionaryFieldEditor/StructureView/StructureView.tsx"
1104
1104
  ]
1105
1105
  },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const reactIntlayer = require("react-intlayer");
6
- const index = require("../../../index-CsenS2hX.cjs");
6
+ const index = require("../../../index-Db5Dym4h.cjs");
7
7
  require("@intlayer/config/client");
8
8
  const components_Button_Button = require("../../Button/Button.cjs");
9
9
  const components_Auth_ExternalsLoginButtons_assets_GithubLogo = require("./assets/GithubLogo.cjs");
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useDictionary } from "react-intlayer";
4
- import { i as intlayerAPI } from "../../../index-BKE0uywA.js";
4
+ import { i as intlayerAPI } from "../../../index-BTDHuTxL.js";
5
5
  import "@intlayer/config/client";
6
6
  import { Button } from "../../Button/Button.mjs";
7
7
  import { GithubLogo } from "./assets/GithubLogo.mjs";
@@ -55,7 +55,10 @@ const containerVariants = classVarianceAuthority.cva(
55
55
  primary: "border-primary dark:border-primary-dark",
56
56
  secondary: "border-secondary dark:border-secondary-dark",
57
57
  neutral: "border-neutral dark:border-neutral-dark",
58
- text: "border-text dark:border-text-dark"
58
+ text: "border-text dark:border-text-dark",
59
+ error: "border-error dark:border-error-dark",
60
+ warning: "border-warning dark:border-warning-dark",
61
+ success: "border-success dark:border-success-dark"
59
62
  },
60
63
  background: {
61
64
  none: "bg-inherit",
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: '',\n full: 'bg-none',\n sm: 'dark:bg-opacity-90',\n md: 'dark:bg-opacity-70',\n lg: 'dark:bg-opacity-40',\n xl: 'dark:bg-opacity-20',\n },\n backgroundColor: {\n none: 'bg-card dark:bg-card-dark',\n primary: 'bg-primary dark:bg-primary-dark',\n secondary: 'bg-secondary dark:bg-secondary-dark',\n neutral: 'bg-neutral dark:bg-neutral-dark',\n text: 'bg-text dark:bg-text-dark',\n card: 'bg-card dark:bg-card-dark',\n contrast: 'bg-background-dark dark:bg-background',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!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',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n backgroundColor: 'card',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n backgroundColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n backgroundColor,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n\nContainer.displayName = 'Container';\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASA,MAAM,oBAAoBA,uBAAA;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,iBAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,WACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AASO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,UAAU,cAAc;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: '',\n full: 'bg-none',\n sm: 'dark:bg-opacity-90',\n md: 'dark:bg-opacity-70',\n lg: 'dark:bg-opacity-40',\n xl: 'dark:bg-opacity-20',\n },\n backgroundColor: {\n none: 'bg-card dark:bg-card-dark',\n primary: 'bg-primary dark:bg-primary-dark',\n secondary: 'bg-secondary dark:bg-secondary-dark',\n neutral: 'bg-neutral dark:bg-neutral-dark',\n text: 'bg-text dark:bg-text-dark',\n card: 'bg-card dark:bg-card-dark',\n contrast: 'bg-background-dark dark:bg-background',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n error: 'border-error dark:border-error-dark',\n warning: 'border-warning dark:border-warning-dark',\n success: 'border-success dark:border-success-dark',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!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',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n backgroundColor: 'card',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n backgroundColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n backgroundColor,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n\nContainer.displayName = 'Container';\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASA,MAAM,oBAAoBA,uBAAA;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,iBAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,WACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AASO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,UAAU,cAAc;;"}
@@ -7,7 +7,7 @@ declare const containerVariants: (props?: ({
7
7
  padding?: "sm" | "md" | "lg" | "xl" | "none" | null | undefined;
8
8
  separator?: "x" | "y" | "without" | "both" | null | undefined;
9
9
  border?: "none" | "with" | null | undefined;
10
- borderColor?: "text" | "primary" | "secondary" | "neutral" | null | undefined;
10
+ borderColor?: "text" | "success" | "warning" | "error" | "primary" | "secondary" | "neutral" | null | undefined;
11
11
  background?: "none" | "hoverable" | "with" | null | undefined;
12
12
  gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | null | undefined;
13
13
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,QAAA,MAAM,iBAAiB;;;;;;;;;;8EAiFtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,QAAQ,CAAC,CACvD,GACC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAgCxC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,QAAA,MAAM,iBAAiB;;;;;;;;;;8EAoFtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,QAAQ,CAAC,CACvD,GACC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAgCxC,CAAC"}
@@ -53,7 +53,10 @@ const containerVariants = cva(
53
53
  primary: "border-primary dark:border-primary-dark",
54
54
  secondary: "border-secondary dark:border-secondary-dark",
55
55
  neutral: "border-neutral dark:border-neutral-dark",
56
- text: "border-text dark:border-text-dark"
56
+ text: "border-text dark:border-text-dark",
57
+ error: "border-error dark:border-error-dark",
58
+ warning: "border-warning dark:border-warning-dark",
59
+ success: "border-success dark:border-success-dark"
57
60
  },
58
61
  background: {
59
62
  none: "bg-inherit",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: '',\n full: 'bg-none',\n sm: 'dark:bg-opacity-90',\n md: 'dark:bg-opacity-70',\n lg: 'dark:bg-opacity-40',\n xl: 'dark:bg-opacity-20',\n },\n backgroundColor: {\n none: 'bg-card dark:bg-card-dark',\n primary: 'bg-primary dark:bg-primary-dark',\n secondary: 'bg-secondary dark:bg-secondary-dark',\n neutral: 'bg-neutral dark:bg-neutral-dark',\n text: 'bg-text dark:bg-text-dark',\n card: 'bg-card dark:bg-card-dark',\n contrast: 'bg-background-dark dark:bg-background',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!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',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n backgroundColor: 'card',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n backgroundColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n backgroundColor,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n\nContainer.displayName = 'Container';\n"],"names":[],"mappings":";;;AASA,MAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,iBAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,WACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AASO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,UAAU,cAAc;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type PropsWithChildren,\n type HTMLAttributes,\n type FC,\n type DetailedHTMLProps,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nconst containerVariants = cva(\n 'flex flex-col p-10 text-text backdrop-blur dark:text-text-dark',\n {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: '',\n full: 'bg-none',\n sm: 'dark:bg-opacity-90',\n md: 'dark:bg-opacity-70',\n lg: 'dark:bg-opacity-40',\n xl: 'dark:bg-opacity-20',\n },\n backgroundColor: {\n none: 'bg-card dark:bg-card-dark',\n primary: 'bg-primary dark:bg-primary-dark',\n secondary: 'bg-secondary dark:bg-secondary-dark',\n neutral: 'bg-neutral dark:bg-neutral-dark',\n text: 'bg-text dark:bg-text-dark',\n card: 'bg-card dark:bg-card-dark',\n contrast: 'bg-background-dark dark:bg-background',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20 dark:divide-text-dark/20',\n y: 'divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n both: 'divide-x divide-y divide-dashed divide-text/20 dark:divide-text-dark/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary dark:border-primary-dark',\n secondary: 'border-secondary dark:border-secondary-dark',\n neutral: 'border-neutral dark:border-neutral-dark',\n text: 'border-text dark:border-text-dark',\n error: 'border-error dark:border-error-dark',\n warning: 'border-warning dark:border-warning-dark',\n success: 'border-success dark:border-success-dark',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!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',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n backgroundColor: 'card',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n }\n);\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n backgroundColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n backgroundColor,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n\nContainer.displayName = 'Container';\n"],"names":[],"mappings":";;;AASA,MAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,aAAa;AAAA,QACX,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,iBAAiB;AAAA,QACf,MAAM;AAAA,QACN,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,QACN,UAAU;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,WAAW;AAAA,QACT,SAAS;AAAA,QACT,GAAG;AAAA,QACH,GAAG;AAAA,QACH,MAAM;AAAA,MACR;AAAA,MACA,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,MACA,YAAY;AAAA,QACV,MAAM;AAAA,QACN,WACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,KAAK;AAAA,QACH,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IAEA,iBAAiB;AAAA,MACf,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAAA,EACP;AAEJ;AASO,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,UAAU,cAAc;"}
@@ -9,7 +9,10 @@ require("../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
9
9
  const components_DictionaryFieldEditor_ContentEditorView_EditorView = require("./ContentEditorView/EditorView.cjs");
10
10
  const components_DictionaryFieldEditor_KeyPathBreadcrumb = require("./KeyPathBreadcrumb.cjs");
11
11
  const components_DictionaryFieldEditor_NavigationView_NavigationViewNode = require("./NavigationView/NavigationViewNode.cjs");
12
- const ContentEditor = ({ dictionary }) => {
12
+ const ContentEditor = ({
13
+ dictionary,
14
+ isDarkMode
15
+ }) => {
13
16
  const { content: dictionaryContent, key } = dictionary;
14
17
  const { editedContent } = editorReact.useEditedContent();
15
18
  const { focusedContent, setFocusedContentKeyPath } = editorReact.useFocusDictionary();
@@ -28,7 +31,7 @@ const ContentEditor = ({ dictionary }) => {
28
31
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(components_LocaleSwitcherContentDropDown_LocaleSwitcherContent.LocaleSwitcherContent, {}) })
29
32
  ] }),
30
33
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 max-md:flex-col", children: [
31
- /* @__PURE__ */ jsxRuntime.jsx(
34
+ typeof section === "object" && section && Object.keys(section).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
32
35
  components_Container_index.Container,
33
36
  {
34
37
  border: true,
@@ -46,7 +49,14 @@ const ContentEditor = ({ dictionary }) => {
46
49
  )
47
50
  }
48
51
  ),
49
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_ContentEditorView_EditorView.EditorView, { dictionary, dictionaryKey: key }) })
52
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: /* @__PURE__ */ jsxRuntime.jsx(
53
+ components_DictionaryFieldEditor_ContentEditorView_EditorView.EditorView,
54
+ {
55
+ dictionary,
56
+ dictionaryKey: key,
57
+ isDarkMode
58
+ }
59
+ ) })
50
60
  ] })
51
61
  ] });
52
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { EditorView } from './ContentEditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const ContentEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent?.[key]?.content ?? dictionaryContent;\n\n return (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex items-center gap-2\">\n <LocaleSwitcherContent />\n </div>\n </div>\n\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n transparency=\"sm\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n )}\n </div>\n </div>\n </>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","Fragment","jsx","KeyPathBreadcrumb","LocaleSwitcherContent","Container","NavigationViewNode","EditorView"],"mappings":";;;;;;;;;;;AAeO,MAAM,gBAAqC,CAAC,EAAE,iBAAiB;AACpE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AACtC,QAAA,EAAE,cAAc,IAAIA,6BAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,gBAAgB,GAAG,GAAG,WAAW;AAEjD,SAEIC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACD,2BAAAA,KAAA,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,MAAAE,2BAAA;AAAA,QAACC,mDAAA;AAAA,QAAA;AAAA,UACC,eAAe;AAAA,UACf,SAAS,kBAAkB,CAAC;AAAA,UAC5B,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,qCACC,OAAI,EAAA,WAAU,2BACb,UAAAD,2BAAA,IAACE,wFAAsB,EACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAEAJ,2BAAAA,KAAC,OAAI,EAAA,WAAU,8BACb,UAAA;AAAA,MAAAE,2BAAA;AAAA,QAACG,2BAAA;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UAEb,UAAAH,2BAAA;AAAA,YAACI,mEAAA;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,MACCJ,2BAAA,IAAA,OAAA,EAAI,WAAU,qDACX,WAAgB,gBAAA,UAAU,KAAK,KAC9BA,2BAAA,IAAAK,0EAAA,EAAW,YAAwB,eAAe,KAAK,EAE5D,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { EditorView } from './ContentEditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const ContentEditor: FC<NodeEditorProps> = ({\n dictionary,\n isDarkMode,\n}) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent?.[key]?.content ?? dictionaryContent;\n\n return (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex items-center gap-2\">\n <LocaleSwitcherContent />\n </div>\n </div>\n\n <div className=\"flex gap-2 max-md:flex-col\">\n {typeof section === 'object' &&\n section &&\n Object.keys(section).length > 0 && (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n transparency=\"sm\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n )}\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n <EditorView\n dictionary={dictionary}\n dictionaryKey={key}\n isDarkMode={isDarkMode}\n />\n </div>\n </div>\n </>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","Fragment","jsx","KeyPathBreadcrumb","LocaleSwitcherContent","Container","NavigationViewNode","EditorView"],"mappings":";;;;;;;;;;;AAgBO,MAAM,gBAAqC,CAAC;AAAA,EACjD;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AACtC,QAAA,EAAE,cAAc,IAAIA,6BAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,gBAAgB,GAAG,GAAG,WAAW;AAEjD,SAEIC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACD,2BAAAA,KAAA,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,MAAAE,2BAAA;AAAA,QAACC,mDAAA;AAAA,QAAA;AAAA,UACC,eAAe;AAAA,UACf,SAAS,kBAAkB,CAAC;AAAA,UAC5B,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,qCACC,OAAI,EAAA,WAAU,2BACb,UAAAD,2BAAA,IAACE,wFAAsB,EACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAEAJ,2BAAAA,KAAC,OAAI,EAAA,WAAU,8BACZ,UAAA;AAAA,MAAO,OAAA,YAAY,YAClB,WACA,OAAO,KAAK,OAAO,EAAE,SAAS,KAC5BE,2BAAA;AAAA,QAACG,2BAAA;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UAEb,UAAAH,2BAAA;AAAA,YAACI,mEAAA;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,MAEJJ,2BAAAA,IAAC,OAAI,EAAA,WAAU,qDACb,UAAAA,2BAAA;AAAA,QAACK,8DAAA;AAAA,QAAA;AAAA,UACC;AAAA,UACA,eAAe;AAAA,UACf;AAAA,QAAA;AAAA,MAAA,EAEJ,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
@@ -2,6 +2,7 @@ import { Dictionary } from '@intlayer/core';
2
2
  import { FC } from 'react';
3
3
  type NodeEditorProps = {
4
4
  dictionary: Dictionary;
5
+ isDarkMode?: boolean;
5
6
  };
6
7
  export declare const ContentEditor: FC<NodeEditorProps>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,eAAe,CA4C7C,CAAC"}
1
+ {"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,eAAe,CAqD7C,CAAC"}
@@ -7,7 +7,10 @@ import "../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
7
7
  import { EditorView } from "./ContentEditorView/EditorView.mjs";
8
8
  import { KeyPathBreadcrumb } from "./KeyPathBreadcrumb.mjs";
9
9
  import { NavigationViewNode } from "./NavigationView/NavigationViewNode.mjs";
10
- const ContentEditor = ({ dictionary }) => {
10
+ const ContentEditor = ({
11
+ dictionary,
12
+ isDarkMode
13
+ }) => {
11
14
  const { content: dictionaryContent, key } = dictionary;
12
15
  const { editedContent } = useEditedContent();
13
16
  const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();
@@ -26,7 +29,7 @@ const ContentEditor = ({ dictionary }) => {
26
29
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(LocaleSwitcherContent, {}) })
27
30
  ] }),
28
31
  /* @__PURE__ */ jsxs("div", { className: "flex gap-2 max-md:flex-col", children: [
29
- /* @__PURE__ */ jsx(
32
+ typeof section === "object" && section && Object.keys(section).length > 0 && /* @__PURE__ */ jsx(
30
33
  Container,
31
34
  {
32
35
  border: true,
@@ -44,7 +47,14 @@ const ContentEditor = ({ dictionary }) => {
44
47
  )
45
48
  }
46
49
  ),
47
- /* @__PURE__ */ jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: (focusedKeyPath?.length ?? 0) > 0 && /* @__PURE__ */ jsx(EditorView, { dictionary, dictionaryKey: key }) })
50
+ /* @__PURE__ */ jsx("div", { className: "top-6 flex h-full flex-1 flex-col gap-6 md:sticky", children: /* @__PURE__ */ jsx(
51
+ EditorView,
52
+ {
53
+ dictionary,
54
+ dictionaryKey: key,
55
+ isDarkMode
56
+ }
57
+ ) })
48
58
  ] })
49
59
  ] });
50
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { EditorView } from './ContentEditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n};\n\nexport const ContentEditor: FC<NodeEditorProps> = ({ dictionary }) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent?.[key]?.content ?? dictionaryContent;\n\n return (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex items-center gap-2\">\n <LocaleSwitcherContent />\n </div>\n </div>\n\n <div className=\"flex gap-2 max-md:flex-col\">\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n transparency=\"sm\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n {(focusedKeyPath?.length ?? 0) > 0 && (\n <EditorView dictionary={dictionary} dictionaryKey={key} />\n )}\n </div>\n </div>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM,gBAAqC,CAAC,EAAE,iBAAiB;AACpE,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AACtC,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,gBAAgB,GAAG,GAAG,WAAW;AAEjD,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,eAAe;AAAA,UACf,SAAS,kBAAkB,CAAC;AAAA,UAC5B,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,0BACC,OAAI,EAAA,WAAU,2BACb,UAAA,oBAAC,yBAAsB,EACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAEA,qBAAC,OAAI,EAAA,WAAU,8BACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UAEb,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,MACC,oBAAA,OAAA,EAAI,WAAU,qDACX,WAAgB,gBAAA,UAAU,KAAK,KAC9B,oBAAA,YAAA,EAAW,YAAwB,eAAe,KAAK,EAE5D,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { EditorView } from './ContentEditorView/EditorView';\nimport { KeyPathBreadcrumb } from './KeyPathBreadcrumb';\nimport { NavigationViewNode } from './NavigationView/NavigationViewNode';\n\ntype NodeEditorProps = {\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const ContentEditor: FC<NodeEditorProps> = ({\n dictionary,\n isDarkMode,\n}) => {\n const { content: dictionaryContent, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n const section = editedContent?.[key]?.content ?? dictionaryContent;\n\n return (\n <>\n <div className=\"flex items-center justify-between gap-2\">\n <KeyPathBreadcrumb\n dictionaryKey={key}\n keyPath={focusedKeyPath ?? []}\n onClickKeyPath={setFocusedContentKeyPath}\n />\n <div className=\"flex items-center gap-2\">\n <LocaleSwitcherContent />\n </div>\n </div>\n\n <div className=\"flex gap-2 max-md:flex-col\">\n {typeof section === 'object' &&\n section &&\n Object.keys(section).length > 0 && (\n <Container\n border\n background=\"none\"\n className=\"top-6 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]\"\n roundedSize=\"xl\"\n transparency=\"sm\"\n >\n <NavigationViewNode\n keyPath={[]}\n section={section}\n dictionaryKey={key}\n />\n </Container>\n )}\n <div className=\"top-6 flex h-full flex-1 flex-col gap-6 md:sticky\">\n <EditorView\n dictionary={dictionary}\n dictionaryKey={key}\n isDarkMode={isDarkMode}\n />\n </div>\n </div>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAgBO,MAAM,gBAAqC,CAAC;AAAA,EACjD;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,mBAAmB,IAAQ,IAAA;AACtC,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAEvC,QAAM,UAAU,gBAAgB,GAAG,GAAG,WAAW;AAEjD,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAU,2CACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,eAAe;AAAA,UACf,SAAS,kBAAkB,CAAC;AAAA,UAC5B,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,0BACC,OAAI,EAAA,WAAU,2BACb,UAAA,oBAAC,yBAAsB,EACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAEA,qBAAC,OAAI,EAAA,WAAU,8BACZ,UAAA;AAAA,MAAO,OAAA,YAAY,YAClB,WACA,OAAO,KAAK,OAAO,EAAE,SAAS,KAC5B;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,QAAM;AAAA,UACN,YAAW;AAAA,UACX,WAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UAEb,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAS,CAAC;AAAA,cACV;AAAA,cACA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MACF;AAAA,MAEJ,oBAAC,OAAI,EAAA,WAAU,qDACb,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,eAAe;AAAA,UACf;AAAA,QAAA;AAAA,MAAA,EAEJ,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -9,17 +9,21 @@ const components_DictionaryFieldEditor_getIsEditableSection = require("../getIsE
9
9
  const components_DictionaryFieldEditor_ContentEditorView_TextEditor = require("./TextEditor.cjs");
10
10
  const EditorView = ({
11
11
  dictionaryKey,
12
- dictionary
12
+ dictionary,
13
+ isDarkMode
13
14
  }) => {
14
15
  const { focusedContent } = editorReact.useFocusDictionary();
15
16
  const keyPath = focusedContent?.keyPath ?? [];
16
17
  const { editedContent } = editorReact.useEditedContent();
17
- const editedSection = editedContent?.[dictionaryKey]?.content ? core.getContentNodeByKeyPath(editedContent?.[dictionaryKey].content, keyPath) : void 0;
18
+ const editedSection = typeof editedContent?.[dictionaryKey]?.content === "undefined" ? void 0 : core.getContentNodeByKeyPath(
19
+ editedContent?.[dictionaryKey].content,
20
+ keyPath
21
+ );
18
22
  const dictionarySection = core.getContentNodeByKeyPath(
19
23
  dictionary.content,
20
24
  keyPath
21
25
  );
22
- const section = editedSection ?? dictionarySection;
26
+ const section = typeof editedSection === "undefined" ? dictionarySection : editedSection;
23
27
  const isEditableSection = components_DictionaryFieldEditor_getIsEditableSection.getIsEditableSection(section);
24
28
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isEditableSection && /* @__PURE__ */ jsxRuntime.jsx(
25
29
  components_Container_index.Container,
@@ -33,7 +37,8 @@ const EditorView = ({
33
37
  {
34
38
  keyPath,
35
39
  section,
36
- dictionary
40
+ dictionary,
41
+ isDarkMode
37
42
  },
38
43
  keyPath.join(".")
39
44
  )
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Dictionary, getContentNodeByKeyPath } from '@intlayer/core';\nimport { useFocusDictionary, useEditedContent } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../../Container';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n}) => {\n const { focusedContent } = useFocusDictionary();\n const keyPath = focusedContent?.keyPath ?? [];\n\n const { editedContent } = useEditedContent();\n\n const editedSection = editedContent?.[dictionaryKey]?.content\n ? getContentNodeByKeyPath(editedContent?.[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getContentNodeByKeyPath(\n dictionary.content,\n keyPath\n );\n const section = editedSection ?? dictionarySection;\n const isEditableSection = getIsEditableSection(section);\n\n return (\n <>\n {isEditableSection && (\n <Container\n border\n background=\"none\"\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n />\n </Container>\n )}\n </>\n );\n};\n"],"names":["useFocusDictionary","useEditedContent","getContentNodeByKeyPath","getIsEditableSection","jsx","Container","TextEditor"],"mappings":";;;;;;;;;AAcO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,eAAe,IAAIA,+BAAmB;AACxC,QAAA,UAAU,gBAAgB,WAAW,CAAC;AAEtC,QAAA,EAAE,cAAc,IAAIC,6BAAiB;AAErC,QAAA,gBAAgB,gBAAgB,aAAa,GAAG,UAClDC,KAAAA,wBAAwB,gBAAgB,aAAa,EAAE,SAAS,OAAO,IACvE;AAEJ,QAAM,oBAAoBA,KAAA;AAAA,IACxB,WAAW;AAAA,IACX;AAAA,EACF;AACA,QAAM,UAAU,iBAAiB;AAC3B,QAAA,oBAAoBC,2EAAqB,OAAO;AAEtD,+DAEK,UACC,qBAAAC,2BAAA;AAAA,IAACC,2BAAA;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,YAAW;AAAA,MACX,WAAU;AAAA,MACV,aAAY;AAAA,MAEZ,UAAAD,2BAAA;AAAA,QAACE,8DAAA;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAHK,QAAQ,KAAK,GAAG;AAAA,MAAA;AAAA,IAIvB;AAAA,EAAA,GAGN;AAEJ;;"}
1
+ {"version":3,"file":"EditorView.cjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Dictionary, getContentNodeByKeyPath } from '@intlayer/core';\nimport { useFocusDictionary, useEditedContent } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../../Container';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n isDarkMode,\n}) => {\n const { focusedContent } = useFocusDictionary();\n const keyPath = focusedContent?.keyPath ?? [];\n\n const { editedContent } = useEditedContent();\n\n const editedSection =\n typeof editedContent?.[dictionaryKey]?.content === 'undefined'\n ? undefined\n : getContentNodeByKeyPath(\n editedContent?.[dictionaryKey].content,\n keyPath\n );\n\n const dictionarySection = getContentNodeByKeyPath(\n dictionary.content,\n keyPath\n );\n const section =\n typeof editedSection === 'undefined' ? dictionarySection : editedSection;\n const isEditableSection = getIsEditableSection(section);\n\n return (\n <>\n {isEditableSection && (\n <Container\n border\n background=\"none\"\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n isDarkMode={isDarkMode}\n />\n </Container>\n )}\n </>\n );\n};\n"],"names":["useFocusDictionary","useEditedContent","getContentNodeByKeyPath","getIsEditableSection","jsx","Container","TextEditor"],"mappings":";;;;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,eAAe,IAAIA,+BAAmB;AACxC,QAAA,UAAU,gBAAgB,WAAW,CAAC;AAEtC,QAAA,EAAE,cAAc,IAAIC,6BAAiB;AAE3C,QAAM,gBACJ,OAAO,gBAAgB,aAAa,GAAG,YAAY,cAC/C,SACAC,KAAA;AAAA,IACE,gBAAgB,aAAa,EAAE;AAAA,IAC/B;AAAA,EACF;AAEN,QAAM,oBAAoBA,KAAA;AAAA,IACxB,WAAW;AAAA,IACX;AAAA,EACF;AACA,QAAM,UACJ,OAAO,kBAAkB,cAAc,oBAAoB;AACvD,QAAA,oBAAoBC,2EAAqB,OAAO;AAEtD,+DAEK,UACC,qBAAAC,2BAAA;AAAA,IAACC,2BAAA;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,YAAW;AAAA,MACX,WAAU;AAAA,MACV,aAAY;AAAA,MAEZ,UAAAD,2BAAA;AAAA,QAACE,8DAAA;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAJK,QAAQ,KAAK,GAAG;AAAA,MAAA;AAAA,IAKvB;AAAA,EAAA,GAGN;AAEJ;;"}
@@ -3,6 +3,7 @@ import { FC } from 'react';
3
3
  type EditorViewProps = {
4
4
  dictionaryKey: string;
5
5
  dictionary: Dictionary;
6
+ isDarkMode?: boolean;
6
7
  };
7
8
  export declare const EditorView: FC<EditorViewProps>;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAuC1C,CAAC"}
1
+ {"version":3,"file":"EditorView.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8C1C,CAAC"}
@@ -7,17 +7,21 @@ import { getIsEditableSection } from "../getIsEditableSection.mjs";
7
7
  import { TextEditor } from "./TextEditor.mjs";
8
8
  const EditorView = ({
9
9
  dictionaryKey,
10
- dictionary
10
+ dictionary,
11
+ isDarkMode
11
12
  }) => {
12
13
  const { focusedContent } = useFocusDictionary();
13
14
  const keyPath = focusedContent?.keyPath ?? [];
14
15
  const { editedContent } = useEditedContent();
15
- const editedSection = editedContent?.[dictionaryKey]?.content ? getContentNodeByKeyPath(editedContent?.[dictionaryKey].content, keyPath) : void 0;
16
+ const editedSection = typeof editedContent?.[dictionaryKey]?.content === "undefined" ? void 0 : getContentNodeByKeyPath(
17
+ editedContent?.[dictionaryKey].content,
18
+ keyPath
19
+ );
16
20
  const dictionarySection = getContentNodeByKeyPath(
17
21
  dictionary.content,
18
22
  keyPath
19
23
  );
20
- const section = editedSection ?? dictionarySection;
24
+ const section = typeof editedSection === "undefined" ? dictionarySection : editedSection;
21
25
  const isEditableSection = getIsEditableSection(section);
22
26
  return /* @__PURE__ */ jsx(Fragment, { children: isEditableSection && /* @__PURE__ */ jsx(
23
27
  Container,
@@ -31,7 +35,8 @@ const EditorView = ({
31
35
  {
32
36
  keyPath,
33
37
  section,
34
- dictionary
38
+ dictionary,
39
+ isDarkMode
35
40
  },
36
41
  keyPath.join(".")
37
42
  )
@@ -1 +1 @@
1
- {"version":3,"file":"EditorView.mjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Dictionary, getContentNodeByKeyPath } from '@intlayer/core';\nimport { useFocusDictionary, useEditedContent } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../../Container';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n}) => {\n const { focusedContent } = useFocusDictionary();\n const keyPath = focusedContent?.keyPath ?? [];\n\n const { editedContent } = useEditedContent();\n\n const editedSection = editedContent?.[dictionaryKey]?.content\n ? getContentNodeByKeyPath(editedContent?.[dictionaryKey].content, keyPath)\n : undefined;\n\n const dictionarySection = getContentNodeByKeyPath(\n dictionary.content,\n keyPath\n );\n const section = editedSection ?? dictionarySection;\n const isEditableSection = getIsEditableSection(section);\n\n return (\n <>\n {isEditableSection && (\n <Container\n border\n background=\"none\"\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n />\n </Container>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,eAAe,IAAI,mBAAmB;AACxC,QAAA,UAAU,gBAAgB,WAAW,CAAC;AAEtC,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAErC,QAAA,gBAAgB,gBAAgB,aAAa,GAAG,UAClD,wBAAwB,gBAAgB,aAAa,EAAE,SAAS,OAAO,IACvE;AAEJ,QAAM,oBAAoB;AAAA,IACxB,WAAW;AAAA,IACX;AAAA,EACF;AACA,QAAM,UAAU,iBAAiB;AAC3B,QAAA,oBAAoB,qBAAqB,OAAO;AAEtD,yCAEK,UACC,qBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,YAAW;AAAA,MACX,WAAU;AAAA,MACV,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAHK,QAAQ,KAAK,GAAG;AAAA,MAAA;AAAA,IAIvB;AAAA,EAAA,GAGN;AAEJ;"}
1
+ {"version":3,"file":"EditorView.mjs","sources":["../../../../src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx"],"sourcesContent":["'use client';\n\nimport { type Dictionary, getContentNodeByKeyPath } from '@intlayer/core';\nimport { useFocusDictionary, useEditedContent } from '@intlayer/editor-react';\nimport { type FC } from 'react';\nimport { Container } from '../../Container';\nimport { getIsEditableSection } from '../getIsEditableSection';\nimport { TextEditor } from './TextEditor';\n\ntype EditorViewProps = {\n dictionaryKey: string;\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const EditorView: FC<EditorViewProps> = ({\n dictionaryKey,\n dictionary,\n isDarkMode,\n}) => {\n const { focusedContent } = useFocusDictionary();\n const keyPath = focusedContent?.keyPath ?? [];\n\n const { editedContent } = useEditedContent();\n\n const editedSection =\n typeof editedContent?.[dictionaryKey]?.content === 'undefined'\n ? undefined\n : getContentNodeByKeyPath(\n editedContent?.[dictionaryKey].content,\n keyPath\n );\n\n const dictionarySection = getContentNodeByKeyPath(\n dictionary.content,\n keyPath\n );\n const section =\n typeof editedSection === 'undefined' ? dictionarySection : editedSection;\n const isEditableSection = getIsEditableSection(section);\n\n return (\n <>\n {isEditableSection && (\n <Container\n border\n background=\"none\"\n className=\"h-full flex-1 overflow-hidden\"\n roundedSize=\"xl\"\n >\n <TextEditor\n key={keyPath.join('.')}\n keyPath={keyPath}\n section={section}\n dictionary={dictionary}\n isDarkMode={isDarkMode}\n />\n </Container>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAeO,MAAM,aAAkC,CAAC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,eAAe,IAAI,mBAAmB;AACxC,QAAA,UAAU,gBAAgB,WAAW,CAAC;AAEtC,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAE3C,QAAM,gBACJ,OAAO,gBAAgB,aAAa,GAAG,YAAY,cAC/C,SACA;AAAA,IACE,gBAAgB,aAAa,EAAE;AAAA,IAC/B;AAAA,EACF;AAEN,QAAM,oBAAoB;AAAA,IACxB,WAAW;AAAA,IACX;AAAA,EACF;AACA,QAAM,UACJ,OAAO,kBAAkB,cAAc,oBAAoB;AACvD,QAAA,oBAAoB,qBAAqB,OAAO;AAEtD,yCAEK,UACC,qBAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,YAAW;AAAA,MACX,WAAU;AAAA,MACV,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAJK,QAAQ,KAAK,GAAG;AAAA,MAAA;AAAA,IAKvB;AAAA,EAAA,GAGN;AAEJ;"}
@@ -5,8 +5,8 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const core = require("@intlayer/core");
6
6
  const editorReact = require("@intlayer/editor-react");
7
7
  const lucideReact = require("lucide-react");
8
+ const ReactExports = require("react");
8
9
  const reactIntlayer = require("react-intlayer");
9
- require("react");
10
10
  require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
11
11
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
12
12
  const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
@@ -25,6 +25,7 @@ require("../../Input/Checkbox.cjs");
25
25
  const components_SwitchSelector_index = require("../../SwitchSelector/index.cjs");
26
26
  require("../../LocaleSwitcherContentDropDown/localeSwitcher.content.cjs");
27
27
  const components_LocaleSwitcherContentDropDown_LocaleSwitcherContentContext = require("../../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
28
+ const components_MarkDownRender_index = require("../../MarkDownRender/index.cjs");
28
29
  const components_DictionaryFieldEditor_EnumKeyInput = require("../EnumKeyInput.cjs");
29
30
  const components_DictionaryFieldEditor_getIsEditableSection = require("../getIsEditableSection.cjs");
30
31
  const components_DictionaryFieldEditor_NavigationView_navigationViewNode_content = require("../NavigationView/navigationViewNode.content.cjs");
@@ -361,18 +362,50 @@ const ArrayTextEditor = ({
361
362
  const MarkdownTextEditor = ({
362
363
  section,
363
364
  keyPath,
364
- dictionary
365
+ dictionary,
366
+ isDarkMode
365
367
  }) => {
366
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
367
- ContentEditorTextArea,
368
+ const [mode, setMode] = ReactExports.useState(
369
+ 0
370
+ /* Edit */
371
+ );
372
+ const toggleContent2 = [
368
373
  {
369
- variant: "default",
370
- "aria-label": "Edit field",
371
- keyPath: [...keyPath, { type: core.NodeType.Markdown }],
372
- dictionary,
373
- children: section[core.NodeType.Markdown]
374
+ content: "Edit",
375
+ value: 0
376
+ /* Edit */
377
+ },
378
+ {
379
+ content: "Preview",
380
+ value: 1
381
+ /* Preview */
374
382
  }
375
- ) });
383
+ ];
384
+ const content = section[core.NodeType.Markdown];
385
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col justify-center gap-6 p-2", children: [
386
+ /* @__PURE__ */ jsxRuntime.jsx(
387
+ components_SwitchSelector_index.SwitchSelector,
388
+ {
389
+ choices: toggleContent2,
390
+ value: mode,
391
+ onChange: setMode,
392
+ color: "text",
393
+ size: "sm",
394
+ className: "ml-auto"
395
+ }
396
+ ),
397
+ mode === 0 && /* @__PURE__ */ jsxRuntime.jsx(
398
+ ContentEditorTextArea,
399
+ {
400
+ variant: "default",
401
+ "aria-label": "Edit field",
402
+ keyPath: [...keyPath, { type: core.NodeType.Markdown }],
403
+ dictionary,
404
+ children: content
405
+ }
406
+ ),
407
+ mode === 1 && /* @__PURE__ */ jsxRuntime.jsx(components_MarkDownRender_index.MarkdownRenderer, { isDarkMode, children: content })
408
+ ] });
376
409
  };
377
410
  const NestedTextEditor = ({
378
411
  keyPath,
@@ -431,7 +464,8 @@ const NestedTextEditor = ({
431
464
  const TextEditor = ({
432
465
  section,
433
466
  keyPath,
434
- dictionary
467
+ dictionary,
468
+ isDarkMode
435
469
  }) => {
436
470
  const { tsxNotEditable } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent);
437
471
  const nodeType = core.getNodeType(section);
@@ -490,7 +524,8 @@ const TextEditor = ({
490
524
  {
491
525
  dictionary,
492
526
  keyPath,
493
- section
527
+ section,
528
+ isDarkMode
494
529
  }
495
530
  );
496
531
  }