smsmslib 1.0.59 → 1.0.65
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/javascr/av_controller/AvControllerState_t.js +1 -1
- package/javascr/av_controller/HtmlControl_t.js +1 -1
- package/javascr/av_controller/HtmlMedia_t.js +1 -1
- package/javascr/av_controller/HtmlPlay_t.js +1 -1
- package/javascr/av_controller/HtmlSkipForward_t.js +1 -1
- package/javascr/av_controller/HtmlSkipRewind_t.js +1 -1
- package/javascr/av_controller/HtmlTimerDigit_t.js +1 -1
- package/javascr/av_controller/HtmlTimerFrame_t.js +1 -1
- package/javascr/av_controller/av_controller.js +1 -1
- package/javascr/av_controller/index.js +1 -1
- package/javascr/index.js +1 -1
- package/javascr/system/App_t.js +1 -1
- package/javascr/system/HtmlElement_t.js +1 -1
- package/javascr/system/Observer_t.js +1 -1
- package/javascr/system/SubjectSet_t.js +1 -1
- package/javascr/system/Subject_t.js +1 -1
- package/javascr/system/array.js +1 -1
- package/javascr/system/arrayconcat.js +1 -1
- package/javascr/system/arraynew.js +1 -1
- package/javascr/system/arraypush.js +1 -1
- package/javascr/system/arraysplice.js +1 -1
- package/javascr/system/document.js +1 -1
- package/javascr/system/html.js +1 -1
- package/javascr/system/index.js +1 -1
- package/javascr/system/matnew.js +72 -2
- package/javascr/system/set.js +1 -1
- package/javascr/system/type.js +1 -1
- package/package.json +2 -2
- package/react/index.js +1 -1
- package/react/system/index.js +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* observer for HTMLMediaElements (e.g., <video> or <audio>). It facilitates
|
|
8
8
|
* bidirectional synchronization:
|
|
9
9
|
*
|
|
10
|
-
* @module
|
|
10
|
+
* @module javascr/av_controller/HtmlMedia_t
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/** ---------------------------------------------------------------------------
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* the button's visual state with the application's playback state and handles
|
|
9
9
|
* user toggle interactions.
|
|
10
10
|
*
|
|
11
|
-
* @module
|
|
11
|
+
* @module javascr/av_controller/HtmlPlay_t
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/** ---------------------------------------------------------------------------
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* observer for a skip-forward control. It handles user interactions to
|
|
8
8
|
* instantly move the media playback position to the end of the seekable range.
|
|
9
9
|
*
|
|
10
|
-
* @module
|
|
10
|
+
* @module javascr/av_controller/HtmlSkipForward_t
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/** ---------------------------------------------------------------------------
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* observer for a skip-rewind control. It handles user interactions to
|
|
8
8
|
* instantly move the media playback position to the start of the seekable range.
|
|
9
9
|
*
|
|
10
|
-
* @module
|
|
10
|
+
* @module javascr/av_controller/HtmlSkipRewind_t
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/** ---------------------------------------------------------------------------
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* The logic includes both initial state synchronization and real-time updates
|
|
12
12
|
* triggered by media playback events.
|
|
13
13
|
*
|
|
14
|
-
* @module
|
|
14
|
+
* @module javascr/av_controller/HtmlTimerDigit_t
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/** ---------------------------------------------------------------------------
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* actual rendered width of the progress bar's frame and synchronize that
|
|
9
9
|
* measurement with the shared application state.
|
|
10
10
|
*
|
|
11
|
-
* @module
|
|
11
|
+
* @module javascr/av_controller/HtmlTimerFrame_t
|
|
12
12
|
* --------------------------------------------------------------------------- */
|
|
13
13
|
|
|
14
14
|
/** ---------------------------------------------------------------------------
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This module provides high-level controller functions to manage the creation,
|
|
6
6
|
* initialization, and disposal of `Subject_t`.
|
|
7
7
|
*
|
|
8
|
-
* @module
|
|
8
|
+
* @module javascr/av_controller/av_controller
|
|
9
9
|
* --------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
/** ---------------------------------------------------------------------------
|
package/javascr/index.js
CHANGED
package/javascr/system/App_t.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @file App_t.js
|
|
3
3
|
* @brief Application root class providing a central access point for state management.
|
|
4
4
|
*
|
|
5
|
-
* @module
|
|
5
|
+
* @module javascr/system/App_t
|
|
6
6
|
* --------------------------------------------------------------------------- */
|
|
7
7
|
|
|
8
8
|
/** ---------------------------------------------------------------------------
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* JavaScript objects and their corresponding HTML elements, providing a
|
|
9
9
|
* structured way to manage DOM nodes as observer instances.
|
|
10
10
|
*
|
|
11
|
-
* @module
|
|
11
|
+
* @module javascr/system/HtmlElement_t
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/** ---------------------------------------------------------------------------
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* should override these methods to implement specific behaviors, such as
|
|
8
8
|
* updating DOM elements or handling application-level events.
|
|
9
9
|
*
|
|
10
|
-
* @module
|
|
10
|
+
* @module javascr/system/Observer_t
|
|
11
11
|
* --------------------------------------------------------------------------- */
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* to organize various data domains (e.g., user profiles, settings, state)
|
|
8
8
|
* under unique keys and provides mechanisms for collective operations.
|
|
9
9
|
*
|
|
10
|
-
* @module
|
|
10
|
+
* @module javascr/system/SubjectSet_t
|
|
11
11
|
* --------------------------------------------------------------------------- */
|
|
12
12
|
|
|
13
13
|
/** ---------------------------------------------------------------------------
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* via `data_get()`, editing it, and then explicitly calling `observer_update()`
|
|
19
19
|
* to trigger observer synchronization.
|
|
20
20
|
*
|
|
21
|
-
* @module
|
|
21
|
+
* @module javascr/system/Subject_t
|
|
22
22
|
* --------------------------------------------------------------------------- */
|
|
23
23
|
|
|
24
24
|
/** ---------------------------------------------------------------------------
|
package/javascr/system/array.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Provides utility functions for **safely modifying array contents** through
|
|
4
4
|
* splicing, removal, and replacement.
|
|
5
5
|
*
|
|
6
|
-
* @module
|
|
6
|
+
* @module javascr/system/arraysplice
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/** ---------------------------------------------------------------------------
|
package/javascr/system/html.js
CHANGED
package/javascr/system/index.js
CHANGED
package/javascr/system/matnew.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
2
|
* @file
|
|
3
|
+
* Provides functionality for creating multi-dimensional arrays (matrices).
|
|
3
4
|
*
|
|
4
|
-
* @module
|
|
5
|
+
* @module javascr/system/matnew
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/** ---------------------------------------------------------------------------
|
|
@@ -21,6 +22,24 @@ from "./array.js";
|
|
|
21
22
|
* Functions.
|
|
22
23
|
* --------------------------------------------------------------------------- */
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Creates a multi-dimensional array (matrix) with specified dimensions.
|
|
27
|
+
* This function constructs a nested array structure based on the provided
|
|
28
|
+
* dimension arguments.
|
|
29
|
+
*
|
|
30
|
+
* @param {...number} ai_dim [in]
|
|
31
|
+
* A variable number of arguments defining the size of each dimension.
|
|
32
|
+
* For example, `sj_mat_new(2, 3)` creates a 2x3 matrix. All arguments
|
|
33
|
+
* must be positive integers.
|
|
34
|
+
*
|
|
35
|
+
* @returns {Array | null}
|
|
36
|
+
* A new multi-dimensional array initialized with 0 at the deepest level.
|
|
37
|
+
* Returns `null` if any dimension is invalid or if allocation fails.
|
|
38
|
+
*
|
|
39
|
+
* @see mat_new_init
|
|
40
|
+
* @see mat_new_push
|
|
41
|
+
* @see mat_new_pop
|
|
42
|
+
*/
|
|
24
43
|
export function sj_mat_new(...ai_dim)
|
|
25
44
|
{
|
|
26
45
|
let a_mat = null;
|
|
@@ -48,6 +67,20 @@ export function sj_mat_new(...ai_dim)
|
|
|
48
67
|
}
|
|
49
68
|
|
|
50
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Validates matrix dimensions and initializes the root array.
|
|
72
|
+
* This function ensures that `ai_dim` contains only positive integers.
|
|
73
|
+
* If valid, it creates and returns the first-order (root) array.
|
|
74
|
+
*
|
|
75
|
+
* @param {number[]} ai_dim [in]
|
|
76
|
+
* An array where `ai_dim[n]` represents the size of the n-th order dimension.
|
|
77
|
+
* Must contain at least one element, and all elements must be positive integers.
|
|
78
|
+
*
|
|
79
|
+
* @returns {Array | null}
|
|
80
|
+
* A new empty array for the first dimension if validation passes.
|
|
81
|
+
* Returns `null` if `ai_dim` is empty, contains invalid dimensions,
|
|
82
|
+
* or if array allocation fails.
|
|
83
|
+
*/
|
|
51
84
|
function mat_new_init(ai_dim)
|
|
52
85
|
{
|
|
53
86
|
let a_mat = null;
|
|
@@ -67,6 +100,22 @@ function mat_new_init(ai_dim)
|
|
|
67
100
|
}
|
|
68
101
|
|
|
69
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Creates a new empty array for a deeper dimension and pushes the current
|
|
105
|
+
* array `a_mat` onto the stack.
|
|
106
|
+
*
|
|
107
|
+
* @param {Array<Array>} aa_stack [in/out]
|
|
108
|
+
* A stack used to store parent array references as the construction
|
|
109
|
+
* moves to deeper dimensions.
|
|
110
|
+
*
|
|
111
|
+
* @param {Array} a_mat [in]
|
|
112
|
+
* The current array level that will now act as a parent to the
|
|
113
|
+
* newly created array.
|
|
114
|
+
*
|
|
115
|
+
* @returns {Array | null}
|
|
116
|
+
* The newly created array instance (the new current level).
|
|
117
|
+
* Returns `null` if array creation or pushing fails.
|
|
118
|
+
*/
|
|
70
119
|
function mat_new_push(aa_stack, a_mat)
|
|
71
120
|
{
|
|
72
121
|
const a_push = sj_array_new(0, 0);
|
|
@@ -90,6 +139,27 @@ function mat_new_push(aa_stack, a_mat)
|
|
|
90
139
|
}
|
|
91
140
|
|
|
92
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Pops the stack to find the next available parent level after a_mat
|
|
144
|
+
* has been fully populated.
|
|
145
|
+
*
|
|
146
|
+
* This function repeatedly executes `a_mat = aa_stack.pop()` until the
|
|
147
|
+
* condition `a_mat.length < ai_dim[aa_stack.length]` is met, ensuring
|
|
148
|
+
* the returned array has space for the next element at its specific depth.
|
|
149
|
+
*
|
|
150
|
+
* @param {Array<Array>} aa_stack [in/out]
|
|
151
|
+
* A stack containing references to the parent arrays of `a_mat`.
|
|
152
|
+
*
|
|
153
|
+
* @param {Array} a_mat [in]
|
|
154
|
+
* The current array level having been populated.
|
|
155
|
+
*
|
|
156
|
+
* @param {number[]} ai_dim [in]
|
|
157
|
+
* An array where `ai_dim[n]` represents the size of the n-th order dimension.
|
|
158
|
+
*
|
|
159
|
+
* @returns {Array}
|
|
160
|
+
* The parent array of `a_mat` that has available capacity.
|
|
161
|
+
* Returns `a_mat` as is if no popping was necessary.
|
|
162
|
+
*/
|
|
93
163
|
function mat_new_pop(aa_stack, a_mat, ai_dim)
|
|
94
164
|
{
|
|
95
165
|
let a_mat_now = a_mat;
|
package/javascr/system/set.js
CHANGED
package/javascr/system/type.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smsmslib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Reusable functions for me.",
|
|
5
5
|
"files": [
|
|
6
6
|
"javascr/**/*.js",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"smsmslib": "^1.0.
|
|
22
|
+
"smsmslib": "^1.0.65"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/react/index.js
CHANGED