@intlayer/design-system 5.1.2 → 5.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +12 -23
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +1 -1
- package/dist/components/Container/index.cjs +5 -2
- package/dist/components/Container/index.cjs.map +1 -1
- package/dist/components/Container/index.d.ts +1 -1
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/Container/index.mjs +5 -2
- package/dist/components/Container/index.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +27 -6
- package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts +1 -0
- package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +27 -6
- package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +278 -214
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +2 -0
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +281 -217
- package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +5 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts +5 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +5 -3
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +18 -13
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +19 -14
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +64 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +64 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +64 -0
- package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +6 -16
- package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +7 -17
- package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +8 -7
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts +7 -0
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +11 -10
- package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs +2 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs +3 -2
- package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
- package/dist/components/MarkDownRender/index.cjs.map +1 -1
- package/dist/components/MarkDownRender/index.d.ts +1 -1
- package/dist/components/MarkDownRender/index.d.ts.map +1 -1
- package/dist/components/MarkDownRender/index.mjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs +1 -1
- package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
- package/dist/components/MaxHeightSmoother/index.d.ts.map +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs +1 -1
- package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs +1 -1
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/index-BCuMWKyy.js.map +1 -1
- package/dist/{index-BKE0uywA.js → index-BTDHuTxL.js} +2 -2
- package/dist/index-BTDHuTxL.js.map +1 -0
- package/dist/index-BYzBot7l.cjs.map +1 -1
- package/dist/{index-CsenS2hX.cjs → index-Db5Dym4h.cjs} +2 -2
- package/dist/index-Db5Dym4h.cjs.map +1 -0
- package/dist/tailwind.css +1 -1
- package/dist/zod-BV4nCGJE.js.map +1 -1
- package/dist/zod-DSrtTSD_.cjs.map +1 -1
- package/package.json +19 -19
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs +0 -44
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs.map +0 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts +0 -9
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts.map +0 -1
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs +0 -44
- package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs.map +0 -1
- package/dist/index-BKE0uywA.js.map +0 -1
- package/dist/index-CsenS2hX.cjs.map +0 -1
package/dist/.vite/manifest.json
CHANGED
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
|
-
"_index-
|
|
59
|
-
"file": "index-
|
|
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-
|
|
79
|
-
"file": "index-
|
|
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-
|
|
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",
|
|
@@ -794,22 +794,12 @@
|
|
|
794
794
|
"src/components/Container/index.tsx",
|
|
795
795
|
"src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx",
|
|
796
796
|
"src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx",
|
|
797
|
-
"src/components/DictionaryFieldEditor/ContentEditorView/
|
|
797
|
+
"src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx",
|
|
798
|
+
"src/components/DictionaryFieldEditor/getIsEditableSection.ts",
|
|
798
799
|
"src/components/DictionaryFieldEditor/KeyPathBreadcrumb.tsx",
|
|
799
800
|
"src/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.tsx"
|
|
800
801
|
]
|
|
801
802
|
},
|
|
802
|
-
"src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx": {
|
|
803
|
-
"file": "components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs",
|
|
804
|
-
"name": "components/DictionaryFieldEditor/ContentEditorView/EditorView",
|
|
805
|
-
"src": "src/components/DictionaryFieldEditor/ContentEditorView/EditorView.tsx",
|
|
806
|
-
"isEntry": true,
|
|
807
|
-
"imports": [
|
|
808
|
-
"src/components/Container/index.tsx",
|
|
809
|
-
"src/components/DictionaryFieldEditor/getIsEditableSection.ts",
|
|
810
|
-
"src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx"
|
|
811
|
-
]
|
|
812
|
-
},
|
|
813
803
|
"src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx": {
|
|
814
804
|
"file": "components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs",
|
|
815
805
|
"name": "components/DictionaryFieldEditor/ContentEditorView/TextEditor",
|
|
@@ -821,18 +811,18 @@
|
|
|
821
811
|
"src/hooks/intlayerAPIHooks.ts",
|
|
822
812
|
"src/utils/object.ts",
|
|
823
813
|
"src/components/Button/Button.tsx",
|
|
814
|
+
"src/components/Container/index.tsx",
|
|
824
815
|
"src/components/ContentEditor/ContentEditorInput.tsx",
|
|
825
816
|
"src/components/ContentEditor/ContentEditorTextArea.tsx",
|
|
826
817
|
"src/components/Label/index.tsx",
|
|
827
|
-
"src/components/Container/index.tsx",
|
|
828
818
|
"src/components/DropDown/index.tsx",
|
|
829
819
|
"src/components/Input/Input.tsx",
|
|
830
820
|
"src/components/Input/Checkbox.tsx",
|
|
831
821
|
"src/components/SwitchSelector/index.tsx",
|
|
832
822
|
"src/components/LocaleSwitcherContentDropDown/localeSwitcher.content.ts",
|
|
833
823
|
"src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx",
|
|
824
|
+
"src/components/MarkDownRender/index.tsx",
|
|
834
825
|
"src/components/DictionaryFieldEditor/EnumKeyInput.tsx",
|
|
835
|
-
"src/components/DictionaryFieldEditor/getIsEditableSection.ts",
|
|
836
826
|
"src/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.ts"
|
|
837
827
|
]
|
|
838
828
|
},
|
|
@@ -864,7 +854,7 @@
|
|
|
864
854
|
"isEntry": true,
|
|
865
855
|
"imports": [
|
|
866
856
|
"src/hooks/intlayerAPIHooks.ts",
|
|
867
|
-
"_index-
|
|
857
|
+
"_index-Db5Dym4h.cjs",
|
|
868
858
|
"src/components/Button/Button.tsx",
|
|
869
859
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
870
860
|
"src/components/Form/FormBase.tsx",
|
|
@@ -919,7 +909,7 @@
|
|
|
919
909
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
|
|
920
910
|
"src/hooks/useAsync/useAsyncStateStore.tsx",
|
|
921
911
|
"src/hooks/intlayerAPIHooks.ts",
|
|
922
|
-
"_index-
|
|
912
|
+
"_index-Db5Dym4h.cjs",
|
|
923
913
|
"src/components/Button/Button.tsx",
|
|
924
914
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
925
915
|
"src/components/Form/FormBase.tsx",
|
|
@@ -1060,7 +1050,7 @@
|
|
|
1060
1050
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
|
|
1061
1051
|
"src/hooks/useAsync/useAsyncStateStore.tsx",
|
|
1062
1052
|
"src/hooks/intlayerAPIHooks.ts",
|
|
1063
|
-
"_index-
|
|
1053
|
+
"_index-Db5Dym4h.cjs",
|
|
1064
1054
|
"src/components/Button/Button.tsx",
|
|
1065
1055
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
1066
1056
|
"src/components/Form/FormBase.tsx",
|
|
@@ -1099,7 +1089,6 @@
|
|
|
1099
1089
|
"src": "src/components/DictionaryFieldEditor/StructureEditor.tsx",
|
|
1100
1090
|
"isEntry": true,
|
|
1101
1091
|
"imports": [
|
|
1102
|
-
"src/components/Container/index.tsx",
|
|
1103
1092
|
"src/components/DictionaryFieldEditor/StructureView/StructureView.tsx"
|
|
1104
1093
|
]
|
|
1105
1094
|
},
|
|
@@ -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-
|
|
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-
|
|
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,10 +55,13 @@ 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
|
-
none: "bg-inherit",
|
|
64
|
+
none: "bg-inherit dark:bg-inherit",
|
|
62
65
|
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",
|
|
63
66
|
with: ""
|
|
64
67
|
},
|
|
@@ -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,
|
|
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 dark: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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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;;;;;;;;;;
|
|
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,10 +53,13 @@ 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
|
-
none: "bg-inherit",
|
|
62
|
+
none: "bg-inherit dark:bg-inherit",
|
|
60
63
|
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",
|
|
61
64
|
with: ""
|
|
62
65
|
},
|
|
@@ -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,
|
|
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 dark: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,QAC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,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;"}
|
|
@@ -2,19 +2,32 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const core = require("@intlayer/core");
|
|
5
6
|
const editorReact = require("@intlayer/editor-react");
|
|
7
|
+
const ReactExports = require("react");
|
|
6
8
|
const components_Container_index = require("../Container/index.cjs");
|
|
7
9
|
const components_LocaleSwitcherContentDropDown_LocaleSwitcherContent = require("../LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs");
|
|
8
10
|
require("../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs");
|
|
9
|
-
const
|
|
11
|
+
const components_DictionaryFieldEditor_ContentEditorView_TextEditor = require("./ContentEditorView/TextEditor.cjs");
|
|
12
|
+
const components_DictionaryFieldEditor_getIsEditableSection = require("./getIsEditableSection.cjs");
|
|
10
13
|
const components_DictionaryFieldEditor_KeyPathBreadcrumb = require("./KeyPathBreadcrumb.cjs");
|
|
11
14
|
const components_DictionaryFieldEditor_NavigationView_NavigationViewNode = require("./NavigationView/NavigationViewNode.cjs");
|
|
12
|
-
const ContentEditor = ({
|
|
13
|
-
|
|
15
|
+
const ContentEditor = ({
|
|
16
|
+
dictionary,
|
|
17
|
+
isDarkMode
|
|
18
|
+
}) => {
|
|
19
|
+
const { content, key } = dictionary;
|
|
14
20
|
const { editedContent } = editorReact.useEditedContent();
|
|
15
21
|
const { focusedContent, setFocusedContentKeyPath } = editorReact.useFocusDictionary();
|
|
16
22
|
const focusedKeyPath = focusedContent?.keyPath;
|
|
17
|
-
const section = editedContent?.[key]?.content
|
|
23
|
+
const section = typeof editedContent?.[dictionary.key]?.content === "undefined" ? content : editedContent?.[key]?.content;
|
|
24
|
+
const focusedSection = core.getContentNodeByKeyPath(section, focusedKeyPath ?? []);
|
|
25
|
+
const isEditableFocusedSection = components_DictionaryFieldEditor_getIsEditableSection.getIsEditableSection(focusedSection);
|
|
26
|
+
ReactExports.useEffect(() => {
|
|
27
|
+
if (typeof focusedSection === "undefined") {
|
|
28
|
+
setFocusedContentKeyPath(focusedContent?.keyPath?.slice(0, -1) ?? []);
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
18
31
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
19
32
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
20
33
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28,7 +41,7 @@ const ContentEditor = ({ dictionary }) => {
|
|
|
28
41
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(components_LocaleSwitcherContentDropDown_LocaleSwitcherContent.LocaleSwitcherContent, {}) })
|
|
29
42
|
] }),
|
|
30
43
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 max-md:flex-col", children: [
|
|
31
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
typeof section === "object" && section && Object.keys(section).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
45
|
components_Container_index.Container,
|
|
33
46
|
{
|
|
34
47
|
border: true,
|
|
@@ -46,7 +59,15 @@ const ContentEditor = ({ dictionary }) => {
|
|
|
46
59
|
)
|
|
47
60
|
}
|
|
48
61
|
),
|
|
49
|
-
|
|
62
|
+
(isEditableFocusedSection || (focusedKeyPath ?? []).length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
+
components_DictionaryFieldEditor_ContentEditorView_TextEditor.TextEditorContainer,
|
|
64
|
+
{
|
|
65
|
+
keyPath: focusedKeyPath ?? [],
|
|
66
|
+
section: focusedSection,
|
|
67
|
+
dictionary,
|
|
68
|
+
isDarkMode
|
|
69
|
+
}
|
|
70
|
+
)
|
|
50
71
|
] })
|
|
51
72
|
] });
|
|
52
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type
|
|
1
|
+
{"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { getContentNodeByKeyPath, type Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { useEffect, type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { TextEditorContainer } from './ContentEditorView/TextEditor';\nimport { getIsEditableSection } from './getIsEditableSection';\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, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n const section =\n typeof editedContent?.[dictionary.key]?.content === 'undefined'\n ? content\n : editedContent?.[key]?.content;\n\n const focusedSection = getContentNodeByKeyPath(section, focusedKeyPath ?? []);\n const isEditableFocusedSection = getIsEditableSection(focusedSection);\n\n useEffect(() => {\n if (typeof focusedSection === 'undefined') {\n setFocusedContentKeyPath(focusedContent?.keyPath?.slice(0, -1) ?? []);\n }\n }, []);\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 <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 {(isEditableFocusedSection || (focusedKeyPath ?? []).length > 0) && (\n <TextEditorContainer\n keyPath={focusedKeyPath ?? []}\n section={focusedSection}\n dictionary={dictionary}\n isDarkMode={isDarkMode}\n />\n )}\n </div>\n </>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","getContentNodeByKeyPath","getIsEditableSection","useEffect","jsxs","Fragment","jsx","KeyPathBreadcrumb","LocaleSwitcherContent","Container","NavigationViewNode","TextEditorContainer"],"mappings":";;;;;;;;;;;;;;AAiBO,MAAM,gBAAqC,CAAC;AAAA,EACjD;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,SAAS,IAAA,IAAQ;AACnB,QAAA,EAAE,cAAc,IAAIA,6BAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AACjC,QAAA,UACJ,OAAO,gBAAgB,W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AA,QAAA;AAAA,MAAA;AAAA,IACF,EAEJ,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAAa,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,eAAe,CAgE7C,CAAC"}
|
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
3
4
|
import { useEditedContent, useFocusDictionary } from "@intlayer/editor-react";
|
|
5
|
+
import { useEffect } from "react";
|
|
4
6
|
import { Container } from "../Container/index.mjs";
|
|
5
7
|
import { LocaleSwitcherContent } from "../LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs";
|
|
6
8
|
import "../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
|
|
7
|
-
import {
|
|
9
|
+
import { TextEditorContainer } from "./ContentEditorView/TextEditor.mjs";
|
|
10
|
+
import { getIsEditableSection } from "./getIsEditableSection.mjs";
|
|
8
11
|
import { KeyPathBreadcrumb } from "./KeyPathBreadcrumb.mjs";
|
|
9
12
|
import { NavigationViewNode } from "./NavigationView/NavigationViewNode.mjs";
|
|
10
|
-
const ContentEditor = ({
|
|
11
|
-
|
|
13
|
+
const ContentEditor = ({
|
|
14
|
+
dictionary,
|
|
15
|
+
isDarkMode
|
|
16
|
+
}) => {
|
|
17
|
+
const { content, key } = dictionary;
|
|
12
18
|
const { editedContent } = useEditedContent();
|
|
13
19
|
const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();
|
|
14
20
|
const focusedKeyPath = focusedContent?.keyPath;
|
|
15
|
-
const section = editedContent?.[key]?.content
|
|
21
|
+
const section = typeof editedContent?.[dictionary.key]?.content === "undefined" ? content : editedContent?.[key]?.content;
|
|
22
|
+
const focusedSection = getContentNodeByKeyPath(section, focusedKeyPath ?? []);
|
|
23
|
+
const isEditableFocusedSection = getIsEditableSection(focusedSection);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (typeof focusedSection === "undefined") {
|
|
26
|
+
setFocusedContentKeyPath(focusedContent?.keyPath?.slice(0, -1) ?? []);
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
16
29
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
30
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18
31
|
/* @__PURE__ */ jsx(
|
|
@@ -26,7 +39,7 @@ const ContentEditor = ({ dictionary }) => {
|
|
|
26
39
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(LocaleSwitcherContent, {}) })
|
|
27
40
|
] }),
|
|
28
41
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2 max-md:flex-col", children: [
|
|
29
|
-
/* @__PURE__ */ jsx(
|
|
42
|
+
typeof section === "object" && section && Object.keys(section).length > 0 && /* @__PURE__ */ jsx(
|
|
30
43
|
Container,
|
|
31
44
|
{
|
|
32
45
|
border: true,
|
|
@@ -44,7 +57,15 @@ const ContentEditor = ({ dictionary }) => {
|
|
|
44
57
|
)
|
|
45
58
|
}
|
|
46
59
|
),
|
|
47
|
-
|
|
60
|
+
(isEditableFocusedSection || (focusedKeyPath ?? []).length > 0) && /* @__PURE__ */ jsx(
|
|
61
|
+
TextEditorContainer,
|
|
62
|
+
{
|
|
63
|
+
keyPath: focusedKeyPath ?? [],
|
|
64
|
+
section: focusedSection,
|
|
65
|
+
dictionary,
|
|
66
|
+
isDarkMode
|
|
67
|
+
}
|
|
68
|
+
)
|
|
48
69
|
] })
|
|
49
70
|
] });
|
|
50
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport type
|
|
1
|
+
{"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { getContentNodeByKeyPath, type Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport { useEffect, type FC } from 'react';\nimport { Container } from '../Container';\nimport { LocaleSwitcherContent } from '../LocaleSwitcherContentDropDown';\nimport { TextEditorContainer } from './ContentEditorView/TextEditor';\nimport { getIsEditableSection } from './getIsEditableSection';\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, key } = dictionary;\n const { editedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n const section =\n typeof editedContent?.[dictionary.key]?.content === 'undefined'\n ? content\n : editedContent?.[key]?.content;\n\n const focusedSection = getContentNodeByKeyPath(section, focusedKeyPath ?? []);\n const isEditableFocusedSection = getIsEditableSection(focusedSection);\n\n useEffect(() => {\n if (typeof focusedSection === 'undefined') {\n setFocusedContentKeyPath(focusedContent?.keyPath?.slice(0, -1) ?? []);\n }\n }, []);\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 <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 {(isEditableFocusedSection || (focusedKeyPath ?? []).length > 0) && (\n <TextEditorContainer\n keyPath={focusedKeyPath ?? []}\n section={focusedSection}\n dictionary={dictionary}\n isDarkMode={isDarkMode}\n />\n )}\n </div>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAiBO,MAAM,gBAAqC,CAAC;AAAA,EACjD;AAAA,EACA;AACF,MAAM;AACE,QAAA,EAAE,SAAS,IAAA,IAAQ;AACnB,QAAA,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AACjC,QAAA,UACJ,OAAO,gBAAgB,WAAW,GAAG,GAAG,YAAY,cAChD,UACA,gBAAgB,GAAG,GAAG;AAE5B,QAAM,iBAAiB,wBAAwB,SAAS,kBAAkB,CAAA,CAAE;AACtE,QAAA,2BAA2B,qBAAqB,cAAc;AAEpE,YAAU,MAAM;AACV,QAAA,OAAO,mBAAmB,aAAa;AACzC,+BAAyB,gBAAgB,SAAS,MAAM,GAAG,EAAE,KAAK,EAAE;AAAA,IAAA;AAAA,EAExE,GAAG,EAAE;AAEL,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,q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