@gateweb/react-utils 1.14.4 → 1.15.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.
@@ -764,6 +764,20 @@ type PartialBy<T, K extends keyof T, RemoveUndefined extends boolean = false> =
764
764
  *
765
765
  */
766
766
  declare const deepClone: <T>(obj: T) => T;
767
+ /**
768
+ * A utility function to rename a key in an object.
769
+ *
770
+ * @param obj - The object to modify.
771
+ * @param oldKey - The key to rename.
772
+ * @param newKey - The new key name.
773
+ *
774
+ * @example
775
+ *
776
+ * const obj = { a: 1, b: 2 };
777
+ * const newObj = renameKey(obj, 'a', 'c');
778
+ * console.log(newObj); // { c: 1, b: 2 }
779
+ */
780
+ declare const renameKey: <T extends object, K extends keyof T, NK extends string>(obj: T, oldKey: K, newKey: NK) => Omit<T, K> & Record<NK, T[K]>;
767
781
 
768
782
  /**
769
783
  * debounce function
@@ -1321,5 +1335,5 @@ declare const getLocalStorage: <T>(key: string, deCode?: boolean) => T | undefin
1321
1335
  */
1322
1336
  declare const setLocalStorage: (key: string, value: Record<string, any>, enCode?: boolean) => void;
1323
1337
 
1324
- export { ByteSize, MimeTypeMap, OtherMimeType, QueryProvider, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, downloadFile, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getLocalStorage, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, rocEraToAd, searchParamsToObject, setLocalStorage, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useCountdown, useQueryContext, useValue, validTaxId, validateDateString, validateFileType, wait };
1338
+ export { ByteSize, MimeTypeMap, OtherMimeType, QueryProvider, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, downloadFile, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getLocalStorage, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, renameKey, rocEraToAd, searchParamsToObject, setLocalStorage, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useCountdown, useQueryContext, useValue, validTaxId, validateDateString, validateFileType, wait };
1325
1339
  export type { MimeTypeExtension, MimeTypeValue, PartialBy, RequiredBy, TCountdownActions };
package/dist/cjs/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var dayjs = require('dayjs');
4
- var queryStoreClient = require('./queryStore-client-q_SLGgYH.js');
4
+ var queryStore12s = require('./queryStore-12s-q_SLGgYH.js');
5
5
  var React = require('react');
6
- var useCountdownClient = require('./useCountdown-client-uiqhgllY.js');
7
- var downloadClient = require('./download-client-DKxkL92w.js');
8
- var webStorageClient = require('./webStorage-client-DHr9PcPl.js');
6
+ var useCountdown12s = require('./useCountdown-12s-uiqhgllY.js');
7
+ var download12s = require('./download-12s-DKxkL92w.js');
8
+ var webStorage12s = require('./webStorage-12s-DHr9PcPl.js');
9
9
 
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
 
@@ -539,6 +539,27 @@ const isObject = (value)=>value !== null && typeof value === 'object';
539
539
  }, {});
540
540
  return cloned;
541
541
  };
542
+ /**
543
+ * A utility function to rename a key in an object.
544
+ *
545
+ * @param obj - The object to modify.
546
+ * @param oldKey - The key to rename.
547
+ * @param newKey - The new key name.
548
+ *
549
+ * @example
550
+ *
551
+ * const obj = { a: 1, b: 2 };
552
+ * const newObj = renameKey(obj, 'a', 'c');
553
+ * console.log(newObj); // { c: 1, b: 2 }
554
+ */ const renameKey = (obj, oldKey, newKey)=>{
555
+ // 建立一個淺拷貝,避免修改原始物件
556
+ const { [oldKey]: oldValue, ...rest } = obj;
557
+ // 回傳新的物件:用新 key 存舊值,其他 key 保留
558
+ return {
559
+ ...rest,
560
+ [newKey]: oldValue
561
+ };
562
+ };
542
563
 
