estreui 1.2.2 → 1.2.4

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.
@@ -31,13 +31,19 @@ SOFTWARE.
31
31
  // Collections of bypass for process codes takes be inline,
32
32
  // and monkey patching like as modern languages.
33
33
  //
34
- // v0.7.1 / release 2026.03.31
34
+ // v0.7.2 / release 2026.04.18
35
35
  //
36
36
  // Author: Estre Soliette
37
37
  // Established: 2025.01.05
38
38
 
39
39
 
40
+ /** @type {Object} Global object (globalThis / window / global). */
40
41
  const _global = (typeof globalThis !== 'undefined') ? globalThis : (typeof window !== 'undefined' ? window : global);
42
+ /**
43
+ * Defines a read-only global constant.
44
+ * @param {string} name - Global property name.
45
+ * @param {*} value - Value.
46
+ */
41
47
  const defineGlobal = (name, value) => Object.defineProperty(_global, name, {
42
48
  value: value,
43
49
  writable: false,
@@ -85,7 +91,15 @@ const DEFAULT = "default";
85
91
  const FINALLY = "finally";
86
92
 
87
93
 
88
- // bypass constant
94
+ // bypass constant — conditional execution utilities
95
+ /**
96
+ * Executes work if condition is true, ornot if false.
97
+ * @param {boolean} bool - Condition.
98
+ * @param {Function} [work] - Function to execute when true.
99
+ * @param {Array} [args=[]] - Arguments to pass to work/ornot.
100
+ * @param {Function} [ornot] - Function to execute when false.
101
+ * @returns {*} Execution result.
102
+ */
89
103
  const executeIf = (bool, work = () => {}, args = [], ornot = () => {}) => {
90
104
  if (bool) return work(...args);
91
105
  else return ornot(...args);
@@ -222,9 +236,18 @@ const isNotNull = it => it !== null;
222
236
  const isNotTrue = it => it !== true;
223
237
  const isNotFalse = it => it !== false;
224
238
 
239
+ /** Checks whether the value is null or undefined. @param {*} it @returns {boolean} */
225
240
  const isNully = it => it == null;
241
+ /** Checks whether the value is truthy. @param {*} it @returns {boolean} */
226
242
  const isTruely = it => it == true;
243
+ /** Checks whether the value is falsy. @param {*} it @returns {boolean} */
227
244
  const isFalsely = it => it == false;
245
+ /**
246
+ * Checks whether the value is empty by type. undefined/null → true, string → length, array/object → length/size/keys.
247
+ * @param {*} it - Value to check.
248
+ * @param {number} [numberEmptyMatch=0] - Values at or below this number are considered empty.
249
+ * @returns {boolean}
250
+ */
228
251
  const isEmpty = (it, numberEmptyMatch = 0) => typeCase(it, {
229
252
  [UNDEFINED]: _ => true,
230
253
  [NULL]: _ => true,
@@ -243,12 +266,21 @@ const isEmpty = (it, numberEmptyMatch = 0) => typeCase(it, {
243
266
  },
244
267
  });
245
268
 
269
+ /** Checks whether the value is not null/undefined. @param {*} it @returns {boolean} */
246
270
  const isNotNully = it => it != null;
247
271
  const isNotTruely = it => it != true;
248
272
  const isNotFalsely = it => it != false;
273
+ /** Checks whether the value is not empty. @param {*} it @param {number} [numberEmptyMatch=0] @returns {boolean} */
249
274
  const isNotEmpty = (it, numberEmptyMatch = 0) => !isEmpty(it, numberEmptyMatch);
250
275
 
276
+ /** Checks whether the value is null or empty. @param {*} it @param {number} [numberEmptyMatch=0] @returns {boolean} */
251
277
  const isNullOrEmpty = (it, numberEmptyMatch = 0) => isNully(it) || isEmpty(it, numberEmptyMatch);
278
+ /**
279
+ * Checks whether the value is not null and not empty. Aliased as `nne()` in alienese.
280
+ * @param {*} it - Value to check.
281
+ * @param {number} [numberEmptyMatch=0] - Values at or below this number are considered empty.
282
+ * @returns {boolean} true if the value is meaningful.
283
+ */
252
284
  const isNotNullAndEmpty = (it, numberEmptyMatch = 0) => isNotNully(it) && isNotEmpty(it, numberEmptyMatch);
253
285
 
254
286
 
@@ -442,15 +474,24 @@ const revert = (to, from, dataOnly = true, primitiveOnly = false, recusive = tru
442
474
  };
443
475
 
444
476
 
445
- /** run handle */
477
+ /** run handle — async execution utilities */
478
+ /** Schedules a task on the microtask queue via setTimeout(process, 0). @param {Function} process @param {...*} args @returns {number} timer ID */
446
479
  const postQueue = (process = (...args) => args[0], ...args) => setTimeout(process, 0, ...args);
480
+ /** Delayed execution via setTimeout(process, delay). @param {Function} process @param {number} [delay=100] @param {...*} args @returns {number} */
447
481
  const postDelayed = (process = (...args) => args[0], delay = 100, ...args) => setTimeout(process, delay, ...args);
482
+ /** Wraps process(resolve, reject, ...args) in a Promise. @param {Function} process @param {...*} args @returns {Promise<*>} */
448
483
  const postPromise = (process = (rs, rj, ...args) => rs(args[0]), ...args) => new Promise((rs, rj) => process(rs, rj, ...args));
484
+ /** Executes a Promise after a delay. @param {Function} process @param {number} [delay=100] @param {...*} args @returns {Promise<*>} */
449
485
  const postBonded = (process = (rs, rj, ...args) => rs(args[0]), delay = 100, ...args) => new Promise((rs, rj) => setTimeout(process, delay, rs, rj, ...args));
486
+ /** setTimeout(0) + Promise combination. @param {Function} process @param {...*} args @returns {Promise<*>} */
450
487
  const postPromiseQueue = (process = (rs, rj, ...args) => rs(args[0]), ...args) => new Promise((rs, rj) => setTimeout(process, 0, rs, rj, ...args));
488
+ /** Immediately executes an async function. @param {Function} process @param {...*} args @returns {Promise<*>} */
451
489
  const postAsyncQueue = (process = async (...args) => args[0], ...args) => process(...args);
490
+ /** Executes an async function with await. @param {Function} process @param {...*} args @returns {Promise<*>} */
452
491
  const postAwaitQueue = async (process = async (...args) => args[0], ...args) => await process(...args);
492
+ /** Executes on the next frame via requestAnimationFrame. @param {Function} process @param {...*} args @returns {number} */
453
493
  const postFrameQueue = (process = (...args) => args[0], ...args) => requestAnimationFrame(() => process(...args));
494
+ /** requestAnimationFrame + Promise combination. @param {Function} process @param {...*} args @returns {Promise<*>} */
454
495
  const postFramePromise = (process = (rs, rj, ...args) => rs(args[0]), ...args) => new Promise((rs, rj) => requestAnimationFrame(() => process(rs, rj, ...args)));
455
496
 
456
497
 
package/serviceWorker.js CHANGED
@@ -1,4 +1,4 @@
1
- const INSTALLATION_VERSION_NAME = "1.2.1-r20260308";
1
+ const INSTALLATION_VERSION_NAME = "1.2.4-r20260418";
2
2
  // ^^ Use for check new update "Native application(webview) version(or Android/iOS version combo) - PWA release version"
3
3
  // ex) "1.0.1/1.0.0-r20251101k"
4
4
 
@@ -21,7 +21,7 @@ const INSTALLATION_FILE_LIST = [
21
21
 
22
22
 
23
23
  // Common files cache - Be changes some time but, well not changed very often
24
- const CACHE_NAME_COMMON_FILES = "common-files-cache-v1-20260308";
24
+ const CACHE_NAME_COMMON_FILES = "common-files-cache-v1-20260418";
25
25
 
26
26
  const COMMON_FILES_TO_CACHE = [
27
27
  "./",
@@ -47,7 +47,14 @@ const COMMON_FILES_TO_CACHE = [
47
47
  "./scripts/modernism.js",
48
48
  "./scripts/alienese.js",
49
49
  "./scripts/estreU0EEOZ.js",
50
- "./scripts/estreUi.js",
50
+ "./scripts/estreUi-core.js",
51
+ "./scripts/estreUi-dialog.js",
52
+ "./scripts/estreUi-notation.js",
53
+ "./scripts/estreUi-pageModel.js",
54
+ "./scripts/estreUi-pageManager.js",
55
+ "./scripts/estreUi-handles.js",
56
+ "./scripts/estreUi-interaction.js",
57
+ "./scripts/estreUi-main.js",
51
58
  ];
52
59
 
53
60