intlayer-editor 7.3.1 → 7.3.2-canary.1

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.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-M1-XqLgv.js","assets/css-BtVcDqlU.js","assets/javascript-DLs729Nk.js","assets/typescript-Cju7JbYj.js","assets/json-D07AUpjp.js","assets/html-derivative-Cswrtqyq.js","assets/html-BOjX3v2Q.js","assets/bundle-web-XpyHnbkn.js","assets/index-DfNZ8e5l.js","assets/index-UvWk4YN-.css"])))=>i.map(i=>d[i]);
2
- import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-DfNZ8e5l.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-M1-XqLgv.js","assets/css-BtVcDqlU.js","assets/javascript-DLs729Nk.js","assets/typescript-Cju7JbYj.js","assets/json-D07AUpjp.js","assets/html-derivative-Cswrtqyq.js","assets/html-BOjX3v2Q.js","assets/bundle-web-RIIsSW5h.js","assets/index-C1SpL0Yu.js","assets/index-BzAV_y2-.css"])))=>i.map(i=>d[i]);
2
+ import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-C1SpL0Yu.js";
3
3
  const languageCache = /* @__PURE__ */ new Map();
4
4
  const themeCache = /* @__PURE__ */ new Map();
5
5
  const loadLanguage = async (lang) => {
@@ -60,7 +60,7 @@ const loadTheme = async (themeName) => {
60
60
  const highlightCode = async (code, lang, isDarkMode) => {
61
61
  const themeName = isDarkMode ? "github-dark" : "github-light";
62
62
  const [{ codeToHtml }, languageModule, themeModule] = await Promise.all([
63
- __vitePreload(() => import("./bundle-web-XpyHnbkn.js"), true ? __vite__mapDeps([7,8,9]) : void 0),
63
+ __vitePreload(() => import("./bundle-web-RIIsSW5h.js"), true ? __vite__mapDeps([7,8,9]) : void 0),
64
64
  loadLanguage(lang),
65
65
  loadTheme(themeName)
66
66
  ]);
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-ChYFFmg7.js","assets/html-BOjX3v2Q.js","assets/javascript-DLs729Nk.js","assets/css-BtVcDqlU.js","assets/angular-ts-CpuGw9DZ.js","assets/scss-Dq-LbI_c.js","assets/astro-B0lt4qz0.js","assets/json-D07AUpjp.js","assets/typescript-Cju7JbYj.js","assets/postcss-kj1IbjVd.js","assets/tsx-B9RA6cgQ.js","assets/blade-DtOFwYfC.js","assets/html-derivative-Cswrtqyq.js","assets/xml-BMzZeaqs.js","assets/java-BfXh-0uJ.js","assets/sql-DzUuSofg.js","assets/coffee-DJkIX6_2.js","assets/cpp-zh2ePAE_.js","assets/regexp-BxWeO75u.js","assets/glsl-CGsiYPcu.js","assets/c-C4VtT7JA.js","assets/graphql-oNSp8dGZ.js","assets/jsx-BPmvoin2.js","assets/haml-BJ44RGT2.js","assets/handlebars-DTnHNTeU.js","assets/yaml-B_vW5iTY.js","assets/http-B1QlEqj7.js","assets/bash-Bz2gZrDc.js","assets/hurl-Br_hZn4E.js","assets/csv-Ba84L8e5.js","assets/jinja-BAZ4h1JD.js","assets/jison-Bwp1bXaL.js","assets/julia-D0f5tMoo.js","assets/python-CrdIx4PZ.js","assets/r-oprfD2-9.js","assets/marko-rwefYVra.js","assets/less-BAzLMJNR.js","assets/mdc-ucHOH9Vl.js","assets/markdown-F_EULe_G.js","assets/php-CI-6KGJr.js","assets/pug-C-LeC0-n.js","assets/svelte-CYSO_rLN.js","assets/ts-tags-DCkNjov3.js","assets/vue-M1-XqLgv.js","assets/vue-html-BzXE5pTE.js","assets/vue-vine-BT_ihGGO.js","assets/stylus-DXFa_2Jl.js"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./index-DfNZ8e5l.js";
2
+ import { _ as __vitePreload } from "./index-C1SpL0Yu.js";
3
3
  let ShikiError$2 = class ShikiError extends Error {
4
4
  constructor(message) {
5
5
  super(message);
@@ -4950,11 +4950,6 @@
4950
4950
  content: var(--tw-content);
4951
4951
  }
4952
4952
 
4953
- .before\:content-\[\\\"\\\"\]:before {
4954
- --tw-content: \"\";
4955
- content: var(--tw-content);
4956
- }
4957
-
4958
4953
  .after\:absolute:after {
4959
4954
  content: var(--tw-content);
4960
4955
  position: absolute;
@@ -5091,11 +5086,6 @@
5091
5086
  content: var(--tw-content);
5092
5087
  }
5093
5088
 
5094
- .after\:content-\[\\\"\\\"\]:after {
5095
- --tw-content: \"\";
5096
- content: var(--tw-content);
5097
- }
5098
-
5099
5089
  .checked\:border-current:checked {
5100
5090
  border-color: currentColor;
5101
5091
  }
@@ -13729,12 +13729,169 @@ const getNesting = (dictionaryKey, path, props) => {
13729
13729
  }
13730
13730
  return dictionary;
13731
13731
  };
13732
- const getTranslation = (languageContent, locale, fallback) => {
13733
- let result = languageContent[locale];
13734
- if (fallback && !result) result = languageContent[fallback];
13732
+ var cjs;
13733
+ var hasRequiredCjs;
13734
+ function requireCjs() {
13735
+ if (hasRequiredCjs) return cjs;
13736
+ hasRequiredCjs = 1;
13737
+ var isMergeableObject2 = function isMergeableObject3(value) {
13738
+ return isNonNullObject(value) && !isSpecial(value);
13739
+ };
13740
+ function isNonNullObject(value) {
13741
+ return !!value && typeof value === "object";
13742
+ }
13743
+ function isSpecial(value) {
13744
+ var stringValue = Object.prototype.toString.call(value);
13745
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
13746
+ }
13747
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
13748
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
13749
+ function isReactElement(value) {
13750
+ return value.$$typeof === REACT_ELEMENT_TYPE;
13751
+ }
13752
+ function emptyTarget(val) {
13753
+ return Array.isArray(val) ? [] : {};
13754
+ }
13755
+ function cloneUnlessOtherwiseSpecified(value, options) {
13756
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
13757
+ }
13758
+ function defaultArrayMerge(target, source, options) {
13759
+ return target.concat(source).map(function(element) {
13760
+ return cloneUnlessOtherwiseSpecified(element, options);
13761
+ });
13762
+ }
13763
+ function getMergeFunction(key2, options) {
13764
+ if (!options.customMerge) {
13765
+ return deepmerge;
13766
+ }
13767
+ var customMerge = options.customMerge(key2);
13768
+ return typeof customMerge === "function" ? customMerge : deepmerge;
13769
+ }
13770
+ function getEnumerableOwnPropertySymbols(target) {
13771
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
13772
+ return Object.propertyIsEnumerable.call(target, symbol);
13773
+ }) : [];
13774
+ }
13775
+ function getKeys(target) {
13776
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
13777
+ }
13778
+ function propertyIsOnObject(object2, property) {
13779
+ try {
13780
+ return property in object2;
13781
+ } catch (_2) {
13782
+ return false;
13783
+ }
13784
+ }
13785
+ function propertyIsUnsafe(target, key2) {
13786
+ return propertyIsOnObject(target, key2) && !(Object.hasOwnProperty.call(target, key2) && Object.propertyIsEnumerable.call(target, key2));
13787
+ }
13788
+ function mergeObject(target, source, options) {
13789
+ var destination = {};
13790
+ if (options.isMergeableObject(target)) {
13791
+ getKeys(target).forEach(function(key2) {
13792
+ destination[key2] = cloneUnlessOtherwiseSpecified(target[key2], options);
13793
+ });
13794
+ }
13795
+ getKeys(source).forEach(function(key2) {
13796
+ if (propertyIsUnsafe(target, key2)) {
13797
+ return;
13798
+ }
13799
+ if (propertyIsOnObject(target, key2) && options.isMergeableObject(source[key2])) {
13800
+ destination[key2] = getMergeFunction(key2, options)(target[key2], source[key2], options);
13801
+ } else {
13802
+ destination[key2] = cloneUnlessOtherwiseSpecified(source[key2], options);
13803
+ }
13804
+ });
13805
+ return destination;
13806
+ }
13807
+ function deepmerge(target, source, options) {
13808
+ options = options || {};
13809
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
13810
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject2;
13811
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
13812
+ var sourceIsArray = Array.isArray(source);
13813
+ var targetIsArray = Array.isArray(target);
13814
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
13815
+ if (!sourceAndTargetTypesMatch) {
13816
+ return cloneUnlessOtherwiseSpecified(source, options);
13817
+ } else if (sourceIsArray) {
13818
+ return options.arrayMerge(target, source, options);
13819
+ } else {
13820
+ return mergeObject(target, source, options);
13821
+ }
13822
+ }
13823
+ deepmerge.all = function deepmergeAll(array2, options) {
13824
+ if (!Array.isArray(array2)) {
13825
+ throw new Error("first argument should be an array");
13826
+ }
13827
+ return array2.reduce(function(prev, next) {
13828
+ return deepmerge(prev, next, options);
13829
+ }, {});
13830
+ };
13831
+ var deepmerge_1 = deepmerge;
13832
+ cjs = deepmerge_1;
13833
+ return cjs;
13834
+ }
13835
+ var cjsExports = /* @__PURE__ */ requireCjs();
13836
+ const deepMerge$1 = /* @__PURE__ */ getDefaultExportFromCjs(cjsExports);
13837
+ const isMergeableObject = (value) => {
13838
+ if (value === null || typeof value !== "object") return false;
13839
+ if (value instanceof Promise || typeof value.then === "function") return false;
13840
+ if (value.$$typeof !== void 0) return false;
13841
+ const proto = Object.getPrototypeOf(value);
13842
+ return proto === Object.prototype || proto === null || Array.isArray(value);
13843
+ };
13844
+ const removeUndefinedValues = (object2, visited = /* @__PURE__ */ new WeakSet()) => {
13845
+ if (typeof object2 !== "object" || object2 === null) return object2;
13846
+ if (visited.has(object2)) return object2;
13847
+ visited.add(object2);
13848
+ if (!isMergeableObject(object2)) return object2;
13849
+ if (Array.isArray(object2)) return object2.map((item) => removeUndefinedValues(item, visited));
13850
+ const result = {};
13851
+ for (const [key2, value] of Object.entries(object2)) if (value !== void 0) result[key2] = removeUndefinedValues(value, visited);
13735
13852
  return result;
13736
13853
  };
13737
- const translationPlugin = (locale, fallback) => ({
13854
+ const getTranslation = (languageContent, locale, fallback) => {
13855
+ const results = [];
13856
+ const getContent2 = (loc) => languageContent[loc];
13857
+ const content2 = getContent2(locale);
13858
+ if (typeof content2 === "string") return content2;
13859
+ else if (content2 !== void 0) results.push(content2);
13860
+ if (locale.includes("-")) {
13861
+ const genericLocale = locale.split("-")[0];
13862
+ if (genericLocale in languageContent) {
13863
+ const genericContent = getContent2(genericLocale);
13864
+ if (typeof genericContent === "string") {
13865
+ if (results.length === 0) return genericContent;
13866
+ } else if (genericContent !== void 0) results.push(genericContent);
13867
+ }
13868
+ }
13869
+ if (fallback !== void 0 && fallback !== locale) {
13870
+ if (fallback in languageContent) {
13871
+ const fallbackContent = getContent2(fallback);
13872
+ if (typeof fallbackContent === "string") {
13873
+ if (results.length === 0) return fallbackContent;
13874
+ } else if (fallbackContent !== void 0) results.push(fallbackContent);
13875
+ }
13876
+ if (fallback.includes("-")) {
13877
+ const genericFallback = fallback.split("-")[0];
13878
+ if (genericFallback !== locale.split("-")[0] && genericFallback in languageContent) {
13879
+ const genericFallbackContent = getContent2(genericFallback);
13880
+ if (typeof genericFallbackContent === "string") {
13881
+ if (results.length === 0) return genericFallbackContent;
13882
+ } else if (genericFallbackContent !== void 0) results.push(genericFallbackContent);
13883
+ }
13884
+ }
13885
+ }
13886
+ if (results.length === 0) return;
13887
+ results.reverse();
13888
+ const cleanResults = results.map((item) => removeUndefinedValues(item));
13889
+ return deepMerge$1.all(cleanResults, {
13890
+ arrayMerge: (_destinationArray, sourceArray) => sourceArray,
13891
+ isMergeableObject
13892
+ });
13893
+ };
13894
+ const translationPlugin = (locale, fallback, onContentNotFound) => ({
13738
13895
  id: "translation-plugin",
13739
13896
  canHandle: (node) => typeof node === "object" && node?.nodeType === NodeType.Translation,
13740
13897
  transform: (node, props, deepTransformNode2) => {
@@ -31706,7 +31863,7 @@ let ModalSize = /* @__PURE__ */ function(ModalSize$1) {
31706
31863
  ModalSize$1["UNSET"] = "unset";
31707
31864
  return ModalSize$1;
31708
31865
  }({});
31709
- const modalVariants = cva("cursor-default justify-center overflow-auto p-3 shadow-sm", {
31866
+ const modalVariants = cva("cursor-default overflow-auto p-3 shadow-sm", {
31710
31867
  variants: { size: {
31711
31868
  sm: "h-auto max-h-[30vh] w-[95vw] max-w-xl",
31712
31869
  md: "h-auto max-h-[50vh] w-[95vw] max-w-xl",
@@ -46528,7 +46685,7 @@ const FormLabelLayout = ({ children, isRequired, info, htmlFor, className }) =>
46528
46685
  }), info && /* @__PURE__ */ jsxRuntimeExports.jsx(InformationTag, { content: info })]
46529
46686
  });
46530
46687
  const FormItemLayout = ({ label, description, isRequired, info, children, showErrorMessage = true, htmlFor }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Form.Item, {
46531
- className: "flex w-full flex-col gap-2 px-1 py-2",
46688
+ className: "flex w-full flex-col flex-wrap gap-2 px-1 py-2",
46532
46689
  children: [
46533
46690
  (description || label) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
46534
46691
  className: "flex flex-col gap-1 p-1 leading-none",
@@ -49617,7 +49774,7 @@ const CodeDefault = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div
49617
49774
  }, `line-${index2}-${line.slice(0, 10)}`)) })
49618
49775
  })
49619
49776
  });
49620
- const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-C8Ml9WUx.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
49777
+ const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-BWnnGpSi.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
49621
49778
  const CodeBlock = ({ className, onChange, isEditable, children, lang, isDarkMode, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
49622
49779
  className: cn$2("flex w-full min-w-0 max-w-full overflow-x-auto", className),
49623
49780
  ...props,
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Intlayer Editor</title>
8
- <script type="module" crossorigin src="/assets/index-DfNZ8e5l.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-UvWk4YN-.css">
8
+ <script type="module" crossorigin src="/assets/index-C1SpL0Yu.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BzAV_y2-.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer-editor",
3
- "version": "7.3.1",
3
+ "version": "7.3.2-canary.1",
4
4
  "private": false,
5
5
  "description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
6
6
  "keywords": [
@@ -85,32 +85,32 @@
85
85
  "typecheck": "tsc --project ./server/tsconfig.types.json --noEmit"
86
86
  },
87
87
  "dependencies": {
88
- "@intlayer/api": "7.3.1",
89
- "@intlayer/chokidar": "7.3.1",
90
- "@intlayer/config": "7.3.1",
91
- "@intlayer/core": "7.3.1",
92
- "@intlayer/design-system": "7.3.1",
93
- "@intlayer/editor-react": "7.3.1",
94
- "@intlayer/types": "7.3.1",
95
- "@intlayer/unmerged-dictionaries-entry": "7.3.1",
88
+ "@intlayer/api": "7.3.2-canary.1",
89
+ "@intlayer/chokidar": "7.3.2-canary.1",
90
+ "@intlayer/config": "7.3.2-canary.1",
91
+ "@intlayer/core": "7.3.2-canary.1",
92
+ "@intlayer/design-system": "7.3.2-canary.1",
93
+ "@intlayer/editor-react": "7.3.2-canary.1",
94
+ "@intlayer/types": "7.3.2-canary.1",
95
+ "@intlayer/unmerged-dictionaries-entry": "7.3.2-canary.1",
96
96
  "@tanstack/react-query": "5.90.10",
97
97
  "compression": "1.8.1",
98
98
  "cookie-parser": "1.4.7",
99
99
  "cors": "2.8.5",
100
100
  "express": "5.1.0",
101
- "express-intlayer": "7.3.1",
101
+ "express-intlayer": "7.3.2-canary.1",
102
102
  "framer-motion": "12.23.24",
103
103
  "fuse.js": "7.1.0",
104
104
  "helmet": "8.1.0",
105
- "intlayer": "7.3.1",
105
+ "intlayer": "7.3.2-canary.1",
106
106
  "lucide-react": "0.554.0",
107
107
  "mime": "4.1.0",
108
108
  "react": "19.2.0",
109
109
  "react-dom": "19.2.0",
110
- "react-intlayer": "7.3.1",
110
+ "react-intlayer": "7.3.2-canary.1",
111
111
  "react-router-dom": "7.9.5",
112
112
  "rimraf": "6.1.2",
113
- "vite-intlayer": "7.3.1"
113
+ "vite-intlayer": "7.3.2-canary.1"
114
114
  },
115
115
  "devDependencies": {
116
116
  "@tailwindcss/vite": "4.1.16",
@@ -127,21 +127,21 @@
127
127
  "babel-plugin-react-compiler": "^1.0.0",
128
128
  "globals": "16.5.0",
129
129
  "tailwindcss": "4.1.17",
130
- "tsdown": "0.16.6",
130
+ "tsdown": "0.16.8",
131
131
  "typescript": "5.9.3",
132
132
  "vite": "7.2.2",
133
- "vitest": "4.0.13"
133
+ "vitest": "4.0.14"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "clsx": "2.1.1",
137
137
  "framer-motion": "12.23.24",
138
- "intlayer": "7.3.1",
138
+ "intlayer": "7.3.2-canary.1",
139
139
  "react": ">=16.0.0",
140
140
  "react-dom": ">=16.0.0",
141
- "react-intlayer": "7.3.1",
141
+ "react-intlayer": "7.3.2-canary.1",
142
142
  "react-router-dom": ">=6.0.0",
143
143
  "tailwind-merge": "3.4.0",
144
- "vite-intlayer": "7.3.1"
144
+ "vite-intlayer": "7.3.2-canary.1"
145
145
  },
146
146
  "engines": {
147
147
  "node": ">=14.18"