sibujs 4.7.0 → 4.8.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 (81) hide show
  1. package/dist/browser.cjs +45 -4
  2. package/dist/browser.d.cts +23 -0
  3. package/dist/browser.d.ts +23 -0
  4. package/dist/browser.js +6 -5
  5. package/dist/build.cjs +513 -78
  6. package/dist/build.d.cts +22 -8
  7. package/dist/build.d.ts +22 -8
  8. package/dist/build.js +68 -21
  9. package/dist/cdn.dev.global.js +15 -13
  10. package/dist/cdn.full.dev.global.js +15 -13
  11. package/dist/cdn.full.global.js +14 -12
  12. package/dist/cdn.global.js +14 -12
  13. package/dist/chunk-3ACAAQIN.js +224 -0
  14. package/dist/{chunk-DKXRACVN.js → chunk-44MTL7ED.js} +6 -6
  15. package/dist/{chunk-3QWBSL5R.js → chunk-4WMSTZ7J.js} +8 -5
  16. package/dist/{chunk-H3SRKIYX.js → chunk-62BDYGAG.js} +8 -0
  17. package/dist/{chunk-BSY63EM6.js → chunk-C5PEWEGH.js} +20 -5
  18. package/dist/{chunk-BC2SECJD.js → chunk-C7AA2CZX.js} +1 -1
  19. package/dist/{chunk-SLM3IA34.js → chunk-CZPRSWSS.js} +1 -1
  20. package/dist/{chunk-FQRUXCEE.js → chunk-DSID757X.js} +1 -1
  21. package/dist/{chunk-ZVL7TY4K.js → chunk-EGUQLBHE.js} +22 -8
  22. package/dist/{chunk-2INLLLMZ.js → chunk-EXXSN3BW.js} +202 -26
  23. package/dist/{chunk-HURREPU2.js → chunk-FC6KCJSA.js} +87 -150
  24. package/dist/{chunk-Z3OHK6QT.js → chunk-GSGNX35Q.js} +5 -5
  25. package/dist/{chunk-XYV3EDB7.js → chunk-J3YQ457H.js} +37 -20
  26. package/dist/{chunk-VZSG24LS.js → chunk-JUTFX2RM.js} +18 -10
  27. package/dist/{chunk-RUSSKG6G.js → chunk-KJ3UKABJ.js} +1 -1
  28. package/dist/{chunk-UNWRJRKC.js → chunk-LI4W3U6C.js} +1 -1
  29. package/dist/{chunk-FNJXNGYZ.js → chunk-O6TRVMJI.js} +58 -6
  30. package/dist/{chunk-7LUJQAOJ.js → chunk-Q5J2LVKH.js} +1 -1
  31. package/dist/{chunk-4AWA2PVD.js → chunk-QGMSESDD.js} +10 -5
  32. package/dist/{chunk-XZR4PXRE.js → chunk-RGLPEBDE.js} +13 -10
  33. package/dist/{chunk-JWKYU5GV.js → chunk-TQQUN4WR.js} +1 -1
  34. package/dist/{chunk-WOLJZUFQ.js → chunk-UCNP3HVM.js} +12 -8
  35. package/dist/{chunk-WEQ3DMVL.js → chunk-V3LHZSU5.js} +1 -1
  36. package/dist/{chunk-UOL2ECCS.js → chunk-VWT3VXPL.js} +18 -12
  37. package/dist/{chunk-2BPG2XDA.js → chunk-ZVLHNEEL.js} +17 -35
  38. package/dist/{customElement-MmInOW1U.d.ts → customElement-pYDKUzWl.d.cts} +11 -3
  39. package/dist/{customElement-MmInOW1U.d.cts → customElement-pYDKUzWl.d.ts} +11 -3
  40. package/dist/data.cjs +9 -2
  41. package/dist/data.js +6 -6
  42. package/dist/devtools.cjs +1 -1
  43. package/dist/devtools.js +5 -5
  44. package/dist/ecosystem.cjs +400 -37
  45. package/dist/ecosystem.js +9 -8
  46. package/dist/extras.cjs +621 -252
  47. package/dist/extras.d.cts +2 -2
  48. package/dist/extras.d.ts +2 -2
  49. package/dist/extras.js +24 -23
  50. package/dist/index.cjs +464 -70
  51. package/dist/index.d.cts +28 -2
  52. package/dist/index.d.ts +28 -2
  53. package/dist/index.js +16 -12
  54. package/dist/motion.cjs +1 -1
  55. package/dist/motion.js +3 -3
  56. package/dist/patterns.cjs +10 -7
  57. package/dist/patterns.js +6 -6
  58. package/dist/performance.cjs +31 -2
  59. package/dist/performance.d.cts +12 -2
  60. package/dist/performance.d.ts +12 -2
  61. package/dist/performance.js +8 -6
  62. package/dist/plugins.cjs +558 -231
  63. package/dist/plugins.d.cts +8 -3
  64. package/dist/plugins.d.ts +8 -3
  65. package/dist/plugins.js +22 -28
  66. package/dist/{ssr-XOTUASDO.js → ssr-5OWAH3U2.js} +4 -2
  67. package/dist/{ssr-Bli9XRW5.d.ts → ssr-C8hgIAw7.d.cts} +6 -0
  68. package/dist/{ssr-Bli9XRW5.d.cts → ssr-C8hgIAw7.d.ts} +6 -0
  69. package/dist/ssr.cjs +457 -131
  70. package/dist/ssr.d.cts +55 -5
  71. package/dist/ssr.d.ts +55 -5
  72. package/dist/ssr.js +11 -9
  73. package/dist/testing.cjs +3 -3
  74. package/dist/testing.js +4 -4
  75. package/dist/ui.cjs +608 -240
  76. package/dist/ui.d.cts +1 -1
  77. package/dist/ui.d.ts +1 -1
  78. package/dist/ui.js +9 -8
  79. package/dist/widgets.cjs +1 -1
  80. package/dist/widgets.js +7 -7
  81. package/package.json +5 -4
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { T as TagProps, a as TagFunction, D as DerivedAccessor } from './tagFact
4
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
5
  import { A as Accessor } from './signal-EotCj4hS.cjs';
