@ktjs/shared 0.20.3 → 0.22.2

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
@@ -20,7 +20,12 @@ declare const $define: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor
20
20
  declare const $entries: <T>(o: T) => Array<[keyof T, T[keyof T]]>;
21
21
  declare const $isThenable: (o: any) => o is Promise<any>;
22
22
 
23
+ /**
24
+ * * Actually, these functions will be replaced as they are by @rollup/plugin-replace
25
+ * @see ./.scripts/replace.mjs
26
+ */
23
27
  declare const $throw: (message: string) => never;
28
+ declare const $warn: (message: string) => void;
24
29
 
25
30
  type otherstring = string & {};
26
31
 
@@ -136,5 +141,5 @@ declare const emplaceParams: (path: string, params: Record<string, string>) => s
136
141
  */
137
142
  declare const extractParams: (pattern: string, path: string) => Record<string, string> | null;
138
143
 
139
- export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isThenable, $keys, $throw, $toString, applyModel, buildQuery, emplaceParams, extractParams, generateHandler, normalizePath, parseQuery, parseStyle };
144
+ export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isThenable, $keys, $throw, $toString, $warn, applyModel, buildQuery, emplaceParams, extractParams, generateHandler, normalizePath, parseQuery, parseStyle };
140
145
  export type { ChangeHandler, ChangeTriggerField, HTMLTag, InputElementTag, MathMLTag, NoTextNodeTag, NonSpecialTags, SVGTag, otherstring };
@@ -15,8 +15,15 @@ var __ktjs_shared__ = (function (exports) {
15
15
  const $isThenable = (o) => typeof o === 'object' && o !== null && typeof o.then === 'function';
16
16
 
17
17
  // Error handling utilities
18
+ /**
19
+ * * Actually, these functions will be replaced as they are by @rollup/plugin-replace
20
+ * @see ./.scripts/replace.mjs
21
+ */
18
22
  const $throw = (message) => {
19
- throw new Error('@ktjs/shared: ' + message);
23
+ throw new Error('[kt.js error]' + message);
24
+ };
25
+ const $warn = (message) => {
26
+ console.warn('[kt.js warn] ' + message);
20
27
  };
21
28
 
22
29
  // String manipulation utilities
@@ -173,7 +180,7 @@ var __ktjs_shared__ = (function (exports) {
173
180
 
174
181
  // Shared utilities and cached native methods for kt.js framework
175
182
  // Re-export all utilities
176
- Object.defineProperty(window, '@ktjs/shared', { value: '0.20.3' });
183
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.2' });
177
184
 
178
185
  exports.$ArrayFrom = $ArrayFrom;
179
186
  exports.$append = $append;
@@ -192,6 +199,7 @@ var __ktjs_shared__ = (function (exports) {
192
199
  exports.$keys = $keys;
193
200
  exports.$throw = $throw;
194
201
  exports.$toString = $toString;
202
+ exports.$warn = $warn;
195
203
  exports.applyModel = applyModel;
196
204
  exports.buildQuery = buildQuery;
197
205
  exports.emplaceParams = emplaceParams;
@@ -17,8 +17,15 @@ var __ktjs_shared__ = (function (exports) {
17
17
  };
18
18
 
19
19
  // Error handling utilities
20
+ /**
21
+ * * Actually, these functions will be replaced as they are by @rollup/plugin-replace
22
+ * @see ./.scripts/replace.mjs
23
+ */
20
24
  var $throw = function (message) {
21
- throw new Error('@ktjs/shared: ' + message);
25
+ throw new Error('[kt.js error]' + message);
26
+ };
27
+ var $warn = function (message) {
28
+ console.warn('[kt.js warn] ' + message);
22
29
  };
23
30
 
24
31
  // String manipulation utilities
@@ -186,7 +193,7 @@ var __ktjs_shared__ = (function (exports) {
186
193
 
187
194
  // Shared utilities and cached native methods for kt.js framework
188
195
  // Re-export all utilities
189
- Object.defineProperty(window, '@ktjs/shared', { value: '0.20.3' });
196
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.2' });
190
197
 
191
198
  exports.$ArrayFrom = $ArrayFrom;
192
199
  exports.$append = $append;
@@ -205,6 +212,7 @@ var __ktjs_shared__ = (function (exports) {
205
212
  exports.$keys = $keys;
206
213
  exports.$throw = $throw;
207
214
  exports.$toString = $toString;
215
+ exports.$warn = $warn;
208
216
  exports.applyModel = applyModel;
209
217
  exports.buildQuery = buildQuery;
210
218
  exports.emplaceParams = emplaceParams;
package/dist/index.mjs CHANGED
@@ -12,8 +12,15 @@ const $entries = Object.entries;
12
12
  const $isThenable = (o) => typeof o === 'object' && o !== null && typeof o.then === 'function';
13
13
 
14
14
  // Error handling utilities
15
+ /**
16
+ * * Actually, these functions will be replaced as they are by @rollup/plugin-replace
17
+ * @see ./.scripts/replace.mjs
18
+ */
15
19
  const $throw = (message) => {
16
- throw new Error('@ktjs/shared: ' + message);
20
+ throw new Error('[kt.js error]' + message);
21
+ };
22
+ const $warn = (message) => {
23
+ console.warn('[kt.js warn] ' + message);
17
24
  };
18
25
 
19
26
  // String manipulation utilities
@@ -170,6 +177,6 @@ const extractParams = (pattern, path) => {
170
177
 
171
178
  // Shared utilities and cached native methods for kt.js framework
172
179
  // Re-export all utilities
173
- Object.defineProperty(window, '@ktjs/shared', { value: '0.20.3' });
180
+ Object.defineProperty(window, '__ktjs__', { value: '0.22.2' });
174
181
 
175
- export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isThenable, $keys, $throw, $toString, applyModel, buildQuery, emplaceParams, extractParams, generateHandler, normalizePath, parseQuery, parseStyle };
182
+ export { $ArrayFrom, $append, $appendChild, $assign, $buttonDisabledGetter, $buttonDisabledSetter, $define, $defines, $emptyFn, $entries, $hasOwn, $is, $isArray, $isThenable, $keys, $throw, $toString, $warn, applyModel, buildQuery, emplaceParams, extractParams, generateHandler, normalizePath, parseQuery, parseStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/shared",
3
- "version": "0.20.3",
3
+ "version": "0.22.2",
4
4
  "description": "Shared utilities and cached native methods for kt.js framework",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",