minutool 1.0.3 → 1.0.5

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.
package/dist/index.d.ts CHANGED
@@ -158,11 +158,13 @@ export declare const BLOCK_TAGS: string[];
158
158
  export declare const buildHtmlHidden: (maps: Record<string, any>) => string;
159
159
 
160
160
  /**
161
- * 构建 CSS 变量对象(自动添加 -- 前缀和 px 单位)
161
+ * 构建 CSS 变量对象
162
162
  * @param {Record<string, number|string|undefined>} vars - CSS 变量对象
163
163
  * @returns {Record<string, string>} 返回格式化后的 CSS 变量对象
164
164
  * @example
165
- * buildStyleVars({width: 100, color: 'red'}) // {'--width': '100px', '--color': 'red'}
165
+ * buildStyleVars({width: '100px', color: 'red', text:'"hello"'})
166
+ * 输出 // {'--width': '100px', '--color': 'red', '--text': '"hello"'}
167
+ * 实际样式:style="--width: 100px; --color: red; --text: \"hello\";"
166
168
  */
167
169
  export declare const buildStyleVars: (vars: Record<string, number | string | undefined>) => Record<string, string>;
168
170
 
@@ -1108,8 +1110,12 @@ export declare const mmToTwip: (mm: number) => number;
1108
1110
 
1109
1111
  export declare const MONTH_NAMES_CN: string[];
1110
1112
 
1113
+ export declare const MONTH_NAMES_EN: string[];
1114
+
1111
1115
  export declare const MONTH_NAMES_SHORT_CN: string[];
1112
1116
 
1117
+ export declare const MONTH_NAMES_SHORT_EN: string[];
1118
+
1113
1119
  export declare const MONTH_NOW: number;
1114
1120
 
1115
1121
  /**
@@ -1617,8 +1623,12 @@ export declare const utf8Encode: (srcStr: string) => string;
1617
1623
 
1618
1624
  export declare const WEEK_DAY_NAMES_CN: string[];
1619
1625
 
1626
+ export declare const WEEK_DAY_NAMES_EN: string[];
1627
+
1620
1628
  export declare const WEEK_DAY_NAMES_SHORT_CN: string[];
1621
1629
 
1630
+ export declare const WEEK_DAY_NAMES_SHORT_EN: string[];
1631
+
1622
1632
  export declare const YEAR_NOW: number;
1623
1633
 
1624
1634
  export { }
package/dist/minutool.js CHANGED
@@ -378,7 +378,7 @@ g(t.top + t.height, e.top, e.top + e.height) && g(t.left + t.width, e.left, e.le
378
378
  let e = {};
379
379
  for (let n in t) {
380
380
  const i = t[n];
381
- i !== void 0 && (e[`--${n}`] = `${i}` + (typeof i == "number" ? "px" : ""));
381
+ i != null && (e[`--${n}`] = `${i}`);
382
382
  }
383
383
  return e;
384
384
  }, Ve = (t) => t.replace(/[\\/:*?"<>|]/g, "_").replace(/[\0-\x1F]/g, "_").replace(/\s+/g, " ").replace(/^\.+/, "").replace(/\.+$/, "").trim(), I = (t) => new Promise((e, n) => {
@@ -1174,7 +1174,9 @@ export {
1174
1174
  Mt as MIME_MULTIPART,
1175
1175
  hn as MIME_TEXT,
1176
1176
  Yn as MONTH_NAMES_CN,
1177
+ Ht as MONTH_NAMES_EN,
1177
1178
  $n as MONTH_NAMES_SHORT_CN,
1179
+ Ft as MONTH_NAMES_SHORT_EN,
1178
1180
  Sn as MONTH_NOW,
1179
1181
  T as ONE_DAY,
1180
1182
  Nn as ONE_HOUR,
@@ -1192,7 +1194,9 @@ export {
1192
1194
  R as TRIM_LEFT,
1193
1195
  ot as TRIM_RIGHT,
1194
1196
  jn as WEEK_DAY_NAMES_CN,
1197
+ Lt as WEEK_DAY_NAMES_EN,
1195
1198
  Gn as WEEK_DAY_NAMES_SHORT_CN,
1199
+ kt as WEEK_DAY_NAMES_SHORT_EN,
1196
1200
  Mn as YEAR_NOW,
1197
1201
  Ct as abortableFetch,
1198
1202
  $t as arrayChunk,