6
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';
7
+ export { T as TrustedHTML, t as trustHTML } from './ssr-C8hgIAw7.cjs';
8
8
  import { R as ReactiveSignal } from './signal-BnWpq6WB.cjs';
9
9
 
10
10
  interface ErrorBoundaryOptions {
@@ -741,6 +741,25 @@ declare function Fragment(nodes: NodeChildren[]): DocumentFragment;
741
741
  * string, and not a virtual node.
742
742
  */
743
743
  declare function html(strings: TemplateStringsArray, ...values: unknown[]): Element;
744
+ /**
745
+ * Render a template the build-time compiler has ALREADY PARSED. Internal: the
746
+ * entry point compiled `html` templates call, not an API for applications.
747
+ *
748
+ * The compiler emits most templates as straight-line DOM code. Some it cannot
749
+ * reproduce exactly — an expression on `value` / `checked`, a top-level
750
+ * `${expr}`, a `<meta>`, a static `srcdoc` — and those used to be left to this
751
+ * module's parser at runtime. Passing the tree the compiler's line-for-line
752
+ * port of that parser produced to the runtime's own executor compiles them too,
753
+ * with output identical to the runtime BY CONSTRUCTION: it is the runtime.
754
+ *
755
+ * TRUST BOUNDARY: `tree` is template SOURCE. Its tag names and static
756
+ * attributes are treated exactly like text typed into an `html` template, so it
757
+ * must only ever be a constant the compiler emitted — never data built at
758
+ * runtime. Interpolated `values` keep the runtime policy.
759
+ *
760
+ * @internal
761
+ */
762
+ declare function __renderParsedTemplate(tree: readonly unknown[], values: unknown[]): Element;
744
763
 
745
764
  type reactive<T> = T | (() => T);
746
765
  interface AnchorProps extends TagProps<HTMLAnchorElement> {
@@ -979,6 +998,13 @@ declare const template: TagFunction<HTMLTemplateElement, TagProps<HTMLTemplateEl
979
998
  declare const base: TagFunction<HTMLBaseElement, TagProps<HTMLBaseElement>>;
980
999
  declare const link: TagFunction<HTMLLinkElement, TagProps<HTMLLinkElement>>;
981
1000
  declare const meta: TagFunction<HTMLMetaElement, TagProps<HTMLMetaElement>>;
1001
+ /**
1002
+ * `<style>`. Its text is STYLESHEET SOURCE, applied unsanitized exactly like a
1003
+ * stylesheet shipped with the application — a trust boundary, since a tag
1004
+ * factory cannot tell a literal from runtime data. For CSS that comes from
1005
+ * runtime data use `scopedStyle()` (sanitized stylesheet text) or `style` props
1006
+ * (sanitized per declaration).
1007
+ */
982
1008
  declare const style: TagFunction<HTMLStyleElement, TagProps<HTMLStyleElement>>;
983
1009
  declare const circle: TagFunction<SVGCircleElement, TagProps<SVGCircleElement>>;
984
1010
  declare const ellipse: TagFunction<SVGEllipseElement, TagProps<SVGEllipseElement>>;
@@ -2221,4 +2247,4 @@ declare const untracked: ReactiveApi["untracked"];
2221
2247
  declare const retrack: ReactiveApi["retrack"];
2222
2248
  declare const setMaxDrainIterations: ReactiveApi["setMaxDrainIterations"];
2223
2249
 
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 };
2250
+ 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, __renderParsedTemplate, __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 };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { T as TagProps, a as TagFunction, D as DerivedAccessor } from './tagFact
4
4
  export { S as SVG_NS, b as StyleMap, c as StyleObject, d as TagEventHandlers, e as derived, t as tagFactory } from './tagFactory-BL2fymez.js';
