@cometix/claude-code 2.1.141 → 2.1.143

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/bun-ink-compat.cjs +383 -75
  2. package/package.json +10 -10
@@ -38,14 +38,317 @@ var require_emoji_regex = __commonJS({
38
38
  }
39
39
  });
40
40
 
41
- // bun-compat-entry.ts
42
- var bun_compat_entry_exports = {};
43
- __export(bun_compat_entry_exports, {
41
+ // ../../../../../../private/tmp/width-overrides.cjs
42
+ var require_width_overrides = __commonJS({
43
+ "../../../../../../private/tmp/width-overrides.cjs"(exports2, module2) {
44
+ var CODEPOINT_WIDTH_OVERRIDES = /* @__PURE__ */ new Map([
45
+ [2307, 1],
46
+ [2365, 1],
47
+ [2382, 1],
48
+ [2383, 1],
49
+ [2435, 1],
50
+ [2493, 1],
51
+ [2510, 1],
52
+ [2511, 1],
53
+ [2563, 1],
54
+ [2621, 1],
55
+ [2638, 1],
56
+ [2639, 1],
57
+ [2691, 1],
58
+ [2749, 1],
59
+ [2766, 1],
60
+ [2767, 1],
61
+ [2819, 1],
62
+ [2877, 1],
63
+ [2894, 1],
64
+ [2895, 1],
65
+ [2947, 1],
66
+ [3005, 1],
67
+ [3022, 1],
68
+ [3023, 1],
69
+ [3075, 1],
70
+ [3133, 1],
71
+ [3150, 1],
72
+ [3151, 1],
73
+ [3203, 1],
74
+ [3261, 1],
75
+ [3278, 1],
76
+ [3279, 1],
77
+ [3331, 1],
78
+ [3389, 1],
79
+ [3406, 1],
80
+ [3407, 1],
81
+ [8206, 0],
82
+ [8207, 0],
83
+ [8419, 2],
84
+ [9728, 1],
85
+ [9729, 1],
86
+ [9730, 1],
87
+ [9731, 1],
88
+ [9732, 1],
89
+ [9742, 1],
90
+ [9745, 1],
91
+ [9752, 1],
92
+ [9757, 1],
93
+ [9760, 1],
94
+ [9762, 1],
95
+ [9763, 1],
96
+ [9766, 1],
97
+ [9770, 1],
98
+ [9774, 1],
99
+ [9775, 1],
100
+ [9776, 1],
101
+ [9777, 1],
102
+ [9778, 1],
103
+ [9779, 1],
104
+ [9780, 1],
105
+ [9781, 1],
106
+ [9782, 1],
107
+ [9783, 1],
108
+ [9784, 1],
109
+ [9785, 1],
110
+ [9786, 1],
111
+ [9792, 1],
112
+ [9794, 1],
113
+ [9823, 1],
114
+ [9824, 1],
115
+ [9827, 1],
116
+ [9829, 1],
117
+ [9830, 1],
118
+ [9832, 1],
119
+ [9851, 1],
120
+ [9854, 1],
121
+ [9866, 1],
122
+ [9867, 1],
123
+ [9868, 1],
124
+ [9869, 1],
125
+ [9870, 1],
126
+ [9871, 1],
127
+ [9874, 1],
128
+ [9876, 1],
129
+ [9877, 1],
130
+ [9878, 1],
131
+ [9879, 1],
132
+ [9881, 1],
133
+ [9883, 1],
134
+ [9884, 1],
135
+ [9888, 1],
136
+ [9895, 1],
137
+ [9904, 1],
138
+ [9905, 1],
139
+ [9928, 1],
140
+ [9935, 1],
141
+ [9937, 1],
142
+ [9939, 1],
143
+ [9961, 1],
144
+ [9968, 1],
145
+ [9969, 1],
146
+ [9972, 1],
147
+ [9975, 1],
148
+ [9976, 1],
149
+ [9977, 1],
150
+ [9986, 1],
151
+ [9992, 1],
152
+ [9993, 1],
153
+ [9996, 1],
154
+ [9997, 1],
155
+ [9999, 1],
156
+ [10002, 1],
157
+ [10004, 1],
158
+ [10006, 1],
159
+ [10013, 1],
160
+ [10017, 1],
161
+ [10035, 1],
162
+ [10036, 1],
163
+ [10052, 1],
164
+ [10055, 1],
165
+ [10083, 1],
166
+ [10084, 1],
167
+ [10145, 1],
168
+ [12772, 1],
169
+ [12773, 1],
170
+ [19904, 1],
171
+ [19905, 1],
172
+ [19906, 1],
173
+ [19907, 1],
174
+ [19908, 1],
175
+ [19909, 1],
176
+ [19910, 1],
177
+ [19911, 1],
178
+ [19912, 1],
179
+ [19913, 1],
180
+ [19914, 1],
181
+ [19915, 1],
182
+ [19916, 1],
183
+ [19917, 1],
184
+ [19918, 1],
185
+ [19919, 1],
186
+ [19920, 1],
187
+ [19921, 1],
188
+ [19922, 1],
189
+ [19923, 1],
190
+ [19924, 1],
191
+ [19925, 1],
192
+ [19926, 1],
193
+ [19927, 1],
194
+ [19928, 1],
195
+ [19929, 1],
196
+ [19930, 1],
197
+ [19931, 1],
198
+ [19932, 1],
199
+ [19933, 1],
200
+ [19934, 1],
201
+ [19935, 1],
202
+ [19936, 1],
203
+ [19937, 1],
204
+ [19938, 1],
205
+ [19939, 1],
206
+ [19940, 1],
207
+ [19941, 1],
208
+ [19942, 1],
209
+ [19943, 1],
210
+ [19944, 1],
211
+ [19945, 1],
212
+ [19946, 1],
213
+ [19947, 1],
214
+ [19948, 1],
215
+ [19949, 1],
216
+ [19950, 1],
217
+ [19951, 1],
218
+ [19952, 1],
219
+ [19953, 1],
220
+ [19954, 1],
221
+ [19955, 1],
222
+ [19956, 1],
223
+ [19957, 1],
224
+ [19958, 1],
225
+ [19959, 1],
226
+ [19960, 1],
227
+ [19961, 1],
228
+ [19962, 1],
229
+ [19963, 1],
230
+ [19964, 1],
231
+ [19965, 1],
232
+ [19966, 1],
233
+ [19967, 1],
234
+ [127777, 1],
235
+ [127780, 1],
236
+ [127781, 1],
237
+ [127782, 1],
238
+ [127783, 1],
239
+ [127784, 1],
240
+ [127785, 1],
241
+ [127786, 1],
242
+ [127787, 1],
243
+ [127788, 1],
244
+ [127798, 1],
245
+ [127869, 1],
246
+ [127894, 1],
247
+ [127895, 1],
248
+ [127897, 1],
249
+ [127898, 1],
250
+ [127899, 1],
251
+ [127902, 1],
252
+ [127903, 1],
253
+ [127947, 1],
254
+ [127948, 1],
255
+ [127949, 1],
256
+ [127950, 1],
257
+ [127956, 1],
258
+ [127957, 1],
259
+ [127958, 1],
260
+ [127959, 1],
261
+ [127960, 1],
262
+ [127961, 1],
263
+ [127962, 1],
264
+ [127963, 1],
265
+ [127964, 1],
266
+ [127965, 1],
267
+ [127966, 1],
268
+ [127967, 1],
269
+ [127987, 1],
270
+ [127989, 1],
271
+ [127991, 1],
272
+ [128063, 1],
273
+ [128065, 1],
274
+ [128253, 1],
275
+ [128329, 1],
276
+ [128330, 1],
277
+ [128367, 1],
278
+ [128368, 1],
279
+ [128371, 1],
280
+ [128372, 1],
281
+ [128373, 1],
282
+ [128374, 1],
283
+ [128375, 1],
284
+ [128376, 1],
285
+ [128377, 1],
286
+ [128391, 1],
287
+ [128394, 1],
288
+ [128395, 1],
289
+ [128396, 1],
290
+ [128397, 1],
291
+ [128400, 1],
292
+ [128421, 1],
293
+ [128424, 1],
294
+ [128433, 1],
295
+ [128434, 1],
296
+ [128444, 1],
297
+ [128450, 1],
298
+ [128451, 1],
299
+ [128452, 1],
300
+ [128465, 1],
301
+ [128466, 1],
302
+ [128467, 1],
303
+ [128476, 1],
304
+ [128477, 1],
305
+ [128478, 1],
306
+ [128481, 1],
307
+ [128483, 1],
308
+ [128488, 1],
309
+ [128495, 1],
310
+ [128499, 1],
311
+ [128506, 1],
312
+ [128715, 1],
313
+ [128717, 1],
314
+ [128718, 1],
315
+ [128719, 1],
316
+ [128728, 1],
317
+ [128736, 1],
318
+ [128737, 1],
319
+ [128738, 1],
320
+ [128739, 1],
321
+ [128740, 1],
322
+ [128741, 1],
323
+ [128745, 1],
324
+ [128752, 1],
325
+ [128755, 1],
326
+ [129673, 1],
327
+ [129674, 1],
328
+ [129678, 1],
329
+ [129679, 1],
330
+ [129726, 1],
331
+ [129734, 1],
332
+ [129736, 1],
333
+ [129741, 1],
334
+ [129756, 1],
335
+ [129759, 1],
336
+ [129769, 1],
337
+ [129770, 1],
338
+ [129775, 1]
339
+ ]);
340
+ module2.exports = { CODEPOINT_WIDTH_OVERRIDES };
341
+ }
342
+ });
343
+
344
+ // bun-compat-final.ts
345
+ var bun_compat_final_exports = {};
346
+ __export(bun_compat_final_exports, {
44
347
  stringWidth: () => stringWidth2,
45
348
  stripANSI: () => stripANSI,
46
349
  wrapAnsi: () => wrapAnsi2
47
350
  });
48
- module.exports = __toCommonJS(bun_compat_entry_exports);
351
+ module.exports = __toCommonJS(bun_compat_final_exports);
49
352
  var import_emoji_regex = __toESM(require_emoji_regex(), 1);
50
353
 
51
354
  // node_modules/get-east-asian-width/lookup-data.js
@@ -762,101 +1065,106 @@ function wrapAnsi(string, columns, options) {
762
1065
  return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs(line), columns, options)).join("\n");
763
1066
  }
