mnfst 0.5.275 → 0.5.277

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
3
- "manifest.appwrite.data.js": "sha384-DL3DcEUoVXDqLwODzd/CBtnTyBPqeFl6RVx01oBv1lCwgMkNEGQeeKdA9l132m2m",
3
+ "manifest.appwrite.data.js": "sha384-mCIqSYY/Ngu515RzMULX16zxzYOQGM7tqmE+7svce9srKtR/mlCl1x1b1CjHRJ4B",
4
4
  "manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
5
5
  "manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
6
6
  "manifest.charts.js": "sha384-AFbP7mQnigy7DU1s+YE30yKTeQAKfgNazhbfSNbfd9ZpLgeulZKaPi/fAq3gJHDO",
@@ -11,7 +11,7 @@
11
11
  "manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
12
12
  "manifest.components.js": "sha384-1el5WMdgmzu/2ocaYN21OjLi/lfjllvA8aju1J3knYuOizw+XFfJU1+rvGqYW7qk",
13
13
  "manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
14
- "manifest.data.js": "sha384-pOXyFP7tUdQG4c52usKJkWYgGxMN5g2a6dWAKYGAJEHrJL4gZDYRNgOsSq/+jnTm",
14
+ "manifest.data.js": "sha384-DvGoRZcSmeLzmWpo7ar4WS0mUH3UbRtUmIjdyHyTI+PUGdIR+6ixZsmmvRrYgPUi",
15
15
  "manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
16
16
  "manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
17
17
  "manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
@@ -29,13 +29,13 @@
29
29
  "manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
30
30
  "manifest.submissions.js": "sha384-v9eS47ytAfTGIKAyVnbd0QWegucVS7yduvigqfsxxoqXmbaEoy0M2y+BiI4xeZBd",
31
31
  "manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
32
- "manifest.sw.js": "sha384-hyn8eZtfGN2VxD1+L4AxEyI7CQlPPguEkG5AgjB19A2Ca/W4HhOnTiF3QfoAMnLq",
32
+ "manifest.sw.js": "sha384-IKiC3a1QD7Hc1MinJp92000xRhEBdcMf4FIil5MUnBW6EeI6TeRDLX9ZCICqum1E",
33
33
  "manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
34
34
  "manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
35
35
  "manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
36
36
  "manifest.tooltips.js": "sha384-hXGp5j0s6p2kGZY/hqLPEbaUv68ca63kFCjYiZqK3DcC12mpHTBy1vz3kuApyf4p",
37
37
  "manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
38
38
  "manifest.utilities.js": "sha384-h17EquaRtNcEW0yfhk7R+a+2+CzTlBxPuFryO6i9NV/OiIRMihREoyzQ77QawoQ7",
39
- "manifest.virtual.js": "sha384-ru/eYigBWgJHcHCP0yGKRaF1FNsKisWN61LBWaH16+8ZIh5H8fWtP3aMe0s9/mrg",
39
+ "manifest.virtual.js": "sha384-PtIDx042i29mkxEYZH+y3whBzKgBgV01CU1XzzeEl/8TBPl9qvny4ppyXgYI5DsM",
40
40
  "manifest.js": "sha384-7+hNmvzD6OPQt6q4pZEDoqf5C8LHucIqlfKJQAAH6b4tsmvpX0viCvdYqqGOjqET"
41
41
  }
@@ -275,6 +275,21 @@
275
275
  }
276
276
  ]
277
277
  },
