@digipair/engine 0.0.4 → 0.0.6

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.esm.js CHANGED
@@ -12455,7 +12455,7 @@ const executePins = async (settingsOrigin, context = {}, options = {
12455
12455
  })=>{
12456
12456
  const settings = await preparePinsSettings(settingsOrigin, context, options);
12457
12457
  const version = options.libraries[settings.library] || 'latest';
12458
- const library = _config['LIBRARIES'][settings.library] || await import(`${_config['BASE_URL']}/${settings.library}@${version}/index.js`);
12458
+ const library = _config.LIBRARIES[settings.library] || await import(`${_config.BASE_URL}/${settings.library}@${version}/index.js`);
12459
12459
  const pins = library == null ? void 0 : library[settings.element];
12460
12460
  return pins ? await pins(settings.properties, settings.pins, context) : {
12461
12461
  command: 'error',
@@ -12468,9 +12468,9 @@ const generateElementFromPins = async (pinsSettings, context, options = {
12468
12468
  const element = document.createElement(pinsSettings.element);
12469
12469
  element.setAttribute('data-digipair-pins', '');
12470
12470
  const library = pinsSettings.library;
12471
- if (library !== 'web' && !_config['LIBRARIES'][library]) {
12471
+ if (library !== 'web' && !_config.LIBRARIES[library]) {
12472
12472
  const version = options.libraries[library] || 'latest';
12473
- import(`${_config['BASE_URL']}/${library}@${version}/index.js`);
12473
+ import(`${_config.BASE_URL}/${library}@${version}/index.js`);
12474
12474
  }
12475
12475
  const settings = await preparePinsSettings(pinsSettings, context, options);
12476
12476
  Object.entries(settings.properties || {}).forEach(([key, value])=>{
@@ -1,6 +1,7 @@
1
1
  import { PinsSettings } from './pins-settings.interface';
2
+ type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES';
2
3
  export declare const config: {
3
- set: (key: string, value: any) => void;
4
+ set: (key: CONFIG_KEY, value: any) => void;
4
5
  };
5
6
  export declare const applyTemplate: (value: any, context: any) => any;
6
7
  export declare const executePins: (settingsOrigin: PinsSettings, context?: any, options?: {
@@ -23,3 +24,4 @@ export declare const preparePinsSettings: (settings: PinsSettings, context: any,
23
24
  [key: string]: string;
24
25
  };
25
26
  }) => Promise<PinsSettings>;
27
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/engine",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "dependencies": {},
5
5
  "type": "module",
6
6
  "main": "./index.esm.js",