@ktjs/shared 0.22.7 → 0.22.8

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
@@ -39,9 +39,9 @@ declare const $isThenable: (o: any) => o is Promise<any>;
39
39
  * @see ./.scripts/replace.mjs
40
40
  */
41
41
  declare const $throw: (message: string) => never;
42
- declare const $warn: (message: string) => void;
43
- declare const $error: (message: string) => void;
44
- declare const $debug: (message: string) => void;
42
+ declare const $warn: typeof console.warn;
43
+ declare const $error: typeof console.error;
44
+ declare const $debug: typeof console.debug;
45
45
 
46
46
  type otherstring = string & {};
47
47
 
@@ -38,14 +38,14 @@ var __ktjs_shared__ = (function (exports) {
38
38
  const $throw = (message) => {
39
39
  throw new Error('[kt.js error]' + message);
40
40
  };
41
- const $warn = (message) => {
42
- console.warn('[kt.js warn] ' + message);
41
+ const $warn = (...args) => {
42
+ console.warn('[kt.js warn]', ...args);
43
43
  };
44
- const $error = (message) => {
45
- console.error('[kt.js error] ' + message);
44
+ const $error = (...args) => {
45
+ console.error('[kt.js error]', ...args);
46
46
  };
47
- const $debug = (message) => {
48
- console.debug('[kt.js debug] ' + message);
47
+ const $debug = (...args) => {
48
+ console.debug('[kt.js debug]', ...args);
49
49
  };
50
50
 
51
51
  // DOM manipulation utilities
@@ -215,7 +215,7 @@ var __ktjs_shared__ = (function (exports) {
215
215
  }
216
216
 
217
217
  // Shared utilities and cached native methods for kt.js framework
218
- Object.defineProperty(window, '__ktjs__', { value: '0.22.7' });
218
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.8' });
219
219
 
220
220
  exports.$ArrayFrom = $ArrayFrom;
221
221
  exports.$append = $append;
@@ -30,6 +30,38 @@ var __ktjs_shared__ = (function (exports) {
30
30
  var $random = Math.random;
31
31
  var $isThenable = function (o) { return typeof (o === null || o === void 0 ? void 0 : o.then) === 'function'; };
32
32
 
33
+ /******************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
+
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */
47
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
48
+
49
+
50
+ function __spreadArray(to, from, pack) {
51
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
52
+ if (ar || !(i in from)) {
53
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
54
+ ar[i] = from[i];
55
+ }
56
+ }
57
+ return to.concat(ar || Array.prototype.slice.call(from));
58
+ }
59
+
60
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
61
+ var e = new Error(message);
62
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
63
+ };
64
+
33
65
  // Error handling utilities
34
66
  /**
35
67
  * * Actually, these functions will be replaced as they are by @rollup/plugin-replace
@@ -38,14 +70,26 @@ var __ktjs_shared__ = (function (exports) {
38
70
  var $throw = function (message) {
39
71
  throw new Error('[kt.js error]' + message);
40
72
  };
41
- var $warn = function (message) {
42
- console.warn('[kt.js warn] ' + message);
73
+ var $warn = function () {
74
+ var args = [];
75
+ for (var _i = 0; _i < arguments.length; _i++) {
76
+ args[_i] = arguments[_i];
77
+ }
78
+ console.warn.apply(console, __spreadArray(['[kt.js warn]'], args, false));
43
79
  };
44
- var $error = function (message) {
45
- console.error('[kt.js error] ' + message);
80
+ var $error = function () {
81
+ var args = [];
82
+ for (var _i = 0; _i < arguments.length; _i++) {
83
+ args[_i] = arguments[_i];
84
+ }
85
+ console.error.apply(console, __spreadArray(['[kt.js error]'], args, false));
46
86
  };
47
- var $debug = function (message) {
48
- console.debug('[kt.js debug] ' + message);
87
+ var $debug = function () {
88
+ var args = [];
89
+ for (var _i = 0; _i < arguments.length; _i++) {
90
+ args[_i] = arguments[_i];
91
+ }
92
+ console.debug.apply(console, __spreadArray(['[kt.js debug]'], args, false));
49
93
  };
50
94
 
51
95
  // DOM manipulation utilities
@@ -226,7 +270,7 @@ var __ktjs_shared__ = (function (exports) {
226
270
  }
227
271
 
228
272
  // Shared utilities and cached native methods for kt.js framework
229
- Object.defineProperty(window, '__ktjs__', { value: '0.22.7' });
273
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.8' });
230
274
 
231
275
  exports.$ArrayFrom = $ArrayFrom;
232
276
  exports.$append = $append;
package/dist/index.mjs CHANGED
@@ -35,14 +35,14 @@ const $isThenable = (o) => typeof o?.then === 'function';
35
35
  const $throw = (message) => {
36
36
  throw new Error('[kt.js error]' + message);
37
37
  };
38
- const $warn = (message) => {
39
- console.warn('[kt.js warn] ' + message);
38
+ const $warn = (...args) => {
39
+ console.warn('[kt.js warn]', ...args);
40
40
  };
41
- const $error = (message) => {
42
- console.error('[kt.js error] ' + message);
41
+ const $error = (...args) => {
42
+ console.error('[kt.js error]', ...args);
43
43
  };
44
- const $debug = (message) => {
45
- console.debug('[kt.js debug] ' + message);
44
+ const $debug = (...args) => {
45
+ console.debug('[kt.js debug]', ...args);
46
46
  };
47
47
 
48
48
  // DOM manipulation utilities
@@ -212,6 +212,6 @@ if (typeof Symbol === 'undefined') {
212
212
  }
213
213
 
214
214
  // Shared utilities and cached native methods for kt.js framework
215
- Object.defineProperty(window, '__ktjs__', { value: '0.22.7' });
215
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.8' });
216
216
 
217
217
  export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $debug, $define, $defines, $emptyFn, $entries, $error, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $random, $replaceNode, $throw, $toString, $warn, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, applyModel, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery, parseStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/shared",
3
- "version": "0.22.7",
3
+ "version": "0.22.8",
4
4
  "description": "Shared utilities and cached native methods for kt.js framework",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",