@yamada-ui/utils 1.0.8 → 1.1.0-dev-20240405180056

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 +1 @@
1
- {"version":3,"sources":["../src/string.ts"],"sourcesContent":["export const escape = (value: string, replaceValue: string = \"\"): string =>\n value.replace(/\\s+/g, replaceValue)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,SAAS,CAAC,OAAe,eAAuB,OAC3D,MAAM,QAAQ,QAAQ,YAAY;","names":[]}
1
+ {"version":3,"sources":["../src/string.ts"],"sourcesContent":["import type { StringLiteral } from \"./index.types\"\n\nexport const escape = (value: string, replaceValue: string = \"\"): string =>\n value.replace(/\\s+/g, replaceValue)\n\nexport const antonym = (value: string): string => {\n switch (value) {\n case \"top\":\n return \"bottom\"\n\n case \"bottom\":\n return \"top\"\n\n case \"left\":\n return \"right\"\n\n case \"right\":\n return \"left\"\n\n case \"start\":\n return \"end\"\n\n case \"end\":\n return \"start\"\n\n case \"x\":\n return \"y\"\n\n case \"y\":\n return \"x\"\n\n case \"enter\":\n return \"exit\"\n\n case \"exit\":\n return \"enter\"\n\n case \"vertical\":\n return \"horizontal\"\n\n case \"horizontal\":\n return \"vertical\"\n\n case \"up\":\n return \"down\"\n\n case \"down\":\n return \"up\"\n\n case \"block\":\n return \"inline\"\n\n case \"inline\":\n return \"block\"\n\n default:\n return value\n }\n}\n\nexport const toCamelCase = (value: StringLiteral): string =>\n value\n .toLowerCase()\n .replace(/-(.)/g, (_, group1) => group1.toUpperCase())\n .replace(/^(.)/, (_, group1) => group1.toUpperCase())\n\nexport const toKebabCase = (value: StringLiteral): string =>\n value\n .replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, \"$1-$2\")\n .toLowerCase()\n .replace(/^-/, \"\")\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,SAAS,CAAC,OAAe,eAAuB,OAC3D,MAAM,QAAQ,QAAQ,YAAY;AAE7B,IAAM,UAAU,CAAC,UAA0B;AAChD,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET,KAAK;AACH,aAAO;AAAA,IAET;AACE,aAAO;AAAA,EACX;AACF;AAEO,IAAM,cAAc,CAAC,UAC1B,MACG,YAAY,EACZ,QAAQ,SAAS,CAAC,GAAG,WAAW,OAAO,YAAY,CAAC,EACpD,QAAQ,QAAQ,CAAC,GAAG,WAAW,OAAO,YAAY,CAAC;AAEjD,IAAM,cAAc,CAAC,UAC1B,MACG,QAAQ,gCAAgC,OAAO,EAC/C,YAAY,EACZ,QAAQ,MAAM,EAAE;","names":[]}
package/dist/string.mjs CHANGED
@@ -1,7 +1,13 @@
1
1
  import {
2
- escape
3
- } from "./chunk-TX5GWD7K.mjs";
2
+ antonym,
3
+ escape,
4
+ toCamelCase,
5
+ toKebabCase
6
+ } from "./chunk-WRCRDOPY.mjs";
4
7
  export {
5
- escape
8
+ antonym,
9
+ escape,
10
+ toCamelCase,
11
+ toKebabCase
6
12
  };
7
13
  //# sourceMappingURL=string.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/utils",
3
- "version": "1.0.8",
3
+ "version": "1.1.0-dev-20240405180056",
4
4
  "description": "Yamada UI utils",
5
5
  "keywords": [
6
6
  "utils",
@@ -1,7 +0,0 @@
1
- // src/string.ts
2
- var escape = (value, replaceValue = "") => value.replace(/\s+/g, replaceValue);
3
-
4
- export {
5
- escape
6
- };
7
- //# sourceMappingURL=chunk-TX5GWD7K.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/string.ts"],"sourcesContent":["export const escape = (value: string, replaceValue: string = \"\"): string =>\n value.replace(/\\s+/g, replaceValue)\n"],"mappings":";AAAO,IAAM,SAAS,CAAC,OAAe,eAAuB,OAC3D,MAAM,QAAQ,QAAQ,YAAY;","names":[]}