543
564
  /**
544
565
  * 將嵌套物件的所有屬性設為指定的布林值
@@ -1399,12 +1420,12 @@ function mergeRefs(refs) {
1399
1420
  return dayjs__default.default(endMonth, 'YYYYMM').subtract(1911, 'year').format('YYYYMM').substring(1);
1400
1421
  };
1401
1422
 
1402
- exports.QueryProvider = queryStoreClient.QueryProvider;
1403
- exports.useQueryContext = queryStoreClient.useQueryContext;
1404
- exports.useCountdown = useCountdownClient.useCountdown;
1405
- exports.downloadFile = downloadClient.downloadFile;
1406
- exports.getLocalStorage = webStorageClient.getLocalStorage;
1407
- exports.setLocalStorage = webStorageClient.setLocalStorage;
1423
+ exports.QueryProvider = queryStore12s.QueryProvider;
1424
+ exports.useQueryContext = queryStore12s.useQueryContext;
1425
+ exports.useCountdown = useCountdown12s.useCountdown;
1426
+ exports.downloadFile = download12s.downloadFile;
1427
+ exports.getLocalStorage = webStorage12s.getLocalStorage;
1428
+ exports.setLocalStorage = webStorage12s.setLocalStorage;
1408
1429
  exports.ByteSize = ByteSize;
1409
1430
  exports.MimeTypeMap = MimeTypeMap;
1410
1431
  exports.OtherMimeType = OtherMimeType;
@@ -1459,6 +1480,7 @@ exports.pascalString2CamelString = pascalString2CamelString;
1459
1480
  exports.pascalString2SnakeString = pascalString2SnakeString;
1460
1481
  exports.pick = pick;
1461
1482
  exports.pickByValue = pickByValue;
1483
+ exports.renameKey = renameKey;
1462
1484
  exports.rocEraToAd = rocEraToAd;
1463
1485
  exports.searchParamsToObject = searchParamsToObject;
1464
1486
  exports.snakeCase2CamelCase = snakeCase2CamelCase;
@@ -200,5 +200,70 @@ type MapToType<T extends Record<any, any>, A = any> = {
200
200
  type OverrideProps<T, R extends {
201
201
  [K in keyof R]: any;
202
202
  }> = Omit<T, keyof R> & R;
203
+ /**
204
+ * A utility type that makes a specific property in the generic type `T` required while keeping the rest optional.
205
+ *
206
+ * @template T - The object type to modify.
207
+ * @template K - The key of the property to make required.
208
+ *
209
+ * @example
210
+ * type User = { id?: number; name?: string }
211
+ * type FormUser = WithRequired<User, 'id'> // { id: number; name?: string }
212
+ */
213
+ type WithRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
214
+ /**
215
+ * A utility type that makes a specific property in the generic type `T` optional while keeping the rest required.
216
+ *
217
+ * @template T - The object type to modify.
218
+ * @template K - The key of the property to make optional.
219
+ *
220
+ * @example
221
+ * type User = { id: number; name: string }
222
+ * type FormUser = WithOptional<User, 'id'> // { id?: number; name: string }
223
+ */
224
+ type WithOptional<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
225
+ /**
226
+ * 產生從 1 到 N 的「數字字面量聯集」型別。
227
+ *
228
+ * @template N - 終止數字(必須是正整數)
229
+ * @template A - 用於遞迴計數的輔助 tuple,預設為 [any] 代表從 1 開始
230
+ * @template R - 暫存累積結果的 union,預設為 1
231
+ *
232
+ * @returns 1 | 2 | ... | N
233
+ *
234
+ * @example
235
+ * type T1 = Num1ToN<3>;
236
+ * // ^? 1 | 2 | 3
237
+ *
238
+ * type T2 = Num1ToN<5>;
239
+ * // ^? 1 | 2 | 3 | 4 | 5
240
+ *
241
+ * @warning
242
+ * ⚠ **效能注意事項**:
243
+ * - 遞迴深度等於 `N`,因此 `N` 過大會影響 TypeScript 編譯效能
244
+ * - 建議 **N ≤ 100**,否則 VS Code IntelliSense 可能變慢
245
+ */
246
+ type Num1ToN<N extends number, A extends any[] = [], R extends number = never> = A['length'] extends N ? R | N : Num1ToN<N, [...A, any], R | (A['length'] extends 0 ? never : A['length'])>;
247
+ /**
248
+ * 根據給定的前綴字串與數量,從陣列型別生成一個物件型別。
249
+ *
250
+ * @template T - 陣列型別,例如 `string[]`
251
+ * @template Prefix - 屬性鍵的前綴字串,例如 `'url'`
252
+ * @template N - 欄位數量,會生成 1..N 的鍵名
253
+ *
254
+ * @returns 一個物件型別,鍵為 `${Prefix}${1..N}`,值為 `T[number]`
255
+ *
256
+ * @example
257
+ * type List = string[];
258
+ *
259
+ * type Obj = BuildPrefixedObject<List, 'url', 3>;
260
+ * // ^? { url1: string; url2: string; url3: string }
261
+ *
262
+ * type Obj2 = BuildPrefixedObject<List, 'name', 2>;
263
+ * // ^? { name1: string; name2: string }
264
+ */
265
+ type BuildPrefixedObject<T extends readonly unknown[], Prefix extends string, N extends number> = {
266
+ [K in Num1ToN<N> as `${Prefix}${K & number}`]: T[number];
267
+ };
203
268
 