278
+ "paging": {
279
+ "description": "Load an Appwrite table in pages that stay live. 'all' walks every page (up to max, default 5000); 'window' loads the first page (size, default 100, at most 4999) and $more() appends the next.",
280
+ "oneOf": [
281
+ { "type": "string", "enum": ["all", "window"] },
282
+ {
283
+ "type": "object",
284
+ "properties": {
285
+ "mode": { "type": "string", "enum": ["all", "window"] },
286
+ "size": { "type": "integer", "minimum": 1, "maximum": 4999 },
287
+ "max": { "type": "integer", "minimum": 1 }
288
+ },
289
+ "additionalProperties": false
290
+ }
291
+ ]
292
+ },
278
293
  "realtime": {
279
294
  "description": "Realtime subscription config. false disables the subscription. { mode, maxRows } bounds growth: 'append' (default) stops appending at maxRows and counts skipped events in $realtimeOverflow; 'window' keeps the initial window size by evicting the oldest realtime-appended rows. maxRows defaults to max(500, 2x the initially loaded rows); 0 opts into legacy unbounded growth. serverFilter picks which filters ride the Appwrite realtime subscription server-side: 'scope' (default) sends only scope-column filters; 'all' (alias true) sends every expressible filter — rows that stop matching then drop on the next load instead of instantly; false sends none.",
280
295
  "oneOf": [
@@ -16,7 +16,7 @@
16
16
 
17
17
  // Build stamps the published version here; unstamped (dev) falls back to the
18
18
  // registration URL's `v`, then 'dev'.
19
- const BUILD_VERSION = '0.5.275';
19
+ const BUILD_VERSION = '0.5.277';
20
20
  const CACHE_PREFIX = 'mnfst-sw:';
21
21
  const META_CACHE = CACHE_PREFIX + 'meta';
22
22
  // Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
@@ -108,6 +108,8 @@ function initializeVirtualPlugin() {
108
108
  const rendered = new Map(); // key -> { node, scope, removeScope }
109
109
  let data = [];
110
110
  let cumulative = new Float64Array(1); // line-top offsets; last = total
111
+ let endNotifiedAt = -1; // data length `virtual-end` last fired for
112
+ let endHead; // first item's key then: a replaced list fires again
111
113
  let lines = []; // gallery: [{ start, end, height }]
112
114
  let pos = []; // masonry: per-index { x, y, w, h }
113
115
  let sortedTop = []; // masonry: indices sorted by y
@@ -218,6 +220,16 @@ function initializeVirtualPlugin() {
218
220
 
219
221
  // ---- Render ----
220
222
 
223
+ // The last item is rendered: `virtual-end` fires once per data length (load the next page here)
224
+ function notifyEnd(reached) {
225
+ const head = data.length ? keyFn(data[0]) : undefined;
226
+ if (data.length < endNotifiedAt || head !== endHead) endNotifiedAt = -1;
227
+ endHead = head;
228
+ if (!reached || !data.length || endNotifiedAt === data.length) return;
229
+ endNotifiedAt = data.length;
230
+ el.dispatchEvent(new CustomEvent('virtual-end', { bubbles: true, detail: { length: data.length } }));
231
+ }
232
+
221
233
  function render() {
222
234
  if (isMasonry) return renderMasonry();
223
235
  if (!data.length) { clearRows(); setHeight(topSpacer, 0); setHeight(botSpacer, 0); return; }
@@ -238,6 +250,7 @@ function initializeVirtualPlugin() {
238
250
  // Resolve the item range for these units.
239
251
  const startItem = isGallery ? lines[startUnit].start : startUnit;
240
252
  const endItem = isGallery ? lines[endUnit - 1].end : endUnit;
253
+ notifyEnd(endItem >= data.length);
241
254
 
242
255
  const visible = new Set();
243
256
  const keys = [];
@@ -324,6 +337,7 @@ function initializeVirtualPlugin() {
324
337
  for (const [key, entry] of rendered) {
325
338
  if (!visible.has(key)) removeRow(key, entry);
326
339
  }
340
+ notifyEnd(visible.has(keyFn(data[data.length - 1])));
327
341
  scheduleMeasure(keys);
328
342
  }
329
343
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.275",
3
+ "version": "0.5.277",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",
@@ -52,6 +52,7 @@
52
52
  "test:e2e:upload": "node tests/e2e/upload-first-load.e2e.mjs",
53
53
  "test:e2e:test-kit": "node tests/e2e/test-kit-journeys.e2e.mjs",
54
54
  "test:e2e:submissions": "node tests/e2e/submissions.e2e.mjs",
55
+ "test:e2e:data-paging": "node tests/e2e/data-paging.e2e.mjs",
55
56
  "test:e2e:modules": "node tests/e2e/modules.e2e.mjs",
56
57
  "test:e2e:contract": "node tests/e2e/contract.e2e.mjs && node tests/e2e/contract-checks.e2e.mjs",
57
58
  "lint": "echo 'No linting configured'",
@@ -74,6 +75,7 @@
74
75
  "rimraf": "^5.0.0",
75
76
  "rollup": "^4.24.2",
76
77
  "terser": "^5.47.1",
78
+ "typescript": "^7.0.2",
77
79
  "vitest": "^4.1.2"
78
80
  },
79
81
  "keywords": [