@univerjs/design 0.5.3 → 0.5.4

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,61 +1,61 @@
1
1
  function _e(i) {
2
2
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
3
3
  }
4
- var Z = { exports: {} }, z = { exports: {} }, ve = z.exports, oe;
4
+ var Z = { exports: {} }, z = { exports: {} }, ve = z.exports, ue;
5
5
  function $e() {
6
- return oe || (oe = 1, function(i, m) {
6
+ return ue || (ue = 1, function(i, m) {
7
7
  (function(l, a) {
8
8
  i.exports = a();
9
9
  })(ve, function() {
10
- var l = 1e3, a = 6e4, h = 36e5, d = "millisecond", _ = "second", v = "minute", g = "hour", O = "day", w = "week", D = "month", T = "quarter", Y = "year", f = "date", j = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, P = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, H = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(o) {
11
- var r = ["th", "st", "nd", "rd"], e = o % 100;
12
- return "[" + o + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
13
- } }, V = function(o, r, e) {
14
- var n = String(o);
15
- return !n || n.length >= r ? o : "" + Array(r + 1 - n.length).join(e) + o;
16
- }, me = { s: V, z: function(o) {
17
- var r = -o.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), t = e % 60;
10
+ var l = 1e3, a = 6e4, h = 36e5, p = "millisecond", _ = "second", v = "minute", g = "hour", O = "day", w = "week", D = "month", T = "quarter", Y = "year", f = "date", j = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, P = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, H = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
11
+ var r = ["th", "st", "nd", "rd"], e = u % 100;
12
+ return "[" + u + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
13
+ } }, V = function(u, r, e) {
14
+ var n = String(u);
15
+ return !n || n.length >= r ? u : "" + Array(r + 1 - n.length).join(e) + u;
16
+ }, me = { s: V, z: function(u) {
17
+ var r = -u.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), t = e % 60;
18
18
  return (r <= 0 ? "+" : "-") + V(n, 2, "0") + ":" + V(t, 2, "0");
19
- }, m: function o(r, e) {
20
- if (r.date() < e.date()) return -o(e, r);
21
- var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(n, D), s = e - t < 0, u = r.clone().add(n + (s ? -1 : 1), D);
22
- return +(-(n + (e - t) / (s ? t - u : u - t)) || 0);
23
- }, a: function(o) {
24
- return o < 0 ? Math.ceil(o) || 0 : Math.floor(o);
25
- }, p: function(o) {
26
- return { M: D, y: Y, w, d: O, D: f, h: g, m: v, s: _, ms: d, Q: T }[o] || String(o || "").toLowerCase().replace(/s$/, "");
27
- }, u: function(o) {
28
- return o === void 0;
19
+ }, m: function u(r, e) {
20
+ if (r.date() < e.date()) return -u(e, r);
21
+ var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(n, D), s = e - t < 0, o = r.clone().add(n + (s ? -1 : 1), D);
22
+ return +(-(n + (e - t) / (s ? t - o : o - t)) || 0);
23
+ }, a: function(u) {
24
+ return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
25
+ }, p: function(u) {
26
+ return { M: D, y: Y, w, d: O, D: f, h: g, m: v, s: _, ms: p, Q: T }[u] || String(u || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(u) {
28
+ return u === void 0;
29
29
  } }, U = "en", q = {};
30
30
  q[U] = H;
31
- var ne = "$isDayjsObject", B = function(o) {
32
- return o instanceof N || !(!o || !o[ne]);
33
- }, K = function o(r, e, n) {
31
+ var ne = "$isDayjsObject", B = function(u) {
32
+ return u instanceof N || !(!u || !u[ne]);
33
+ }, K = function u(r, e, n) {
34
34
  var t;
35
35
  if (!r) return U;
36
36
  if (typeof r == "string") {
37
37
  var s = r.toLowerCase();
38
38
  q[s] && (t = s), e && (q[s] = e, t = s);
39
- var u = r.split("-");
40
- if (!t && u.length > 1) return o(u[0]);
39
+ var o = r.split("-");
40
+ if (!t && o.length > 1) return u(o[0]);
41
41
  } else {
42
- var p = r.name;
43
- q[p] = r, t = p;
42
+ var d = r.name;
43
+ q[d] = r, t = d;
44
44
  }
45
45
  return !n && t && (U = t), t || !n && U;
46
- }, $ = function(o, r) {
47
- if (B(o)) return o.clone();
46
+ }, $ = function(u, r) {
47
+ if (B(u)) return u.clone();
48
48
  var e = typeof r == "object" ? r : {};
49
- return e.date = o, e.args = arguments, new N(e);
49
+ return e.date = u, e.args = arguments, new N(e);
50
50
  }, c = me;
51
- c.l = K, c.i = B, c.w = function(o, r) {
52
- return $(o, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
51
+ c.l = K, c.i = B, c.w = function(u, r) {
52
+ return $(u, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
53
53
  };
54
54
  var N = function() {
55
- function o(e) {
55
+ function u(e) {
56
56
  this.$L = K(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[ne] = !0;
57
57
  }
58
- var r = o.prototype;
58
+ var r = u.prototype;
59
59
  return r.parse = function(e) {
60
60
  this.$d = function(n) {
61
61
  var t = n.date, s = n.utc;
@@ -63,10 +63,10 @@ function $e() {
63
63
  if (c.u(t)) return /* @__PURE__ */ new Date();
64
64
  if (t instanceof Date) return new Date(t);
65
65
  if (typeof t == "string" && !/Z$/i.test(t)) {
66
- var u = t.match(E);
67
- if (u) {
68
- var p = u[2] - 1 || 0, y = (u[7] || "0").substring(0, 3);
69
- return s ? new Date(Date.UTC(u[1], p, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y)) : new Date(u[1], p, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y);
66
+ var o = t.match(E);
67
+ if (o) {
68
+ var d = o[2] - 1 || 0, y = (o[7] || "0").substring(0, 3);
69
+ return s ? new Date(Date.UTC(o[1], d, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, y)) : new Date(o[1], d, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, y);
70
70
  }
71
71
  }
72
72
  return new Date(t);
@@ -92,20 +92,20 @@ function $e() {
92
92
  }, r.valueOf = function() {
93
93
  return this.$d.getTime();
94
94
  }, r.startOf = function(e, n) {
95
- var t = this, s = !!c.u(n) || n, u = c.p(e), p = function(k, b) {
95
+ var t = this, s = !!c.u(n) || n, o = c.p(e), d = function(k, b) {
96
96
  var R = c.w(t.$u ? Date.UTC(t.$y, b, k) : new Date(t.$y, b, k), t);
97
97
  return s ? R : R.endOf(O);
98
98
  }, y = function(k, b) {
99
99
  return c.w(t.toDate()[k].apply(t.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), t);
100
100
  }, M = this.$W, x = this.$M, S = this.$D, C = "set" + (this.$u ? "UTC" : "");
101
- switch (u) {
101
+ switch (o) {
102
102
  case Y:
103
- return s ? p(1, 0) : p(31, 11);
103
+ return s ? d(1, 0) : d(31, 11);
104
104
  case D:
105
- return s ? p(1, x) : p(0, x + 1);
105
+ return s ? d(1, x) : d(0, x + 1);
106
106
  case w:
107
107
  var L = this.$locale().weekStart || 0, F = (M < L ? M + 7 : M) - L;
108
- return p(s ? S - F : S + (6 - F), x);
108
+ return d(s ? S - F : S + (6 - F), x);
109
109
  case O:
110
110
  case f:
111
111
  return y(C + "Hours", 0);
@@ -121,11 +121,11 @@ function $e() {
121
121
  }, r.endOf = function(e) {
122
122
  return this.startOf(e, !1);
123
123
  }, r.$set = function(e, n) {
124
- var t, s = c.p(e), u = "set" + (this.$u ? "UTC" : ""), p = (t = {}, t[O] = u + "Date", t[f] = u + "Date", t[D] = u + "Month", t[Y] = u + "FullYear", t[g] = u + "Hours", t[v] = u + "Minutes", t[_] = u + "Seconds", t[d] = u + "Milliseconds", t)[s], y = s === O ? this.$D + (n - this.$W) : n;
124
+ var t, s = c.p(e), o = "set" + (this.$u ? "UTC" : ""), d = (t = {}, t[O] = o + "Date", t[f] = o + "Date", t[D] = o + "Month", t[Y] = o + "FullYear", t[g] = o + "Hours", t[v] = o + "Minutes", t[_] = o + "Seconds", t[p] = o + "Milliseconds", t)[s], y = s === O ? this.$D + (n - this.$W) : n;
125
125
  if (s === D || s === Y) {
126
126
  var M = this.clone().set(f, 1);
127
- M.$d[p](y), M.init(), this.$d = M.set(f, Math.min(this.$D, M.daysInMonth())).$d;
128
- } else p && this.$d[p](y);
127
+ M.$d[d](y), M.init(), this.$d = M.set(f, Math.min(this.$D, M.daysInMonth())).$d;
128
+ } else d && this.$d[d](y);
129
129
  return this.init(), this;
130
130
  }, r.set = function(e, n) {
131
131
  return this.clone().$set(e, n);
@@ -134,25 +134,25 @@ function $e() {
134
134
  }, r.add = function(e, n) {
135
135
  var t, s = this;
136
136
  e = Number(e);
137
- var u = c.p(n), p = function(x) {
137
+ var o = c.p(n), d = function(x) {
138
138
  var S = $(s);
139
139
  return c.w(S.date(S.date() + Math.round(x * e)), s);
140
140
  };
141
- if (u === D) return this.set(D, this.$M + e);
142
- if (u === Y) return this.set(Y, this.$y + e);
143
- if (u === O) return p(1);
144
- if (u === w) return p(7);
145
- var y = (t = {}, t[v] = a, t[g] = h, t[_] = l, t)[u] || 1, M = this.$d.getTime() + e * y;
141
+ if (o === D) return this.set(D, this.$M + e);
142
+ if (o === Y) return this.set(Y, this.$y + e);
143
+ if (o === O) return d(1);
144
+ if (o === w) return d(7);
145
+ var y = (t = {}, t[v] = a, t[g] = h, t[_] = l, t)[o] || 1, M = this.$d.getTime() + e * y;
146
146
  return c.w(M, this);
147
147
  }, r.subtract = function(e, n) {
148
148
  return this.add(-1 * e, n);
149
149
  }, r.format = function(e) {
150
150
  var n = this, t = this.$locale();
151
151
  if (!this.isValid()) return t.invalidDate || j;
152
- var s = e || "YYYY-MM-DDTHH:mm:ssZ", u = c.z(this), p = this.$H, y = this.$m, M = this.$M, x = t.weekdays, S = t.months, C = t.meridiem, L = function(b, R, W, J) {
152
+ var s = e || "YYYY-MM-DDTHH:mm:ssZ", o = c.z(this), d = this.$H, y = this.$m, M = this.$M, x = t.weekdays, S = t.months, C = t.meridiem, L = function(b, R, W, J) {
153
153
  return b && (b[R] || b(n, s)) || W[R].slice(0, J);
154
154
  }, F = function(b) {
155
- return c.s(p % 12 || 12, b, "0");
155
+ return c.s(d % 12 || 12, b, "0");
156
156
  }, k = C || function(b, R, W) {
157
157
  var J = b < 12 ? "AM" : "PM";
158
158
  return W ? J.toLowerCase() : J;
@@ -185,17 +185,17 @@ function $e() {
185
185
  case "dddd":
186
186
  return x[n.$W];
187
187
  case "H":
188
- return String(p);
188
+ return String(d);
189
189
  case "HH":
190
- return c.s(p, 2, "0");
190
+ return c.s(d, 2, "0");
191
191
  case "h":
192
192
  return F(1);
193
193
  case "hh":
194
194
  return F(2);
195
195
  case "a":
196
- return k(p, y, !0);
196
+ return k(d, y, !0);
197
197
  case "A":
198
- return k(p, y, !1);
198
+ return k(d, y, !1);
199
199
  case "m":
200
200
  return String(y);
201
201
  case "mm":
@@ -207,18 +207,18 @@ function $e() {
207
207
  case "SSS":
208
208
  return c.s(n.$ms, 3, "0");
209
209
  case "Z":
210
- return u;
210
+ return o;
211
211
  }
212
212
  return null;
213
- }(b) || u.replace(":", "");
213
+ }(b) || o.replace(":", "");
214
214
  });
215
215
  }, r.utcOffset = function() {
216
216
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
217
  }, r.diff = function(e, n, t) {
218
- var s, u = this, p = c.p(n), y = $(e), M = (y.utcOffset() - this.utcOffset()) * a, x = this - y, S = function() {
219
- return c.m(u, y);
218
+ var s, o = this, d = c.p(n), y = $(e), M = (y.utcOffset() - this.utcOffset()) * a, x = this - y, S = function() {
219
+ return c.m(o, y);
220
220
  };
221
- switch (p) {
221
+ switch (d) {
222
222
  case Y:
223
223
  s = S() / 12;
224
224
  break;
@@ -265,16 +265,16 @@ function $e() {
265
265
  return this.$d.toISOString();
266
266
  }, r.toString = function() {
267
267
  return this.$d.toUTCString();
268
- }, o;
268
+ }, u;
269
269
  }(), ie = N.prototype;
270
- return $.prototype = ie, [["$ms", d], ["$s", _], ["$m", v], ["$H", g], ["$W", O], ["$M", D], ["$y", Y], ["$D", f]].forEach(function(o) {
271
- ie[o[1]] = function(r) {
272
- return this.$g(r, o[0], o[1]);
270
+ return $.prototype = ie, [["$ms", p], ["$s", _], ["$m", v], ["$H", g], ["$W", O], ["$M", D], ["$y", Y], ["$D", f]].forEach(function(u) {
271
+ ie[u[1]] = function(r) {
272
+ return this.$g(r, u[0], u[1]);
273
273
  };
274
- }), $.extend = function(o, r) {
275
- return o.$i || (o(r, N, $), o.$i = !0), $;
276
- }, $.locale = K, $.isDayjs = B, $.unix = function(o) {
277
- return $(1e3 * o);
274
+ }), $.extend = function(u, r) {
275
+ return u.$i || (u(r, N, $), u.$i = !0), $;
276
+ }, $.locale = K, $.isDayjs = B, $.unix = function(u) {
277
+ return $(1e3 * u);
278
278
  }, $.en = q[U], $.Ls = q, $.p = {}, $;
279
279
  });
280
280
  }(z)), z.exports;
@@ -288,15 +288,15 @@ function xe() {
288
288
  function a(f) {
289
289
  return f && typeof f == "object" && "default" in f ? f : { default: f };
290
290
  }
291
- var h = a(l), d = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), _ = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), v = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), g = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), O = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
291
+ var h = a(l), p = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), _ = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), v = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), g = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), O = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
292
292
  function w(f, j, E) {
293
293
  var P, H;
294
294
  return E === "m" ? j ? "минута" : "минуту" : f + " " + (P = +f, H = { mm: j ? "минута_минуты_минут" : "минуту_минуты_минут", hh: "час_часа_часов", dd: "день_дня_дней", MM: "месяц_месяца_месяцев", yy: "год_года_лет" }[E].split("_"), P % 10 == 1 && P % 100 != 11 ? H[0] : P % 10 >= 2 && P % 10 <= 4 && (P % 100 < 10 || P % 100 >= 20) ? H[1] : H[2]);
295
295
  }
296
296
  var D = function(f, j) {
297
- return O.test(j) ? d[f.month()] : _[f.month()];
297
+ return O.test(j) ? p[f.month()] : _[f.month()];
298
298
  };
299
- D.s = _, D.f = d;
299
+ D.s = _, D.f = p;
300
300
  var T = function(f, j) {
301
301
  return O.test(j) ? v[f.month()] : g[f.month()];
302
302
  };
@@ -312,9 +312,9 @@ function xe() {
312
312
  }
313
313
  var De = xe();
314
314
  const be = /* @__PURE__ */ _e(De);
315
- var A = {}, Q = { exports: {} }, ue;
315
+ var A = {}, Q = { exports: {} }, oe;
316
316
  function Se() {
317
- return ue || (ue = 1, function(i) {
317
+ return oe || (oe = 1, function(i) {
318
318
  function m(l) {
319
319
  return l && l.__esModule ? l : {
320
320
  default: l
@@ -343,9 +343,9 @@ function ge() {
343
343
  var m = ye().default;
344
344
  function l(a, h) {
345
345
  if (m(a) != "object" || !a) return a;
346
- var d = a[Symbol.toPrimitive];
347
- if (d !== void 0) {
348
- var _ = d.call(a, h || "default");
346
+ var p = a[Symbol.toPrimitive];
347
+ if (p !== void 0) {
348
+ var _ = p.call(a, h || "default");
349
349
  if (m(_) != "object") return _;
350
350
  throw new TypeError("@@toPrimitive must return a primitive value.");
351
351
  }
@@ -359,23 +359,23 @@ function Oe() {
359
359
  return fe || (fe = 1, function(i) {
360
360
  var m = ye().default, l = ge();
361
361
  function a(h) {
362
- var d = l(h, "string");
363
- return m(d) == "symbol" ? d : d + "";
362
+ var p = l(h, "string");
363
+ return m(p) == "symbol" ? p : p + "";
364
364
  }
365
365
  i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
366
366
  }(ee)), ee.exports;
367
367
  }
368
- var pe;
368
+ var de;
369
369
  function we() {
370
- return pe || (pe = 1, function(i) {
370
+ return de || (de = 1, function(i) {
371
371
  var m = Oe();
372
- function l(a, h, d) {
372
+ function l(a, h, p) {
373
373
  return (h = m(h)) in a ? Object.defineProperty(a, h, {
374
- value: d,
374
+ value: p,
375
375
  enumerable: !0,
376
376
  configurable: !0,
377
377
  writable: !0
378
- }) : a[h] = d, a;
378
+ }) : a[h] = p, a;
379
379
  }
380
380
  i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
381
381
  }(X)), X.exports;
@@ -384,20 +384,20 @@ var le;
384
384
  function Ye() {
385
385
  return le || (le = 1, function(i) {
386
386
  var m = we();
387
- function l(h, d) {
387
+ function l(h, p) {
388
388
  var _ = Object.keys(h);
389
389
  if (Object.getOwnPropertySymbols) {
390
390
  var v = Object.getOwnPropertySymbols(h);
391
- d && (v = v.filter(function(g) {
391
+ p && (v = v.filter(function(g) {
392
392
  return Object.getOwnPropertyDescriptor(h, g).enumerable;
393
393
  })), _.push.apply(_, v);
394
394
  }
395
395
  return _;
396
396
  }
397
397
  function a(h) {
398
- for (var d = 1; d < arguments.length; d++) {
399
- var _ = arguments[d] != null ? arguments[d] : {};
400
- d % 2 ? l(Object(_), !0).forEach(function(v) {
398
+ for (var p = 1; p < arguments.length; p++) {
399
+ var _ = arguments[p] != null ? arguments[p] : {};
400
+ p % 2 ? l(Object(_), !0).forEach(function(v) {
401
401
  m(h, v, _[v]);
402
402
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(_)) : l(Object(_)).forEach(function(v) {
403
403
  Object.defineProperty(h, v, Object.getOwnPropertyDescriptor(_, v));
@@ -408,9 +408,9 @@ function Ye() {
408
408
  i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
409
409
  }(G)), G.exports;
410
410
  }
411
- var I = {}, de;
411
+ var I = {}, pe;
412
412
  function je() {
413
- return de || (de = 1, Object.defineProperty(I, "__esModule", {
413
+ return pe || (pe = 1, Object.defineProperty(I, "__esModule", {
414
414
  value: !0
415
415
  }), I.commonLocale = void 0, I.commonLocale = {
416
416
  yearFormat: "YYYY",