@ktjs/shared 0.23.1 → 0.23.3
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 +1 -1
- package/dist/index.iife.js +12 -8
- package/dist/index.legacy.js +12 -9
- package/dist/index.mjs +12 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ declare const originAppend: (...nodes: (Node | string)[]) => void;
|
|
|
114
114
|
declare const $append: typeof originAppend;
|
|
115
115
|
declare const $buttonDisabledGetter: () => any;
|
|
116
116
|
declare const $buttonDisabledSetter: (v: any) => void;
|
|
117
|
-
declare const parseStyle: (style:
|
|
117
|
+
declare const parseStyle: (style: unknown) => string;
|
|
118
118
|
type ChangeHandler<T = string> = (value: T, ...args: any[]) => void;
|
|
119
119
|
/**
|
|
120
120
|
* Used for `k-model`
|
package/dist/index.iife.js
CHANGED
|
@@ -80,19 +80,23 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
const { get: $buttonDisabledGetter, set: $buttonDisabledSetter } = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled');
|
|
83
|
-
// # DOM utilities
|
|
84
83
|
const parseStyle = (style) => {
|
|
84
|
+
if (!style) {
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
85
87
|
if (typeof style === 'string') {
|
|
86
88
|
return style;
|
|
87
89
|
}
|
|
88
90
|
if (style && typeof style === 'object') {
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
if (style.isKT) {
|
|
92
|
+
return parseStyle(style.value);
|
|
93
|
+
}
|
|
94
|
+
return $entries(style)
|
|
95
|
+
.map((entry) => {
|
|
96
|
+
const cssKey = entry[0].replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
97
|
+
return `${cssKey}:${entry[1]}`;
|
|
94
98
|
})
|
|
95
|
-
.join(';
|
|
99
|
+
.join(';');
|
|
96
100
|
}
|
|
97
101
|
return '';
|
|
98
102
|
};
|
|
@@ -197,7 +201,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
197
201
|
}
|
|
198
202
|
|
|
199
203
|
// Shared utilities and cached native methods for kt.js framework
|
|
200
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
204
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.3' });
|
|
201
205
|
|
|
202
206
|
exports.$ArrayFrom = $ArrayFrom;
|
|
203
207
|
exports.$append = $append;
|
package/dist/index.legacy.js
CHANGED
|
@@ -85,20 +85,23 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
var $buttonDisabledGetter = (_a = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled'), _a.get), $buttonDisabledSetter = _a.set;
|
|
88
|
-
// # DOM utilities
|
|
89
88
|
var parseStyle = function (style) {
|
|
89
|
+
if (!style) {
|
|
90
|
+
return '';
|
|
91
|
+
}
|
|
90
92
|
if (typeof style === 'string') {
|
|
91
93
|
return style;
|
|
92
94
|
}
|
|
93
95
|
if (style && typeof style === 'object') {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
if (style.isKT) {
|
|
97
|
+
return parseStyle(style.value);
|
|
98
|
+
}
|
|
99
|
+
return $entries(style)
|
|
100
|
+
.map(function (entry) {
|
|
101
|
+
var cssKey = entry[0].replace(/[A-Z]/g, function (m) { return "-".concat(m.toLowerCase()); });
|
|
102
|
+
return "".concat(cssKey, ":").concat(entry[1]);
|
|
100
103
|
})
|
|
101
|
-
.join(';
|
|
104
|
+
.join(';');
|
|
102
105
|
}
|
|
103
106
|
return '';
|
|
104
107
|
};
|
|
@@ -208,7 +211,7 @@ var __ktjs_shared__ = (function (exports) {
|
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
// Shared utilities and cached native methods for kt.js framework
|
|
211
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
214
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.3' });
|
|
212
215
|
|
|
213
216
|
exports.$ArrayFrom = $ArrayFrom;
|
|
214
217
|
exports.$append = $append;
|
package/dist/index.mjs
CHANGED
|
@@ -77,19 +77,23 @@ const $append = // for ie 9/10/11
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
const { get: $buttonDisabledGetter, set: $buttonDisabledSetter } = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled');
|
|
80
|
-
// # DOM utilities
|
|
81
80
|
const parseStyle = (style) => {
|
|
81
|
+
if (!style) {
|
|
82
|
+
return '';
|
|
83
|
+
}
|
|
82
84
|
if (typeof style === 'string') {
|
|
83
85
|
return style;
|
|
84
86
|
}
|
|
85
87
|
if (style && typeof style === 'object') {
|
|
86
|
-
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
if (style.isKT) {
|
|
89
|
+
return parseStyle(style.value);
|
|
90
|
+
}
|
|
91
|
+
return $entries(style)
|
|
92
|
+
.map((entry) => {
|
|
93
|
+
const cssKey = entry[0].replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
94
|
+
return `${cssKey}:${entry[1]}`;
|
|
91
95
|
})
|
|
92
|
-
.join(';
|
|
96
|
+
.join(';');
|
|
93
97
|
}
|
|
94
98
|
return '';
|
|
95
99
|
};
|
|
@@ -194,6 +198,6 @@ if (typeof Symbol === 'undefined') {
|
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
// Shared utilities and cached native methods for kt.js framework
|
|
197
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
201
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.3' });
|
|
198
202
|
|
|
199
203
|
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 };
|