sibujs 4.5.0 → 4.7.0

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 (116) hide show
  1. package/README.md +1 -1
  2. package/dist/browser.cjs +326 -133
  3. package/dist/browser.d.cts +46 -14
  4. package/dist/browser.d.ts +46 -14
  5. package/dist/browser.js +8 -6
  6. package/dist/build.cjs +2094 -1033
  7. package/dist/build.d.cts +133 -44
  8. package/dist/build.d.ts +133 -44
  9. package/dist/build.js +1372 -574
  10. package/dist/cdn.dev.global.js +10 -10
  11. package/dist/cdn.full.dev.global.js +11 -11
  12. package/dist/cdn.full.global.js +10 -10
  13. package/dist/cdn.global.js +10 -10
  14. package/dist/{chunk-2DCGACUU.js → chunk-2BPG2XDA.js} +251 -66
  15. package/dist/{chunk-IXKSNWV5.js → chunk-2INLLLMZ.js} +1 -1
  16. package/dist/{chunk-4PMLNECI.js → chunk-3QWBSL5R.js} +98 -29
  17. package/dist/{chunk-KKLW7YWL.js → chunk-4AWA2PVD.js} +275 -144
  18. package/dist/chunk-5HZXGZ6T.js +24 -0
  19. package/dist/{chunk-PCT43HW3.js → chunk-7LUJQAOJ.js} +1 -1
  20. package/dist/{chunk-5DXA2J44.js → chunk-7XHATCIH.js} +5 -2
  21. package/dist/chunk-BC2SECJD.js +44 -0
  22. package/dist/{chunk-TBYTO6BS.js → chunk-BSY63EM6.js} +136 -80
  23. package/dist/{chunk-FTIR4QW2.js → chunk-DKXRACVN.js} +6 -8
  24. package/dist/{chunk-ONOHFDLG.js → chunk-FNJXNGYZ.js} +3 -3
  25. package/dist/{chunk-XZZOBQAY.js → chunk-FQRUXCEE.js} +6 -5
  26. package/dist/{chunk-NIOYEGBQ.js → chunk-HURREPU2.js} +27 -13
  27. package/dist/chunk-J6FW5TV6.js +233 -0
  28. package/dist/{chunk-UGRX3S57.js → chunk-JWKYU5GV.js} +22 -4
  29. package/dist/chunk-NYNYSPK7.js +318 -0
  30. package/dist/{chunk-RBTPLM32.js → chunk-RUSSKG6G.js} +13 -12
  31. package/dist/{chunk-7LN645I6.js → chunk-SLM3IA34.js} +3 -3
  32. package/dist/{chunk-R25EFXXC.js → chunk-TUCPL2HB.js} +3 -3
  33. package/dist/{chunk-B3WHI2QA.js → chunk-UNWRJRKC.js} +55 -31
  34. package/dist/{chunk-KEISJXBU.js → chunk-UOL2ECCS.js} +44 -17
  35. package/dist/{chunk-RJE2BNI4.js → chunk-VZSG24LS.js} +108 -45
  36. package/dist/{chunk-RIXRAYIU.js → chunk-WEQ3DMVL.js} +10 -4
  37. package/dist/{chunk-3JZ4L5TJ.js → chunk-WOLJZUFQ.js} +354 -90
  38. package/dist/{chunk-S373NSMK.js → chunk-XYV3EDB7.js} +283 -123
  39. package/dist/{chunk-VZKNK2V7.js → chunk-XZR4PXRE.js} +296 -38
  40. package/dist/{chunk-GW3SCCZG.js → chunk-Z3OHK6QT.js} +153 -110
  41. package/dist/{chunk-OMJJM3KM.js → chunk-ZVL7TY4K.js} +287 -130
  42. package/dist/{contracts-DBdg9J_a.d.ts → contracts-CLqzJnOV.d.ts} +36 -17
  43. package/dist/{contracts-DBdg9J_a.d.cts → contracts-CTOJXu-x.d.cts} +36 -17
  44. package/dist/{customElement-OB9CIsc5.d.cts → customElement-MmInOW1U.d.cts} +21 -0
  45. package/dist/{customElement-OB9CIsc5.d.ts → customElement-MmInOW1U.d.ts} +21 -0
  46. package/dist/data.cjs +410 -155
  47. package/dist/data.d.cts +166 -12
  48. package/dist/data.d.ts +166 -12
  49. package/dist/data.js +12 -9
  50. package/dist/devtools.cjs +98 -61
  51. package/dist/devtools.js +7 -8
  52. package/dist/dispose-GEIG2KOF.js +28 -0
  53. package/dist/ecosystem.cjs +372 -126
  54. package/dist/ecosystem.d.cts +20 -3
  55. package/dist/ecosystem.d.ts +20 -3
  56. package/dist/ecosystem.js +12 -12
  57. package/dist/extras.cjs +2366 -909
  58. package/dist/extras.d.cts +11 -9
  59. package/dist/extras.d.ts +11 -9
  60. package/dist/extras.js +39 -28
  61. package/dist/index.cjs +421 -158
  62. package/dist/index.d.cts +213 -171
  63. package/dist/index.d.ts +213 -171
  64. package/dist/index.js +24 -27
  65. package/dist/motion.cjs +118 -44
  66. package/dist/motion.js +5 -5
  67. package/dist/patterns.cjs +344 -53
  68. package/dist/patterns.d.cts +28 -9
  69. package/dist/patterns.d.ts +28 -9
  70. package/dist/patterns.js +8 -8
  71. package/dist/performance.cjs +325 -220
  72. package/dist/performance.d.cts +2 -2
  73. package/dist/performance.d.ts +2 -2
  74. package/dist/performance.js +8 -9
  75. package/dist/plugin-DVgSnTfK.d.cts +112 -0
  76. package/dist/plugin-DVgSnTfK.d.ts +112 -0
  77. package/dist/plugins.cjs +664 -233
  78. package/dist/plugins.d.cts +127 -14
  79. package/dist/plugins.d.ts +127 -14
  80. package/dist/plugins.js +96 -42
  81. package/dist/signal-EotCj4hS.d.cts +110 -0
  82. package/dist/signal-EotCj4hS.d.ts +110 -0
  83. package/dist/{ssr-BiPRdZ6n.d.cts → ssr-Bli9XRW5.d.cts} +5 -0
  84. package/dist/{ssr-BiPRdZ6n.d.ts → ssr-Bli9XRW5.d.ts} +5 -0
  85. package/dist/{ssr-Y7XOEPEN.js → ssr-XOTUASDO.js} +4 -5
  86. package/dist/ssr.cjs +229 -84
  87. package/dist/ssr.d.cts +9 -3
  88. package/dist/ssr.d.ts +9 -3
  89. package/dist/ssr.js +11 -12
  90. package/dist/{startup-BMpaiMhP.d.ts → startup-BLfSeL15.d.cts} +73 -22
  91. package/dist/{startup-BMpaiMhP.d.cts → startup-BLfSeL15.d.ts} +73 -22
  92. package/dist/tagFactory-8qL9LCIx.d.cts +156 -0
  93. package/dist/tagFactory-BL2fymez.d.ts +156 -0
  94. package/dist/testing.cjs +2503 -2191
  95. package/dist/testing.d.cts +56 -5
  96. package/dist/testing.d.ts +56 -5
  97. package/dist/testing.js +580 -307
  98. package/dist/types-CJFViL6Q.d.cts +26 -0
  99. package/dist/types-CJFViL6Q.d.ts +26 -0
  100. package/dist/ui.cjs +732 -329
  101. package/dist/ui.d.cts +41 -7
  102. package/dist/ui.d.ts +41 -7
  103. package/dist/ui.js +151 -56
  104. package/dist/widgets.cjs +267 -291
  105. package/dist/widgets.js +9 -10
  106. package/package.json +4 -2
  107. package/dist/chunk-2WLZ6757.js +0 -149
  108. package/dist/chunk-CCSJMTRN.js +0 -15
  109. package/dist/chunk-QKRPLZ2V.js +0 -108
  110. package/dist/chunk-VUF4ALSW.js +0 -60
  111. package/dist/chunk-WWV3SJ3L.js +0 -131
  112. package/dist/dispose-46BOMMQJ.js +0 -19
  113. package/dist/plugin-D30wlGW5.d.cts +0 -71
  114. package/dist/plugin-D30wlGW5.d.ts +0 -71
  115. package/dist/tagFactory-DVoDpHye.d.cts +0 -215
  116. package/dist/tagFactory-DVoDpHye.d.ts +0 -215
