intlayer-editor 7.0.9-canary.2 → 7.1.0-canary.0

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-CV5z08t_.js","assets/css-BtVcDqlU.js","assets/javascript-BXO33K-2.js","assets/typescript-j4TNaYMi.js","assets/json-D07AUpjp.js","assets/html-derivative-9rfoponC.js","assets/html-Dkr1GMsP.js","assets/bundle-web-DnDpJc5N.js","assets/index-B_fQHAk5.js","assets/index-BVgTO6SK.css"])))=>i.map(i=>d[i]);
2
- import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-B_fQHAk5.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-CV5z08t_.js","assets/css-BtVcDqlU.js","assets/javascript-BXO33K-2.js","assets/typescript-j4TNaYMi.js","assets/json-D07AUpjp.js","assets/html-derivative-9rfoponC.js","assets/html-Dkr1GMsP.js","assets/bundle-web-DkwBW04f.js","assets/index-e-HKwUP8.js","assets/index-BVgTO6SK.css"])))=>i.map(i=>d[i]);
2
+ import { r as reactExports, j as jsxRuntimeExports, C as CodeDefault, _ as __vitePreload } from "./index-e-HKwUP8.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-DnDpJc5N.js"), true ? __vite__mapDeps([7,8,9]) : void 0),
63
+ __vitePreload(() => import("./bundle-web-DkwBW04f.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-CqDu7dYI.js","assets/html-Dkr1GMsP.js","assets/javascript-BXO33K-2.js","assets/css-BtVcDqlU.js","assets/angular-ts-JUgYMaAO.js","assets/scss-Dq-LbI_c.js","assets/astro-DgRPb09x.js","assets/json-D07AUpjp.js","assets/typescript-j4TNaYMi.js","assets/postcss-kj1IbjVd.js","assets/tsx-B9RA6cgQ.js","assets/blade-BNo76U2i.js","assets/html-derivative-9rfoponC.js","assets/xml-BMzZeaqs.js","assets/java-BfXh-0uJ.js","assets/sql-DzUuSofg.js","assets/coffee-DRmm8L99.js","assets/cpp-zh2ePAE_.js","assets/regexp-BxWeO75u.js","assets/glsl-CGsiYPcu.js","assets/c-C4VtT7JA.js","assets/graphql-BRx9mrhY.js","assets/jsx-BPmvoin2.js","assets/haml-O037W7a8.js","assets/handlebars-kwM0CYPJ.js","assets/yaml-B_vW5iTY.js","assets/http-CB4Cm8yY.js","assets/bash-Bz2gZrDc.js","assets/jinja-DX5epABU.js","assets/jison-5-r4c8L1.js","assets/julia-CSYRDJn0.js","assets/python-CrdIx4PZ.js","assets/r-oprfD2-9.js","assets/marko-D6KBFqYp.js","assets/less-BAzLMJNR.js","assets/mdc-N73HqDUD.js","assets/markdown-F_EULe_G.js","assets/php-D0sxH1LE.js","assets/pug-HL4PJmfE.js","assets/svelte-zeq24KqG.js","assets/ts-tags-CINmazHI.js","assets/vue-CV5z08t_.js","assets/vue-html-k04GfWOW.js","assets/vue-vine-BL_nHMoY.js","assets/stylus-DXFa_2Jl.js"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./index-B_fQHAk5.js";
2
+ import { _ as __vitePreload } from "./index-e-HKwUP8.js";
3
3
  let ShikiError$2 = class ShikiError extends Error {
4
4
  constructor(message) {
5
5
  super(message);
@@ -14876,35 +14876,28 @@ const getPathWithoutLocale = (inputUrl, locales = configuration?.internationaliz
14876
14876
  if (isAbsoluteUrl) return url.toString();
14877
14877
  return url.toString().replace("http://example.com", "");
14878
14878
  };
14879
- const getMultilingualUrls = (url, locales = configuration?.internationalization?.locales, defaultLocale = configuration?.internationalization?.defaultLocale, mode = configuration?.routing?.mode) => {
14879
+ const getLocalizedUrl = (url, currentLocale, options = {}) => {
14880
+ const { locales = configuration?.internationalization?.locales ?? defaultValues_exports.Internationalization.LOCALES, defaultLocale = configuration?.internationalization?.defaultLocale ?? defaultValues_exports.Internationalization.DEFAULT_LOCALE, mode = configuration?.routing?.mode ?? defaultValues_exports.Routing.ROUTING_MODE } = options;
14880
14881
  const urlWithoutLocale = getPathWithoutLocale(url, locales);
14882
+ if (mode === "no-prefix") return urlWithoutLocale;
14881
14883
  const isAbsoluteUrl = checkIsURLAbsolute(urlWithoutLocale);
14882
14884
  const parsedUrl = isAbsoluteUrl ? new URL(urlWithoutLocale) : new URL(urlWithoutLocale, "http://example.com");
14883
14885
  let pathname = parsedUrl.pathname;
14884
14886
  if (!pathname.startsWith("/")) pathname = `/${pathname}`;
14885
14887
  const baseUrl = isAbsoluteUrl ? `${parsedUrl.protocol}//${parsedUrl.host}` : "";
14886
- const routingMode = mode ?? defaultValues_exports.Routing.ROUTING_MODE;
14887
- return (locales ?? []).reduce((acc, locale) => {
14888
- const isDefaultLocale = locale?.toString() === defaultLocale?.toString();
14889
- let localizedUrl;
14890
- if (routingMode === "search-params") {
14891
- const searchParams = new URLSearchParams(parsedUrl.search);
14892
- searchParams.set("locale", locale.toString());
14893
- const queryString = searchParams.toString();
14894
- const pathWithQuery = queryString ? `${pathname}?${queryString}` : pathname;
14895
- localizedUrl = isAbsoluteUrl ? `${baseUrl}${pathWithQuery}${parsedUrl.hash}` : `${pathWithQuery}${parsedUrl.hash}`;
14896
- } else if (routingMode === "no-prefix") localizedUrl = isAbsoluteUrl ? `${baseUrl}${pathname}${parsedUrl.search}${parsedUrl.hash}` : `${pathname}${parsedUrl.search}${parsedUrl.hash}`;
14897
- else {
14898
- let localizedPath = routingMode === "prefix-all" || routingMode === "prefix-no-default" && !isDefaultLocale ? `/${locale}${pathname}` : pathname;
14899
- if (localizedPath.length > 1 && localizedPath.endsWith("/")) localizedPath = localizedPath.slice(0, -1);
14900
- localizedUrl = isAbsoluteUrl ? `${baseUrl}${localizedPath}${parsedUrl.search}${parsedUrl.hash}` : `${localizedPath}${parsedUrl.search}${parsedUrl.hash}`;
14901
- }
14902
- acc[locale] = localizedUrl;
14903
- return acc;
14904
- }, {});
14905
- };
14906
- const getLocalizedUrl = (url, currentLocale, locales = configuration?.internationalization?.locales, defaultLocale = configuration?.internationalization?.defaultLocale, mode = configuration?.routing?.mode) => {
14907
- return getMultilingualUrls(url, locales, defaultLocale, mode)[currentLocale] ?? url;
14888
+ if (mode === "search-params") {
14889
+ const searchParams = new URLSearchParams(parsedUrl.search);
14890
+ searchParams.set("locale", currentLocale.toString());
14891
+ const queryString = searchParams.toString();
14892
+ const pathWithQuery = queryString ? `${pathname}?${queryString}` : pathname;
14893
+ if (isAbsoluteUrl) return `${baseUrl}${pathWithQuery}${parsedUrl.hash}`;
14894
+ return `${pathWithQuery}${parsedUrl.hash}`;
14895
+ }
14896
+ const isDefaultLocale = currentLocale?.toString() === defaultLocale?.toString();
14897
+ let localizedPath = mode === "prefix-all" || mode === "prefix-no-default" && !isDefaultLocale ? `/${currentLocale}${pathname}` : pathname;
14898
+ if (localizedPath.length > 1 && localizedPath.endsWith("/")) localizedPath = localizedPath.slice(0, -1);
14899
+ if (isAbsoluteUrl) return `${baseUrl}${localizedPath}${parsedUrl.search}${parsedUrl.hash}`;
14900
+ return `${localizedPath}${parsedUrl.search}${parsedUrl.hash}`;
14908
14901
  };
14909
14902
  const isSameKeyPath = (keyPath1, keyPath2) => keyPath1.every((element, index2) => keyPath2[index2] && keyPath2[index2].key === element.key && keyPath2[index2].type === element.type);
14910
14903
  const localeInStorage = getLocaleFromStorage(localeStorageOptions);
@@ -49651,7 +49644,7 @@ const CodeDefault = ({ children }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div
49651
49644
  }, `line-${index2}-${line.slice(0, 10)}`)) })
49652
49645
  })