204
- export type { AtLeastOne, DeepPartial, Entries, MapToString, MapToType, OnlyOne, OverrideProps, PopArgs, PushArgs, ShiftArgs, TChangeKeyType, TExtractValueType, UnshiftArgs };
269
+ export type { AtLeastOne, BuildPrefixedObject, DeepPartial, Entries, MapToString, MapToType, Num1ToN, OnlyOne, OverrideProps, PopArgs, PushArgs, ShiftArgs, TChangeKeyType, TExtractValueType, UnshiftArgs, WithOptional, WithRequired };
@@ -764,6 +764,20 @@ type PartialBy<T, K extends keyof T, RemoveUndefined extends boolean = false> =
764
764
  *
765
765
  */
766
766
  declare const deepClone: <T>(obj: T) => T;
767
+ /**
768
+ * A utility function to rename a key in an object.
769
+ *
770
+ * @param obj - The object to modify.
771
+ * @param oldKey - The key to rename.
772
+ * @param newKey - The new key name.
773
+ *
774
+ * @example
775
+ *
776
+ * const obj = { a: 1, b: 2 };
777
+ * const newObj = renameKey(obj, 'a', 'c');
778
+ * console.log(newObj); // { c: 1, b: 2 }
779
+ */
780
+ declare const renameKey: <T extends object, K extends keyof T, NK extends string>(obj: T, oldKey: K, newKey: NK) => Omit<T, K> & Record<NK, T[K]>;
767
781
 
768
782
  /**
769
783
  * debounce function
@@ -1321,5 +1335,5 @@ declare const getLocalStorage: <T>(key: string, deCode?: boolean) => T | undefin
1321
1335
  */
1322
1336
  declare const setLocalStorage: (key: string, value: Record<string, any>, enCode?: boolean) => void;
1323
1337
 
1324
- export { ByteSize, MimeTypeMap, OtherMimeType, QueryProvider, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, downloadFile, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getLocalStorage, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, rocEraToAd, searchParamsToObject, setLocalStorage, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useCountdown, useQueryContext, useValue, validTaxId, validateDateString, validateFileType, wait };
1338
+ export { ByteSize, MimeTypeMap, OtherMimeType, QueryProvider, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, downloadFile, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getLocalStorage, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, renameKey, rocEraToAd, searchParamsToObject, setLocalStorage, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useCountdown, useQueryContext, useValue, validTaxId, validateDateString, validateFileType, wait };
1325
1339
  export type { MimeTypeExtension, MimeTypeValue, PartialBy, RequiredBy, TCountdownActions };
package/dist/es/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import dayjs from 'dayjs';
2
- export { Q as QueryProvider, u as useQueryContext } from './queryStore-client-CFQTVwrg.mjs';
2
+ export { Q as QueryProvider, u as useQueryContext } from './queryStore-12s-CFQTVwrg.mjs';
3
3
  import React, { useMemo, createContext, useContext, useState, useCallback } from 'react';
4
- export { u as useCountdown } from './useCountdown-client-t52WIHfq.mjs';
5
- export { d as downloadFile } from './download-client-CnaJ0p_f.mjs';
6
- export { g as getLocalStorage, s as setLocalStorage } from './webStorage-client-W1DItzhS.mjs';
4
+ export { u as useCountdown } from './useCountdown-12s-t52WIHfq.mjs';
5
+ export { d as downloadFile } from './download-12s-CnaJ0p_f.mjs';
6
+ export { g as getLocalStorage, s as setLocalStorage } from './webStorage-12s-W1DItzhS.mjs';
7
7
 
8
8
  const FILE_SIZE_UNITS$1 = [
9
9
  'Bytes',
@@ -532,6 +532,27 @@ const isObject = (value)=>value !== null && typeof value === 'object';
532
532
  }, {});