764
1067
 
765
- // bun-compat-entry.ts
766
- var _segmenter = null;
767
- function getGraphemeSegmenter() {
768
- if (!_segmenter) _segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
769
- return _segmenter;
1068
+ // bun-compat-final.ts
1069
+ var OV = require_width_overrides().CODEPOINT_WIDTH_OVERRIDES;
1070
+ var _s = null;
1071
+ function seg() {
1072
+ if (!_s) _s = new Intl.Segmenter(void 0, { granularity: "grapheme" });
1073
+ return _s;
770
1074
  }
771
- var EMOJI_REGEX = (0, import_emoji_regex.default)();
772
- function needsSegmentation(str) {
773
- for (const char of str) {
774
- const cp = char.codePointAt(0);
775
- if (cp >= 127744 && cp <= 129791) return true;
776
- if (cp >= 9728 && cp <= 10175) return true;
777
- if (cp >= 127462 && cp <= 127487) return true;
778
- if (cp >= 65024 && cp <= 65039) return true;
779
- if (cp === 8205) return true;
1075
+ var ER = (0, import_emoji_regex.default)();
1076
+ function needsSeg(s) {
1077
+ for (const c of s) {
1078
+ const p = c.codePointAt(0);
1079
+ if (p >= 127744 && p <= 129791 || p >= 9728 && p <= 10175 || p >= 127462 && p <= 127487 || p >= 65024 && p <= 65039 || p === 8205) return true;
780
1080
  }
781
1081
  return false;
782
1082
  }
783
- function getEmojiWidth(grapheme) {
784
- const first = grapheme.codePointAt(0);
785
- if (first >= 127462 && first <= 127487) {
786
- let count = 0;
787
- for (const _ of grapheme) count++;
788
- return count === 1 ? 1 : 2;
1083
+ function hasTextVS(g) {
1084
+ for (const c of g) if (c.codePointAt(0) === 65038) return true;
1085
+ return false;
1086
+ }
1087
+ function emojiW(g) {
1088
+ if (hasTextVS(g)) return 1;
1089
+ const f = g.codePointAt(0);
1090
+ if (f >= 127462 && f <= 127487) {
1091
+ let n = 0;
1092
+ for (const _ of g) n++;
1093
+ return n === 1 ? 1 : 2;
789
1094
  }
790
- if (grapheme.length === 2) {
791
- const second = grapheme.codePointAt(1);
792
- if (second === 65039 && (first >= 48 && first <= 57 || first === 35 || first === 42)) return 1;
1095
+ if (g.length === 2) {
1096
+ const s = g.codePointAt(1);
1097
+ if (s === 65039 && (f >= 48 && f <= 57 || f === 35 || f === 42)) return 1;
793
1098
  }
794
1099
  return 2;
795
1100
  }
796
- function isZeroWidth(codePoint) {
797
- if (codePoint >= 32 && codePoint < 127) return false;
798
- if (codePoint >= 160 && codePoint < 768) return codePoint === 173;
799
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) return true;
800
- if (codePoint >= 8203 && codePoint <= 8205 || codePoint === 65279 || codePoint >= 8288 && codePoint <= 8292) return true;
801
- if (codePoint >= 65024 && codePoint <= 65039 || codePoint >= 917760 && codePoint <= 917999) return true;
802
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) return true;
803
- if (codePoint >= 2304 && codePoint <= 3407) {
804
- const offset = codePoint & 127;
805
- if (offset <= 3) return true;
806
- if (offset >= 58 && offset <= 79) return true;
807
- if (offset >= 81 && offset <= 87) return true;
808
- if (offset >= 98 && offset <= 99) return true;
809
- }
810
- if (codePoint === 3633 || codePoint >= 3636 && codePoint <= 3642 || codePoint >= 3655 && codePoint <= 3662 || codePoint === 3761 || codePoint >= 3764 && codePoint <= 3772 || codePoint >= 3784 && codePoint <= 3789) return true;
811
- if (codePoint >= 1536 && codePoint <= 1541 || codePoint === 1757 || codePoint === 1807 || codePoint === 2274) return true;
812
- if (codePoint >= 55296 && codePoint <= 57343) return true;
813
- if (codePoint >= 917504 && codePoint <= 917631) return true;
1101
+ function isZW(p) {
1102
+ if (p >= 32 && p < 127) return false;
1103
+ if (p >= 160 && p < 768) return p === 173;
1104
+ if (p <= 31 || p >= 127 && p <= 159) return true;
1105
+ if (p >= 8203 && p <= 8205 || p === 65279 || p >= 8288 && p <= 8292) return true;
1106
+ if (p >= 65024 && p <= 65039 || p >= 917760 && p <= 917999) return true;
1107
+ if (p >= 768 && p <= 879 || p >= 6832 && p <= 6911 || p >= 7616 && p <= 7679 || p >= 8400 && p <= 8447 || p >= 65056 && p <= 65071) return true;
1108
+ if (p >= 2304 && p <= 3407) {
1109
+ const o = p & 127;
1110
+ if (o <= 3 || o >= 58 && o <= 79 || o >= 81 && o <= 87 || o >= 98 && o <= 99) return true;
1111
+ }
1112
+ if (p === 3633 || p >= 3636 && p <= 3642 || p >= 3655 && p <= 3662 || p === 3761 || p >= 3764 && p <= 3772 || p >= 3784 && p <= 3789) return true;
1113
+ if (p >= 1536 && p <= 1541 || p === 1757 || p === 1807 || p === 2274) return true;
1114
+ if (p >= 55296 && p <= 57343) return true;
1115
+ if (p >= 917504 && p <= 917631) return true;
814
1116
  return false;
815
1117
  }
1118
+ function cw(p) {
1119
+ const o = OV.get(p);
1120
+ if (o !== void 0) return o;
1121
+ if (isZW(p)) return 0;
1122
+ return eastAsianWidth(p, { ambiguousAsWide: false });
1123
+ }
816
1124
  function stringWidth2(str) {
817
1125
  if (typeof str !== "string" || str.length === 0) return 0;
818
- let isPureAscii = true;
819
- for (let i = 0; i < str.length; i++) {
820
- if (str.charCodeAt(i) >= 127 || str.charCodeAt(i) === 27) {
821
- isPureAscii = false;
822
- break;
823
- }
1126
+ let a = true;
1127
+ for (let i = 0; i < str.length; i++) if (str.charCodeAt(i) >= 127 || str.charCodeAt(i) === 27) {
1128
+ a = false;
1129
+ break;
824
1130
  }
825
- if (isPureAscii) {
826
- let width2 = 0;
827
- for (let i = 0; i < str.length; i++) {
828
- if (str.charCodeAt(i) > 31) width2++;
829
- }
830
- return width2;
1131
+ if (a) {
1132
+ let w2 = 0;
1133
+ for (let i = 0; i < str.length; i++) if (str.charCodeAt(i) > 31) w2++;
1134
+ return w2;
831
1135
  }
832
1136
  if (str.includes("\x1B")) {
833
1137
  str = stripAnsi(str);
834
- if (str.length === 0) return 0;
1138
+ if (!str.length) return 0;
835
1139
  }
836
- if (!needsSegmentation(str)) {
837
- let width2 = 0;
838
- for (const char of str) {
839
- const cp = char.codePointAt(0);
840
- if (!isZeroWidth(cp)) width2 += eastAsianWidth(cp, { ambiguousAsWide: false });
841
- }
842
- return width2;
1140
+ if (!needsSeg(str)) {
1141
+ let w2 = 0;
1142
+ for (const c of str) w2 += cw(c.codePointAt(0));
1143
+ return w2;
843
1144
  }
844
- let width = 0;
845
- for (const { segment: grapheme } of getGraphemeSegmenter().segment(str)) {
846
- EMOJI_REGEX.lastIndex = 0;
847
- if (EMOJI_REGEX.test(grapheme)) {
848
- width += getEmojiWidth(grapheme);
1145
+ let w = 0;
1146
+ for (const { segment: g } of seg().segment(str)) {
1147
+ if ([...g].length === 1) {
1148
+ const o = OV.get(g.codePointAt(0));
1149
+ if (o !== void 0) {
1150
+ w += o;
1151
+ continue;
1152
+ }
1153
+ }
1154
+ ER.lastIndex = 0;
1155
+ if (ER.test(g)) {
1156
+ w += emojiW(g);
849
1157
  continue;
850
1158
  }
851
- for (const char of grapheme) {
852
- const cp = char.codePointAt(0);
853
- if (!isZeroWidth(cp)) {
854
- width += eastAsianWidth(cp, { ambiguousAsWide: false });
1159
+ for (const c of g) {
1160
+ const p = c.codePointAt(0);
1161
+ if (!isZW(p)) {
1162
+ w += cw(p);
855
1163
  break;
856
1164
  }
857
1165
  }
858
1166
  }
859
- return width;
1167
+ return w;
860
1168
  }
861
1169
  var stripANSI = stripAnsi;
862
1170
  var wrapAnsi2 = wrapAnsi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometix/claude-code",
3
- "version": "2.1.141",
3
+ "version": "2.1.143",
4
4
  "bin": {
5
5
  "claude": "cli.js"
6
6
  },
@@ -28,15 +28,15 @@
28
28
  "semver": "^7.6.3"
29
29
  },
30
30
  "optionalDependencies": {
31
- "@cometix/claude-code-darwin-arm64": "2.1.141",
32
- "@cometix/claude-code-darwin-x64": "2.1.141",
33
- "@cometix/claude-code-linux-arm64": "2.1.141",
34
- "@cometix/claude-code-linux-x64": "2.1.141",
35
- "@cometix/claude-code-linux-arm64-musl": "2.1.141",
36
- "@cometix/claude-code-linux-x64-musl": "2.1.141",
37
- "@cometix/claude-code-win32-arm64": "2.1.141",
38
- "@cometix/claude-code-win32-x64": "2.1.141",
39
- "@cometix/claude-code-android-arm64": "2.1.141",
31
+ "@cometix/claude-code-darwin-arm64": "2.1.143",
32
+ "@cometix/claude-code-darwin-x64": "2.1.143",
33
+ "@cometix/claude-code-linux-arm64": "2.1.143",
34
+ "@cometix/claude-code-linux-x64": "2.1.143",
35
+ "@cometix/claude-code-linux-arm64-musl": "2.1.143",
36
+ "@cometix/claude-code-linux-x64-musl": "2.1.143",
37
+ "@cometix/claude-code-win32-arm64": "2.1.143",
38
+ "@cometix/claude-code-win32-x64": "2.1.143",
39
+ "@cometix/claude-code-android-arm64": "2.1.143",
40
40
  "@img/sharp-darwin-arm64": "^0.34.2",
41
41
  "@img/sharp-darwin-x64": "^0.34.2",
42
42
  "@img/sharp-linux-arm": "^0.34.2",