@digipair/engine 0.64.1 → 0.64.5
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 +4 -2
- package/index.esm.js +9 -7
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -8317,7 +8317,9 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
8317
8317
|
return;
|
8318
8318
|
}
|
8319
8319
|
const element = document.createElement(pinsSettings.element);
|
8320
|
-
|
8320
|
+
// add digipair-vision and aframe compatibility
|
8321
|
+
const setAttribute = (attribute, value)=>pinsSettings.element.startsWith('a-') || pinsSettings.element.startsWith('dxr-') ? element.setAttributeNS('', attribute, value) : element.setAttribute(attribute, value);
|
8322
|
+
setAttribute('data-digipair-pins', '');
|
8321
8323
|
const library = pinsSettings.library;
|
8322
8324
|
if (options.import && library !== 'web' && !_config.LIBRARIES[library]) {
|
8323
8325
|
const config = context.config || {};
|
@@ -8330,7 +8332,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
8330
8332
|
} else if (key === 'innerHTML') {
|
8331
8333
|
element.innerHTML = value;
|
8332
8334
|
} else if (typeof value === 'string') {
|
8333
|
-
|
8335
|
+
setAttribute(key, value);
|
8334
8336
|
} else {
|
8335
8337
|
element[key] = value;
|
8336
8338
|
}
|
package/index.esm.js
CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
|
|
23899
23899
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23900
23900
|
// match is required
|
23901
23901
|
if (!match) {
|
23902
|
-
return
|
23902
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23903
23903
|
v: nextMatch1
|
23904
23904
|
};
|
23905
23905
|
}
|
23906
23906
|
var token = match.token, offset = match.offset;
|
23907
23907
|
i1 += offset;
|
23908
23908
|
if (token === " ") {
|
23909
|
-
return
|
23909
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23910
23910
|
}
|
23911
23911
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23912
23912
|
token
|
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
|
|
23925
23925
|
if (contextKeys.some(function(el) {
|
23926
23926
|
return el.startsWith(name);
|
23927
23927
|
})) {
|
23928
|
-
return
|
23928
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23929
23929
|
}
|
23930
23930
|
if (dateTimeIdentifiers.some(function(el) {
|
23931
23931
|
return el === name;
|
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
|
|
23944
23944
|
if (dateTimeIdentifiers.some(function(el) {
|
23945
23945
|
return el.startsWith(name);
|
23946
23946
|
})) {
|
23947
|
-
return
|
23947
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23948
23948
|
}
|
23949
|
-
return
|
23949
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23950
23950
|
v: nextMatch1
|
23951
23951
|
};
|
23952
23952
|
};
|
@@ -27996,7 +27996,9 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
27996
27996
|
return;
|
27997
27997
|
}
|
27998
27998
|
const element = document.createElement(pinsSettings.element);
|
27999
|
-
|
27999
|
+
// add digipair-vision and aframe compatibility
|
28000
|
+
const setAttribute = (attribute, value)=>pinsSettings.element.startsWith('a-') || pinsSettings.element.startsWith('dxr-') ? element.setAttributeNS('', attribute, value) : element.setAttribute(attribute, value);
|
28001
|
+
setAttribute('data-digipair-pins', '');
|
28000
28002
|
const library = pinsSettings.library;
|
28001
28003
|
if (options.import && library !== 'web' && !_config.LIBRARIES[library]) {
|
28002
28004
|
const config = context.config || {};
|
@@ -28009,7 +28011,7 @@ const generateElementFromPins = async (pinsSettings, parent, context, document =
|
|
28009
28011
|
} else if (key === 'innerHTML') {
|
28010
28012
|
element.innerHTML = value;
|
28011
28013
|
} else if (typeof value === 'string') {
|
28012
|
-
|
28014
|
+
setAttribute(key, value);
|
28013
28015
|
} else {
|
28014
28016
|
element[key] = value;
|
28015
28017
|
}
|