@digipair/engine 0.4.21 → 0.4.23

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/index.cjs.js CHANGED
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
23510
23510
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23511
23511
  // match is required
23512
23512
  if (!match) {
23513
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23513
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23514
23514
  v: nextMatch1
23515
23515
  };
23516
23516
  }
23517
23517
  var token = match.token, offset = match.offset;
23518
23518
  i1 += offset;
23519
23519
  if (token === " ") {
23520
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23520
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23521
23521
  }
23522
23522
  tokens1 = _to_consumable_array$1(tokens1).concat([
23523
23523
  token
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
23536
23536
  if (contextKeys.some(function(el) {
23537
23537
  return el.startsWith(name);
23538
23538
  })) {
23539
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23539
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23540
23540
  }
23541
23541
  if (dateTimeIdentifiers.some(function(el) {
23542
23542
  return el === name;
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
23555
23555
  if (dateTimeIdentifiers.some(function(el) {
23556
23556
  return el.startsWith(name);
23557
23557
  })) {
23558
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23558
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23559
23559
  }
23560
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23560
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23561
23561
  v: nextMatch1
23562
23562
  };
23563
23563
  };
@@ -27379,8 +27379,9 @@ const executePins = async (settingsOrigin, context = {}, options = {
27379
27379
  const settings = await preparePinsSettings(settingsOrigin, context);
27380
27380
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27381
27381
  const results = [];
27382
- for (const item of settings.conditions.each){
27382
+ for(let index = 0; index < settings.conditions.each.length; index++){
27383
27383
  var _itemSettings_conditions;
27384
+ const item = settings.conditions.each[index];
27384
27385
  const itemSettingsOrigin = _extends({}, settingsOrigin, {
27385
27386
  conditions: _extends({}, settingsOrigin.conditions, {
27386
27387
  each: undefined
@@ -27388,8 +27389,10 @@ const executePins = async (settingsOrigin, context = {}, options = {
27388
27389
  });
27389
27390
  const itemContext = _extends({}, context, {
27390
27391
  item,
27392
+ index,
27391
27393
  parent: {
27392
27394
  item: context.item,
27395
+ index: item.index,
27393
27396
  parent: context.parent
27394
27397
  }
27395
27398
  });
@@ -27444,16 +27447,18 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27444
27447
  var _settings_conditions, _settings_conditions1;
27445
27448
  const settings = await preparePinsSettings(pinsSettings, context);
27446
27449
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27447
- for(let i = 0; i < settings.conditions.each.length; i++){
27448
- const item = settings.conditions.each[i];
27450
+ for(let index = 0; index < settings.conditions.each.length; index++){
27451
+ const item = settings.conditions.each[index];
27449
27452
  await generateElementFromPins(_extends({}, pinsSettings, {
27450
27453
  conditions: _extends({}, pinsSettings.conditions, {
27451
27454
  each: undefined
27452
27455
  })
27453
27456
  }), parent, _extends({}, context, {
27454
27457
  item,
27458
+ index,
27455
27459
  parent: {
27456
27460
  item: context.item,
27461
+ index: item.index,
27457
27462
  parent: context.parent
27458
27463
  }
27459
27464
  }), options);
@@ -27491,7 +27496,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27491
27496
  const pinsList = settings.pins || [];
27492
27497
  for(let i = 0; i < pinsList.length; i++){
27493
27498
  const item = pinsList[i];
27494
- await generateElementFromPins(item, element, settings.context, options);
27499
+ await generateElementFromPins(item, element, settings, options);
27495
27500
  }
27496
27501
  parent == null ? void 0 : parent.appendChild(element);
27497
27502
  return element;
package/index.esm.js CHANGED
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
23488
23488
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23489
23489
  // match is required
23490
23490
  if (!match) {
23491
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23491
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23492
23492
  v: nextMatch1
23493
23493
  };
23494
23494
  }
23495
23495
  var token = match.token, offset = match.offset;
23496
23496
  i1 += offset;
23497
23497
  if (token === " ") {
23498
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23498
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23499
23499
  }
23500
23500
  tokens1 = _to_consumable_array$1(tokens1).concat([
23501
23501
  token
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
23514
23514
  if (contextKeys.some(function(el) {
23515
23515
  return el.startsWith(name);
23516
23516
  })) {
23517
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23517
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23518
23518
  }
23519
23519
  if (dateTimeIdentifiers.some(function(el) {
23520
23520
  return el === name;
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
23533
23533
  if (dateTimeIdentifiers.some(function(el) {
23534
23534
  return el.startsWith(name);
23535
23535
  })) {
23536
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23536
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23537
23537
  }
23538
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23538
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -27357,8 +27357,9 @@ const executePins = async (settingsOrigin, context = {}, options = {
27357
27357
  const settings = await preparePinsSettings(settingsOrigin, context);
27358
27358
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27359
27359
  const results = [];
27360
- for (const item of settings.conditions.each){
27360
+ for(let index = 0; index < settings.conditions.each.length; index++){
27361
27361
  var _itemSettings_conditions;
27362
+ const item = settings.conditions.each[index];
27362
27363
  const itemSettingsOrigin = _extends({}, settingsOrigin, {
27363
27364
  conditions: _extends({}, settingsOrigin.conditions, {
27364
27365
  each: undefined
@@ -27366,8 +27367,10 @@ const executePins = async (settingsOrigin, context = {}, options = {
27366
27367
  });
27367
27368
  const itemContext = _extends({}, context, {
27368
27369
  item,
27370
+ index,
27369
27371
  parent: {
27370
27372
  item: context.item,
27373
+ index: item.index,
27371
27374
  parent: context.parent
27372
27375
  }
27373
27376
  });
@@ -27422,16 +27425,18 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27422
27425
  var _settings_conditions, _settings_conditions1;
27423
27426
  const settings = await preparePinsSettings(pinsSettings, context);
27424
27427
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27425
- for(let i = 0; i < settings.conditions.each.length; i++){
27426
- const item = settings.conditions.each[i];
27428
+ for(let index = 0; index < settings.conditions.each.length; index++){
27429
+ const item = settings.conditions.each[index];
27427
27430
  await generateElementFromPins(_extends({}, pinsSettings, {
27428
27431
  conditions: _extends({}, pinsSettings.conditions, {
27429
27432
  each: undefined
27430
27433
  })
27431
27434
  }), parent, _extends({}, context, {
27432
27435
  item,
27436
+ index,
27433
27437
  parent: {
27434
27438
  item: context.item,
27439
+ index: item.index,
27435
27440
  parent: context.parent
27436
27441
  }
27437
27442
  }), options);
@@ -27469,7 +27474,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27469
27474
  const pinsList = settings.pins || [];
27470
27475
  for(let i = 0; i < pinsList.length; i++){
27471
27476
  const item = pinsList[i];
27472
- await generateElementFromPins(item, element, settings.context, options);
27477
+ await generateElementFromPins(item, element, settings, options);
27473
27478
  }
27474
27479
  parent == null ? void 0 : parent.appendChild(element);
27475
27480
  return element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/engine",
3
- "version": "0.4.21",
3
+ "version": "0.4.23",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",