package/dist/index.d.cts CHANGED
@@ -1,6 +1,10 @@
1
- import { N as NodeChild, a as NodeChildren, T as TagProps, A as Accessor, D as DerivedAccessor } from './tagFactory-DVoDpHye.cjs';
2
- export { b as Dispose, E as ExternalSource, S as SVG_NS, c as SignalOptions, d as derived, e as external, s as signal, t as tagFactory } from './tagFactory-DVoDpHye.cjs';
3
- export { T as TrustedHTML, t as trustHTML } from './ssr-BiPRdZ6n.cjs';
1
+ import { a as NodeChild, C as Component, N as NodeChildren } from './types-CJFViL6Q.cjs';
2
+ export { D as Dispose } from './types-CJFViL6Q.cjs';
3
+ import { T as TagProps, a as TagFunction, D as DerivedAccessor } from './tagFactory-8qL9LCIx.cjs';
4
+ export { S as SVG_NS, b as StyleMap, c as StyleObject, d as TagEventHandlers, e as derived, t as tagFactory } from './tagFactory-8qL9LCIx.cjs';
5
+ import { A as Accessor } from './signal-EotCj4hS.cjs';
6
+ export { D as DisposableAccessor, E as ExternalSource, S as SignalOptions, e as external, s as signal } from './signal-EotCj4hS.cjs';
7
+ export { T as TrustedHTML, t as trustHTML } from './ssr-Bli9XRW5.cjs';
4
8
  import { R as ReactiveSignal } from './signal-BnWpq6WB.cjs';
5
9
 