5
5
  import { A as Accessor } from './signal-EotCj4hS.js';
6
6
  export { D as DisposableAccessor, E as ExternalSource, S as SignalOptions, e as external, s as signal } from './signal-EotCj4hS.js';
7
- export { T as TrustedHTML, t as trustHTML } from './ssr-Bli9XRW5.js';
7
+ export { T as TrustedHTML, t as trustHTML } from './ssr-C8hgIAw7.js';
8
8
  import { R as ReactiveSignal } from './signal-BnWpq6WB.js';
9
9
 
10
10
  interface ErrorBoundaryOptions {
@@ -741,6 +741,25 @@ declare function Fragment(nodes: NodeChildren[]): DocumentFragment;
741
741
  * string, and not a virtual node.
742
742
  */
743
743
  declare function html(strings: TemplateStringsArray, ...values: unknown[]): Element;
744
+ /**
745
+ * Render a template the build-time compiler has ALREADY PARSED. Internal: the
746
+ * entry point compiled `html` templates call, not an API for applications.
747
+ *
748
+ * The compiler emits most templates as straight-line DOM code. Some it cannot
749
+ * reproduce exactly — an expression on `value` / `checked`, a top-level
750
+ * `${expr}`, a `<meta>`, a static `srcdoc` — and those used to be left to this
751
+ * module's parser at runtime. Passing the tree the compiler's line-for-line
752
+ * port of that parser produced to the runtime's own executor compiles them too,
753
+ * with output identical to the runtime BY CONSTRUCTION: it is the runtime.
754
+ *
755
+ * TRUST BOUNDARY: `tree` is template SOURCE. Its tag names and static
756
+ * attributes are treated exactly like text typed into an `html` template, so it
757
+ * must only ever be a constant the compiler emitted — never data built at
758
+ * runtime. Interpolated `values` keep the runtime policy.
759
+ *
760
+ * @internal
761
+ */
762
+ declare function __renderParsedTemplate(tree: readonly unknown[], values: unknown[]): Element;
744
763
 
745
764
  type reactive<T> = T | (() => T);
746
765
  interface AnchorProps extends TagProps<HTMLAnchorElement> {
@@ -979,6 +998,13 @@ declare const template: TagFunction<HTMLTemplateElement, TagProps<HTMLTemplateEl
979
998
  declare const base: TagFunction<HTMLBaseElement, TagProps<HTMLBaseElement>>;
980
999
  declare const link: TagFunction<HTMLLinkElement, TagProps<HTMLLinkElement>>;
981
1000
  declare const meta: TagFunction<HTMLMetaElement, TagProps<HTMLMetaElement>>;
1001
+ /**
1002
+ * `<style>`. Its text is STYLESHEET SOURCE, applied unsanitized exactly like a
1003
+ * stylesheet shipped with the application — a trust boundary, since a tag
1004
+ * factory cannot tell a literal from runtime data. For CSS that comes from
1005
+ * runtime data use `scopedStyle()` (sanitized stylesheet text) or `style` props
1006
+ * (sanitized per declaration).
1007
+ */
982
1008
  declare const style: TagFunction<HTMLStyleElement, TagProps<HTMLStyleElement>>;
983
1009
  declare const circle: TagFunction<SVGCircleElement, TagProps<SVGCircleElement>>;
984
1010
  declare const ellipse: TagFunction<SVGEllipseElement, TagProps<SVGEllipseElement>>;
@@ -2221,4 +2247,4 @@ declare const untracked: ReactiveApi["untracked"];
2221
2247
  declare const retrack: ReactiveApi["retrack"];
2222
2248
  declare const setMaxDrainIterations: ReactiveApi["setMaxDrainIterations"];
2223
2249
 
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 };
2250
+ 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, __renderParsedTemplate, __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 };
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  Loading,
8
8
  Portal,
