@ktjs/shared 0.22.8 → 0.23.1
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 +13 -10
- package/dist/index.iife.js +1 -23
- package/dist/index.legacy.js +1 -67
- package/dist/index.mjs +2 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,15 +34,6 @@ declare const $entries: <T>(o: T) => Array<[keyof T, T[keyof T]]>;
|
|
|
34
34
|
declare const $random: () => number;
|
|
35
35
|
declare const $isThenable: (o: any) => o is Promise<any>;
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* * Actually, these functions will be replaced as they are by @rollup/plugin-replace
|
|
39
|
-
* @see ./.scripts/replace.mjs
|
|
40
|
-
*/
|
|
41
|
-
declare const $throw: (message: string) => never;
|
|
42
|
-
declare const $warn: typeof console.warn;
|
|
43
|
-
declare const $error: typeof console.error;
|
|
44
|
-
declare const $debug: typeof console.debug;
|
|
45
|
-
|
|
46
37
|
type otherstring = string & {};
|
|
47
38
|
|
|
48
39
|
/**
|
|
@@ -162,5 +153,17 @@ declare const emplaceParams: (path: string, params: Record<string, string>) => s
|
|
|
162
153
|
*/
|
|
163
154
|
declare const extractParams: (pattern: string, path: string) => Record<string, string> | null;
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
// declare function $throw(message: string): never;
|
|
157
|
+
// declare const $warn: typeof console.warn;
|
|
158
|
+
// declare const $error: typeof console.error;
|
|
159
|
+
// declare const $debug: typeof console.debug;
|
|
160
|
+
declare global {
|
|
161
|
+
const $throw: (message?: string) => never;
|
|
162
|
+
const $warn: typeof console.warn;
|
|
163
|
+
const $log: typeof console.log;
|
|
164
|
+
const $error: typeof console.error;
|
|
165
|
+
const $debug: typeof console.debug;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, applyModel, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery, parseStyle };
|
|
166
169
|
export type { ChangeHandler, ChangeTriggerField, HTMLTag, InputElementTag, MathMLTag, NoTextNodeTag, NonSpecialTags, SVGTag, otherstring };
|
package/dist/index.iife.js
CHANGED
|
@@ -30,24 +30,6 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
30
30
|
const $random = Math.random;
|
|
31
31
|
const $isThenable = (o) => typeof o?.then === 'function';
|
|
32
32
|
|
|
33
|
-
// Error handling utilities
|
|
34
|
-
/**
|
|
35
|
-
* * Actually, these functions will be replaced as they are by @rollup/plugin-replace
|
|
36
|
-
* @see ./.scripts/replace.mjs
|
|
37
|
-
*/
|
|
38
|
-
const $throw = (message) => {
|
|
39
|
-
throw new Error('[kt.js error]' + message);
|
|
40
|
-
};
|
|
41
|
-
const $warn = (...args) => {
|
|
42
|
-
console.warn('[kt.js warn]', ...args);
|
|
43
|
-
};
|
|
44
|
-
const $error = (...args) => {
|
|
45
|
-
console.error('[kt.js error]', ...args);
|
|
46
|
-
};
|
|
47
|
-
const $debug = (...args) => {
|
|
48
|
-
console.debug('[kt.js debug]', ...args);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
33
|
// DOM manipulation utilities
|
|
52
34
|
// # dom natives
|
|
53
35
|
const $isNode = (x) => x?.nodeType > 0;
|
|
@@ -215,7 +197,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
215
197
|
}
|
|
216
198
|
|
|
217
199
|
// Shared utilities and cached native methods for kt.js framework
|
|
218
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.
|
|
200
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
219
201
|
|
|
220
202
|
exports.$ArrayFrom = $ArrayFrom;
|
|
221
203
|
exports.$append = $append;
|
|
@@ -223,12 +205,10 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
223
205
|
exports.$assign = $assign;
|
|
224
206
|
exports.$buttonDisabledGetter = $buttonDisabledGetter;
|
|
225
207
|
exports.$buttonDisabledSetter = $buttonDisabledSetter;
|
|
226
|
-
exports.$debug = $debug;
|
|
227
208
|
exports.$define = $define;
|
|
228
209
|
exports.$defines = $defines;
|
|
229
210
|
exports.$emptyFn = $emptyFn;
|
|
230
211
|
exports.$entries = $entries;
|
|
231
|
-
exports.$error = $error;
|
|
232
212
|
exports.$hasOwn = $hasOwn;
|
|
233
213
|
exports.$is = $is;
|
|
234
214
|
exports.$isArray = $isArray;
|
|
@@ -238,9 +218,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
238
218
|
exports.$keys = $keys;
|
|
239
219
|
exports.$random = $random;
|
|
240
220
|
exports.$replaceNode = $replaceNode;
|
|
241
|
-
exports.$throw = $throw;
|
|
242
221
|
exports.$toString = $toString;
|
|
243
|
-
exports.$warn = $warn;
|
|
244
222
|
exports.DIRV_TYPE = DIRV_TYPE;
|
|
245
223
|
exports.MATHML_ATTR_FLAG = MATHML_ATTR_FLAG;
|
|
246
224
|
exports.SVG_ATTR_FLAG = SVG_ATTR_FLAG;
|
package/dist/index.legacy.js
CHANGED
|
@@ -30,68 +30,6 @@ 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
|
-
|
|
65
|
-
// Error handling utilities
|
|
66
|
-
/**
|
|
67
|
-
* * Actually, these functions will be replaced as they are by @rollup/plugin-replace
|
|
68
|
-
* @see ./.scripts/replace.mjs
|
|
69
|
-
*/
|
|
70
|
-
var $throw = function (message) {
|
|
71
|
-
throw new Error('[kt.js error]' + message);
|
|
72
|
-
};
|
|
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));
|
|
79
|
-
};
|
|
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));
|
|
86
|
-
};
|
|
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));
|
|
93
|
-
};
|
|
94
|
-
|
|
95
33
|
// DOM manipulation utilities
|
|
96
34
|
var _a;
|
|
97
35
|
// # dom natives
|
|
@@ -270,7 +208,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
270
208
|
}
|
|
271
209
|
|
|
272
210
|
// Shared utilities and cached native methods for kt.js framework
|
|
273
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.
|
|
211
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
274
212
|
|
|
275
213
|
exports.$ArrayFrom = $ArrayFrom;
|
|
276
214
|
exports.$append = $append;
|
|
@@ -278,12 +216,10 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
278
216
|
exports.$assign = $assign;
|
|
279
217
|
exports.$buttonDisabledGetter = $buttonDisabledGetter;
|
|
280
218
|
exports.$buttonDisabledSetter = $buttonDisabledSetter;
|
|
281
|
-
exports.$debug = $debug;
|
|
282
219
|
exports.$define = $define;
|
|
283
220
|
exports.$defines = $defines;
|
|
284
221
|
exports.$emptyFn = $emptyFn;
|
|
285
222
|
exports.$entries = $entries;
|
|
286
|
-
exports.$error = $error;
|
|
287
223
|
exports.$hasOwn = $hasOwn;
|
|
288
224
|
exports.$is = $is;
|
|
289
225
|
exports.$isArray = $isArray;
|
|
@@ -293,9 +229,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
293
229
|
exports.$keys = $keys;
|
|
294
230
|
exports.$random = $random;
|
|
295
231
|
exports.$replaceNode = $replaceNode;
|
|
296
|
-
exports.$throw = $throw;
|
|
297
232
|
exports.$toString = $toString;
|
|
298
|
-
exports.$warn = $warn;
|
|
299
233
|
exports.DIRV_TYPE = DIRV_TYPE;
|
|
300
234
|
exports.MATHML_ATTR_FLAG = MATHML_ATTR_FLAG;
|
|
301
235
|
exports.SVG_ATTR_FLAG = SVG_ATTR_FLAG;
|
package/dist/index.mjs
CHANGED
|
@@ -27,24 +27,6 @@ const $entries = Object.entries;
|
|
|
27
27
|
const $random = Math.random;
|
|
28
28
|
const $isThenable = (o) => typeof o?.then === 'function';
|
|
29
29
|
|
|
30
|
-
// Error handling utilities
|
|
31
|
-
/**
|
|
32
|
-
* * Actually, these functions will be replaced as they are by @rollup/plugin-replace
|
|
33
|
-
* @see ./.scripts/replace.mjs
|
|
34
|
-
*/
|
|
35
|
-
const $throw = (message) => {
|
|
36
|
-
throw new Error('[kt.js error]' + message);
|
|
37
|
-
};
|
|
38
|
-
const $warn = (...args) => {
|
|
39
|
-
console.warn('[kt.js warn]', ...args);
|
|
40
|
-
};
|
|
41
|
-
const $error = (...args) => {
|
|
42
|
-
console.error('[kt.js error]', ...args);
|
|
43
|
-
};
|
|
44
|
-
const $debug = (...args) => {
|
|
45
|
-
console.debug('[kt.js debug]', ...args);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
30
|
// DOM manipulation utilities
|
|
49
31
|
// # dom natives
|
|
50
32
|
const $isNode = (x) => x?.nodeType > 0;
|
|
@@ -212,6 +194,6 @@ if (typeof Symbol === 'undefined') {
|
|
|
212
194
|
}
|
|
213
195
|
|
|
214
196
|
// Shared utilities and cached native methods for kt.js framework
|
|
215
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.
|
|
197
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
216
198
|
|
|
217
|
-
export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $
|
|
199
|
+
export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, applyModel, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery, parseStyle };
|