6
10
  interface ErrorBoundaryOptions {
@@ -416,6 +420,11 @@ declare function context<T>(defaultValue: T): Context<T>;
416
420
  *
417
421
  * Each call returns a fresh incrementing id. Optionally accepts a prefix.
418
422
  *
423
+ * Inside an SSR request (`runInSSRContext`) the counter belongs to that request,
424
+ * so every request's ids start from 1 — independent of earlier or concurrent
425
+ * requests, and identical to a fresh client's sequence for hydration. Outside a
426
+ * request the shared client counter is used.
427
+ *
419
428
  * IDs are plain strings (not reactive) — call once per component instance
420
429
  * and reuse the returned value for both sides of the association.
421
430
  *
@@ -558,7 +567,7 @@ declare function registerDisposer(node: Node, teardown: () => void): void;
558
567
  * The teardown is assumed to have already run (or to be deliberately abandoned);
559
568
  * this only releases the reference.
560
569
  */
561
- declare function unregisterDisposer(node: Node, teardown: () => void): void;
570
+ declare function unregisterDisposer(node: Node, teardown: () => void): boolean;
562
571
  /**
563
572
  * Run all registered teardowns for a node and its descendants,
564
573
  * cleaning up reactive subscriptions to prevent memory leaks.
@@ -596,7 +605,6 @@ declare function replaceChildrenSafely(parent: ParentNode, ...next: Node[]): voi
596
605
  */
597
606
  declare function checkLeaks(warnThreshold?: number): number;
598
607
 
599
- type Component$1 = () => HTMLElement;
600
608
  /**
601
609
  * Register a component by name for dynamic resolution.
602
610
  *
@@ -609,7 +617,7 @@ type Component$1 = () => HTMLElement;
609
617
  * registerComponent("AdminPanel", AdminPanel);
610
618
  * ```
611
619
  */
612
- declare function registerComponent(name: string, component: Component$1): void;
620
+ declare function registerComponent(name: string, component: Component): void;
613
621
  /**
614
622
  * Unregister a previously registered component.
615
623
  */
@@ -618,8 +626,12 @@ declare function unregisterComponent(name: string): void;
618
626
  * Resolve and render a dynamically registered component by name.
619
627
  * Returns a placeholder if the component is not found.
620
628
  *
629
+ * The registry is keyed by name, so it cannot know which root a component
630
+ * renders: `El` states it, like `querySelector<E>()`. It defaults to
631
+ * `HTMLElement`; pass `Element` (or `SVGSVGElement`, …) for an SVG component.
632
+ *
621
633
  * @param name Component name to resolve
622
- * @returns The rendered HTMLElement or a fallback
634
+ * @returns The rendered root element or a fallback
623
635
  *
624
636
  * @example
625
637
  * ```ts
@@ -627,7 +639,7 @@ declare function unregisterComponent(name: string): void;
627
639
  * div([resolveComponent("Widget")]);
628
640
  * ```
629
641
  */
630
- declare function resolveComponent(name: string): HTMLElement;
642
+ declare function resolveComponent<El extends Element = HTMLElement>(name: string): El;
631
643
  /**
632
644
  * Dynamic component that reactively switches between components
633
645
  * based on a reactive getter returning a component name or function.
@@ -643,7 +655,7 @@ declare function resolveComponent(name: string): HTMLElement;
643
655
  * setView("grid"); // Swaps to registered "grid" component
644
656
  * ```
645
657
  */
646
- declare function DynamicComponent(is: () => string | Component$1): HTMLElement;
658
+ declare function DynamicComponent(is: () => string | Component): HTMLDivElement;
647
659
 
648
660
  /**
649
661
  * Renders a list of nodes efficiently with key-based diffing and
@@ -697,12 +709,17 @@ declare function each<T>(getArray: () => T[], render: (item: () => T, index: ()
697
709
  * Fragment groups multiple nodes without adding a wrapper DOM element.
698
710
  * Returns a DocumentFragment that can be appended to any parent.
699
711
  *
712
+ * A function child is reactive, exactly as it is inside a tag factory: it is
713
+ * rendered after a placeholder comment and re-rendered when the signals it reads
714
+ * change. The binding is owned by that placeholder, so disposing the parent the
715
+ * fragment was appended to (or unmounting a mounted fragment) stops it.
716
+ *
700
717
  * @example
701
718
  * ```ts
702
719
  * div([
703
720
  * Fragment([
704
721
  * p("First"),
705
- * p("Second"),
722
+ * () => `Count: ${count()}`,
706
723
  * ])
707
724
  * ]);
708
725
  * ```
@@ -726,9 +743,9 @@ declare function Fragment(nodes: NodeChildren[]): DocumentFragment;
726
743
  declare function html(strings: TemplateStringsArray, ...values: unknown[]): Element;
727
744
 
728
745
  type reactive<T> = T | (() => T);
729
- interface AnchorProps extends TagProps {
746
+ interface AnchorProps extends TagProps<HTMLAnchorElement> {
730
747
  href?: reactive<string>;
731
- target?: "_self" | "_blank" | "_parent" | "_top" | (string & {});
748
+ target?: reactive<"_self" | "_blank" | "_parent" | "_top" | (string & {})>;
732
749
  rel?: reactive<string>;
733
750
  download?: reactive<string | boolean>;
734
751
  hreflang?: reactive<string>;
@@ -736,8 +753,8 @@ interface AnchorProps extends TagProps {
736
753
  ping?: reactive<string>;
737
754
  }
738
755
  type InputType = "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week";
739
- interface InputProps extends TagProps {
740
- type?: InputType | (string & {});
756
+ interface InputProps extends TagProps<HTMLInputElement> {
757
+ type?: reactive<InputType | (string & {})>;
741
758
  name?: reactive<string>;
742
759
  value?: reactive<string | number>;
743
760
  placeholder?: reactive<string>;
@@ -760,7 +777,7 @@ interface InputProps extends TagProps {
760
777
  list?: reactive<string>;
761
778
  inputmode?: reactive<"none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url">;
762
779
  }
763
- interface ImgProps extends TagProps {
780
+ interface ImgProps extends TagProps<HTMLImageElement> {
764
781
  src?: reactive<string>;
765
782
  alt?: reactive<string>;
766
783
  width?: reactive<number | string>;
@@ -772,7 +789,7 @@ interface ImgProps extends TagProps {
772
789
  crossorigin?: reactive<"anonymous" | "use-credentials">;
773
790
  referrerpolicy?: reactive<string>;
774
791
  }
775
- interface ButtonProps extends TagProps {
792
+ interface ButtonProps extends TagProps<HTMLButtonElement> {
776
793
  type?: reactive<"button" | "submit" | "reset">;
777
794
  name?: reactive<string>;
778
795
  value?: reactive<string>;
@@ -785,7 +802,7 @@ interface ButtonProps extends TagProps {
785
802
  formtarget?: reactive<string>;
786
803
  autofocus?: reactive<boolean>;
787
804
  }
788
- interface FormProps extends TagProps {
805
+ interface FormProps extends TagProps<HTMLFormElement> {
789
806
  action?: reactive<string>;
790
807
  method?: reactive<"get" | "post" | "dialog">;
791
808
  enctype?: reactive<"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain">;
@@ -795,7 +812,7 @@ interface FormProps extends TagProps {
795
812
  autocomplete?: reactive<"on" | "off">;
796
813
  acceptcharset?: reactive<string>;
797
814
  }
798
- interface SelectProps extends TagProps {
815
+ interface SelectProps extends TagProps<HTMLSelectElement> {
799
816
  name?: reactive<string>;
800
817
  value?: reactive<string>;
801
818
  disabled?: reactive<boolean>;
@@ -806,7 +823,7 @@ interface SelectProps extends TagProps {
806
823
  autofocus?: reactive<boolean>;
807
824
  form?: reactive<string>;
808
825
  }
809
- interface TextareaProps extends TagProps {
826
+ interface TextareaProps extends TagProps<HTMLTextAreaElement> {
810
827
  name?: reactive<string>;
811
828
  value?: reactive<string>;
812
829
  placeholder?: reactive<string>;
@@ -823,17 +840,17 @@ interface TextareaProps extends TagProps {
823
840
  form?: reactive<string>;
824
841
  spellcheck?: reactive<boolean>;
825
842
  }
826
- interface LabelProps extends TagProps {
843
+ interface LabelProps extends TagProps<HTMLLabelElement> {
827
844
  for?: reactive<string>;
828
845
  form?: reactive<string>;
829
846
  }
830
- interface OptionProps extends TagProps {
847
+ interface OptionProps extends TagProps<HTMLOptionElement> {
831
848
  value?: reactive<string | number>;
832
849
  selected?: reactive<boolean>;
833
850
  disabled?: reactive<boolean>;
834
851
  label?: reactive<string>;
835
852
  }
836
- interface MediaProps extends TagProps {
853
+ interface MediaProps<El extends HTMLMediaElement = HTMLMediaElement> extends TagProps<El> {
837
854
  src?: reactive<string>;
838
855
  autoplay?: reactive<boolean>;
839
856
  controls?: reactive<boolean>;
@@ -842,152 +859,151 @@ interface MediaProps extends TagProps {
842
859
  preload?: reactive<"none" | "metadata" | "auto">;
843
860
  crossorigin?: reactive<"anonymous" | "use-credentials">;
844
861
  }
845
- interface VideoProps extends MediaProps {
862
+ interface VideoProps extends MediaProps<HTMLVideoElement> {
846
863
  poster?: reactive<string>;
847
864
  width?: reactive<number | string>;
848
865
  height?: reactive<number | string>;
849
866
  playsinline?: reactive<boolean>;
850
867
  }
851
- type AudioProps = MediaProps;
868
+ type AudioProps = MediaProps<HTMLAudioElement>;
869
+ type TypedTagFunction<Props extends TagProps<El>, El extends Element> = TagFunction<El, Props>;
852
870
 
853
- type TypedTagFunction<Props extends TagProps, El extends Element> = (first?: Props | NodeChildren, second?: NodeChildren) => El;
854
-
855
- declare const head: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
856
- declare const body: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
857
- declare const title: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
858
- declare const div: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
859
- declare const span: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
860
- declare const section: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
861
- declare const article: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
862
- declare const header: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
863
- declare const footer: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
864
- declare const nav: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
865
- declare const main: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
866
- declare const aside: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
867
- declare const address: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
868
- declare const p: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
869
- declare const h1: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
870
- declare const h2: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
871
- declare const h3: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
872
- declare const h4: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
873
- declare const h5: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
874
- declare const h6: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
875
- declare const blockquote: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
876
- declare const dd: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
877
- declare const dl: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
878
- declare const dt: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
879
- declare const figcaption: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
880
- declare const figure: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
881
- declare const hr: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
882
- declare const li: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
883
- declare const ol: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
884
- declare const ul: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
885
- declare const pre: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
871
+ declare const head: TagFunction<HTMLHeadElement, TagProps<HTMLHeadElement>>;
872
+ declare const body: TagFunction<HTMLBodyElement, TagProps<HTMLBodyElement>>;
873
+ declare const title: TagFunction<HTMLTitleElement, TagProps<HTMLTitleElement>>;
874
+ declare const div: TagFunction<HTMLDivElement, TagProps<HTMLDivElement>>;
875
+ declare const span: TagFunction<HTMLSpanElement, TagProps<HTMLSpanElement>>;
876
+ declare const section: TagFunction<HTMLElement, TagProps<HTMLElement>>;
877
+ declare const article: TagFunction<HTMLElement, TagProps<HTMLElement>>;
878
+ declare const header: TagFunction<HTMLElement, TagProps<HTMLElement>>;
879
+ declare const footer: TagFunction<HTMLElement, TagProps<HTMLElement>>;
880
+ declare const nav: TagFunction<HTMLElement, TagProps<HTMLElement>>;
881
+ declare const main: TagFunction<HTMLElement, TagProps<HTMLElement>>;
882
+ declare const aside: TagFunction<HTMLElement, TagProps<HTMLElement>>;
883
+ declare const address: TagFunction<HTMLElement, TagProps<HTMLElement>>;
884
+ declare const p: TagFunction<HTMLParagraphElement, TagProps<HTMLParagraphElement>>;
885
+ declare const h1: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
886
+ declare const h2: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
887
+ declare const h3: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
888
+ declare const h4: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
889
+ declare const h5: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
890
+ declare const h6: TagFunction<HTMLHeadingElement, TagProps<HTMLHeadingElement>>;
891
+ declare const blockquote: TagFunction<HTMLQuoteElement, TagProps<HTMLQuoteElement>>;
892
+ declare const dd: TagFunction<HTMLElement, TagProps<HTMLElement>>;
893
+ declare const dl: TagFunction<HTMLDListElement, TagProps<HTMLDListElement>>;
894
+ declare const dt: TagFunction<HTMLElement, TagProps<HTMLElement>>;
895
+ declare const figcaption: TagFunction<HTMLElement, TagProps<HTMLElement>>;
896
+ declare const figure: TagFunction<HTMLElement, TagProps<HTMLElement>>;
897
+ declare const hr: TagFunction<HTMLHRElement, TagProps<HTMLHRElement>>;
898
+ declare const li: TagFunction<HTMLLIElement, TagProps<HTMLLIElement>>;
899
+ declare const ol: TagFunction<HTMLOListElement, TagProps<HTMLOListElement>>;
900
+ declare const ul: TagFunction<HTMLUListElement, TagProps<HTMLUListElement>>;
901
+ declare const pre: TagFunction<HTMLPreElement, TagProps<HTMLPreElement>>;
886
902
  declare const a: TypedTagFunction<AnchorProps, HTMLAnchorElement>;
887
- declare const abbr: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
888
- declare const b: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
889
- declare const bdi: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
890
- declare const bdo: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
891
- declare const br: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
892
- declare const cite: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
893
- declare const code: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
894
- declare const data: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
895
- declare const dfn: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
896
- declare const em: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
897
- declare const i: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
898
- declare const kbd: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
899
- declare const mark: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
900
- declare const q: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
901
- declare const rp: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
902
- declare const rt: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
903
- declare const ruby: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
904
- declare const s: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
905
- declare const samp: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
906
- declare const small: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
907
- declare const strong: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
908
- declare const sub: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
909
- declare const sup: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
910
- declare const time: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
911
- declare const u: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
912
- declare const var_: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
913
- declare const area: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
903
+ declare const abbr: TagFunction<HTMLElement, TagProps<HTMLElement>>;
904
+ declare const b: TagFunction<HTMLElement, TagProps<HTMLElement>>;
905
+ declare const bdi: TagFunction<HTMLElement, TagProps<HTMLElement>>;
906
+ declare const bdo: TagFunction<HTMLElement, TagProps<HTMLElement>>;
907
+ declare const br: TagFunction<HTMLBRElement, TagProps<HTMLBRElement>>;
908
+ declare const cite: TagFunction<HTMLElement, TagProps<HTMLElement>>;
909
+ declare const code: TagFunction<HTMLElement, TagProps<HTMLElement>>;
910
+ declare const data: TagFunction<HTMLDataElement, TagProps<HTMLDataElement>>;
911
+ declare const dfn: TagFunction<HTMLElement, TagProps<HTMLElement>>;
912
+ declare const em: TagFunction<HTMLElement, TagProps<HTMLElement>>;
913
+ declare const i: TagFunction<HTMLElement, TagProps<HTMLElement>>;
914
+ declare const kbd: TagFunction<HTMLElement, TagProps<HTMLElement>>;
915
+ declare const mark: TagFunction<HTMLElement, TagProps<HTMLElement>>;
916
+ declare const q: TagFunction<HTMLQuoteElement, TagProps<HTMLQuoteElement>>;
917
+ declare const rp: TagFunction<HTMLElement, TagProps<HTMLElement>>;
918
+ declare const rt: TagFunction<HTMLElement, TagProps<HTMLElement>>;
919
+ declare const ruby: TagFunction<HTMLElement, TagProps<HTMLElement>>;
920
+ declare const s: TagFunction<HTMLElement, TagProps<HTMLElement>>;
921
+ declare const samp: TagFunction<HTMLElement, TagProps<HTMLElement>>;
922
+ declare const small: TagFunction<HTMLElement, TagProps<HTMLElement>>;
923
+ declare const strong: TagFunction<HTMLElement, TagProps<HTMLElement>>;
924
+ declare const sub: TagFunction<HTMLElement, TagProps<HTMLElement>>;
925
+ declare const sup: TagFunction<HTMLElement, TagProps<HTMLElement>>;
926
+ declare const time: TagFunction<HTMLTimeElement, TagProps<HTMLTimeElement>>;
927
+ declare const u: TagFunction<HTMLElement, TagProps<HTMLElement>>;
928
+ declare const var_: TagFunction<HTMLElement, TagProps<HTMLElement>>;
929
+ declare const area: TagFunction<HTMLAreaElement, TagProps<HTMLAreaElement>>;
914
930
  declare const audio: TypedTagFunction<AudioProps, HTMLAudioElement>;
915
931
  declare const img: TypedTagFunction<ImgProps, HTMLImageElement>;
916
- declare const map: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
917
- declare const track$1: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
932
+ declare const map: TagFunction<HTMLMapElement, TagProps<HTMLMapElement>>;
933
+ declare const track$1: TagFunction<HTMLTrackElement, TagProps<HTMLTrackElement>>;
918
934
  declare const video: TypedTagFunction<VideoProps, HTMLVideoElement>;
919
- declare const embed: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
920
- declare const iframe: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
921
- declare const object: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
922
- declare const param: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
923
- declare const picture: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
924
- declare const portal: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
925
- declare const source: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
926
- declare const svg: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
927
- declare const math: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
928
- declare const canvas: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
929
- declare const noscript: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
930
- declare const script: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
931
- declare const del: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
932
- declare const ins: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
933
- declare const caption: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
934
- declare const col: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
935
- declare const colgroup: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
936
- declare const table: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
937
- declare const tbody: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
938
- declare const td: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
939
- declare const tfoot: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
940
- declare const th: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
941
- declare const thead: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
942
- declare const tr: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
935
+ declare const embed: TagFunction<HTMLEmbedElement, TagProps<HTMLEmbedElement>>;
936
+ declare const iframe: TagFunction<HTMLIFrameElement, TagProps<HTMLIFrameElement>>;
937
+ declare const object: TagFunction<HTMLObjectElement, TagProps<HTMLObjectElement>>;
938
+ declare const param: TagFunction<HTMLElement, TagProps<HTMLElement>>;
939
+ declare const picture: TagFunction<HTMLPictureElement, TagProps<HTMLPictureElement>>;
940
+ declare const portal: TagFunction<HTMLElement, TagProps<HTMLElement>>;
941
+ declare const source: TagFunction<HTMLSourceElement, TagProps<HTMLSourceElement>>;
942
+ declare const svg: TagFunction<SVGSVGElement, TagProps<SVGSVGElement>>;
943
+ declare const math: TagFunction<HTMLElement, TagProps<HTMLElement>>;
944
+ declare const canvas: TagFunction<HTMLCanvasElement, TagProps<HTMLCanvasElement>>;
945
+ declare const noscript: TagFunction<HTMLElement, TagProps<HTMLElement>>;
946
+ declare const script: TagFunction<HTMLScriptElement, TagProps<HTMLScriptElement>>;
947
+ declare const del: TagFunction<HTMLModElement, TagProps<HTMLModElement>>;
948
+ declare const ins: TagFunction<HTMLModElement, TagProps<HTMLModElement>>;
949
+ declare const caption: TagFunction<HTMLTableCaptionElement, TagProps<HTMLTableCaptionElement>>;
950
+ declare const col: TagFunction<HTMLTableColElement, TagProps<HTMLTableColElement>>;
951
+ declare const colgroup: TagFunction<HTMLTableColElement, TagProps<HTMLTableColElement>>;
952
+ declare const table: TagFunction<HTMLTableElement, TagProps<HTMLTableElement>>;
953
+ declare const tbody: TagFunction<HTMLTableSectionElement, TagProps<HTMLTableSectionElement>>;
954
+ declare const td: TagFunction<HTMLTableCellElement, TagProps<HTMLTableCellElement>>;
955
+ declare const tfoot: TagFunction<HTMLTableSectionElement, TagProps<HTMLTableSectionElement>>;
956
+ declare const th: TagFunction<HTMLTableCellElement, TagProps<HTMLTableCellElement>>;
957
+ declare const thead: TagFunction<HTMLTableSectionElement, TagProps<HTMLTableSectionElement>>;
958
+ declare const tr: TagFunction<HTMLTableRowElement, TagProps<HTMLTableRowElement>>;
943
959
  declare const button: TypedTagFunction<ButtonProps, HTMLButtonElement>;
944
- declare const datalist: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
945
- declare const fieldset: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
960
+ declare const datalist: TagFunction<HTMLDataListElement, TagProps<HTMLDataListElement>>;
961
+ declare const fieldset: TagFunction<HTMLFieldSetElement, TagProps<HTMLFieldSetElement>>;
946
962
  declare const form: TypedTagFunction<FormProps, HTMLFormElement>;
947
963
  declare const input: TypedTagFunction<InputProps, HTMLInputElement>;
948
964
  declare const label: TypedTagFunction<LabelProps, HTMLLabelElement>;
949
- declare const legend: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
950
- declare const meter: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
951
- declare const optgroup: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
965
+ declare const legend: TagFunction<HTMLLegendElement, TagProps<HTMLLegendElement>>;
966
+ declare const meter: TagFunction<HTMLMeterElement, TagProps<HTMLMeterElement>>;
967
+ declare const optgroup: TagFunction<HTMLOptGroupElement, TagProps<HTMLOptGroupElement>>;
952
968
  declare const option: TypedTagFunction<OptionProps, HTMLOptionElement>;
953
- declare const output: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
954
- declare const progress: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
969
+ declare const output: TagFunction<HTMLOutputElement, TagProps<HTMLOutputElement>>;
970
+ declare const progress: TagFunction<HTMLProgressElement, TagProps<HTMLProgressElement>>;
955
971
  declare const select: TypedTagFunction<SelectProps, HTMLSelectElement>;
956
972
  declare const textarea: TypedTagFunction<TextareaProps, HTMLTextAreaElement>;
957
- declare const details: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
958
- declare const dialog: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
959
- declare const menu: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
960
- declare const summary: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
961
- declare const slot: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
962
- declare const template: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
963
- declare const base: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
964
- declare const link: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
965
- declare const meta: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
966
- declare const style: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
967
- declare const circle: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
968
- declare const ellipse: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
969
- declare const g: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
970
- declare const line: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
971
- declare const path: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
972
- declare const polygon: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
973
- declare const polyline: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
974
- declare const rect: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
975
- declare const text: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
976
- declare const tspan: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
977
- declare const defs: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
978
- declare const clipPath: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
979
- declare const mask: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
980
- declare const pattern: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
981
- declare const linearGradient: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
982
- declare const radialGradient: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
983
- declare const stop: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
984
- declare const use: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
985
- declare const symbol: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
986
- declare const marker: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
987
- declare const center: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
988
- declare const font: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
989
- declare const marquee: (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
990
- declare const customElement: (tagName: string) => (first?: TagProps | NodeChildren, second?: NodeChildren) => Element;
973
+ declare const details: TagFunction<HTMLDetailsElement, TagProps<HTMLDetailsElement>>;
974
+ declare const dialog: TagFunction<HTMLDialogElement, TagProps<HTMLDialogElement>>;
975
+ declare const menu: TagFunction<HTMLMenuElement, TagProps<HTMLMenuElement>>;
976
+ declare const summary: TagFunction<HTMLElement, TagProps<HTMLElement>>;
977
+ declare const slot: TagFunction<HTMLSlotElement, TagProps<HTMLSlotElement>>;
978
+ declare const template: TagFunction<HTMLTemplateElement, TagProps<HTMLTemplateElement>>;
979
+ declare const base: TagFunction<HTMLBaseElement, TagProps<HTMLBaseElement>>;
980
+ declare const link: TagFunction<HTMLLinkElement, TagProps<HTMLLinkElement>>;
981
+ declare const meta: TagFunction<HTMLMetaElement, TagProps<HTMLMetaElement>>;
982
+ declare const style: TagFunction<HTMLStyleElement, TagProps<HTMLStyleElement>>;
983
+ declare const circle: TagFunction<SVGCircleElement, TagProps<SVGCircleElement>>;
984
+ declare const ellipse: TagFunction<SVGEllipseElement, TagProps<SVGEllipseElement>>;
985
+ declare const g: TagFunction<SVGGElement, TagProps<SVGGElement>>;
986
+ declare const line: TagFunction<SVGLineElement, TagProps<SVGLineElement>>;
987
+ declare const path: TagFunction<SVGPathElement, TagProps<SVGPathElement>>;
988
+ declare const polygon: TagFunction<SVGPolygonElement, TagProps<SVGPolygonElement>>;
989
+ declare const polyline: TagFunction<SVGPolylineElement, TagProps<SVGPolylineElement>>;
990
+ declare const rect: TagFunction<SVGRectElement, TagProps<SVGRectElement>>;
991
+ declare const text: TagFunction<SVGTextElement, TagProps<SVGTextElement>>;
992
+ declare const tspan: TagFunction<SVGTSpanElement, TagProps<SVGTSpanElement>>;
993
+ declare const defs: TagFunction<SVGDefsElement, TagProps<SVGDefsElement>>;
994
+ declare const clipPath: TagFunction<SVGClipPathElement, TagProps<SVGClipPathElement>>;
995
+ declare const mask: TagFunction<SVGMaskElement, TagProps<SVGMaskElement>>;
996
+ declare const pattern: TagFunction<SVGPatternElement, TagProps<SVGPatternElement>>;
997
+ declare const linearGradient: TagFunction<SVGLinearGradientElement, TagProps<SVGLinearGradientElement>>;
998
+ declare const radialGradient: TagFunction<SVGRadialGradientElement, TagProps<SVGRadialGradientElement>>;
999
+ declare const stop: TagFunction<SVGStopElement, TagProps<SVGStopElement>>;
1000
+ declare const use: TagFunction<SVGUseElement, TagProps<SVGUseElement>>;
1001
+ declare const symbol: TagFunction<SVGSymbolElement, TagProps<SVGSymbolElement>>;
1002
+ declare const marker: TagFunction<SVGMarkerElement, TagProps<SVGMarkerElement>>;
1003
+ declare const center: TagFunction<HTMLElement, TagProps<HTMLElement>>;
1004
+ declare const font: TagFunction<HTMLElement, TagProps<HTMLElement>>;
1005
+ declare const marquee: TagFunction<HTMLElement, TagProps<HTMLElement>>;
1006
+ declare const customElement: (tagName: string) => TagFunction<HTMLElement, TagProps<HTMLElement>>;
991
1007
 
992
1008
  /**
993
1009
  * Options for KeepAlive.
@@ -1037,10 +1053,6 @@ declare function KeepAlive(activeKey: () => string, cases: Record<string, () =>
1037
1053
  * @returns The pending error, or `undefined` when there is none.
1038
1054
  */
1039
1055
  declare function takePendingError(node: Element): Error | undefined;
1040
- type Component = () => HTMLElement;
1041
- type LazyImport = () => Promise<{
1042
- default: Component;
1043
- }>;
1044
1056
  /**
1045
1057
  * lazy() enables code-splitting by deferring the import of a component
1046
1058
  * until it is first rendered. Returns a wrapper component that shows a
@@ -1060,10 +1072,16 @@ type LazyImport = () => Promise<{
1060
1072
  * LazyDashboard();
1061
1073
  * ```
1062
1074
  *
1075
+ * The returned component renders either the loading container (a `div`) or,
1076
+ * once loaded, the component's own root — its return type is the union, so an
1077
+ * SVG component stays usable without a cast.
1078
+ *
1063
1079
  * @param importFn Dynamic import function returning `{ default: Component }`
1064
1080
  * @returns A component function that lazy-loads on first call
1065
1081
  */
1066
- declare function lazy(importFn: LazyImport): Component;
1082
+ declare function lazy<R extends Node = HTMLElement>(importFn: () => Promise<{
1083
+ default: Component<void, R>;
1084
+ }>): Component<void, R | HTMLDivElement>;
1067
1085
  /**
1068
1086
  * Suspense provides a fallback UI while lazy or async nodes are loading.
1069
1087
  *
@@ -1077,11 +1095,13 @@ declare function lazy(importFn: LazyImport): Component;
1077
1095
  *
1078
1096
  * @param props.nodes Function that returns the async/lazy component
1079
1097
  * @param props.fallback Function that returns the loading UI
1080
- * @returns An HTMLElement that swaps from fallback to content when ready
1098
+ * @returns A container element that swaps from fallback to content when ready
1081
1099
  */
1082
1100
  interface SuspenseProps {
1083
- nodes: () => HTMLElement;
1084
- fallback: () => HTMLElement;
1101
+ /** The content's root must be an element (HTML or SVG): its loading state is read from it. */
1102
+ nodes: () => Element;
1103
+ /** Any node, including a text node or fragment. */
1104
+ fallback: () => Node;
1085
1105
  }
1086
1106
  /**
1087
1107
  * Render `fallback` until the async `nodes` factory resolves, then swap it for
@@ -1095,7 +1115,7 @@ interface SuspenseProps {
1095
1115
  * the fallback are discarded. That is usually harmless (a spinner rarely holds
1096
1116
  * focus) but matters for a skeleton form; see the note on `when`.
1097
1117
  */
1098
- declare function Suspense({ nodes, fallback }: SuspenseProps): HTMLElement;
1118
+ declare function Suspense({ nodes, fallback }: SuspenseProps): HTMLDivElement;
1099
1119
 
1100
1120
  /**
1101
1121
  * Lifecycle hooks for SibuJS components.
@@ -1128,18 +1148,18 @@ type CleanupFn = () => void;
1128
1148
  * (if you also use onUnmount, prefer that for explicit cleanup).
1129
1149
  *
1130
1150
  * @param callback Function to run after mount. May return a cleanup function.
1131
- * @param element Optional element to observe; if provided, waits until it's connected.
1151
+ * @param element Optional element to observe (HTML or SVG); if provided, waits until it's connected.
1132
1152
  */
1133
- declare function onMount(callback: () => undefined | CleanupFn, element?: HTMLElement): void;
1153
+ declare function onMount(callback: () => undefined | CleanupFn, element?: Element): void;
1134
1154
  /**
1135
1155
  * Runs a callback when the given element is removed from the DOM.
1136
1156
  * Uses a shared MutationObserver to watch for disconnection, plus
1137
1157
  * `registerDisposer` so explicit dispose() paths also trigger the callback.
1138
1158
  *
1139
1159
  * @param callback Function to run on unmount
1140
- * @param element The element to watch for removal
1160
+ * @param element The element to watch for removal (HTML or SVG)
1141
1161
  */
1142
- declare function onUnmount(callback: CleanupFn, element: HTMLElement): void;
1162
+ declare function onUnmount(callback: CleanupFn, element: Element): void;
1143
1163
  /**
1144
1164
  * Register a cleanup callback that runs when the given element is disposed.
1145
1165
  * Integrates with `when()`, `match()`, and `each()` which call `dispose()`
@@ -1162,14 +1182,25 @@ declare function onCleanup(callback: CleanupFn, element: Node): void;
1162
1182
 
1163
1183
  /**
1164
1184
  * Mounts a root component into a DOM element.
1165
- * Supports both function components and pre-created HTMLElements.
1185
+ * Supports both function components and pre-created nodes.
1186
+ *
1187
+ * A component function runs as a render transaction: if it throws — or the
1188
+ * append fails — every binding and listener it registered is released before
1189
+ * the error reaches the caller, so a failed mount leaves nothing subscribed.
1190
+ * A pre-built node belongs to its caller and is never rolled back.
1191
+ *
1192
+ * A `DocumentFragment` root (from `Fragment()`) empties itself into the
1193
+ * container, so the mount tracks the range it filled instead: `unmount()`
1194
+ * disposes and removes everything in that range, including nodes a reactive
1195
+ * child rendered after mounting.
1166
1196
  *
1167
- * @param component Component function, or an already-built Element/Node.
1197
+ * @param component Component function (any root node, HTML or SVG element or
1198
+ * fragment), or an already-built Element/Node.
1168
1199
  * @param container Element to mount into.
1169
1200
  * @returns `{ node, unmount }` — the live root node, and a teardown that
1170
1201
  * disposes the tree and removes it.
1171
1202
  */
1172
- declare function mount(component: (() => Element) | Element | Node, container: Element | null): {
1203
+ declare function mount(component: Component<void, Node> | Node, container: Element | null): {
1173
1204
  node: Node;
1174
1205
  unmount: () => void;
1175
1206
  };
@@ -1182,7 +1213,8 @@ declare function mount(component: (() => Element) | Element | Node, container: E
1182
1213
  * are properly torn down when the anchor is disposed by `when()`, `match()`,
1183
1214
  * `each()`, or manual `dispose(anchor)`.
1184
1215
  *
1185
- * @param nodes Function that returns the content to render
1216
+ * @param nodes Function that returns the content to render — any element,
1217
+ * HTML or SVG (a `Component` fits)
1186
1218
  * @param target Target DOM element (defaults to document.body)
1187
1219
  * @returns A Comment anchor node in the original position
1188
1220
  *
@@ -1196,7 +1228,7 @@ declare function mount(component: (() => Element) | Element | Node, container: E
1196
1228
  * Portal(() => div("Tooltip"), overlay);
1197
1229
  * ```
1198
1230
  */
1199
- declare function Portal(nodes: () => HTMLElement, target?: HTMLElement): Comment;
1231
+ declare function Portal(nodes: () => Element, target?: Element): Comment;
1200
1232
 
1201
1233
  type SlotFn = () => Element | string | number | null | undefined;
1202
1234
  type Slots = Record<string, SlotFn>;
@@ -1206,6 +1238,8 @@ type Slots = Record<string, SlotFn>;
1206
1238
  * @param slots The slot map, which may be undefined.
1207
1239
  * @param name Slot name; defaults to `"default"`.
1208
1240
  * @returns The slot factory, or `undefined` when the slot was not provided.
1241
+ * Only an OWN function-valued entry counts: an inherited member such as
1242
+ * `toString` or `constructor` is not a slot, so fallback content renders.
1209
1243
  */
1210
1244
  declare function getSlot(slots: Slots | undefined, name?: string): SlotFn | undefined;
1211
1245
 
@@ -1597,6 +1631,13 @@ declare function writable<T>(get: () => T, set: (value: T) => void, options?: {
1597
1631
  interface SSRStore {
1598
1632
  ssr: boolean;
1599
1633
  suspenseIdCounter: number;
1634
+ /**
1635
+ * `createId()` counter for this request. Request-scoped for the same reason
1636
+ * as `suspenseIdCounter`: a server render's ids must not depend on earlier or
1637
+ * concurrent requests, and must match a fresh client's sequence. Optional so
1638
+ * stores created elsewhere start it lazily at 0.
1639
+ */
1640
+ idCounter?: number;
1600
1641
  /**
1601
1642
  * Per-request data caches (e.g. the query cache). Lazily created and keyed
1602
1643
  * by subsystem so request-scoped data never bleeds between concurrent
@@ -2045,7 +2086,8 @@ interface TransitionState {
2045
2086
  * and avoids the complexity of an interruptible reconciler.
2046
2087
  *
2047
2088
  * Async callbacks are supported: `pending()` stays `true` until the
2048
- * returned promise resolves OR rejects.
2089
+ * returned promise resolves OR rejects. With overlapping `start()` calls it
2090
+ * stays `true` until every one of them has settled.
2049
2091
  *
2050
2092
  * @example
2051
2093
  * ```ts
@@ -2179,4 +2221,4 @@ declare const untracked: ReactiveApi["untracked"];
2179
2221
  declare const retrack: ReactiveApi["retrack"];
2180
2222
  declare const setMaxDrainIterations: ReactiveApi["setMaxDrainIterations"];
2181
2223
 
2182
- export { Accessor, type ActionFn, type AnchorProps, type ArrayActions, type AsyncDerivedContext, type AsyncDerivedState, type AudioProps, type ButtonProps, type Context, DerivedAccessor, DynamicComponent, type EachBindings, type EachEventBindings, type EffectBody, type EffectOptions, type EnhanceContext, type EnhanceSetup, ErrorBoundary, type ErrorBoundaryOptions, type ErrorBoundaryProps, ErrorDisplay, type ErrorDisplayProps, type ErrorSeverity, type FormProps, Fragment, type ImgProps, type InputProps, type InputType, type IslandLoader, type IslandRegistration, type IslandStrategy, KeepAlive, type KeepAliveOptions, type LabelProps, type LazyIslandLoader, Loading, type LoadingProps, type LongPressOptions, MAX_DRAIN_TEARDOWNS, type MediaProps, type MountIslandsOptions, NodeChild, NodeChildren, type OnCleanup, type OptionProps, Portal, type Ref, type RuntimeErrorContext, type RuntimeErrorHandler, type RuntimeErrorPhase, type SSRStore, type SelectProps, type SlotFn, type Slots, type StoreActions, Suspense, type SuspenseProps, TagProps, type TextareaProps, type TypedTagFunction, type VideoProps, __resetIdCounter, a, abbr, action, address, area, array, article, aside, asyncDerived, audio, autoResize, b, base, batch, bdi, bdo, bindDynamic, blockquote, body, br, button, canvas, caption, catchError, catchErrorAsync, center, checkLeaks, circle, cite, clickOutside, clipPath, code, col, colgroup, context, copyOnClick, createId, customElement, data, datalist, dd, deepEqual, deepSignal, defer, defs, del, details, dfn, dialog, disableSSR, dispose, div, dl, dt, each, effect, ellipse, em, embed, enableSSR, enhance, enhanceAll, enqueueBatchedSignal, fieldset, figcaption, figure, font, footer, form, g, getAction, getRequestScopedCache, getRuntimeErrorHandler, getSSRStore, getSlot, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, iframe, img, input, ins, isBatching, isSSR, kbd, label, lazy, lazyIsland, legend, li, line, linearGradient, link, longPress, main, map, mark, marker, marquee, mask, match, math, menu, meta, meter, mount, mountIslands, nav, nextTick, noscript, object, ol, on, onCleanup, onMount, onUnmount, optgroup, option, output, p, param, path, pattern, picture, polygon, polyline, portal, pre, progress, q, radialGradient, reactiveArray, rect, ref, registerAction, registerComponent, registerDisposer, registerIsland, replaceChildrenSafely, reportDrainRunaway, reportError, resolveComponent, retrack, rp, rt, ruby, runInSSRContext, s, samp, script, section, select, setGlobalErrorHandler, setMaxDrainIterations, setRuntimeErrorHandler, show, slot, small, source, span, stop, store, strict, strictEffect, strong, style, sub, summary, sup, svg, symbol, table, takePendingError, tbody, td, template, text, textarea, tfoot, th, thead, time, title, tr, track$1 as track, transition, trapFocus, tspan, u, ul, unregisterComponent, unregisterDisposer, unregisterIsland, untracked, use, var_, video, watch, when, withSSR, writable };
2224
+ export { Accessor, type ActionFn, type AnchorProps, type ArrayActions, type AsyncDerivedContext, type AsyncDerivedState, type AudioProps, type ButtonProps, Component, type Context, DerivedAccessor, DynamicComponent, type EachBindings, type EachEventBindings, type EffectBody, type EffectOptions, type EnhanceContext, type EnhanceSetup, ErrorBoundary, type ErrorBoundaryOptions, type ErrorBoundaryProps, ErrorDisplay, type ErrorDisplayProps, type ErrorSeverity, type FormProps, Fragment, type ImgProps, type InputProps, type InputType, type IslandLoader, type IslandRegistration, type IslandStrategy, KeepAlive, type KeepAliveOptions, type LabelProps, type LazyIslandLoader, Loading, type LoadingProps, type LongPressOptions, MAX_DRAIN_TEARDOWNS, type MediaProps, type MountIslandsOptions, NodeChild, NodeChildren, type OnCleanup, type OptionProps, Portal, type Ref, type RuntimeErrorContext, type RuntimeErrorHandler, type RuntimeErrorPhase, type SSRStore, type SelectProps, type SlotFn, type Slots, type StoreActions, Suspense, type SuspenseProps, TagFunction, TagProps, type TextareaProps, type TypedTagFunction, type VideoProps, __resetIdCounter, a, abbr, action, address, area, array, article, aside, asyncDerived, audio, autoResize, b, base, batch, bdi, bdo, bindDynamic, blockquote, body, br, button, canvas, caption, catchError, catchErrorAsync, center, checkLeaks, circle, cite, clickOutside, clipPath, code, col, colgroup, context, copyOnClick, createId, customElement, data, datalist, dd, deepEqual, deepSignal, defer, defs, del, details, dfn, dialog, disableSSR, dispose, div, dl, dt, each, effect, ellipse, em, embed, enableSSR, enhance, enhanceAll, enqueueBatchedSignal, fieldset, figcaption, figure, font, footer, form, g, getAction, getRequestScopedCache, getRuntimeErrorHandler, getSSRStore, getSlot, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, iframe, img, input, ins, isBatching, isSSR, kbd, label, lazy, lazyIsland, legend, li, line, linearGradient, link, longPress, main, map, mark, marker, marquee, mask, match, math, menu, meta, meter, mount, mountIslands, nav, nextTick, noscript, object, ol, on, onCleanup, onMount, onUnmount, optgroup, option, output, p, param, path, pattern, picture, polygon, polyline, portal, pre, progress, q, radialGradient, reactiveArray, rect, ref, registerAction, registerComponent, registerDisposer, registerIsland, replaceChildrenSafely, reportDrainRunaway, reportError, resolveComponent, retrack, rp, rt, ruby, runInSSRContext, s, samp, script, section, select, setGlobalErrorHandler, setMaxDrainIterations, setRuntimeErrorHandler, show, slot, small, source, span, stop, store, strict, strictEffect, strong, style, sub, summary, sup, svg, symbol, table, takePendingError, tbody, td, template, text, textarea, tfoot, th, thead, time, title, tr, track$1 as track, transition, trapFocus, tspan, u, ul, unregisterComponent, unregisterDisposer, unregisterIsland, untracked, use, var_, video, watch, when, withSSR, writable };