toolcraft-openapi 0.0.181 → 0.0.183

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.
@@ -33,12 +33,12 @@
33
33
  },
34
34
  {
35
35
  "name": "toolcraft-openapi",
36
- "version": "0.0.181",
36
+ "version": "0.0.183",
37
37
  "license": "MIT"
38
38
  },
39
39
  {
40
40
  "name": "toolcraft-schema",
41
- "version": "0.0.181",
41
+ "version": "0.0.183",
42
42
  "license": "MIT"
43
43
  },
44
44
  {
@@ -1,6 +1,12 @@
1
1
  const graphemeSegmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
2
2
  export function graphemes(value) {
3
- return Array.from(graphemeSegmenter.segment(value), ({ segment }) => segment);
3
+ for (let index = 0; index < value.length; index += 1) {
4
+ const code = value.charCodeAt(index);
5
+ if (code < 0x20 || code > 0x7e) {
6
+ return Array.from(graphemeSegmenter.segment(value), ({ segment }) => segment);
7
+ }
8
+ }
9
+ return value.split("");
4
10
  }
5
11
  export function displayWidth(value, startColumn = 0) {
6
12
  let column = startColumn;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.181",
3
+ "version": "0.0.183",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-openapi",
3
- "version": "0.0.181",
3
+ "version": "0.0.183",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "toolcraft-openapi-generate": "dist/bin/generate.js"
31
31
  },
32
32
  "dependencies": {
33
- "toolcraft": "0.0.181",
33
+ "toolcraft": "0.0.183",
34
34
  "fast-string-width": "^3.0.2",
35
35
  "fast-wrap-ansi": "^0.2.0",
36
36
  "sisteransi": "^1.0.5",
@@ -45,7 +45,7 @@
45
45
  "directory": "packages/toolcraft-openapi"
46
46
  },
47
47
  "optionalDependencies": {
48
- "toolcraft-schema": "0.0.181",
48
+ "toolcraft-schema": "0.0.183",
49
49
  "toolcraft-design": "*",
50
50
  "@poe-code/frontmatter": "*"
51
51
  },