mnfst 0.5.301 → 0.5.303

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  (function () {
4
4
 
5
- const MANIFEST_BUILD_VERSION = '0.5.301';
5
+ const MANIFEST_BUILD_VERSION = '0.5.303';
6
6
 
7
7
  /* Manifest Data Sources - Appwrite Integration */
8
8
 
@@ -452,6 +452,8 @@ window.ManifestComponentsProcessor = {
452
452
  // The file this markup came from (Edit writes regions authored in it back there)
453
453
  rootElement._manifestComponent = name;
454
454
  rootElement._manifestHost = host;
455
+ // The router's hide record travels with the copied inline display
456
+ if (element.__manifestRouteDisplay) rootElement.__manifestRouteDisplay = { ...element.__manifestRouteDisplay };
455
457
  // Set data-component=instanceId if provided
456
458
  if (instanceId) {
457
459
  rootElement.setAttribute('data-component', instanceId);
@@ -795,6 +797,7 @@ window.ManifestComponentsRouting = (function () {
795
797
  const clone = placeholder.cloneNode(true);
796
798
  clone.setAttribute('data-original-placeholder', '');
797
799
  clone.setAttribute('data-component', instanceId);
800
+ if (placeholder.__manifestRouteDisplay) clone.__manifestRouteDisplay = { ...placeholder.__manifestRouteDisplay };
798
801
  placeholderMap.set(instanceId, clone);
799
802
  }
800
803
  // Log before swap
package/lib/manifest.d.ts CHANGED
@@ -248,7 +248,7 @@ export type ManifestData = ManifestSources & {
248
248
  $wipe(target?: string | { all: true }): Promise<void>;
249
249
  };
250
250
 
251
- /** `$auth` from the Appwrite auth plugin. Loose by design — auth API is broad. */
251
+ /** `$auth` from the Appwrite auth module. Loose by design — auth API is broad. */
252
252
  export interface ManifestAuth {
253
253
  readonly current: { $id: string; email?: string; name?: string;[k: string]: unknown } | null;
254
254
  readonly isAuthenticated: boolean;
@@ -263,7 +263,7 @@ export interface ManifestAuth {
263
263
  [extra: string]: unknown;
264
264
  }
265
265
 
266
- /** `$locale` from the localization plugin. */
266
+ /** `$locale` from the localization module. */
267
267
  export interface ManifestLocale {
268
268
  readonly current: string;
269
269
  readonly available: string[];
@@ -277,7 +277,7 @@ export interface ManifestToastVariant {
277
277
  fixed(message: string, opts?: Record<string, unknown>): void;
278
278
  }
279
279
 
280
- /** `$toast` from the toasts plugin. Typed variants: `$toast.brand(...)`, `$toast.positive.dismiss(...)`. */
280
+ /** `$toast` from the toasts module. Typed variants: `$toast.brand(...)`, `$toast.positive.dismiss(...)`. */
281
281
  export interface ManifestToast extends ManifestToastVariant {
282
282
  brand: ManifestToastVariant;
283
283
  accent: ManifestToastVariant;
@@ -285,12 +285,12 @@ export interface ManifestToast extends ManifestToastVariant {
285
285
  negative: ManifestToastVariant;
286
286
  }
287
287
 
288
- /** `$color` from the color plugin — the current light/dark/system color mode. */
288
+ /** `$color` from the color module — the current light/dark/system color mode. */
289
289
  export interface ManifestColor {
290
290
  current: 'light' | 'dark' | 'system' | string;
291
291
  }
292
292
 
293
- /** `$colorpicker` from the colorpicker plugin. Loose by design. */
293
+ /** `$colorpicker` from the colorpicker module. Loose by design. */
294
294
  export interface ManifestColorpicker {
295
295
  (id?: string): Record<string, unknown>;
296
296
  [extra: string]: unknown;
@@ -310,7 +310,7 @@ export interface ManifestUrlParam {
310
310
  clear(): void;
311
311
  }
312
312
 
313
- /** `$url` from the url-parameters plugin: `$url.tab.value`, `$url.tag.add('x')`, ... */
313
+ /** `$url` from the url-parameters module: `$url.tab.value`, `$url.tag.add('x')`, ... */
314
314
  export interface ManifestUrl {
315
315
  [param: string]: ManifestUrlParam;
316
316
  }
@@ -327,7 +327,7 @@ export type ManifestModify = (attr: string) => string | undefined;
327
327
  /** `$try(fn)` — run a callback and swallow any thrown error, returning undefined on failure. */
328
328
  export type ManifestTry = <T>(fn: () => T | Promise<T>, errorVar?: string) => Promise<T | undefined>;
329
329
 
330
- /** `$pay` from the payments plugin: callable to start checkout, plus portal/state helpers. */
330
+ /** `$pay` from the payments module: callable to start checkout, plus portal/state helpers. */
331
331
  export interface ManifestPay {
332
332
  (ref: string, payload?: Record<string, unknown>): Promise<unknown>;
333
333
  portal(ref?: string, payload?: Record<string, unknown>): Promise<unknown>;
@@ -347,7 +347,7 @@ export interface ManifestChatHandle {
347
347
  [extra: string]: unknown;
348
348
  }
349
349
 
350
- /** `$chat` from the chat plugin — adapter-based conversation projection. */
350
+ /** `$chat` from the chat module — adapter-based conversation projection. */
351
351
  export interface ManifestChat {
352
352
  open(conversationId: string, opts?: Record<string, unknown>): ManifestChatHandle;
353
353
  merge(handles: ManifestChatHandle[], opts?: Record<string, unknown>): ManifestChatHandle;
@@ -364,12 +364,12 @@ export interface ManifestStatusEntry {
364
364
  [extra: string]: unknown;
365
365
  }
366
366
 
367
- /** `$status` from the status plugin: `$status.api.state`, iterable, stringifies to the overall state. */
367
+ /** `$status` from the status module: `$status.api.state`, iterable, stringifies to the overall state. */
368
368
  export interface ManifestStatus extends Iterable<ManifestStatusEntry> {
369
369
  readonly [name: string]: any;
370
370
  }
371
371
 
372
- /** `$presence` from the Appwrite presences plugin. */
372
+ /** `$presence` from the Appwrite presences module. */
373
373
  export interface ManifestPresence {
374
374
  start(opts?: Record<string, unknown>): Promise<unknown>;
375
375
  stop(): void;
@@ -384,7 +384,7 @@ export interface ManifestPresence {
384
384
  readonly me: unknown;
385
385
  }
386
386
 
387
- /** `$date(id?)` from the datepicker plugin — the picker API for the nearest (or given) instance. */
387
+ /** `$date(id?)` from the datepicker module — the picker API for the nearest (or given) instance. */
388
388
  export type ManifestDate = (id?: string) => Record<string, unknown>;
389
389
 
390
390
  /** `x-chart` config object (standalone; annotate config objects with it). */
@@ -416,10 +416,10 @@ export interface ManifestChartConfig {
416
416
  [key: string]: unknown;
417
417
  }
418
418
 
419
- /** `$chart(id?)` from the charts plugin — the chart API for the nearest (or given) instance. */
419
+ /** `$chart(id?)` from the charts module — the chart API for the nearest (or given) instance. */
420
420
  export type ManifestChart = (id?: string) => Record<string, unknown>;
421
421
 
422
- /** `$export(opts)` from the export plugin — export the page or a data source (pdf/csv/json/...). */
422
+ /** `$export(opts)` from the export module — export the page or a data source (pdf/csv/json/...). */
423
423
  export type ManifestExport = (opts?: {
424
424
  format?: string;
425
425
  filename?: string;
@@ -428,7 +428,7 @@ export type ManifestExport = (opts?: {
428
428
  [extra: string]: unknown;
429
429
  }) => Promise<unknown>;
430
430
 
431
- /** `$import(opts)` from the import plugin — pick a local file and parse it (json/csv). Resolves the parsed data, or null when the dialog is dismissed. */
431
+ /** `$import(opts)` from the import module — pick a local file and parse it (json/csv). Resolves the parsed data, or null when the dialog is dismissed. */
432
432
  export type ManifestImport = (opts?: {
433
433
  format?: 'json' | 'csv';
434
434
  /** Data source to replace with the parsed content. */
@@ -438,7 +438,7 @@ export type ManifestImport = (opts?: {
438
438
  [extra: string]: unknown;
439
439
  }) => Promise<unknown>;
440
440
 
441
- /** `$device` from the utilities plugin (enriched by the device plugin when present). */
441
+ /** `$device` from the utilities module (enriched by the device module when present). */
442
442
  export interface ManifestDevice {
443
443
  readonly os: string;
444
444
  readonly touch: boolean;
@@ -448,11 +448,11 @@ export interface ManifestDevice {
448
448
  readonly platform: string;
449
449
  }
450
450
 
451
- /** `$share` from the device plugin — native sheet, web share, or clipboard fallback. */
451
+ /** `$share` from the device module — native sheet, web share, or clipboard fallback. */
452
452
  export type ManifestShare = (opts?: { title?: string; text?: string; url?: string }) =>
453
453
  Promise<{ shared: boolean; method: string; cancelled?: boolean }>;
454
454
 
455
- /** `$push` from the device plugin — push/notification permissions and token. */
455
+ /** `$push` from the device module — push/notification permissions and token. */
456
456
  export interface ManifestPush {
457
457
  /** Ask for permission, on your schedule (never prompted on load). */
458
458
  request(): Promise<'granted' | 'denied' | 'prompt' | 'unsupported' | string>;
@@ -466,7 +466,7 @@ export interface ManifestPush {
466
466
  [extra: string]: unknown;
467
467
  }
468
468
 
469
- /** `$secure` from the device plugin — Keychain/Keystore via a native plugin; unencrypted localStorage on the web only; rejects on native without a plugin. */
469
+ /** `$secure` from the device module — Keychain/Keystore via a native plugin; unencrypted localStorage on the web only; rejects on native without a plugin. */
470
470
  export interface ManifestSecure {
471
471
  get(key: string): Promise<string | null>;
472
472
  set(key: string, value: string): Promise<void>;
@@ -476,7 +476,7 @@ export interface ManifestSecure {
476
476
  use(adapter: unknown): void;
477
477
  }
478
478
 
479
- /** `$links` from the device plugin — deep/universal link handling. */
479
+ /** `$links` from the device module — deep/universal link handling. */
480
480
  export interface ManifestLinks {
481
481
  /** Take over an inbound link: link.url is the full URL, link.path the route it maps to. */
482
482
  on(handler: (link: { url: string; path: string }) => void): void;
@@ -484,13 +484,13 @@ export interface ManifestLinks {
484
484
  readonly last: string | null;
485
485
  }
486
486
 
487
- /** `$app` from the device plugin — foreground/background state. */
487
+ /** `$app` from the device module — foreground/background state. */
488
488
  export interface ManifestApp {
489
489
  readonly active: boolean;
490
490
  onChange(handler: (active: boolean) => void): void;
491
491
  }
492
492
 
493
- /** `$haptics` from the device plugin — haptic feedback with web vibration fallback. */
493
+ /** `$haptics` from the device module — haptic feedback with web vibration fallback. */
494
494
  export interface ManifestHaptics {
495
495
  impact(style?: 'LIGHT' | 'MEDIUM' | 'HEAVY' | string): Promise<unknown>;
496
496
  notification(type?: 'SUCCESS' | 'WARNING' | 'ERROR' | string): Promise<unknown>;
@@ -499,7 +499,7 @@ export interface ManifestHaptics {
499
499
  [extra: string]: unknown;
500
500
  }
501
501
 
502
- /** `$biometric` from the device plugin. */
502
+ /** `$biometric` from the device module. */
503
503
  export interface ManifestBiometric {
504
504
  available(): Promise<boolean>;
505
505
  verify(opts?: {
@@ -512,7 +512,7 @@ export interface ManifestBiometric {
512
512
  }): Promise<{ verified: boolean; error?: string; code?: string }>;
513
513
  }
514
514
 
515
- /** `$camera` from the device plugin. */
515
+ /** `$camera` from the device module. */
516
516
  export interface ManifestCamera {
517
517
  photo(opts?: Record<string, unknown>): Promise<unknown>;
518
518
  pick(opts?: Record<string, unknown>): Promise<unknown>;
@@ -534,7 +534,7 @@ export interface ManifestEditClasses {
534
534
  list(el?: Element): string[];
535
535
  }
536
536
 
537
- /** Element editor (`x-edit`) — opt-in plugin. Modifiers: `.text` `.move` `.size`
537
+ /** Element editor (`x-edit`) — opt-in module. Modifiers: `.text` `.move` `.size`
538
538
  * `.data` (default text + move), `.lock[.action]`, `.gated`, `.persist`, `.bare`,
539
539
  * `.theme`, `.cssvar`. Every edit is logged; actions default to `$edit.target`. */
540
540
  export interface ManifestEdit {
@@ -857,62 +857,66 @@ declare global {
857
857
  * Recomputed once per flush when a tracked dependency changes; reads as a plain property with a stable identity in between.
858
858
  */
859
859
  const $computed: <T>(fn: (this: any) => T) => T;
860
- /** Appwrite auth plugin (present when the plugin is loaded). */
860
+ /** Appwrite auth module (present when the module is loaded). */
861
861
  const $auth: ManifestAuth;
862
- /** Localization plugin. */
862
+ /** Localization module. */
863
863
  const $locale: ManifestLocale;
864
- /** Toasts plugin. */
864
+ /** Toasts module. */
865
865
  const $toast: ManifestToast;
866
- /** Color-mode plugin (`$color.current = 'dark'`). */
866
+ /** Color-mode module (`$color.current = 'dark'`). */
867
867
  const $color: ManifestColor;
868
- /** Colorpicker plugin. */
868
+ /** Colorpicker module. */
869
869
  const $colorpicker: ManifestColorpicker;
870
- /** URL parameters plugin (`$url.tab.value`). */
870
+ /** URL parameters module (`$url.tab.value`). */
871
871
  const $url: ManifestUrl;
872
- /** Payments plugin. */
872
+ /** Payments module. */
873
873
  const $pay: ManifestPay;
874
- /** Chat plugin. */
874
+ /** Chat module. */
875
875
  const $chat: ManifestChat;
876
- /** Status plugin. */
876
+ /** Status module. */
877
877
  const $status: ManifestStatus;
878
- /** Appwrite presences plugin. */
878
+ /** Appwrite presences module. */
879
879
  const $presence: ManifestPresence;
880
- /** Datepicker plugin. */
880
+ /** Datepicker module. */
881
881
  const $date: ManifestDate;
882
- /** Charts plugin. */
882
+ /** Charts module. */
883
883
  const $chart: ManifestChart;
884
- /** Export plugin. */
884
+ /** Export module. */
885
885
  const $export: ManifestExport;
886
- /** Import plugin. */
886
+ /** Import module. */
887
887
  const $import: ManifestImport;
888
- /** Element editor (edit plugin; opt-in). */
888
+ /** Element editor (edit module; opt-in). */
889
889
  const $edit: ManifestEdit;
890
- /** Rich text editor (rich-text plugin; loaded on use). */
890
+ /** Rich text editor (rich-text module; loaded on use). */
891
891
  const $rich: ManifestRichText;
892
- /** Device/platform info (utilities; enriched by the device plugin). */
892
+ /** Device/platform info (utilities; enriched by the device module). */
893
893
  const $device: ManifestDevice;
894
- /** Native share (device plugin). */
894
+ /** Native share (device module). */
895
895
  const $share: ManifestShare;
896
- /** Push permissions (device plugin). */
896
+ /** Push permissions (device module). */
897
897
  const $push: ManifestPush;
898
- /** Secure storage (device plugin). */
898
+ /** Secure storage (device module). */
899
899
  const $secure: ManifestSecure;
900
- /** Deep links (device plugin). */
900
+ /** Deep links (device module). */
901
901
  const $links: ManifestLinks;
902
- /** App foreground state (device plugin). */
902
+ /** App foreground state (device module). */
903
903
  const $app: ManifestApp;
904
- /** Haptics (device plugin). */
904
+ /** Haptics (device module). */
905
905
  const $haptics: ManifestHaptics;
906
- /** Biometric auth (device plugin). */
906
+ /** Biometric auth (device module). */
907
907
  const $biometric: ManifestBiometric;
908
- /** Camera (device plugin). */
908
+ /** Camera (device module). */
909
909
  const $camera: ManifestCamera;
910
910
 
911
911
  /** Window-level Manifest namespace exposed by the loader. */
912
912
  interface Window {
913
913
  Manifest?: {
914
+ loadModule(name: string, version?: string): Promise<unknown>;
915
+ /** @deprecated Use loadModule. */
914
916
  loadPlugin(name: string, version?: string): Promise<unknown>;
915
917
  loadTailwind(version?: string): Promise<unknown>;
918
+ getModuleUrl(name: string, version?: string): string;
919
+ /** @deprecated Use getModuleUrl. */
916
920
  getPluginUrl(name: string, version?: string): string;
917
921
  /** Defer a closed container built at runtime (call before Alpine.initTree). */
918
922
  defer?(el: Element): unknown;
@@ -932,7 +936,7 @@ declare global {
932
936
  /** Mark a timer callback as housekeeping that never changes the page (auto settle ignores it). */
933
937
  background<T extends Function>(fn: T): T;
934
938
  };
935
- /** Rich text engine (rich-text plugin). */
939
+ /** Rich text engine (rich-text module). */
936
940
  ManifestRichText?: {
937
941
  attach(el: Element, options?: ManifestRichTextAttachOptions): ManifestRichTextHandle | null;
938
942
  toMarkdown(root: Element): string;
@@ -940,7 +944,7 @@ declare global {
940
944
  sanitize(html: string, allowBlocks?: boolean, keepStyle?: boolean): string;
941
945
  commands(): string[];
942
946
  };
943
- /** Form sending (submissions plugin; loaded on first x-submit). */
947
+ /** Form sending (submissions module; loaded on first x-submit). */
944
948
  ManifestSubmissions?: {
945
949
  readonly events: { sent: string; error: string };
946
950
  send(form: HTMLFormElement, submitter?: HTMLElement | null): Promise<ManifestSubmitDetail>;
@@ -2,7 +2,7 @@
2
2
 
3
3
  (function () {
4
4
 
5
- const MANIFEST_BUILD_VERSION = '0.5.301';
5
+ const MANIFEST_BUILD_VERSION = '0.5.303';
6
6
 
7
7
  /* Manifest Data Sources - Configuration */
8
8
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
3
- "manifest.appwrite.data.js": "sha384-/zJBdX55EWq/ZQkgr0XVmi3M6GCtZQJ9UMYPRGinc/C5yXwCUOTykSCNZQaVU5Gz",
3
+ "manifest.appwrite.data.js": "sha384-hAe/fSjTXXmwo8lHNtWkWCqlOe6ArPFEBDAfXcdrsgGapMp7/HAK7sEkcb/TUxDm",
4
4
  "manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
5
5
  "manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
6
6
  "manifest.charts.js": "sha384-BnTxO3ncLxg82aV+64tQMS3ssN+RKZ69Dic6Oruz0pw+/UIK2MAZicg8+ooHF2ZA",
@@ -9,9 +9,9 @@
9
9
  "manifest.color.js": "sha384-tLmmr7KwPIjznXr2tJfJtuAOV9pohdr+Ojj4L4BaOZ8WngCNOPUp27Dfz47YqU2R",
10
10
  "manifest.colorpicker.js": "sha384-P+Zx0QzhMGfku8s3yEskTte4/iXCGVX3zdhu42IGNfFcSmhOW+nqVK7w+uczWRGY",
11
11
  "manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
12
- "manifest.components.js": "sha384-7lu4Nw2GqpAUn63c3gYEvgfM58PYsdoPv3wzqPQfZ5bravqOY/lfE8HFKHsKflQj",
12
+ "manifest.components.js": "sha384-t2qgBbcGPMoTYpMffOHW2dM07UWIq3pU3PYqLGrS6QP2hzCer4ofgaIKA+7hW558",
13
13
  "manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
14
- "manifest.data.js": "sha384-MRvg00mcEEc/Dzspf834L3Padpp8uWWPDJCKTSA1d9NMMDvysgB6Ul8/BiQ+jEHa",
14
+ "manifest.data.js": "sha384-9+SGmF9k+igY2kMZBX5LbNZgqbnSbs6xxyvFZO7oF9gMM+PAgJL5dMP8P87pkPdM",
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",
@@ -24,12 +24,12 @@
24
24
  "manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
25
25
  "manifest.payments.js": "sha384-p10n6EHBWFKVW9KhI2A+RpkwqrwD068D+wvOJ7D3Gklz1MvmIlqv1lLG1R0cUqbw",
26
26
  "manifest.rich.text.js": "sha384-ZBV9jXmu2nmprEHicddRE/m7nR4RPZtVc969Jte0+EJYBcVph7itkjcgN/61PyeC",
27
- "manifest.router.js": "sha384-Em8/J9eY7KCqYilu85zgfhtkExWBMn51+P9HnIRYG4/g6FM0e99gRzFEOn4ngwIa",
27
+ "manifest.router.js": "sha384-fnFIDMwehZjaLiZwwtry63AXX9qlyxzRJjKHi4SORgwW4hhZ5eiItTHc4J1mKagU",
28
28
  "manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
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-CXhH3Z+Ku5Dgw9GMAunMFEz8KdnaBvrGt+fy0TPePFyGMmzuMkhp1dsJx3Wd6s/U",
32
+ "manifest.sw.js": "sha384-WwO67T+4OdbAXUV6DkZ8JXOicDKYpN4axrVmrubvcPxk75vOfJJgPxd1iDctdJu7",
33
33
  "manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
34
34
  "manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
35
35
  "manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
@@ -37,5 +37,5 @@
37
37
  "manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
38
38
  "manifest.utilities.js": "sha384-J6NZCPmeHPo12kcsUzJNJmjxX67MASCwdHUoLvV3Ty003zOi09quLrf5ghpzfw8a",
39
39
  "manifest.virtual.js": "sha384-PtIDx042i29mkxEYZH+y3whBzKgBgV01CU1XzzeEl/8TBPl9qvny4ppyXgYI5DsM",
40
- "manifest.js": "sha384-7+hNmvzD6OPQt6q4pZEDoqf5C8LHucIqlfKJQAAH6b4tsmvpX0viCvdYqqGOjqET"
40
+ "manifest.js": "sha384-vaJVFuwnaYalVw8vjut1si3Kqwk5+sDHiC3iScfS417NSWqfhNZNBdvcF2lUbuz+"
41
41
  }
package/lib/manifest.js CHANGED
@@ -905,21 +905,22 @@
905
905
  return null;
906
906
  }
907
907
 
908
- const plugins = script.getAttribute('data-plugins');
908
+ // `data-modules` is canonical; `data-plugins` is the legacy alias.
909
+ const plugins = script.getAttribute('data-modules') ?? script.getAttribute('data-plugins');
909
910
  const omit = script.getAttribute('data-omit');
910
911
  const tailwind = script.getAttribute('data-tailwind') !== null;
911
912
  const version = script.getAttribute('data-version') || DEFAULT_VERSION;
912
913
  const alpine = script.getAttribute('data-alpine');
913
914
  // Override: resolve plugin URLs against this base (dir serving
914
915
  // `manifest.<name>.js`, relative or absolute) instead of the CDN.
915
- const pluginBase = script.getAttribute('data-plugin-base');
916
+ const pluginBase = script.getAttribute('data-module-base') ?? script.getAttribute('data-plugin-base');
916
917
  // Override: custom CDN fallback chain (comma-separated origins).
917
918
  const cdn = script.getAttribute('data-cdn');
918
919
  // App-shell service worker switch: 'off' = never, 'on' = force + debug log.
919
920
  const sw = script.getAttribute('data-sw');
920
921
 
921
- // `data-plugins="a,b"` replaces the default set; a `+` prefix is additive
922
- // (`data-plugins="+chat"` = defaults plus chat) — needed for plugins with
922
+ // `data-modules="a,b"` replaces the default set; a `+` prefix is additive
923
+ // (`data-modules="+chat"` = defaults plus chat) — needed for modules with
923
924
  // no manifest.json trigger, e.g. chat driven by custom adapters only.
924
925
  let pluginList = [];
925
926
  let extraPlugins = [];
@@ -1007,8 +1008,8 @@
1007
1008
  const allPlugins = [...AVAILABLE_PLUGINS, ...USAGE_LOADED_PLUGINS, ...APPWRITE_PLUGINS, ...AUTHORING_PLUGINS, 'payments', 'chat', 'device', 'native', 'import', 'tailwind'];
1008
1009
  if (!allPlugins.includes(pluginName)) {
1009
1010
  if (RENAMED_PLUGINS[pluginName]) dropRenamed([pluginName]);
1010
- else console.warn(`[Manifest Loader] Unknown plugin: ${pluginName}`);
1011
- return Promise.reject(new Error(`Unknown plugin: ${pluginName}`));
1011
+ else console.warn(`[Manifest Loader] Unknown module: ${pluginName}`);
1012
+ return Promise.reject(new Error(`Unknown module: ${pluginName}`));
1012
1013
  }
1013
1014
 
1014
1015
  // Resolve dependencies for single plugin load
@@ -1019,10 +1020,13 @@
1019
1020
  },
1020
1021
  loadTailwind: loadTailwind,
1021
1022
  getPluginUrl: getPluginUrl,
1023
+ getModuleUrl: getPluginUrl,
1022
1024
  // On-use plugins referenced by an HTML string or element
1023
1025
  loadUsed: loadUsed
1024
1026
  };
1025
1027
 
1028
+ window.Manifest.loadModule = window.Manifest.loadPlugin;
1029
+
1026
1030
  // ---- App-shell service worker (PERF-PRIMITIVES-DESIGN §13) ----
1027
1031
  // Same-origin `/sw.js` stub — two lines, identical wherever it is emitted
1028
1032
  // (managed hosting, mnfst-publish, the starter template, by hand):
@@ -804,19 +804,29 @@ function hasXShow(element) {
804
804
  // Activation hook fires before the route becomes visible so deferred content renders first
805
805
  function showRoute(element) {
806
806
  element.dispatchEvent(new CustomEvent('manifest:route-activate'));
807
- if (element.hasAttribute('hidden')) element.removeAttribute('hidden');
807
+ const wasHidden = element.hasAttribute('hidden');
808
+ if (wasHidden) element.removeAttribute('hidden');
808
809
  const prior = element.__manifestRouteDisplay;
809
810
  if (prior) {
810
811
  element.__manifestRouteDisplay = null;
811
812
  // x-show added since (tabs panels, components) now owns the inline display
812
813
  if (!hasXShow(element) && element.style.display === 'none') element.style.setProperty('display', prior.value, prior.priority);
814
+ } else if (wasHidden && !hasXShow(element) && element.style.display === 'none') {
815
+ // Route-hidden markup cloned or copied without its record (component placeholders and roots)
816
+ element.style.removeProperty('display');
813
817
  }
814
818
  }
815
819
 
816
820
  // Skip no-op writes: each one is a mutation record for every observer
817
821
  function hideRoute(element) {
818
- if (!element.hasAttribute('hidden')) element.setAttribute('hidden', '');
819
- if (hasXShow(element) || element.style.display === 'none') return;
822
+ const wasHidden = element.hasAttribute('hidden');
823
+ if (!wasHidden) element.setAttribute('hidden', '');
824
+ if (hasXShow(element)) return;
825
+ // An author's own display:none is recorded too, so showRoute puts it back
826
+ if (element.style.display === 'none') {
827
+ if (!wasHidden && !element.__manifestRouteDisplay) element.__manifestRouteDisplay = { value: 'none', priority: element.style.getPropertyPriority('display') };
828
+ return;
829
+ }
820
830
  // Restored on show, so an author's own inline display survives
821
831
  element.__manifestRouteDisplay = { value: element.style.display, priority: element.style.getPropertyPriority('display') };
822
832
  element.style.display = 'none';
@@ -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.301';
19
+ const BUILD_VERSION = '0.5.303';
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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.301",
3
+ "version": "0.5.303",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",
@@ -58,6 +58,7 @@
58
58
  "test:e2e:components-router-race": "node tests/e2e/components-router-race.e2e.mjs",
59
59
  "test:e2e:components-ancestor-gate": "node tests/e2e/components-ancestor-gate.e2e.mjs",
60
60
  "test:e2e:route-head": "node tests/e2e/route-head.e2e.mjs",
61
+ "test:e2e:route-display": "node tests/e2e/components-route-display.e2e.mjs",
61
62
  "test:e2e:prerender-patch": "node tests/e2e/utilities-prerender-patch.e2e.mjs",
62
63
  "test:e2e:hidden-responsive": "node tests/e2e/utilities-hidden-responsive.e2e.mjs",
63
64
  "test:e2e:tailwind-dark": "node tests/e2e/tailwind-dark-variant.e2e.mjs",