@yamada-ui/cli 2.1.12-dev-20260819083400 → 2.1.13-dev-20260830142435

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 (2) hide show
  1. package/dist/index.mjs +8 -11
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5381,7 +5381,7 @@ function updateNotifier(options) {
5381
5381
  var package_default = {
5382
5382
  name: "@yamada-ui/cli",
5383
5383
  type: "module",
5384
- version: "2.1.11",
5384
+ version: "2.1.12",
5385
5385
  description: "The official CLI for Yamada UI projects",
5386
5386
  keywords: [
5387
5387
  "theme",
@@ -6043,24 +6043,21 @@ function transformContent(targetSection, content, { getSection }, generatedNames
6043
6043
  if (module) {
6044
6044
  const [section] = value.split("/").slice(-2);
6045
6045
  if (!generated || !section) return;
6046
- if (section === targetSection) replaceValue = `from "${path.join("..", name)}"`;
6047
- else {
6048
- const { path: relativePath } = getSection(section) ?? {};
6049
- if (!relativePath) return;
6050
- replaceValue = `from "${path.join("..", "..", relativePath, name)}"`;
6051
- }
6046
+ const { path: sectionPath } = getSection(section) ?? {};
6047
+ if (!sectionPath) return;
6048
+ const relativePath = path.posix.relative(path.posix.join(getSection(targetSection)?.path ?? targetSection, "dummy"), path.posix.join(sectionPath, name));
6049
+ replaceValue = `from "${relativePath.startsWith(".") ? relativePath : `./${relativePath}`}"`;
6052
6050
  } else {
6053
6051
  const depth = (value.match(/\.\.\//g) || []).length;
6054
6052
  if (!depth) return;
6055
- if (depth === 1) if (generated) replaceValue = `from "${path.join("..", name)}"`;
6053
+ if (depth === 1) if (generated) replaceValue = `from "${path.posix.join("..", name)}"`;
6056
6054
  else replaceValue = `from "${PACKAGE_NAME}/${targetSection}/${name}"`;
6057
6055
  else {
6058
6056
  const { path: sectionPath, section } = getSection(value.replace(/(\.\.\/|\.\/)/g, "").split("/").slice(0, -1).join("/")) ?? {};
6059
6057
  if (!section || !sectionPath) return;
6060
6058
  if (generated) {
6061
- const neededDepth = depth + (sectionPath.match(/\.\.\//g) || []).length;
6062
- const omittedTargetPath = sectionPath.replace(/(\.\.\/|\.\/)/g, "");
6063
- replaceValue = `from "${"../".repeat(neededDepth)}${omittedTargetPath}/${name}"`;
6059
+ const relativePath = path.posix.relative(path.posix.join(getSection(targetSection)?.path ?? targetSection, "dummy"), path.posix.join(sectionPath, name));
6060
+ replaceValue = `from "${relativePath.startsWith(".") ? relativePath : `./${relativePath}`}"`;
6064
6061
  } else replaceValue = `from "${PACKAGE_NAME}/${section}/${name}"`;
6065
6062
  }
6066
6063
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yamada-ui/cli",
3
3
  "type": "module",
4
- "version": "2.1.12-dev-20260819083400",
4
+ "version": "2.1.13-dev-20260830142435",
5
5
  "description": "The official CLI for Yamada UI projects",
6
6
  "keywords": [
7
7
  "theme",