@digipair/engine 0.4.13 → 0.4.14

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 (3) hide show
  1. package/index.cjs.js +13 -11
  2. package/index.esm.js +13 -11
  3. package/package.json +1 -1
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23513
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23520
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23539
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23558
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23559
23559
  }
23560
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23560
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23561
23561
  v: nextMatch1
23562
23562
  };
23563
23563
  };
@@ -27378,8 +27378,8 @@ const executePins = async (settingsOrigin, context = {}, options = {
27378
27378
  var _settings_conditions;
27379
27379
  const settings = await preparePinsSettings(settingsOrigin, context);
27380
27380
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27381
- return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settings, {
27382
- conditions: _extends({}, settings.conditions, {
27381
+ return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settingsOrigin, {
27382
+ conditions: _extends({}, settingsOrigin.conditions, {
27383
27383
  each: undefined
27384
27384
  })
27385
27385
  }), _extends({}, context, {
@@ -27434,8 +27434,8 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27434
27434
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27435
27435
  for(let i = 0; i < settings.conditions.each.length; i++){
27436
27436
  const item = settings.conditions.each[i];
27437
- await generateElementFromPins(_extends({}, settings, {
27438
- conditions: _extends({}, settings.conditions, {
27437
+ await generateElementFromPins(_extends({}, pinsSettings, {
27438
+ conditions: _extends({}, pinsSettings.conditions, {
27439
27439
  each: undefined
27440
27440
  })
27441
27441
  }), parent, _extends({}, context, {
@@ -27492,15 +27492,17 @@ const preparePinsSettings = async (settings, context)=>{
27492
27492
  for (const [key, value] of Object.entries(settings.variables || {})){
27493
27493
  localContext.variables[key] = applyTemplate(value, localContext);
27494
27494
  }
27495
+ const conditions = {};
27495
27496
  for (const [key, value] of Object.entries(settings.conditions || {})){
27496
- localContext.conditions[key] = await applyTemplate(value, localContext);
27497
+ conditions[key] = await applyTemplate(value, localContext);
27497
27498
  }
27498
27499
  const properties = {};
27499
27500
  for (const [key, value] of Object.entries(settings.properties || {})){
27500
27501
  properties[key] = applyTemplate(value, localContext);
27501
27502
  }
27502
27503
  return _extends({}, settings, {
27503
- properties
27504
+ properties,
27505
+ conditions
27504
27506
  });
27505
27507
  };
27506
27508
 
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, nextMatch = nextMatch1, tokens = tokens1, {
23491
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
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, nextMatch = nextMatch1, tokens = tokens1, "continue";
23498
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "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, nextMatch = nextMatch1, tokens = tokens1, "continue";
23517
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "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, nextMatch = nextMatch1, tokens = tokens1, "continue";
23536
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23537
23537
  }
23538
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23538
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -27356,8 +27356,8 @@ const executePins = async (settingsOrigin, context = {}, options = {
27356
27356
  var _settings_conditions;
27357
27357
  const settings = await preparePinsSettings(settingsOrigin, context);
27358
27358
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27359
- return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settings, {
27360
- conditions: _extends({}, settings.conditions, {
27359
+ return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settingsOrigin, {
27360
+ conditions: _extends({}, settingsOrigin.conditions, {
27361
27361
  each: undefined
27362
27362
  })
27363
27363
  }), _extends({}, context, {
@@ -27412,8 +27412,8 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
27412
27412
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27413
27413
  for(let i = 0; i < settings.conditions.each.length; i++){
27414
27414
  const item = settings.conditions.each[i];
27415
- await generateElementFromPins(_extends({}, settings, {
27416
- conditions: _extends({}, settings.conditions, {
27415
+ await generateElementFromPins(_extends({}, pinsSettings, {
27416
+ conditions: _extends({}, pinsSettings.conditions, {
27417
27417
  each: undefined
27418
27418
  })
27419
27419
  }), parent, _extends({}, context, {
@@ -27470,15 +27470,17 @@ const preparePinsSettings = async (settings, context)=>{
27470
27470
  for (const [key, value] of Object.entries(settings.variables || {})){
27471
27471
  localContext.variables[key] = applyTemplate(value, localContext);
27472
27472
  }
27473
+ const conditions = {};
27473
27474
  for (const [key, value] of Object.entries(settings.conditions || {})){
27474
- localContext.conditions[key] = await applyTemplate(value, localContext);
27475
+ conditions[key] = await applyTemplate(value, localContext);
27475
27476
  }
27476
27477
  const properties = {};
27477
27478
  for (const [key, value] of Object.entries(settings.properties || {})){
27478
27479
  properties[key] = applyTemplate(value, localContext);
27479
27480
  }
27480
27481
  return _extends({}, settings, {
27481
- properties
27482
+ properties,
27483
+ conditions
27482
27484
  });
27483
27485
  };
27484
27486
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/engine",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",