@ktjs/shared 0.23.7 → 0.23.11
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 +3 -11
- package/dist/index.iife.js +5 -6
- package/dist/index.legacy.js +5 -6
- package/dist/index.mjs +4 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
/**
|
|
3
|
-
* Extend Comment interface to include properties for fragment handling.
|
|
4
|
-
*/
|
|
5
|
-
interface Comment {
|
|
6
|
-
kisFragmentAnchor: boolean;
|
|
7
|
-
kFragmentList: Node[];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
/**
|
|
12
2
|
* Mark the attribute as SVG to handle special cases during rendering.
|
|
13
3
|
*/
|
|
@@ -138,6 +128,8 @@ declare const $applyModel: (element: HTMLElementTagNameMap[InputElementTag], val
|
|
|
138
128
|
* Default empty function
|
|
139
129
|
*/
|
|
140
130
|
declare const $emptyFn: (...args: any[]) => any;
|
|
131
|
+
declare const $emptyArray: any[];
|
|
132
|
+
declare const $emptyObject: any;
|
|
141
133
|
declare const $isSame: (a: unknown, b: unknown) => boolean;
|
|
142
134
|
/**
|
|
143
135
|
* Safe and quick forEach implementation that works with array-like objects and handles sparse arrays.
|
|
@@ -183,5 +175,5 @@ declare global {
|
|
|
183
175
|
const $debug: typeof console.debug;
|
|
184
176
|
}
|
|
185
177
|
|
|
186
|
-
export { $ArrayFrom, $append, $appendChild, $applyModel, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $forEach, $forEachAsync, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $parseStyle, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
|
|
178
|
+
export { $ArrayFrom, $append, $appendChild, $applyModel, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyArray, $emptyFn, $emptyObject, $entries, $forEach, $forEachAsync, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $parseStyle, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
|
|
187
179
|
export type { ChangeHandler, ChangeTriggerField, HTMLTag, InputElementTag, MathMLTag, NoTextNodeTag, NonSpecialTags, SVGTag, otherstring };
|
package/dist/index.iife.js
CHANGED
|
@@ -21,11 +21,6 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// each instance shares the same empty array, but it will be replaced when used
|
|
25
|
-
const emptyArray = [];
|
|
26
|
-
Comment.prototype.kisFragmentAnchor = false;
|
|
27
|
-
Comment.prototype.kFragmentList = emptyArray;
|
|
28
|
-
|
|
29
24
|
// Shared constants
|
|
30
25
|
// Empty for now - can be extended with framework-wide constants
|
|
31
26
|
/**
|
|
@@ -125,6 +120,8 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
125
120
|
* Default empty function
|
|
126
121
|
*/
|
|
127
122
|
const $emptyFn = (() => true);
|
|
123
|
+
const $emptyArray = [];
|
|
124
|
+
const $emptyObject = Object.create(null);
|
|
128
125
|
const $isSame = (a, b) => {
|
|
129
126
|
if ($isArray(a)) {
|
|
130
127
|
return true; // always trigger an array
|
|
@@ -224,7 +221,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
224
221
|
};
|
|
225
222
|
|
|
226
223
|
// incase that symbol is not supported
|
|
227
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
224
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.11' });
|
|
228
225
|
|
|
229
226
|
exports.$ArrayFrom = $ArrayFrom;
|
|
230
227
|
exports.$append = $append;
|
|
@@ -235,7 +232,9 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
235
232
|
exports.$buttonDisabledSetter = $buttonDisabledSetter;
|
|
236
233
|
exports.$define = $define;
|
|
237
234
|
exports.$defines = $defines;
|
|
235
|
+
exports.$emptyArray = $emptyArray;
|
|
238
236
|
exports.$emptyFn = $emptyFn;
|
|
237
|
+
exports.$emptyObject = $emptyObject;
|
|
239
238
|
exports.$entries = $entries;
|
|
240
239
|
exports.$forEach = $forEach;
|
|
241
240
|
exports.$forEachAsync = $forEachAsync;
|
package/dist/index.legacy.js
CHANGED
|
@@ -21,11 +21,6 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// each instance shares the same empty array, but it will be replaced when used
|
|
25
|
-
var emptyArray = [];
|
|
26
|
-
Comment.prototype.kisFragmentAnchor = false;
|
|
27
|
-
Comment.prototype.kFragmentList = emptyArray;
|
|
28
|
-
|
|
29
24
|
// Shared constants
|
|
30
25
|
// Empty for now - can be extended with framework-wide constants
|
|
31
26
|
/**
|
|
@@ -190,6 +185,8 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
190
185
|
* Default empty function
|
|
191
186
|
*/
|
|
192
187
|
var $emptyFn = (function () { return true; });
|
|
188
|
+
var $emptyArray = [];
|
|
189
|
+
var $emptyObject = Object.create(null);
|
|
193
190
|
var $isSame = function (a, b) {
|
|
194
191
|
if ($isArray(a)) {
|
|
195
192
|
return true; // always trigger an array
|
|
@@ -309,7 +306,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
309
306
|
};
|
|
310
307
|
|
|
311
308
|
// incase that symbol is not supported
|
|
312
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
309
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.11' });
|
|
313
310
|
|
|
314
311
|
exports.$ArrayFrom = $ArrayFrom;
|
|
315
312
|
exports.$append = $append;
|
|
@@ -320,7 +317,9 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
320
317
|
exports.$buttonDisabledSetter = $buttonDisabledSetter;
|
|
321
318
|
exports.$define = $define;
|
|
322
319
|
exports.$defines = $defines;
|
|
320
|
+
exports.$emptyArray = $emptyArray;
|
|
323
321
|
exports.$emptyFn = $emptyFn;
|
|
322
|
+
exports.$emptyObject = $emptyObject;
|
|
324
323
|
exports.$entries = $entries;
|
|
325
324
|
exports.$forEach = $forEach;
|
|
326
325
|
exports.$forEachAsync = $forEachAsync;
|
package/dist/index.mjs
CHANGED
|
@@ -18,11 +18,6 @@ if (typeof Symbol === 'undefined') {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// each instance shares the same empty array, but it will be replaced when used
|
|
22
|
-
const emptyArray = [];
|
|
23
|
-
Comment.prototype.kisFragmentAnchor = false;
|
|
24
|
-
Comment.prototype.kFragmentList = emptyArray;
|
|
25
|
-
|
|
26
21
|
// Shared constants
|
|
27
22
|
// Empty for now - can be extended with framework-wide constants
|
|
28
23
|
/**
|
|
@@ -122,6 +117,8 @@ const $applyModel = (element, valueRef, propName, eventName) => {
|
|
|
122
117
|
* Default empty function
|
|
123
118
|
*/
|
|
124
119
|
const $emptyFn = (() => true);
|
|
120
|
+
const $emptyArray = [];
|
|
121
|
+
const $emptyObject = Object.create(null);
|
|
125
122
|
const $isSame = (a, b) => {
|
|
126
123
|
if ($isArray(a)) {
|
|
127
124
|
return true; // always trigger an array
|
|
@@ -221,6 +218,6 @@ const extractParams = (pattern, path) => {
|
|
|
221
218
|
};
|
|
222
219
|
|
|
223
220
|
// incase that symbol is not supported
|
|
224
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
221
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.11' });
|
|
225
222
|
|
|
226
|
-
export { $ArrayFrom, $append, $appendChild, $applyModel, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $forEach, $forEachAsync, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $parseStyle, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
|
|
223
|
+
export { $ArrayFrom, $append, $appendChild, $applyModel, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyArray, $emptyFn, $emptyObject, $entries, $forEach, $forEachAsync, $hasOwn, $is, $isArray, $isNode, $isSame, $isThenable, $keys, $parseStyle, $random, $replaceNode, $toString, DIRV_TYPE, MATHML_ATTR_FLAG, SVG_ATTR_FLAG, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
|