memorio 1.0.0 → 1.0.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.
Files changed (106) hide show
  1. package/{dist/index.js → index.js} +1 -1
  2. package/package.json +1 -1
  3. package/.editorconfig +0 -31
  4. package/.gitattributes +0 -1
  5. package/.github/CHANGELOG.md +0 -10
  6. package/.github/CITATION.cff +0 -24
  7. package/.github/CODEOWNERS +0 -1
  8. package/.github/CODE_OF_CONDUCT.md +0 -108
  9. package/.github/CONTRIBUTING.md +0 -108
  10. package/.github/COPYRIGHT.md +0 -9
  11. package/.github/FUNDING.yml +0 -16
  12. package/.github/HISTORY.md +0 -1
  13. package/.github/LICENSE.md +0 -21
  14. package/.github/SECURITY.md +0 -3
  15. package/.github/SUMMARY.md +0 -21
  16. package/.github/dependabot.yml +0 -11
  17. package/.github/documents/OBSERVER.md +0 -72
  18. package/.github/documents/STATE.md +0 -72
  19. package/.github/documents/STORE.md +0 -84
  20. package/.github/pull_request_template.md +0 -27
  21. package/.private/npm +0 -1
  22. package/.vscode/extension.json +0 -15
  23. package/.vscode/settings.json +0 -90
  24. package/config/dispatch.ts +0 -49
  25. package/config/global.ts +0 -36
  26. package/coverage/clover.xml +0 -260
  27. package/coverage/coverage-final.json +0 -10
  28. package/coverage/lcov-report/a51.memorio/config/dispatch.ts.html +0 -232
  29. package/coverage/lcov-report/a51.memorio/config/global.ts.html +0 -193
  30. package/coverage/lcov-report/a51.memorio/config/index.html +0 -131
  31. package/coverage/lcov-report/a51.memorio/dist/config/dispatch.js.html +0 -157
  32. package/coverage/lcov-report/a51.memorio/dist/config/global.js.html +0 -142
  33. package/coverage/lcov-report/a51.memorio/dist/config/index.html +0 -131
  34. package/coverage/lcov-report/a51.memorio/dist/functions/cache/index.html +0 -116
  35. package/coverage/lcov-report/a51.memorio/dist/functions/cache/index.js.html +0 -103
  36. package/coverage/lcov-report/a51.memorio/dist/functions/observer/index.html +0 -116
  37. package/coverage/lcov-report/a51.memorio/dist/functions/observer/index.js.html +0 -280
  38. package/coverage/lcov-report/a51.memorio/dist/functions/state/index.html +0 -116
  39. package/coverage/lcov-report/a51.memorio/dist/functions/state/index.js.html +0 -460
  40. package/coverage/lcov-report/a51.memorio/dist/functions/store/index.html +0 -116
  41. package/coverage/lcov-report/a51.memorio/dist/functions/store/index.js.html +0 -367
  42. package/coverage/lcov-report/a51.memorio/dist/index.html +0 -116
  43. package/coverage/lcov-report/a51.memorio/dist/init.js.html +0 -106
  44. package/coverage/lcov-report/a51.memorio/functions/cache/index.html +0 -116
  45. package/coverage/lcov-report/a51.memorio/functions/cache/index.ts.html +0 -142
  46. package/coverage/lcov-report/a51.memorio/functions/observer/index.html +0 -116
  47. package/coverage/lcov-report/a51.memorio/functions/observer/index.ts.html +0 -448
  48. package/coverage/lcov-report/a51.memorio/functions/session/index.html +0 -116
  49. package/coverage/lcov-report/a51.memorio/functions/session/index.ts.html +0 -409
  50. package/coverage/lcov-report/a51.memorio/functions/state/index.html +0 -116
  51. package/coverage/lcov-report/a51.memorio/functions/state/index.ts.html +0 -682
  52. package/coverage/lcov-report/a51.memorio/functions/store/index.html +0 -116
  53. package/coverage/lcov-report/a51.memorio/functions/store/index.ts.html +0 -409
  54. package/coverage/lcov-report/a51.memorio/index.html +0 -131
  55. package/coverage/lcov-report/a51.memorio/index.ts.html +0 -88
  56. package/coverage/lcov-report/a51.memorio/init.ts.html +0 -115
  57. package/coverage/lcov-report/base.css +0 -224
  58. package/coverage/lcov-report/block-navigation.js +0 -87
  59. package/coverage/lcov-report/favicon.png +0 -0
  60. package/coverage/lcov-report/index.html +0 -206
  61. package/coverage/lcov-report/prettify.css +0 -1
  62. package/coverage/lcov-report/prettify.js +0 -2
  63. package/coverage/lcov-report/session/index.html +0 -116
  64. package/coverage/lcov-report/session/index.ts.html +0 -571
  65. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  66. package/coverage/lcov-report/sorter.js +0 -210
  67. package/coverage/lcov-report/state/index.html +0 -116
  68. package/coverage/lcov-report/state/index.ts.html +0 -1090
  69. package/coverage/lcov-report/store/index.html +0 -116
  70. package/coverage/lcov-report/store/index.ts.html +0 -556
  71. package/coverage/lcov.info +0 -518
  72. package/dist/README.md +0 -319
  73. package/dist/index.d.ts +0 -7
  74. package/dist/package.json +0 -98
  75. package/dist/types/cache.d.ts +0 -27
  76. package/dist/types/memorio.d.ts +0 -18
  77. package/dist/types/observer.d.ts +0 -47
  78. package/dist/types/session.d.ts +0 -91
  79. package/dist/types/state.d.ts +0 -71
  80. package/dist/types/store.d.ts +0 -91
  81. package/esbuild.config.mjs +0 -54
  82. package/eslint.config.mjs +0 -174
  83. package/examples/bg.jpg +0 -0
  84. package/examples/bootstrap.less +0 -92
  85. package/examples/favicon.ico +0 -0
  86. package/examples/index.htm +0 -65
  87. package/examples/javascript.js +0 -2
  88. package/examples/responsive.less +0 -47
  89. package/examples/styles.less +0 -169
  90. package/functions/cache/index.ts +0 -19
  91. package/functions/observer/index.ts +0 -121
  92. package/functions/session/index.ts +0 -108
  93. package/functions/state/index.ts +0 -199
  94. package/functions/store/index.ts +0 -108
  95. package/index.ts +0 -1
  96. package/init.ts +0 -12
  97. package/jest.config.mjs +0 -33
  98. package/jest.setup.js +0 -2
  99. package/tests/basic.test.ts +0 -50
  100. package/tests/cache.test.ts +0 -52
  101. package/tests/observer.test.ts +0 -62
  102. package/tests/setup.ts +0 -48
  103. package/tests/state.test.ts +0 -45
  104. package/tests/store.test.ts +0 -62
  105. package/tsconfig.json +0 -67
  106. /package/{.github/README.md → README.md} +0 -0