9
9
  Suspense,
10
+ __renderParsedTemplate,
10
11
  action,
11
12
  array,
12
13
  asyncDerived,
@@ -53,7 +54,7 @@ import {
53
54
  unregisterIsland,
54
55
  when,
55
56
  writable
56
- } from "./chunk-XYV3EDB7.js";
57
+ } from "./chunk-J3YQ457H.js";
57
58
  import {
58
59
  a,
59
60
  abbr,
@@ -191,33 +192,35 @@ import {
191
192
  use,
192
193
  var_,
193
194
  video
194
- } from "./chunk-7LUJQAOJ.js";
195
+ } from "./chunk-Q5J2LVKH.js";
195
196
  import {
196
197
  trustHTML
197
- } from "./chunk-HURREPU2.js";
198
+ } from "./chunk-FC6KCJSA.js";
198
199
  import {
199
200
  watch
200
- } from "./chunk-SLM3IA34.js";
201
+ } from "./chunk-CZPRSWSS.js";
201
202
  import {
202
203
  __resetIdCounter,
203
204
  createId
204
- } from "./chunk-BC2SECJD.js";
205
+ } from "./chunk-C7AA2CZX.js";
206
+ import "./chunk-62BDYGAG.js";
205
207
  import {
206
208
  SVG_NS,
207
209
  tagFactory
208
- } from "./chunk-UOL2ECCS.js";
210
+ } from "./chunk-VWT3VXPL.js";
209
211
  import {
210
212
  bindDynamic
211
- } from "./chunk-FNJXNGYZ.js";
213
+ } from "./chunk-O6TRVMJI.js";
214
+ import "./chunk-3ACAAQIN.js";
212
215
  import {
213
216
  derived
214
- } from "./chunk-RUSSKG6G.js";
215
- import "./chunk-2INLLLMZ.js";
217
+ } from "./chunk-KJ3UKABJ.js";
216
218
  import "./chunk-7ZHH77QA.js";
