@solidjs/web 2.0.0-experimental.1 → 2.0.0-experimental.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2016-2023 Ryan Carniato
3
+ Copyright (c) 2016-2025 Ryan Carniato
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/dev.cjs CHANGED
@@ -609,9 +609,8 @@ function createElementProxy(el, marker) {
609
609
  }
610
610
  });
611
611
  }
612
- function Dynamic(props) {
613
- const others = solidJs.omit(props, "component");
614
- const cached = solidJs.createMemo(() => props.component);
612
+ function createDynamic(component, props) {
613
+ const cached = solidJs.createMemo(component);
615
614
  return solidJs.createMemo(() => {
616
615
  const component = cached();
617
616
  switch (typeof component) {
@@ -619,15 +618,19 @@ function Dynamic(props) {
619
618
  Object.assign(component, {
620
619
  [solidJs.$DEVCOMP]: true
621
620
  });
622
- return solidJs.untrack(() => component(others));
621
+ return solidJs.untrack(() => component(props));
623
622
  case "string":
624
623
  const isSvg = SVGElements.has(component);
625
624
  const el = solidJs.sharedConfig.context ? getNextElement() : createElement(component, isSvg);
626
- spread(el, others, isSvg);
625
+ spread(el, props, isSvg);
627
626
  return el;
628
627
  }
629
628
  });
630
629
  }
630
+ function Dynamic(props) {
631
+ const others = solidJs.omit(props, "component");
632
+ return createDynamic(() => props.component, others);
633
+ }
631
634
 
632
635
  Object.defineProperty(exports, "ErrorBoundary", {
633
636
  enumerable: true,
@@ -694,6 +697,7 @@ exports.addEventListener = addEventListener;
694
697
  exports.assign = assign;
695
698
  exports.className = className;
696
699
  exports.clearDelegatedEvents = clearDelegatedEvents;
700
+ exports.createDynamic = createDynamic;
697
701
  exports.delegateEvents = delegateEvents;
698
702
  exports.dynamicProperty = dynamicProperty;
699
703
  exports.escape = escape;