533
533
  return cloned;
534
534
  };
535
+ /**
536
+ * A utility function to rename a key in an object.
537
+ *
538
+ * @param obj - The object to modify.
539
+ * @param oldKey - The key to rename.
540
+ * @param newKey - The new key name.
541
+ *
542
+ * @example
543
+ *
544
+ * const obj = { a: 1, b: 2 };
545
+ * const newObj = renameKey(obj, 'a', 'c');
546
+ * console.log(newObj); // { c: 1, b: 2 }
547
+ */ const renameKey = (obj, oldKey, newKey)=>{
548
+ // 建立一個淺拷貝,避免修改原始物件
549
+ const { [oldKey]: oldValue, ...rest } = obj;
550
+ // 回傳新的物件:用新 key 存舊值,其他 key 保留
551
+ return {
552
+ ...rest,
553
+ [newKey]: oldValue
554
+ };
555
+ };
535
556
 
536
557
  /**
537
558
  * 將嵌套物件的所有屬性設為指定的布林值
@@ -1392,4 +1413,4 @@ function mergeRefs(refs) {
1392
1413
  return dayjs(endMonth, 'YYYYMM').subtract(1911, 'year').format('YYYYMM').substring(1);
1393
1414
  };
1394
1415
 
1395
- export { ByteSize, MimeTypeMap, OtherMimeType, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, rocEraToAd, searchParamsToObject, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useValue, validTaxId, validateDateString, validateFileType, wait };
1416
+ export { ByteSize, MimeTypeMap, OtherMimeType, adToRocEra, camelCase2PascalCase, camelCase2SnakeCase, camelString2PascalString, camelString2SnakeString, convertBytes, createDataContext, createEnumLikeObject, debounce, deepClone, deepMerge, extractEnumLikeObject, fakeApi, formatAmount, formatBytes, formatStarMask, generatePeriodArray, getCurrentPeriod, getMimeType, invariant, isChinese, isDateString, isDateTimeString, isEmail, isEnglish, isEqual, isNil, isNonZeroStart, isNumber, isNumberAtLeastN, isNumberN, isNumberNM, isServer, isTWMobile, isTWPhone, isTimeString, isValidPassword, maskString, mergeConfig, mergeRefs, objectToSearchParams, omit, omitByValue, parseFileInfoFromFilename, parseFilenameFromDisposition, pascalCase2CamelCase, pascalCase2SnakeCase, pascalString2CamelString, pascalString2SnakeString, pick, pickByValue, renameKey, rocEraToAd, searchParamsToObject, snakeCase2CamelCase, snakeCase2PascalCase, snakeString2CamelString, snakeString2PascalString, throttle, useValue, validTaxId, validateDateString, validateFileType, wait };
@@ -200,5 +200,70 @@ type MapToType<T extends Record<any, any>, A = any> = {
200
200
  type OverrideProps<T, R extends {
201
201
  [K in keyof R]: any;
202
202
  }> = Omit<T, keyof R> & R;
203
+ /**
204
+ * A utility type that makes a specific property in the generic type `T` required while keeping the rest optional.
205
+ *
206
+ * @template T - The object type to modify.
207
+ * @template K - The key of the property to make required.
208
+ *
209
+ * @example
210
+ * type User = { id?: number; name?: string }
211
+ * type FormUser = WithRequired<User, 'id'> // { id: number; name?: string }
212
+ */
213
+ type WithRequired<T, K extends keyof T> = Required<Pick<T, K>> & Omit<T, K>;
214
+ /**
215
+ * A utility type that makes a specific property in the generic type `T` optional while keeping the rest required.
216
+ *
217
+ * @template T - The object type to modify.
218
+ * @template K - The key of the property to make optional.
219
+ *
220
+ * @example
221
+ * type User = { id: number; name: string }
222
+ * type FormUser = WithOptional<User, 'id'> // { id?: number; name: string }
223
+ */
224
+ type WithOptional<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
225
+ /**
226
+ * 產生從 1 到 N 的「數字字面量聯集」型別。
227
+ *
228
+ * @template N - 終止數字(必須是正整數)
229
+ * @template A - 用於遞迴計數的輔助 tuple,預設為 [any] 代表從 1 開始
230
+ * @template R - 暫存累積結果的 union,預設為 1
231
+ *
232
+ * @returns 1 | 2 | ... | N
233
+ *
234
+ * @example
235
+ * type T1 = Num1ToN<3>;
236
+ * // ^? 1 | 2 | 3
237
+ *
238
+ * type T2 = Num1ToN<5>;
239
+ * // ^? 1 | 2 | 3 | 4 | 5
240
+ *
241
+ * @warning
242
+ * ⚠ **效能注意事項**:
243
+ * - 遞迴深度等於 `N`,因此 `N` 過大會影響 TypeScript 編譯效能
244
+ * - 建議 **N ≤ 100**,否則 VS Code IntelliSense 可能變慢
245
+ */
246
+ type Num1ToN<N extends number, A extends any[] = [], R extends number = never> = A['length'] extends N ? R | N : Num1ToN<N, [...A, any], R | (A['length'] extends 0 ? never : A['length'])>;
247
+ /**
248
+ * 根據給定的前綴字串與數量,從陣列型別生成一個物件型別。
249
+ *
250
+ * @template T - 陣列型別,例如 `string[]`
251
+ * @template Prefix - 屬性鍵的前綴字串,例如 `'url'`
252
+ * @template N - 欄位數量,會生成 1..N 的鍵名
253
+ *
254
+ * @returns 一個物件型別,鍵為 `${Prefix}${1..N}`,值為 `T[number]`
255
+ *
256
+ * @example
257
+ * type List = string[];
258
+ *
259
+ * type Obj = BuildPrefixedObject<List, 'url', 3>;
260
+ * // ^? { url1: string; url2: string; url3: string }
261
+ *
262
+ * type Obj2 = BuildPrefixedObject<List, 'name', 2>;
263
+ * // ^? { name1: string; name2: string }
264
+ */
265
+ type BuildPrefixedObject<T extends readonly unknown[], Prefix extends string, N extends number> = {
266
+ [K in Num1ToN<N> as `${Prefix}${K & number}`]: T[number];
267
+ };
203
268
 
