@digipair/engine 0.32.6 → 0.33.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.
package/index.cjs.js CHANGED
@@ -23511,14 +23511,14 @@ function indent(str, spaces) {
23511
23511
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23512
23512
  // match is required
23513
23513
  if (!match) {
23514
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23514
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23515
23515
  v: nextMatch1
23516
23516
  };
23517
23517
  }
23518
23518
  var token = match.token, offset = match.offset;
23519
23519
  i1 += offset;
23520
23520
  if (token === " ") {
23521
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23521
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23522
23522
  }
23523
23523
  tokens1 = _to_consumable_array$1(tokens1).concat([
23524
23524
  token
@@ -23537,7 +23537,7 @@ function indent(str, spaces) {
23537
23537
  if (contextKeys.some(function(el) {
23538
23538
  return el.startsWith(name);
23539
23539
  })) {
23540
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23540
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23541
23541
  }
23542
23542
  if (dateTimeIdentifiers.some(function(el) {
23543
23543
  return el === name;
@@ -23556,9 +23556,9 @@ function indent(str, spaces) {
23556
23556
  if (dateTimeIdentifiers.some(function(el) {
23557
23557
  return el.startsWith(name);
23558
23558
  })) {
23559
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23559
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23560
23560
  }
23561
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23561
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23562
23562
  v: nextMatch1
23563
23563
  };
23564
23564
  };
@@ -27348,7 +27348,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
27348
27348
  var _globalInstance___DIGIPAIR_CONFIG__;
27349
27349
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
27350
27350
  LIBRARIES: {},
27351
- BASE_URL: 'https://cdn.jsdelivr.net/npm'
27351
+ BASE_URL: 'https://cdn.jsdelivr.net/npm',
27352
+ ALIAS: []
27352
27353
  };
27353
27354
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
27354
27355
  const isPinsSettings = (value)=>{
@@ -27390,7 +27391,13 @@ const applyTemplate = (value, context)=>{
27390
27391
  };
27391
27392
  const executePins = async (settingsOrigin, context = {})=>{
27392
27393
  var _settings_conditions, _settings_conditions1;
27393
- const settings = await preparePinsSettings(settingsOrigin, context);
27394
+ let settings = await preparePinsSettings(settingsOrigin, context);
27395
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27396
+ if (alias) {
27397
+ settings = await preparePinsSettings(_extends({}, settings, alias), {
27398
+ settings
27399
+ });
27400
+ }
27394
27401
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27395
27402
  const results = [];
27396
27403
  for(let index = 0; index < settings.conditions.each.length; index++){
@@ -27463,7 +27470,13 @@ const executePinsList = async (pinsSettingsList, context)=>{
27463
27470
  };
27464
27471
  const generateElementFromPins = async (pinsSettings, parent, context)=>{
27465
27472
  var _settings_conditions, _settings_conditions1;
27466
- const settings = await preparePinsSettings(pinsSettings, context);
27473
+ let settings = await preparePinsSettings(pinsSettings, context);
27474
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27475
+ if (alias) {
27476
+ settings = await preparePinsSettings(_extends({}, settings, alias), {
27477
+ settings
27478
+ });
27479
+ }
27467
27480
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27468
27481
  for(let index = 0; index < settings.conditions.each.length; index++){
27469
27482
  const item = settings.conditions.each[index];
package/index.esm.js CHANGED
@@ -23489,14 +23489,14 @@ function indent(str, spaces) {
23489
23489
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23490
23490
  // match is required
23491
23491
  if (!match) {
23492
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23492
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23493
23493
  v: nextMatch1
23494
23494
  };
23495
23495
  }
23496
23496
  var token = match.token, offset = match.offset;
23497
23497
  i1 += offset;
23498
23498
  if (token === " ") {
23499
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23499
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23500
23500
  }
23501
23501
  tokens1 = _to_consumable_array$1(tokens1).concat([
23502
23502
  token
@@ -23515,7 +23515,7 @@ function indent(str, spaces) {
23515
23515
  if (contextKeys.some(function(el) {
23516
23516
  return el.startsWith(name);
23517
23517
  })) {
23518
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23518
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23519
23519
  }
23520
23520
  if (dateTimeIdentifiers.some(function(el) {
23521
23521
  return el === name;
@@ -23534,9 +23534,9 @@ function indent(str, spaces) {
23534
23534
  if (dateTimeIdentifiers.some(function(el) {
23535
23535
  return el.startsWith(name);
23536
23536
  })) {
23537
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23537
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23538
23538
  }
23539
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23539
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23540
23540
  v: nextMatch1
23541
23541
  };
23542
23542
  };
@@ -27326,7 +27326,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
27326
27326
  var _globalInstance___DIGIPAIR_CONFIG__;
27327
27327
  const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
27328
27328
  LIBRARIES: {},
27329
- BASE_URL: 'https://cdn.jsdelivr.net/npm'
27329
+ BASE_URL: 'https://cdn.jsdelivr.net/npm',
27330
+ ALIAS: []
27330
27331
  };
27331
27332
  const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
27332
27333
  const isPinsSettings = (value)=>{
@@ -27368,7 +27369,13 @@ const applyTemplate = (value, context)=>{
27368
27369
  };
27369
27370
  const executePins = async (settingsOrigin, context = {})=>{
27370
27371
  var _settings_conditions, _settings_conditions1;
27371
- const settings = await preparePinsSettings(settingsOrigin, context);
27372
+ let settings = await preparePinsSettings(settingsOrigin, context);
27373
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27374
+ if (alias) {
27375
+ settings = await preparePinsSettings(_extends({}, settings, alias), {
27376
+ settings
27377
+ });
27378
+ }
27372
27379
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27373
27380
  const results = [];
27374
27381
  for(let index = 0; index < settings.conditions.each.length; index++){
@@ -27441,7 +27448,13 @@ const executePinsList = async (pinsSettingsList, context)=>{
27441
27448
  };
27442
27449
  const generateElementFromPins = async (pinsSettings, parent, context)=>{
27443
27450
  var _settings_conditions, _settings_conditions1;
27444
- const settings = await preparePinsSettings(pinsSettings, context);
27451
+ let settings = await preparePinsSettings(pinsSettings, context);
27452
+ const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
27453
+ if (alias) {
27454
+ settings = await preparePinsSettings(_extends({}, settings, alias), {
27455
+ settings
27456
+ });
27457
+ }
27445
27458
  if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
27446
27459
  for(let index = 0; index < settings.conditions.each.length; index++){
27447
27460
  const item = settings.conditions.each[index];
@@ -0,0 +1,9 @@
1
+ export interface Alias {
2
+ name: string;
3
+ library: string;
4
+ element: string;
5
+ properties: {
6
+ library: string;
7
+ element: string;
8
+ };
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { PinsSettings } from './pins-settings.interface';
2
- type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES';
2
+ type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS';
3
3
  export declare const config: {
4
4
  set: (key: CONFIG_KEY, value: any) => void;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/engine",
3
- "version": "0.32.6",
3
+ "version": "0.33.0",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",
package/schema.en.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "openapi": "3.0.0",
3
- "info": {
4
- "title": "@digipair/engine",
5
- "summary": "Pin Management",
6
- "description": "Digipair's Pin Engine.",
7
- "version": "0.1.0",
8
- "x-icon": "🚀"
9
- },
10
- "paths": {},
11
- "components": {
12
- "schemas": {}
13
- }
14
- }