mnfst 0.5.163 → 0.5.165
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/lib/manifest.appwrite.auth.js +107 -199
- package/lib/manifest.appwrite.data.js +1 -3
- package/lib/manifest.appwrite.presences.js +292 -0
- package/lib/manifest.charts.js +34 -79
- package/lib/manifest.chat.js +515 -0
- package/lib/manifest.code.js +110 -340
- package/lib/manifest.colorpicker.js +252 -551
- package/lib/manifest.combobox.js +73 -91
- package/lib/manifest.components.js +34 -95
- package/lib/manifest.css +0 -132
- package/lib/manifest.data.js +189 -562
- package/lib/manifest.datepicker.js +43 -128
- package/lib/manifest.dropdowns.js +18 -39
- package/lib/manifest.export.js +29 -147
- package/lib/manifest.icons.js +9 -24
- package/lib/manifest.integrity.json +24 -23
- package/lib/manifest.js +65 -129
- package/lib/manifest.localization.js +67 -200
- package/lib/manifest.markdown.js +65 -174
- package/lib/manifest.min.css +1 -1
- package/lib/manifest.payments.js +40 -139
- package/lib/manifest.router.js +24 -73
- package/lib/manifest.status.js +20 -56
- package/lib/manifest.svg.js +12 -30
- package/lib/manifest.tooltips.js +28 -65
- package/lib/manifest.utilities.js +40 -107
- package/lib/manifest.virtual.js +15 -53
- package/package.json +1 -1
- package/lib/manifest.appwrite.presence.js +0 -1650
package/lib/manifest.export.js
CHANGED
|
@@ -1,36 +1,4 @@
|
|
|
1
|
-
/* Manifest Export —
|
|
2
|
-
*
|
|
3
|
-
* The `x-export` directive turns its host element into a download action.
|
|
4
|
-
* What gets downloaded depends on the host element type:
|
|
5
|
-
*
|
|
6
|
-
* <button x-export> → click downloads the whole page
|
|
7
|
-
* <button x-export="{ target: '#x' }"> → click downloads the element with id="x"
|
|
8
|
-
* <a x-export href="#section"> → click downloads #section (no scroll-to)
|
|
9
|
-
* <a x-export href="/other-page"> → appends ?export=<format> to the href
|
|
10
|
-
* so the destination page auto-exports
|
|
11
|
-
* itself after navigation
|
|
12
|
-
*
|
|
13
|
-
* For the destination of a cross-page export, declare what's exportable:
|
|
14
|
-
*
|
|
15
|
-
* <div x-export="{ trigger: 'url', target: '#report' }"></div>
|
|
16
|
-
*
|
|
17
|
-
* On page load, this checks `?export=<format>` in the URL. If present and a
|
|
18
|
-
* known format, it fires the export against the configured target. If the
|
|
19
|
-
* URL has no param, the page renders normally — random visitors never
|
|
20
|
-
* trigger downloads.
|
|
21
|
-
*
|
|
22
|
-
* For programmatic use, the `$export` magic runs an export from any
|
|
23
|
-
* Alpine expression and returns a promise:
|
|
24
|
-
*
|
|
25
|
-
* <form @submit.prevent="if (valid) await $export({ format: 'csv', source: 'rows' })">
|
|
26
|
-
*
|
|
27
|
-
* Supported formats: pdf (default), png, jpeg, webp, csv, json.
|
|
28
|
-
*
|
|
29
|
-
* Library dependencies (html2canvas-pro, jsPDF) are loaded lazily on first
|
|
30
|
-
* use from jsDelivr; pages that never export pay nothing.
|
|
31
|
-
*
|
|
32
|
-
* Elements with `data-no-export` are excluded from visual snapshots.
|
|
33
|
-
*/
|
|
1
|
+
/* Manifest Export — x-export / $export download of pages, regions, or data (pdf/png/jpeg/webp/csv/json) */
|
|
34
2
|
|
|
35
3
|
function initializeExportPlugin() {
|
|
36
4
|
|
|
@@ -41,9 +9,7 @@ function initializeExportPlugin() {
|
|
|
41
9
|
const isAnchor = el.tagName === 'A';
|
|
42
10
|
const href = isAnchor ? el.getAttribute('href') : null;
|
|
43
11
|
|
|
44
|
-
// ----- URL-trigger destination
|
|
45
|
-
// The page declares "I'm exportable; fire if the URL says so." Runs
|
|
46
|
-
// once per page load, regardless of how many elements declare it.
|
|
12
|
+
// ----- URL-trigger destination: fire if ?export=<format> is present (once per load) -----
|
|
47
13
|
if (opts.trigger === 'url') {
|
|
48
14
|
if (urlTriggerFired) return;
|
|
49
15
|
const paramName = opts.urlParam || 'export';
|
|
@@ -59,10 +25,7 @@ function initializeExportPlugin() {
|
|
|
59
25
|
return;
|
|
60
26
|
}
|
|
61
27
|
|
|
62
|
-
// ----- Anchor with cross-page href -----
|
|
63
|
-
// Pre-arm the href with ?export=<format> so default browser navigation
|
|
64
|
-
// delivers the user to the destination URL with the export signal.
|
|
65
|
-
// Hover-prefetch, middle-click, right-click-copy all see the same URL.
|
|
28
|
+
// ----- Anchor with cross-page href: pre-arm with ?export=<format> -----
|
|
66
29
|
if (isAnchor && href && !href.startsWith('#') && !href.startsWith('javascript:')
|
|
67
30
|
&& !/^(mailto|tel):/i.test(href)) {
|
|
68
31
|
try {
|
|
@@ -81,9 +44,7 @@ function initializeExportPlugin() {
|
|
|
81
44
|
return;
|
|
82
45
|
}
|
|
83
46
|
|
|
84
|
-
// ----- Anchor with same-page fragment href -----
|
|
85
|
-
// The href IS the target. Click downloads the matched element
|
|
86
|
-
// instead of jumping the page.
|
|
47
|
+
// ----- Anchor with same-page fragment href: the href IS the target -----
|
|
87
48
|
if (isAnchor && href && href.startsWith('#')) {
|
|
88
49
|
const onClick = async (e) => {
|
|
89
50
|
if (e && typeof e.preventDefault === 'function') e.preventDefault();
|
|
@@ -133,11 +94,7 @@ function initializeExportPlugin() {
|
|
|
133
94
|
console.warn('[x-export] could not evaluate options expression:', err.message);
|
|
134
95
|
}
|
|
135
96
|
}
|
|
136
|
-
// Modifier shorthand for format only
|
|
137
|
-
// Format is a small known set and matches Alpine's modifier convention
|
|
138
|
-
// (a behavioral flag, not a configuration value). Numeric options like
|
|
139
|
-
// resolution / width / height belong in the value expression:
|
|
140
|
-
// <button x-export="{ format: 'png', resolution: 2, width: 1200 }">
|
|
97
|
+
// Modifier shorthand for format only (.png, .jpg, …); numeric options go in the value expression.
|
|
141
98
|
if (!opts.format && Array.isArray(modifiers) && modifiers.length) {
|
|
142
99
|
const found = modifiers.find((m) => isKnownFormat(String(m).toLowerCase()));
|
|
143
100
|
if (found) opts.format = String(found).toLowerCase();
|
|
@@ -173,13 +130,10 @@ function initializeExportPlugin() {
|
|
|
173
130
|
return defaultFilename(format);
|
|
174
131
|
}
|
|
175
132
|
|
|
176
|
-
//
|
|
177
|
-
// Without it, a single CORS or 404 image would reject the entire snapshot.
|
|
133
|
+
// Fallback for a failed inline image, so one CORS/404 doesn't reject the whole snapshot.
|
|
178
134
|
const TRANSPARENT_PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=';
|
|
179
135
|
|
|
180
|
-
//
|
|
181
|
-
// assembled SVG fails to decode (oversized clones, malformed inline assets,
|
|
182
|
-
// etc.). Translate those into something readable before logging.
|
|
136
|
+
// Translate the library's raw image.onerror Event into a readable message.
|
|
183
137
|
function describeExportError(err) {
|
|
184
138
|
if (err && err.message) return err;
|
|
185
139
|
if (err && typeof Event !== 'undefined' && err instanceof Event) {
|
|
@@ -231,18 +185,12 @@ function initializeExportPlugin() {
|
|
|
231
185
|
}
|
|
232
186
|
|
|
233
187
|
function snapshotOptions(opts) {
|
|
234
|
-
//
|
|
235
|
-
// (Inverse of modern-screenshot's `filter`: return true to SKIP this node.)
|
|
188
|
+
// html2canvas-pro: return true to SKIP this node (data-no-export opt-out).
|
|
236
189
|
const ignoreElements = (node) => {
|
|
237
190
|
return !!(node && node.nodeType === 1
|
|
238
191
|
&& node.hasAttribute && node.hasAttribute('data-no-export'));
|
|
239
192
|
};
|
|
240
|
-
// Default scale = device pixel ratio
|
|
241
|
-
// so the export matches what the user actually sees on screen. On a
|
|
242
|
-
// standard 1x display it's 1, so the export is the literal CSS
|
|
243
|
-
// pixel size of the region — no surprise doubling. Callers can
|
|
244
|
-
// explicitly set `resolution: N` to render at N× independent of the
|
|
245
|
-
// host display (useful for "always-2x" archive renders or "1x" thumbs).
|
|
193
|
+
// Default scale = device pixel ratio (matches on-screen); override with `resolution: N`.
|
|
246
194
|
const defaultScale = (typeof window !== 'undefined' && window.devicePixelRatio > 0)
|
|
247
195
|
? window.devicePixelRatio
|
|
248
196
|
: 1;
|
|
@@ -251,23 +199,14 @@ function initializeExportPlugin() {
|
|
|
251
199
|
ignoreElements,
|
|
252
200
|
useCORS: true,
|
|
253
201
|
allowTaint: false,
|
|
254
|
-
//
|
|
255
|
-
// produce a missing image rather than rejecting the whole snapshot.
|
|
202
|
+
// Per-image timeout: a failed fetch drops the image, not the whole snapshot.
|
|
256
203
|
imageTimeout: 5000,
|
|
257
204
|
logging: false,
|
|
258
|
-
// Pin
|
|
259
|
-
// document top regardless of the user's current scroll position.
|
|
260
|
-
// Without this, html2canvas defaults scrollY to window.pageYOffset,
|
|
261
|
-
// which clips the snapshot to "below the current scroll" — anything
|
|
262
|
-
// above the fold renders as blank white space.
|
|
205
|
+
// Pin capture to (0,0) — otherwise html2canvas clips to below the current scroll.
|
|
263
206
|
scrollX: 0,
|
|
264
207
|
scrollY: 0,
|
|
265
208
|
};
|
|
266
|
-
//
|
|
267
|
-
// exports — useful for icons and logos that should composite onto an
|
|
268
|
-
// arbitrary surface. We translate it to null because html2canvas-pro
|
|
269
|
-
// uses `null` (not the string 'transparent') to disable its default
|
|
270
|
-
// white fill.
|
|
209
|
+
// html2canvas-pro wants null (not 'transparent') to disable its default white fill.
|
|
271
210
|
if (opts.backgroundColor === 'transparent') {
|
|
272
211
|
out.backgroundColor = null;
|
|
273
212
|
} else if (opts.backgroundColor) {
|
|
@@ -278,9 +217,7 @@ function initializeExportPlugin() {
|
|
|
278
217
|
return out;
|
|
279
218
|
}
|
|
280
219
|
|
|
281
|
-
// Await
|
|
282
|
-
// appear blank in the snapshot. Bounded by a timeout — a single slow image
|
|
283
|
-
// shouldn't stall the export indefinitely.
|
|
220
|
+
// Await in-target <img> loads so freshly-mounted images aren't blank; timeout-bounded.
|
|
284
221
|
async function waitForImages(target, timeoutMs = 5000) {
|
|
285
222
|
if (!target || typeof target.querySelectorAll !== 'function') return;
|
|
286
223
|
const imgs = Array.from(target.querySelectorAll('img'));
|
|
@@ -295,16 +232,11 @@ function initializeExportPlugin() {
|
|
|
295
232
|
]);
|
|
296
233
|
}
|
|
297
234
|
|
|
298
|
-
// html2canvas-pro paints directly to canvas via computed styles, so the
|
|
299
|
-
// SVG-foreignObject failure modes (oversized SVGs, @layer/oklch parsing
|
|
300
|
-
// issues) don't apply. The fallback path is retained for the rare case
|
|
301
|
-
// where the library throws (e.g. tainted canvas on cross-origin images).
|
|
302
235
|
async function snapshotToCanvas(lib, target, so) {
|
|
303
236
|
try {
|
|
304
237
|
return await lib(target, so);
|
|
305
238
|
} catch (err) {
|
|
306
|
-
// Retry
|
|
307
|
-
// the snapshot even when an image fails cross-origin policy.
|
|
239
|
+
// Retry with allowTaint + lower scale to survive a cross-origin image.
|
|
308
240
|
const safer = { ...so, allowTaint: true, useCORS: false, scale: Math.min(so.scale || 2, 1) };
|
|
309
241
|
return await lib(target, safer);
|
|
310
242
|
}
|
|
@@ -314,13 +246,7 @@ function initializeExportPlugin() {
|
|
|
314
246
|
const lib = await loadSnapshotLib();
|
|
315
247
|
const target = resolveTarget(opts);
|
|
316
248
|
const so = snapshotOptions(opts);
|
|
317
|
-
// Default
|
|
318
|
-
// snapshot looks like the page itself — a Sales Chart exported from
|
|
319
|
-
// a dark-mode page comes out on a dark background. Callers can
|
|
320
|
-
// explicitly opt into transparency with `backgroundColor: 'transparent'`,
|
|
321
|
-
// which snapshotOptions() translates to the null value html2canvas-pro
|
|
322
|
-
// wants. (Previously only JPEG/WebP got a default fill; PNG defaulted
|
|
323
|
-
// to transparent and rendered white text on a white viewer background.)
|
|
249
|
+
// Default to the page's effective background so the snapshot looks like the page.
|
|
324
250
|
if (so.backgroundColor === undefined) {
|
|
325
251
|
so.backgroundColor = effectivePageBackground();
|
|
326
252
|
}
|
|
@@ -336,55 +262,26 @@ function initializeExportPlugin() {
|
|
|
336
262
|
triggerDownload(dataUrl, filename);
|
|
337
263
|
}
|
|
338
264
|
|
|
339
|
-
// PDFs
|
|
340
|
-
//
|
|
341
|
-
// and the page's own @media print CSS — far more reliable than
|
|
342
|
-
// rasterizing a long page and embedding it as a single image, and gives
|
|
343
|
-
// selectable / copy-pasteable text in the resulting file. The user sees
|
|
344
|
-
// the print dialog and picks "Save as PDF" (or any installed PDF
|
|
345
|
-
// printer). For element-scoped PDFs, a temporary print stylesheet is
|
|
346
|
-
// injected that hides everything outside the target subtree.
|
|
265
|
+
// PDFs route through the browser's print pipeline — vector text, real layout,
|
|
266
|
+
// multi-page flow, the page's own @media print CSS. A target scopes the print.
|
|
347
267
|
async function exportPdf(opts, filename) {
|
|
348
|
-
// Both whole-page and targeted PDFs route through the browser's print
|
|
349
|
-
// pipeline. That gives us:
|
|
350
|
-
// - Vector text (selectable, copy/pasteable in the PDF)
|
|
351
|
-
// - Real layout (browser's actual rendering of the target's CSS,
|
|
352
|
-
// including cascade layers, custom properties, and computed
|
|
353
|
-
// fonts — html2canvas-pro's computed-style walker mis-renders
|
|
354
|
-
// heading classes inside @layer rules)
|
|
355
|
-
// - Multi-page flow for tall content
|
|
356
|
-
// - The page's own @media print rules
|
|
357
|
-
// Whole-page is the default; passing a target adds a temporary
|
|
358
|
-
// @media print stylesheet that hides everything outside that subtree.
|
|
359
268
|
return printToPdf(filename, opts.target ? resolveTarget(opts) : null, opts.pageSize);
|
|
360
269
|
}
|
|
361
270
|
|
|
362
|
-
// Trigger
|
|
363
|
-
//
|
|
364
|
-
//
|
|
365
|
-
//
|
|
366
|
-
//
|
|
367
|
-
// Target-scoping strategy: clone the target into a fresh body-level
|
|
368
|
-
// container and `display: none` every other body child. Cloning (rather
|
|
369
|
-
// than relocating) leaves the live DOM intact — Alpine state, event
|
|
370
|
-
// listeners, and any in-flight reactivity stay where they were. The
|
|
371
|
-
// earlier visibility:hidden approach preserved layout space, so the body
|
|
372
|
-
// still occupied its full natural height during print → blank trailing
|
|
373
|
-
// pages. display:none actually removes that space, so the printed pages
|
|
374
|
-
// fit the target's content with no whitespace tail.
|
|
271
|
+
// Trigger "Save as PDF". Filename seeds via a document.title swap. A target is
|
|
272
|
+
// scoped by cloning it into a body-level container and display:none-ing every
|
|
273
|
+
// other body child — cloning leaves live DOM/Alpine state intact, and
|
|
274
|
+
// display:none (not visibility:hidden) collapses body height so no blank tail pages.
|
|
375
275
|
function printToPdf(filename, target, pageSize) {
|
|
376
276
|
const original = document.title;
|
|
377
277
|
const cleaned = String(filename || '').replace(/\.pdf$/i, '') || original;
|
|
378
278
|
document.title = cleaned;
|
|
379
|
-
// Sanitize pageSize
|
|
380
|
-
// attacker-controlled value can't break out of the @page rule.
|
|
279
|
+
// Sanitize pageSize so it can't break out of the @page rule.
|
|
381
280
|
const safePageSize = (typeof pageSize === 'string' && /^[a-zA-Z0-9 ]+$/.test(pageSize))
|
|
382
281
|
? pageSize.trim()
|
|
383
282
|
: 'a4';
|
|
384
283
|
|
|
385
284
|
let printContainer = null;
|
|
386
|
-
// Always inject a @page rule so the chosen pageSize applies for both
|
|
387
|
-
// whole-page and targeted prints.
|
|
388
285
|
const pageRule = '@page { size: ' + safePageSize + '; margin: 1cm; }';
|
|
389
286
|
const style = document.createElement('style');
|
|
390
287
|
style.setAttribute('data-mnfst-print-scope', '');
|
|
@@ -392,9 +289,7 @@ function initializeExportPlugin() {
|
|
|
392
289
|
if (target && target.nodeType === 1) {
|
|
393
290
|
printContainer = document.createElement('div');
|
|
394
291
|
printContainer.setAttribute('data-mnfst-print-target', '');
|
|
395
|
-
//
|
|
396
|
-
// (non-print) rendering. The print stylesheet below resets these
|
|
397
|
-
// for the print medium only.
|
|
292
|
+
// Off-screen so the clone never flashes in normal rendering.
|
|
398
293
|
printContainer.style.position = 'absolute';
|
|
399
294
|
printContainer.style.left = '-99999px';
|
|
400
295
|
printContainer.style.top = '0';
|
|
@@ -404,12 +299,9 @@ function initializeExportPlugin() {
|
|
|
404
299
|
style.textContent =
|
|
405
300
|
pageRule +
|
|
406
301
|
'@media print {' +
|
|
407
|
-
// Hide every original body child
|
|
408
|
-
// out of layout entirely, so body's height collapses to
|
|
409
|
-
// just the clone's height.
|
|
302
|
+
// Hide every original body child so body height collapses to the clone.
|
|
410
303
|
'body > *:not([data-mnfst-print-target]) { display: none !important; }' +
|
|
411
|
-
// Restore the clone to normal flow
|
|
412
|
-
// the page, full width.
|
|
304
|
+
// Restore the clone to normal flow, full width.
|
|
413
305
|
'body > [data-mnfst-print-target] {' +
|
|
414
306
|
'display: block !important;' +
|
|
415
307
|
'position: static !important;' +
|
|
@@ -423,8 +315,7 @@ function initializeExportPlugin() {
|
|
|
423
315
|
'[data-no-export] { display: none !important; }' +
|
|
424
316
|
'}';
|
|
425
317
|
} else {
|
|
426
|
-
// Whole-page print:
|
|
427
|
-
// filter; let the page's own print CSS do everything else.
|
|
318
|
+
// Whole-page print: honor pageSize + data-no-export; page's own print CSS does the rest.
|
|
428
319
|
style.textContent =
|
|
429
320
|
pageRule +
|
|
430
321
|
'@media print {' +
|
|
@@ -444,13 +335,10 @@ function initializeExportPlugin() {
|
|
|
444
335
|
|
|
445
336
|
try { window.print(); }
|
|
446
337
|
catch (err) {
|
|
447
|
-
// If print() throws synchronously (rare), tear down immediately.
|
|
448
338
|
cleanup();
|
|
449
339
|
throw err;
|
|
450
340
|
}
|
|
451
|
-
//
|
|
452
|
-
// cancels with Esc in older Safari). Schedule a fallback teardown
|
|
453
|
-
// a few seconds out so we don't leak the title swap or the style tag.
|
|
341
|
+
// afterprint isn't always reliable (e.g. Esc-cancel in older Safari) — fallback teardown.
|
|
454
342
|
setTimeout(cleanup, 30000);
|
|
455
343
|
}
|
|
456
344
|
|
|
@@ -551,12 +439,7 @@ function initializeExportPlugin() {
|
|
|
551
439
|
|
|
552
440
|
// Lazy library loaders — cached promises.
|
|
553
441
|
|
|
554
|
-
// html2canvas-pro
|
|
555
|
-
// rather than cloning the DOM into an SVG foreignObject. That means it has
|
|
556
|
-
// no failure modes around @layer rules, oklch() colors, url(data:...) in
|
|
557
|
-
// cross-origin stylesheets, or oversized SVG decoding — the cases that
|
|
558
|
-
// sank both html-to-image and modern-screenshot on real-world pages.
|
|
559
|
-
// ESM-only, so we load via dynamic import() from jsDelivr.
|
|
442
|
+
// html2canvas-pro — ESM-only, loaded via dynamic import() from jsDelivr.
|
|
560
443
|
let snapshotLibPromise = null;
|
|
561
444
|
function loadSnapshotLib() {
|
|
562
445
|
if (snapshotLibPromise) return snapshotLibPromise;
|
|
@@ -608,8 +491,7 @@ function initializeExportPlugin() {
|
|
|
608
491
|
}
|
|
609
492
|
}
|
|
610
493
|
|
|
611
|
-
//
|
|
612
|
-
// regardless of how many elements declare `trigger: 'url'`.
|
|
494
|
+
// URL-triggered exports fire at most once per page load.
|
|
613
495
|
let urlTriggerFired = false;
|
|
614
496
|
|
|
615
497
|
// Standard plugin init lifecycle.
|
package/lib/manifest.icons.js
CHANGED
|
@@ -4,8 +4,7 @@ var Iconify = function (t) { "use strict"; const e = Object.freeze({ left: 0, to
|
|
|
4
4
|
|
|
5
5
|
/* Manifest Icons */
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
// Core icon processing logic - shared between directive and manual processing
|
|
7
|
+
// Shared between directive and manual processing.
|
|
9
8
|
function processIconElement(el, iconValue) {
|
|
10
9
|
if (!iconValue) return;
|
|
11
10
|
|
|
@@ -19,14 +18,9 @@ function processIconElement(el, iconValue) {
|
|
|
19
18
|
// Clear the element
|
|
20
19
|
el.innerHTML = '';
|
|
21
20
|
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// post-Iconify-scan setTimeout) means the wrapper exists from
|
|
26
|
-
// first paint, so:
|
|
27
|
-
// - no row→column flicker on SPA load
|
|
28
|
-
// - prerender snapshots capture the correct DOM regardless of
|
|
29
|
-
// when Iconify finishes fetching the SVG
|
|
21
|
+
// Wrap in <span x-icon> upfront: the `li:has([x-icon])` CSS rule needs a
|
|
22
|
+
// descendant carrying the attribute. Building it now (not post-scan) means
|
|
23
|
+
// the wrapper exists from first paint — no flicker, correct prerender DOM.
|
|
30
24
|
const wrapper = document.createElement('span');
|
|
31
25
|
wrapper.setAttribute('x-icon', iconValue);
|
|
32
26
|
const iconTarget = document.createElement('span');
|
|
@@ -44,8 +38,7 @@ function processIconElement(el, iconValue) {
|
|
|
44
38
|
// Mark as processed to prevent re-processing
|
|
45
39
|
el.setAttribute('data-icon-processed', 'true');
|
|
46
40
|
|
|
47
|
-
// Iconify
|
|
48
|
-
// async otherwise). Either way the wrapper stays put.
|
|
41
|
+
// Iconify swaps iconTarget for an inline SVG; wrapper stays put.
|
|
49
42
|
if (window.Iconify && typeof window.Iconify.scan === 'function') {
|
|
50
43
|
window.Iconify.scan(iconTarget);
|
|
51
44
|
}
|
|
@@ -87,8 +80,8 @@ function initializeIconPlugin() {
|
|
|
87
80
|
const iconValue = expression;
|
|
88
81
|
if (!iconValue) return;
|
|
89
82
|
|
|
90
|
-
// Prerender
|
|
91
|
-
// evaluates stale expressions like `module.icon`
|
|
83
|
+
// Prerender/static HTML already inlined the SVG; leave it alone (else Alpine
|
|
84
|
+
// evaluates stale template expressions like `module.icon` and throws).
|
|
92
85
|
if (el.querySelector('svg[data-icon]')) {
|
|
93
86
|
return;
|
|
94
87
|
}
|
|
@@ -129,10 +122,7 @@ function ensureIconPluginInitialized() {
|
|
|
129
122
|
|
|
130
123
|
iconPluginInitialized = true;
|
|
131
124
|
initializeIconPlugin();
|
|
132
|
-
|
|
133
|
-
// No need to manually process existing elements - Alpine will handle them
|
|
134
|
-
// when it initializes, since plugins are now loaded before Alpine starts
|
|
135
|
-
// This maintains full reactivity for all elements
|
|
125
|
+
// Alpine processes existing elements on init (plugins load before Alpine starts).
|
|
136
126
|
}
|
|
137
127
|
|
|
138
128
|
// Expose on window for loader to call if needed
|
|
@@ -145,19 +135,14 @@ if (document.readyState === 'loading') {
|
|
|
145
135
|
|
|
146
136
|
document.addEventListener('alpine:init', ensureIconPluginInitialized);
|
|
147
137
|
|
|
148
|
-
// If Alpine is already initialized when this script loads, initialize immediately
|
|
149
|
-
// Use setTimeout to ensure Alpine is fully ready
|
|
150
138
|
if (window.Alpine && typeof window.Alpine.directive === 'function') {
|
|
151
|
-
// Small delay to ensure Alpine is fully initialized
|
|
152
139
|
setTimeout(ensureIconPluginInitialized, 0);
|
|
153
140
|
} else {
|
|
154
|
-
// If document is already loaded but Alpine isn't ready yet, wait for it
|
|
155
141
|
const checkAlpine = setInterval(() => {
|
|
156
142
|
if (window.Alpine && typeof window.Alpine.directive === 'function') {
|
|
157
143
|
clearInterval(checkAlpine);
|
|
158
144
|
ensureIconPluginInitialized();
|
|
159
145
|
}
|
|
160
146
|
}, 10);
|
|
161
|
-
// Timeout after 5 seconds
|
|
162
147
|
setTimeout(() => clearInterval(checkAlpine), 5000);
|
|
163
|
-
}
|
|
148
|
+
}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
"manifest.appwrite.auth.js": "sha384
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
4
|
-
"manifest.appwrite.
|
|
5
|
-
"manifest.charts.js": "sha384-
|
|
6
|
-
"manifest.
|
|
2
|
+
"manifest.appwrite.auth.js": "sha384-+4T3vdzf2NsDrSpatkIqg7cO2HUnY3tNNwSgfyXCCU0NZ7K9eqX2dzhDJIlochlz",
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-KFKVo5TQESLJB7wgk+C8Zb/sAl43QAMdioWW3tQRWYq5umfdpGCZ5Hld9y9f6/Np",
|
|
4
|
+
"manifest.appwrite.presences.js": "sha384-JyVDWFT69b7Svq8J8p9tNWe2v9PZNQBY5UyhtOl1vnuHFAX0CRQ3MA9SiKq5wzNh",
|
|
5
|
+
"manifest.charts.js": "sha384-wTQlB3hJ9V9lmisCgm8l6YkpJV+nA4+Vci3dI0x1nBtWnS9TFr+eXaJelP7AusyD",
|
|
6
|
+
"manifest.chat.js": "sha384-HDyzPvNxqUOKVcLC3HNSFd5w83Flgm58LHy1BDLB9ejUsbYHAmr34G4X3FwKXokW",
|
|
7
|
+
"manifest.code.js": "sha384-G3MNfvQRWWY+gm4SGGrSsgQbDeil9MP+ON2DTk6Rcq9Nsex8woHMDt5EJHrFH0Nj",
|
|
7
8
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
8
|
-
"manifest.colorpicker.js": "sha384-
|
|
9
|
-
"manifest.combobox.js": "sha384-
|
|
10
|
-
"manifest.components.js": "sha384-
|
|
11
|
-
"manifest.data.js": "sha384-
|
|
12
|
-
"manifest.datepicker.js": "sha384-
|
|
13
|
-
"manifest.dropdowns.js": "sha384-
|
|
14
|
-
"manifest.export.js": "sha384-
|
|
15
|
-
"manifest.icons.js": "sha384-
|
|
16
|
-
"manifest.localization.js": "sha384-
|
|
17
|
-
"manifest.markdown.js": "sha384-
|
|
18
|
-
"manifest.payments.js": "sha384
|
|
9
|
+
"manifest.colorpicker.js": "sha384-N5ezEwgKrDodV4YdURxhdyZKmg1n/QhqvmAC4SEG03mw1pEAZAA8Gphp+NLAOxts",
|
|
10
|
+
"manifest.combobox.js": "sha384-tK8cVTQy3v4RK8pDJKFU+UW7zdsS7ysMqExOsCoWpFBXD0tMfjLNrkMRCQd4+tsW",
|
|
11
|
+
"manifest.components.js": "sha384-eZDib+RFdwd9mOUdi6o53eNS0LBlEEkZPDegxtkAcE+GrGIFxsuB4O0ymfixGNfM",
|
|
12
|
+
"manifest.data.js": "sha384-3lLvGnqcQr4Ium80MdaQTr8RytjVbs5rnxd0q41BF3ppcoQccMFAcvgFSyZP/0sl",
|
|
13
|
+
"manifest.datepicker.js": "sha384-e6rJI0BxuE+AyI96/u6XoeOstsxLuQTO6+wYSr6rm2aKhOP2APM2xJqTz//0v4Pw",
|
|
14
|
+
"manifest.dropdowns.js": "sha384-7DtzNNGKAFzsXLO73x0qifvHxd/o+QSLoENOJA03rBRTDKHvHbXsRoMn1WJvX6VG",
|
|
15
|
+
"manifest.export.js": "sha384-NkqOydcrdQ6qFEcpBKc80JCbeSCuybASrTUGajuTMBrHMzt1OIe8b3ndNn9VfqSh",
|
|
16
|
+
"manifest.icons.js": "sha384-kKOINpX70YzNO3FvkV6umrmO3f0KIu0DNbwB+ej55a7y/lhU7v/myQtXL0bwCTbt",
|
|
17
|
+
"manifest.localization.js": "sha384-MUetuW8PllIM+9JDMw/tx+qGem8t+ZUN5WZpycsTDKtz+LaX4DJehsfh/YZt9J7L",
|
|
18
|
+
"manifest.markdown.js": "sha384-qlhYOzX0nl8HzuaiMVTkIhsma9mv3PlEvHO2S0AzshgmIcdZFvth6/sbHPCe5Zwr",
|
|
19
|
+
"manifest.payments.js": "sha384-vhG1ZL3wGzb0vt0ygJJQF3jVQumMuvc2smGjYezuyQ+auN+MN9HY2k5NW2bdClxl",
|
|
19
20
|
"manifest.resize.js": "sha384-S3v4RAJoA77LUH6MddYG9bx//dZX//up7XWeH69Ql2ge3bVHgC6mR/CJBe6y4nQI",
|
|
20
|
-
"manifest.router.js": "sha384-
|
|
21
|
+
"manifest.router.js": "sha384-oV0lwFkeevEWjRCC/VV2OzkjNdE70owBz+pwKqZzx5bqbx5/1PORW+ndCClEqSgS",
|
|
21
22
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
22
|
-
"manifest.status.js": "sha384-
|
|
23
|
-
"manifest.svg.js": "sha384
|
|
23
|
+
"manifest.status.js": "sha384-6xqyC409lform7U8kRQ4THZ8GwQOgWd8XfsEjdCt6ONTHqE7WDh02KmqyaGejqLM",
|
|
24
|
+
"manifest.svg.js": "sha384-/cZ6kd+E6CUrRDxHJYsrq7i+cxoaU7sCX3KAaHcRCctTB3K5YhglsODp8mbiZVBU",
|
|
24
25
|
"manifest.tabs.js": "sha384-7Kb1EHIbqh1NOl8J1NMp087lcF1gVmwm55QNM3s7JamV6sYiH/WZbdnknAZFtsfW",
|
|
25
26
|
"manifest.tailwind.js": "sha384-r/Jvqb+Piz21jUts10BbVAJoKkShOdJRVFpywyi4HPIi/OfOJq5CtPyWAPbdkMgt",
|
|
26
27
|
"manifest.toasts.js": "sha384-ytd5rDbax/Ou9z23uedFXPZbxDPsk2E/pxCTq4WLvfv+os1qTI6kELp0kPp07g24",
|
|
27
|
-
"manifest.tooltips.js": "sha384-
|
|
28
|
+
"manifest.tooltips.js": "sha384-2zjZgufiF8TuXJMwb06o0kdzJ3yojhCsFrRFk+suE9ZaROTEZzQ5z9kOBmYDUDxn",
|
|
28
29
|
"manifest.url.parameters.js": "sha384-FIufiClqDx1rJpU/QUc9z/D43qClQ6Qm8rBahipbJl9BDHUvhrOsUDegmTWW7Tuf",
|
|
29
|
-
"manifest.utilities.js": "sha384-
|
|
30
|
-
"manifest.virtual.js": "sha384-
|
|
31
|
-
"manifest.js": "sha384-
|
|
30
|
+
"manifest.utilities.js": "sha384-MtzNaVOrgyepjlY5nz38pAJk67yiFPU1H5WoPNfcNbUZTXy+oin1lrtKCIcobEOJ",
|
|
31
|
+
"manifest.virtual.js": "sha384-c194pXD0Ld48QJ+HPVNibvbn54/ETJRuYhUOWesEBjtOIQcQMIKo0DnCyQMvDlLg",
|
|
32
|
+
"manifest.js": "sha384-VshJgT9QAxsLpwNmQZfrxw/EAxoyLIklo0DsmhxLhjVmmT70fLmn5eNRuq98o6zs"
|
|
32
33
|
}
|