217
219
  import {
218
220
  effect,
219
221
  on
220
- } from "./chunk-WEQ3DMVL.js";
222
+ } from "./chunk-V3LHZSU5.js";
223
+ import "./chunk-EXXSN3BW.js";
221
224
  import {
222
225
  disableSSR,
223
226
  enableSSR,
@@ -234,12 +237,12 @@ import {
234
237
  external,
235
238
  isBatching,
236
239
  signal
237
- } from "./chunk-FQRUXCEE.js";
240
+ } from "./chunk-DSID757X.js";
238
241
  import {
239
242
  retrack,
240
243
  setMaxDrainIterations,
241
244
  untracked
242
- } from "./chunk-JWKYU5GV.js";
245
+ } from "./chunk-TQQUN4WR.js";
243
246
  import {
244
247
  MAX_DRAIN_TEARDOWNS,
245
248
  checkLeaks,
@@ -263,6 +266,7 @@ export {
263
266
  Portal,
264
267
  SVG_NS,
265
268
  Suspense,
269
+ __renderParsedTemplate,
266
270
  __resetIdCounter,
267
271
  a,
268
272
  abbr,
package/dist/motion.cjs CHANGED
@@ -761,7 +761,7 @@ function forEachSubscriber(signal2, visit) {
761
761
  }
762
762
 
763
763
  // src/reactivity/track.ts
764
- var _runtimeVersion = true ? "4.7.0" : "dev";
764
+ var _runtimeVersion = true ? "4.8.0" : "dev";
765
765
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
766
766
  function resolveReactiveApi() {
767
767
  const g = globalThis;
package/dist/motion.js CHANGED
@@ -20,10 +20,10 @@ import {
20
20
  stagger,
21
21
  transition,
22
22
  viewTransition
23
- } from "./chunk-UNWRJRKC.js";
23
+ } from "./chunk-LI4W3U6C.js";
24
24
  import "./chunk-5HZXGZ6T.js";
25
- import "./chunk-FQRUXCEE.js";
26
- import "./chunk-JWKYU5GV.js";
25
+ import "./chunk-DSID757X.js";
26
+ import "./chunk-TQQUN4WR.js";
27
27
  import "./chunk-NYNYSPK7.js";
28
28
  export {
29
29
  TransitionGroup,
package/dist/patterns.cjs CHANGED
@@ -657,7 +657,7 @@ function forEachSubscriber(signal2, visit) {
657
657
  }
658
658
 
659
659
  // src/reactivity/track.ts
660
- var _runtimeVersion = true ? "4.7.0" : "dev";
660
+ var _runtimeVersion = true ? "4.8.0" : "dev";
661
661
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
662
662
  function resolveReactiveApi() {
663
663
  const g = globalThis;
@@ -856,6 +856,9 @@ function stripUnsafeKeys(obj) {
856
856
  }
857
857
 
858
858
  // src/patterns/machine.ts
859
+ function ownEntry(table, key) {
860
+ return Object.hasOwn(table, key) ? table[key] : void 0;
861
+ }
859
862
  function machine(config) {
860
863
  const [state2, setState] = signal(config.initial);
861
864
  const [context, setContext] = signal(config.context || {});
@@ -877,9 +880,9 @@ function machine(config) {
877
880
  }
878
881
  }
879
882
  function step(event) {
880
- const stateDef = config.states[currentState];
883
+ const stateDef = ownEntry(config.states, currentState);
881
884
  if (!stateDef?.on) return;
882
- const transition = stateDef.on[event];
885
+ const transition = ownEntry(stateDef.on, event);
883
886
  if (!transition) return;
884
887
  let target;
885
888
  let guard;
@@ -907,7 +910,7 @@ function machine(config) {
907
910
  if (action) setContext(nextContext);
908
911
  setState(target);
909
912
  });
910
- const targetDef = config.states[target];
913
+ const targetDef = ownEntry(config.states, target);
911
914
  if (targetDef?.entry) {
912
915
  targetDef.entry(currentContext);
913
916
  }
@@ -917,7 +920,7 @@ function machine(config) {
917
920
  if (processing) return;
918
921
  drain();
919
922
  }
920
- const initialDef = config.states[config.initial];
923
+ const initialDef = ownEntry(config.states, config.initial);
921
924
  if (initialDef?.entry) {
922
925
  processing = true;
923
926
  try {
@@ -935,9 +938,9 @@ function machine(config) {
935
938
  }
936
939
  function can(event) {
937
940
  const currentState2 = state2();
938
- const stateDef = config.states[currentState2];
941
+ const stateDef = ownEntry(config.states, currentState2);
939
942
  if (!stateDef?.on) return false;
940
- const transition = stateDef.on[event];
943
+ const transition = ownEntry(stateDef.on, event);
941
944
  if (!transition) return false;
942
945
  if (typeof transition === "string") return true;
943
946
  if (transition.guard) {
package/dist/patterns.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  optimisticList,
6
6
  persisted,
7
7
  timeline
8
- } from "./chunk-XZR4PXRE.js";
8
+ } from "./chunk-RGLPEBDE.js";
9
9
  import {
10
10
  RenderProp,
11
11
  assertType,
@@ -22,12 +22,12 @@ import {
22
22
  withProps,
23
23
  withWrapper
24
24
  } from "./chunk-TUCPL2HB.js";
25
- import "./chunk-H3SRKIYX.js";
26
- import "./chunk-RUSSKG6G.js";
27
- import "./chunk-WEQ3DMVL.js";
25
+ import "./chunk-62BDYGAG.js";
26
+ import "./chunk-KJ3UKABJ.js";
27
+ import "./chunk-V3LHZSU5.js";
28
28
  import "./chunk-7XHATCIH.js";
29
- import "./chunk-FQRUXCEE.js";
30
- import "./chunk-JWKYU5GV.js";
29
+ import "./chunk-DSID757X.js";
30
+ import "./chunk-TQQUN4WR.js";
31
31
  import "./chunk-NYNYSPK7.js";
32
32
  export {
33
33
  RenderProp,
@@ -923,7 +923,7 @@ function forEachSubscriber(signal2, visit) {
923
923
  }
924
924
 
925
925
  // src/reactivity/track.ts
926
- var _runtimeVersion = true ? "4.7.0" : "dev";
926
+ var _runtimeVersion = true ? "4.8.0" : "dev";
927
927
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
928
928
  function resolveReactiveApi() {
929
929
  const g = globalThis;
@@ -1321,12 +1321,20 @@ function uniqueId(suffix) {
1321
1321
  function stripControlChars(value) {
1322
1322
  return value.replace(/[\x00-\x20\x7f-\x9f]+/g, "");
1323
1323
  }
1324
+ var ASCII_UPPER = /[A-Z]/;
1325
+ var ASCII_UPPER_G = /[A-Z]/g;
1326
+ function canonicalAttrName(name) {
1327
+ return ASCII_UPPER.test(name) ? name.replace(ASCII_UPPER_G, (ch) => String.fromCharCode(ch.charCodeAt(0) + 32)) : name;
1328
+ }
1324
1329
  var SAFE_URL_PROTOCOLS = ["http:", "https:", "mailto:", "tel:", "ftp:"];
1325
1330
  var OUTER_TRIM = /^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;
1326
1331
  function sanitizeUrl(url) {
1327
1332
  const probe = stripControlChars(url).trim();
1328
1333
  if (!probe) return "";
1329
1334
  const output = url.replace(OUTER_TRIM, "");
1335
+ if (probe.length >= 2 && (probe[0] === "\\" || probe[0] === "/") && (probe[1] === "\\" || probe[1] === "/") && (probe[0] === "\\" || probe[1] === "\\")) {
1336
+ return "";
1337
+ }
1330
1338
  const lower = probe.toLowerCase();
1331
1339
  let schemeEnd = -1;
1332
1340
  for (let i = 0; i < lower.length; i++) {
@@ -1344,6 +1352,15 @@ function sanitizeUrl(url) {
1344
1352
  return output;
1345
1353
  }
1346
1354
 
1355
+ // src/utils/elementPolicy.ts
1356
+ var BLOCKED_ELEMENTS = /* @__PURE__ */ new Set(["script", "iframe", "object", "embed", "frame", "frameset"]);
1357
+ function canonicalTagName(tag) {
1358
+ return canonicalAttrName(tag);
1359
+ }
1360
+ function isBlockedElement(tag) {
1361
+ return BLOCKED_ELEMENTS.has(canonicalTagName(tag));
1362
+ }
1363
+
1347
1364
  // src/performance/domRecycler.ts
1348
1365
  var DOMPool = class {
1349
1366
  constructor(maxSize = 50) {
@@ -1354,6 +1371,9 @@ var DOMPool = class {
1354
1371
  * Get a recycled element or create a new one.
1355
1372
  */
1356
1373
  acquire(tag) {
1374
+ if (isBlockedElement(tag)) {
1375
+ throw new Error(`DOMPool: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
1376
+ }
1357
1377
  const pool = this.pools.get(tag);
1358
1378
  if (pool && pool.length > 0) {
1359
1379
  const el = pool.pop();
@@ -1459,10 +1479,19 @@ function prefetch(url) {
1459
1479
  }
1460
1480
  function preloadImage(src) {
1461
1481
  return new Promise((resolve, reject) => {
1482
+ const safe = sanitizeUrl(String(src));
1483
+ if (!safe) {
1484
+ reject(
1485
+ new Error(
1486
+ String(src).trim() === "" ? "preloadImage: no image URL was given." : "preloadImage: refusing an image URL outside the URL policy."
1487
+ )
1488
+ );
1489
+ return;
1490
+ }
1462
1491
  const img = new Image();
1463
1492
  img.onload = () => resolve(img);
1464
1493
  img.onerror = reject;
1465
- img.src = src;
1494
+ img.src = safe;
1466
1495
  });
1467
1496
  }
1468
1497
 
@@ -1,5 +1,5 @@
1
- import { T as TrustedHTML } from './ssr-Bli9XRW5.cjs';
2
- export { t as trustHTML } from './ssr-Bli9XRW5.cjs';
1
+ import { T as TrustedHTML } from './ssr-C8hgIAw7.cjs';
2
+ export { t as trustHTML } from './ssr-C8hgIAw7.cjs';
3
3
 
4
4
  declare const Priority: {
5
5
  readonly IMMEDIATE: 0;
@@ -144,6 +144,16 @@ declare function preloadResource(url: string, type?: "script" | "style" | "fetch
144
144
  declare function prefetch(url: string): void;
145
145
  /**
146
146
  * Preloads an image and returns a promise that resolves when loaded.
147
+ *
148
+ * The URL goes through the same canonical policy (`sanitizeUrl`) as
149
+ * `preloadResource()`, `prefetch()` and every attribute writer, BEFORE an
150
+ * `Image` exists: a refused URL creates no element and starts no request. The
151
+ * promise then rejects with an `Error` — never stays pending — so an `await`
152
+ * cannot hang on it. The message does not repeat the URL.
153
+ *
154
+ * An empty (or whitespace-only) `src` names no image, which is not a policy
155
+ * refusal; it rejects with its own message, as the browser would have fired
156
+ * `error` for it anyway.
147
157
  */
148
158
  declare function preloadImage(src: string): Promise<HTMLImageElement>;
149
159
 
@@ -1,5 +1,5 @@
1
- import { T as TrustedHTML } from './ssr-Bli9XRW5.js';
2
- export { t as trustHTML } from './ssr-Bli9XRW5.js';
1
+ import { T as TrustedHTML } from './ssr-C8hgIAw7.js';
2
+ export { t as trustHTML } from './ssr-C8hgIAw7.js';
3
3
 
4
4
  declare const Priority: {
5
5
  readonly IMMEDIATE: 0;
@@ -144,6 +144,16 @@ declare function preloadResource(url: string, type?: "script" | "style" | "fetch
144
144
  declare function prefetch(url: string): void;
145
145
  /**
146
146
  * Preloads an image and returns a promise that resolves when loaded.
147
+ *
148
+ * The URL goes through the same canonical policy (`sanitizeUrl`) as
149
+ * `preloadResource()`, `prefetch()` and every attribute writer, BEFORE an
150
+ * `Image` exists: a refused URL creates no element and starts no request. The
151
+ * promise then rejects with an `Error` — never stays pending — so an `await`
152
+ * cannot hang on it. The message does not repeat the URL.
153
+ *
154
+ * An empty (or whitespace-only) `src` names no image, which is not a policy
155
+ * refusal; it rejects with its own message, as the browser would have fired
156
+ * `error` for it anyway.
147
157
  */
148
158
  declare function preloadImage(src: string): Promise<HTMLImageElement>;
149
159
 
@@ -33,16 +33,18 @@ import {
33
33
  transitionState,
34
34
  uniqueId,
35
35
  yieldToMain
36
- } from "./chunk-BSY63EM6.js";
36
+ } from "./chunk-C5PEWEGH.js";
37
37
  import {
38
38
  trustHTML
39
- } from "./chunk-HURREPU2.js";
40
- import "./chunk-2INLLLMZ.js";
39
+ } from "./chunk-FC6KCJSA.js";
40
+ import "./chunk-62BDYGAG.js";
41
+ import "./chunk-3ACAAQIN.js";
41
42
  import "./chunk-7ZHH77QA.js";
42
- import "./chunk-WEQ3DMVL.js";
43
+ import "./chunk-V3LHZSU5.js";
44
+ import "./chunk-EXXSN3BW.js";
43
45
  import "./chunk-7XHATCIH.js";
44
- import "./chunk-FQRUXCEE.js";
45
- import "./chunk-JWKYU5GV.js";
46
+ import "./chunk-DSID757X.js";
47
+ import "./chunk-TQQUN4WR.js";
46
48
  import "./chunk-NYNYSPK7.js";
47
49
  export {
48
50
  DOMPool,