@@ -1,210 +0,0 @@
1
- /* eslint-disable */
2
- var addSorting = (function() {
3
- 'use strict';
4
- var cols,
5
- currentSort = {
6
- index: 0,
7
- desc: false
8
- };
9
-
10
- // returns the summary table element
11
- function getTable() {
12
- return document.querySelector('.coverage-summary');
13
- }
14
- // returns the thead element of the summary table
15
- function getTableHeader() {
16
- return getTable().querySelector('thead tr');
17
- }
18
- // returns the tbody element of the summary table
19
- function getTableBody() {
20
- return getTable().querySelector('tbody');
21
- }
22
- // returns the th element for nth column
23
- function getNthColumn(n) {
24
- return getTableHeader().querySelectorAll('th')[n];
25
- }
26
-
27
- function onFilterInput() {
28
- const searchValue = document.getElementById('fileSearch').value;
29
- const rows = document.getElementsByTagName('tbody')[0].children;
30
-
31
- // Try to create a RegExp from the searchValue. If it fails (invalid regex),
32
- // it will be treated as a plain text search
33
- let searchRegex;
34
- try {
35
- searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
36
- } catch (error) {
37
- searchRegex = null;
38
- }
39
-
40
- for (let i = 0; i < rows.length; i++) {
41
- const row = rows[i];
42
- let isMatch = false;
43
-
44
- if (searchRegex) {
45
- // If a valid regex was created, use it for matching
46
- isMatch = searchRegex.test(row.textContent);
47
- } else {
48
- // Otherwise, fall back to the original plain text search
49
- isMatch = row.textContent
50
- .toLowerCase()
51
- .includes(searchValue.toLowerCase());
52
- }
53
-
54
- row.style.display = isMatch ? '' : 'none';
55
- }
56
- }
57
-
58
- // loads the search box
59
- function addSearchBox() {
60
- var template = document.getElementById('filterTemplate');
61
- var templateClone = template.content.cloneNode(true);
62
- templateClone.getElementById('fileSearch').oninput = onFilterInput;
63
- template.parentElement.appendChild(templateClone);
64
- }
65
-
66
- // loads all columns
67
- function loadColumns() {
68
- var colNodes = getTableHeader().querySelectorAll('th'),
69
- colNode,
70
- cols = [],
71
- col,
72
- i;
73
-
74
- for (i = 0; i < colNodes.length; i += 1) {
75
- colNode = colNodes[i];
76
- col = {
77
- key: colNode.getAttribute('data-col'),
78
- sortable: !colNode.getAttribute('data-nosort'),
79
- type: colNode.getAttribute('data-type') || 'string'
80
- };
81
- cols.push(col);
82
- if (col.sortable) {
83
- col.defaultDescSort = col.type === 'number';
84
- colNode.innerHTML =
85
- colNode.innerHTML + '<span class="sorter"></span>';
86
- }
87
- }
88
- return cols;
89
- }
90
- // attaches a data attribute to every tr element with an object
91
- // of data values keyed by column name
92
- function loadRowData(tableRow) {
93
- var tableCols = tableRow.querySelectorAll('td'),
94
- colNode,
95
- col,
96
- data = {},
97
- i,
98
- val;
99
- for (i = 0; i < tableCols.length; i += 1) {
100
- colNode = tableCols[i];
101
- col = cols[i];
102
- val = colNode.getAttribute('data-value');
103
- if (col.type === 'number') {
104
- val = Number(val);
105
- }
106
- data[col.key] = val;
107
- }
108
- return data;
109
- }
110
- // loads all row data
111
- function loadData() {
112
- var rows = getTableBody().querySelectorAll('tr'),
113
- i;
114
-
115
- for (i = 0; i < rows.length; i += 1) {
116
- rows[i].data = loadRowData(rows[i]);
117
- }
118
- }
119
- // sorts the table using the data for the ith column
120
- function sortByIndex(index, desc) {
121
- var key = cols[index].key,
122
- sorter = function(a, b) {
123
- a = a.data[key];
124
- b = b.data[key];
125
- return a < b ? -1 : a > b ? 1 : 0;
126
- },
127
- finalSorter = sorter,
128
- tableBody = document.querySelector('.coverage-summary tbody'),
129
- rowNodes = tableBody.querySelectorAll('tr'),
130
- rows = [],
131
- i;
132
-
133
- if (desc) {
134
- finalSorter = function(a, b) {
135
- return -1 * sorter(a, b);
136
- };
137
- }
138
-
139
- for (i = 0; i < rowNodes.length; i += 1) {
140
- rows.push(rowNodes[i]);
141
- tableBody.removeChild(rowNodes[i]);
142
- }
143
-
144
- rows.sort(finalSorter);
145
-
146
- for (i = 0; i < rows.length; i += 1) {
147
- tableBody.appendChild(rows[i]);
148
- }
149
- }
150
- // removes sort indicators for current column being sorted
151
- function removeSortIndicators() {
152
- var col = getNthColumn(currentSort.index),
153
- cls = col.className;
154
-
155
- cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
156
- col.className = cls;
157
- }
158
- // adds sort indicators for current column being sorted
159
- function addSortIndicators() {
160
- getNthColumn(currentSort.index).className += currentSort.desc
161
- ? ' sorted-desc'
162
- : ' sorted';
163
- }
164
- // adds event listeners for all sorter widgets
165
- function enableUI() {
166
- var i,
167
- el,
168
- ithSorter = function ithSorter(i) {
169
- var col = cols[i];
170
-
171
- return function() {
172
- var desc = col.defaultDescSort;
173
-
174
- if (currentSort.index === i) {
175
- desc = !currentSort.desc;
176
- }
177
- sortByIndex(i, desc);
178
- removeSortIndicators();
179
- currentSort.index = i;
180
- currentSort.desc = desc;
181
- addSortIndicators();
182
- };
183
- };
184
- for (i = 0; i < cols.length; i += 1) {
185
- if (cols[i].sortable) {
186
- // add the click event handler on the th so users
187
- // dont have to click on those tiny arrows
188
- el = getNthColumn(i).querySelector('.sorter').parentElement;
189
- if (el.addEventListener) {
190
- el.addEventListener('click', ithSorter(i));
191
- } else {
192
- el.attachEvent('onclick', ithSorter(i));
193
- }
194
- }
195
- }
196
- }
197
- // adds sorting functionality to the UI
198
- return function() {
199
- if (!getTable()) {
200
- return;
201
- }
202
- cols = loadColumns();
203
- loadData();
204
- addSearchBox();
205
- addSortIndicators();
206
- enableUI();
207
- };
208
- })();
209
-
210
- window.addEventListener('load', addSorting);
@@ -1,116 +0,0 @@
1
-
2
- <!doctype html>
3
- <html lang="en">
4
-
5
- <head>
6
- <title>Code coverage report for state</title>
7
- <meta charset="utf-8" />
8
- <link rel="stylesheet" href="../prettify.css" />
9
- <link rel="stylesheet" href="../base.css" />
10
- <link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
11
- <meta name="viewport" content="width=device-width, initial-scale=1" />
12
- <style type='text/css'>
13
- .coverage-summary .sorter {
14
- background-image: url(../sort-arrow-sprite.png);
15
- }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <div class='wrapper'>
21
- <div class='pad1'>
22
- <h1><a href="../index.html">All files</a> state</h1>
23
- <div class='clearfix'>
24
-
25
- <div class='fl pad1y space-right2'>
26
- <span class="strong">76% </span>
27
- <span class="quiet">Statements</span>
28
- <span class='fraction'>95/125</span>
29
- </div>
30
-
31
-
32
- <div class='fl pad1y space-right2'>
33
- <span class="strong">73.33% </span>
34
- <span class="quiet">Branches</span>
35
- <span class='fraction'>66/90</span>
36
- </div>
37
-
38
-
39
- <div class='fl pad1y space-right2'>
40
- <span class="strong">76.92% </span>
41
- <span class="quiet">Functions</span>
42
- <span class='fraction'>20/26</span>
43
- </div>
44
-
45
-
46
- <div class='fl pad1y space-right2'>
47
- <span class="strong">76.22% </span>
48
- <span class="quiet">Lines</span>
49
- <span class='fraction'>93/122</span>
50
- </div>
51
-
52
-
53
- </div>
54
- <p class="quiet">
55
- Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
- </p>
57
- <template id="filterTemplate">
58
- <div class="quiet">
59
- Filter:
60
- <input type="search" id="fileSearch">
61
- </div>
62
- </template>
63
- </div>
64
- <div class='status-line medium'></div>
65
- <div class="pad1">
66
- <table class="coverage-summary">
67
- <thead>
68
- <tr>
69
- <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
70
- <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
71
- <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
72
- <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
73
- <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
74
- <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
75
- <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
76
- <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
77
- <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
78
- <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
79
- </tr>
80
- </thead>
81
- <tbody><tr>
82
- <td class="file medium" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
83
- <td data-value="76" class="pic medium">
84
- <div class="chart"><div class="cover-fill" style="width: 76%"></div><div class="cover-empty" style="width: 24%"></div></div>
85
- </td>
86
- <td data-value="76" class="pct medium">76%</td>
87
- <td data-value="125" class="abs medium">95/125</td>
88
- <td data-value="73.33" class="pct medium">73.33%</td>
89
- <td data-value="90" class="abs medium">66/90</td>
90
- <td data-value="76.92" class="pct medium">76.92%</td>
91
- <td data-value="26" class="abs medium">20/26</td>
92
- <td data-value="76.22" class="pct medium">76.22%</td>
93
- <td data-value="122" class="abs medium">93/122</td>
94
- </tr>
95
-
96
- </tbody>
97
- </table>
98
- </div>
99
- <div class='push'></div><!-- for sticky footer -->
100
- </div><!-- /wrapper -->
101
- <div class='footer quiet pad2 space-top1 center small'>
102
- Code coverage generated by
103
- <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2025-08-24T04:29:01.563Z
105
- </div>
106
- <script src="../prettify.js"></script>
107
- <script>
108
- window.onload = function () {
109
- prettyPrint();
110
- };
111
- </script>
112
- <script src="../sorter.js"></script>
113
- <script src="../block-navigation.js"></script>
114
- </body>
115
- </html>
116
-