@motifx/core 1.2.0-rc.3 → 1.2.0-rc.4

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.
@@ -1138,7 +1138,7 @@ class LinkedList {
1138
1138
  }
1139
1139
  }
1140
1140
 
1141
- const COMPILER_CONTRACT = 2;
1141
+ const COMPILER_CONTRACT = 1;
1142
1142
  const SUPPORTED_CONTRACTS = [1, 2];
1143
1143
  const reported = new Set();
1144
1144
  const pending = new Set();
@@ -5696,9 +5696,6 @@ class ComponentBase extends Disposable {
5696
5696
  get motif() {
5697
5697
  return this._motif !== undefined ? this._motif : (this._motif = new ComponentMotif(this, (this.isDisposed && !this.element ? undefined : new ComponentOptionsImpl(this))));
5698
5698
  }
5699
- set motif(value) {
5700
- this._motif = value;
5701
- }
5702
5699
  get isBuilt() {
5703
5700
  return (this._flags & F_BUILT) !== 0;
5704
5701
  }
@@ -6662,6 +6659,12 @@ class ComponentBase extends Disposable {
6662
6659
  t.activeAnimations = [];
6663
6660
  }
6664
6661
  }
6662
+ Object.defineProperty(ComponentBase.prototype, 'motif', {
6663
+ ...Object.getOwnPropertyDescriptor(ComponentBase.prototype, 'motif'),
6664
+ set(value) {
6665
+ this._motif = value;
6666
+ },
6667
+ });
6665
6668
  function findContentBlocks(root, results = []) {
6666
6669
  if (!root || root.isDisposed)
6667
6670
  return results;
@@ -7367,7 +7370,7 @@ function resolveChildExpression(probe) {
7367
7370
  return value;
7368
7371
  return undefined;
7369
7372
  }
7370
- function motifComponent(element, props) {
7373
+ function motifComponent(element, props, lone) {
7371
7374
  // Etiket adı: element yaratımı (HTML/SVG) ve spread prop uygulaması Component ctor'ının string parametresinde
7372
7375
  if (typeof element === "string") {
7373
7376
  if (typeof props === "function") {
@@ -7375,6 +7378,14 @@ function motifComponent(element, props) {
7375
7378
  compiled._init = props;
7376
7379
  return compiled;
7377
7380
  }
7381
+ if (lone === 1 && props !== null && typeof props === "object") {
7382
+ const init = props.initializeComponent;
7383
+ if (typeof init === "function") {
7384
+ const compiled = new Component(element);
7385
+ compiled._init = init;
7386
+ return compiled;
7387
+ }
7388
+ }
7378
7389
  if (element === "text" && props && props.__childExpr) {
7379
7390
  const resolved = resolveChildExpression(props.__childExpr);
7380
7391
  if (resolved !== undefined)
@@ -12879,4 +12890,4 @@ exports.untracked = untracked;
12879
12890
  exports.useApplication = useApplication;
12880
12891
  exports.useModel = useModel;
12881
12892
  exports.useNavigation = useNavigation;
12882
- //# sourceMappingURL=core-DD3SssnS.cjs.map
12893
+ //# sourceMappingURL=core-ZMoM1273.cjs.map