49653
49646
  });
49654
- const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-DcO6QqUs.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
49647
+ const CodeBlockShiki = reactExports.lazy(() => __vitePreload(() => import("./CodeBlockShiki-DnZQYzr7.js"), true ? [] : void 0).then((mod) => ({ default: mod.CodeBlockShiki })));
49655
49648
  const CodeBlock = ({ className, onChange, isEditable, children, lang, isDarkMode, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
49656
49649
  className: cn$2("flex w-full min-w-0 max-w-full overflow-x-auto", className),
49657
49650
  ...props,
@@ -5,7 +5,7 @@
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-B_fQHAk5.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-e-HKwUP8.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BVgTO6SK.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer-editor",
3
- "version": "7.0.9-canary.2",
3
+ "version": "7.1.0-canary.0",
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": [
@@ -77,39 +77,39 @@
77
77
  "start": "bun server/dist/esm/index.mjs",
78
78
  "start:client": "vite preview --config ./client/vite.config.ts",
79
79
  "start:server": "bun --watch --hot ./server/dist/esm/index.mjs",
80
- "publish": "bun publish --access public || true",
81
- "publish:canary": "bun publish --tag canary --access public || true",
82
- "publish:latest": "bun publish --tag latest --access public || true",
80
+ "publish": "bun publish || true",
81
+ "publish:canary": "bun publish --tag canary || true",
82
+ "publish:latest": "bun publish --tag latest || true",
83
83
  "test": "vitest run",
84
84
  "test:watch": "vitest",
85
85
  "typecheck": "tsc --project ./server/tsconfig.types.json --noEmit"
86
86
  },
87
87
  "dependencies": {
88
- "@intlayer/api": "7.0.9-canary.2",
89
- "@intlayer/config": "7.0.9-canary.2",
90
- "@intlayer/core": "7.0.9-canary.2",
91
- "@intlayer/design-system": "7.0.9-canary.2",
92
- "@intlayer/editor-react": "7.0.9-canary.2",
93
- "@intlayer/types": "7.0.9-canary.2",
94
- "@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
88
+ "@intlayer/api": "7.1.0-canary.0",
89
+ "@intlayer/config": "7.1.0-canary.0",
90
+ "@intlayer/core": "7.1.0-canary.0",
91
+ "@intlayer/design-system": "7.1.0-canary.0",
92
+ "@intlayer/editor-react": "7.1.0-canary.0",
93
+ "@intlayer/types": "7.1.0-canary.0",
94
+ "@intlayer/unmerged-dictionaries-entry": "7.1.0-canary.0",
95
95
  "@tanstack/react-query": "5.90.8",
96
96
  "compression": "1.8.1",
97
97
  "cookie-parser": "1.4.7",
98
98
  "cors": "2.8.5",
99
99
  "express": "5.1.0",
100
- "express-intlayer": "7.0.9-canary.2",
100
+ "express-intlayer": "7.1.0-canary.0",
101
101
  "framer-motion": "12.23.24",
102
102
  "fuse.js": "7.1.0",
103
103
  "helmet": "8.1.0",
104
- "intlayer": "7.0.9-canary.2",
104
+ "intlayer": "7.1.0-canary.0",
105
105
  "lucide-react": "0.553.0",
106
106
  "mime": "4.1.0",
107
107
  "react": "19.2.0",
108
108
  "react-dom": "19.2.0",
109
- "react-intlayer": "7.0.9-canary.2",
109
+ "react-intlayer": "7.1.0-canary.0",
110
110
  "react-router-dom": "7.9.5",
111
111
  "rimraf": "6.1.0",
112
- "vite-intlayer": "7.0.9-canary.2"
112
+ "vite-intlayer": "7.1.0-canary.0"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@tailwindcss/vite": "4.1.16",
@@ -132,23 +132,23 @@
132
132
  "vitest": "4.0.8"
133
133
  },
134
134
  "peerDependencies": {
135
- "@intlayer/chokidar": "7.0.9-canary.2",
136
- "@intlayer/config": "7.0.9-canary.2",
137
- "@intlayer/core": "7.0.9-canary.2",
138
- "@intlayer/design-system": "7.0.9-canary.2",
139
- "@intlayer/dictionaries-entry": "7.0.9-canary.2",
140
- "@intlayer/editor-react": "7.0.9-canary.2",
141
- "@intlayer/types": "7.0.9-canary.2",
142
- "@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
135
+ "@intlayer/chokidar": "7.1.0-canary.0",
136
+ "@intlayer/config": "7.1.0-canary.0",
137
+ "@intlayer/core": "7.1.0-canary.0",
138
+ "@intlayer/design-system": "7.1.0-canary.0",
139
+ "@intlayer/dictionaries-entry": "7.1.0-canary.0",
140
+ "@intlayer/editor-react": "7.1.0-canary.0",
141
+ "@intlayer/types": "7.1.0-canary.0",
142
+ "@intlayer/unmerged-dictionaries-entry": "7.1.0-canary.0",
143
143
  "clsx": "2.1.1",
144
144
  "framer-motion": "12.23.24",
145
- "intlayer": "7.0.9-canary.2",
145
+ "intlayer": "7.1.0-canary.0",
146
146
  "react": ">=16.0.0",
147
147
  "react-dom": ">=16.0.0",
148
- "react-intlayer": "7.0.9-canary.2",
148
+ "react-intlayer": "7.1.0-canary.0",
149
149
  "react-router-dom": ">=6.0.0",
150
150
  "tailwind-merge": "3.4.0",
151
- "vite-intlayer": "7.0.9-canary.2"
151
+ "vite-intlayer": "7.1.0-canary.0"
152
152
  },
153
153
  "engines": {
154
154
  "node": ">=14.18"