204
- export type { AtLeastOne, DeepPartial, Entries, MapToString, MapToType, OnlyOne, OverrideProps, PopArgs, PushArgs, ShiftArgs, TChangeKeyType, TExtractValueType, UnshiftArgs };
269
+ export type { AtLeastOne, BuildPrefixedObject, DeepPartial, Entries, MapToString, MapToType, Num1ToN, OnlyOne, OverrideProps, PopArgs, PushArgs, ShiftArgs, TChangeKeyType, TExtractValueType, UnshiftArgs, WithOptional, WithRequired };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gateweb/react-utils",
3
- "version": "1.14.4",
3
+ "version": "1.15.0",
4
4
  "description": "React Utils for GateWeb",
5
5
  "homepage": "https://github.com/GatewebSolutions/react-utils",
6
6
  "files": [
@@ -31,6 +31,16 @@
31
31
  }
32
32
  }
33
33
  },
34
+ "scripts": {
35
+ "prepare": "husky",
36
+ "run-code": "ts-node src/period.ts",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "test:coverage": "vitest run --coverage",
40
+ "test:ui": "vitest --ui --coverage.enabled=true",
41
+ "build": "bunchee",
42
+ "build:prepare": "bunchee --prepare"
43
+ },
34
44
  "publishConfig": {
35
45
  "access": "public"
36
46
  },
@@ -52,7 +62,7 @@
52
62
  "@types/react": "^19.1.8",
53
63
  "@vitest/coverage-v8": "^3.2.4",
54
64
  "@vitest/ui": "3.2.4",
55
- "bunchee": "^5.6.1",
65
+ "bunchee": "^6.6.0",
56
66
  "eslint": "^9.31.0",
57
67
  "husky": "^9.1.7",
58
68
  "jest": "^30.0.5",
@@ -69,13 +79,5 @@
69
79
  "@commitlint/config-conventional"
70
80
  ]
71
81
  },
72
- "scripts": {
73
- "run-code": "ts-node src/period.ts",
74
- "test": "vitest run",
75
- "test:watch": "vitest",
76
- "test:coverage": "vitest run --coverage",
77
- "test:ui": "vitest --ui --coverage.enabled=true",
78
- "build": "bunchee",
79
- "build:prepare": "bunchee --prepare"
80
- }
82
+ "packageManager": "pnpm@10.11.0"
81
83
  }