@bunnyapp/components 1.6.0-beta.23 → 1.6.0-beta.24
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/dist/cjs/index.js +37 -1
- package/dist/esm/index.js +37 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -143,7 +143,7 @@ const useAllErrorFormats = () => {
|
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// This will be replaced at build time by rollup-plugin-replace
|
|
146
|
-
const PACKAGE_VERSION = '1.6.0-beta.
|
|
146
|
+
const PACKAGE_VERSION = '1.6.0-beta.23';
|
|
147
147
|
const createRequestHeaders = (token) => {
|
|
148
148
|
const headers = createClientDevHeaders({ token });
|
|
149
149
|
// Add the components version header
|
|
@@ -1039,6 +1039,42 @@ const defaultStyled = typeof styled === "function" ? styled : styled.default;
|
|
|
1039
1039
|
// !!! This is a workaround to avoid the issue with styled-components not supporting ESM
|
|
1040
1040
|
// Workaround from https://github.com/styled-components/styled-components/issues/3437#issuecomment-1103085056
|
|
1041
1041
|
|
|
1042
|
+
if (typeof window !== 'undefined') {
|
|
1043
|
+
// Prevent watermark from being added
|
|
1044
|
+
const originalCreateElement = document.createElement.bind(document);
|
|
1045
|
+
document.createElement = function (tagName, options) {
|
|
1046
|
+
const element = originalCreateElement(tagName, options);
|
|
1047
|
+
if (tagName.toLowerCase() === 'div') {
|
|
1048
|
+
const originalAttachShadow = element.attachShadow;
|
|
1049
|
+
element.attachShadow = function (init) {
|
|
1050
|
+
var _a;
|
|
1051
|
+
const shadowRoot = originalAttachShadow.call(this, init);
|
|
1052
|
+
// Prevent watermark styles from being injected
|
|
1053
|
+
const originalInnerHTMLSetter = (_a = Object.getOwnPropertyDescriptor(ShadowRoot.prototype, 'innerHTML')) === null || _a === void 0 ? void 0 : _a.set;
|
|
1054
|
+
console.log('originalInnerHTMLSetter', originalInnerHTMLSetter);
|
|
1055
|
+
if (originalInnerHTMLSetter) {
|
|
1056
|
+
Object.defineProperty(shadowRoot, 'innerHTML', {
|
|
1057
|
+
set: function (value) {
|
|
1058
|
+
// Block watermark injection
|
|
1059
|
+
if (typeof value === 'string' &&
|
|
1060
|
+
value.includes('background-image: url(data:image/webp')) {
|
|
1061
|
+
return; // Don't set the watermark HTML
|
|
1062
|
+
}
|
|
1063
|
+
console.log('value', value);
|
|
1064
|
+
originalInnerHTMLSetter.call(this, value);
|
|
1065
|
+
},
|
|
1066
|
+
get: function () {
|
|
1067
|
+
console.log('this.innerHTML', this.innerHTML);
|
|
1068
|
+
return this.innerHTML;
|
|
1069
|
+
},
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
return shadowRoot;
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
return element;
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1042
1078
|
const LISENSE_KEY = 'eyJkYXRhIjoiZXlKMElqb2liM0puWVc1cGVtRjBhVzl1SWl3aVlYWjFJam94TnpneU5ETXhPVGs1TENKa2JTSTZJbUoxYm01NUxtTnZiU0lzSW00aU9pSmhOV1F5TWpKaFpXTTNOelF5TkdFNUlpd2laWGh3SWpveE56WTJORFEzT1RrNUxDSmtiWFFpT2lKM2FXeGtZMkZ5WkNKOSIsInNpZ25hdHVyZSI6ImdJWW5BYWp0WW1aSHV1b1RrTkZCZnRGYjEzUTJOZXZwQXlKRmszdy9STDNUa08rRXZYWlV0MDZxenBrZWdOK1A4TXlkbFY1aityemQvM1VpYlB5SW1VSzAweHZSVk5hS29EOXB0cVpkbjR5SWRRdE1pU1NjZ0J1K1RkM0NXM2FONVNrdlNJVDEyTGpBMnVVYll2RmJ6RFpMci9hODkwa05sT0NQZURoVjMyd0w3R0NrTnV2Z1MyZlk5Mis0L25FdUdvZXBZR0RPN0Ryb3NaOGVlbnJ6b1BsQ044T204eFlMNXJxdUkvS2xLVTVYaGN0allrdzBTR0FlL0pDR1dTN1dLTDAvYmFvbS9GS1ltNU91VmlzcmlDVlc2UXgvbzBnTGE4bUtXLytMb3pNaHdFemdtU2I2S0xERzZpTEVPL0czQ2pYN2p2dTU1NEc4OUx2aW1BaE5BQT09In0=';
|
|
1043
1079
|
// Custom zoom layout component that uses useZoomContext
|
|
1044
1080
|
const CustomZoomLayout = () => {
|
package/dist/esm/index.js
CHANGED
|
@@ -141,7 +141,7 @@ const useAllErrorFormats = () => {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
// This will be replaced at build time by rollup-plugin-replace
|
|
144
|
-
const PACKAGE_VERSION = '1.6.0-beta.
|
|
144
|
+
const PACKAGE_VERSION = '1.6.0-beta.23';
|
|
145
145
|
const createRequestHeaders = (token) => {
|
|
146
146
|
const headers = createClientDevHeaders({ token });
|
|
147
147
|
// Add the components version header
|
|
@@ -1037,6 +1037,42 @@ const defaultStyled = typeof styled === "function" ? styled : styled.default;
|
|
|
1037
1037
|
// !!! This is a workaround to avoid the issue with styled-components not supporting ESM
|
|
1038
1038
|
// Workaround from https://github.com/styled-components/styled-components/issues/3437#issuecomment-1103085056
|
|
1039
1039
|
|
|
1040
|
+
if (typeof window !== 'undefined') {
|
|
1041
|
+
// Prevent watermark from being added
|
|
1042
|
+
const originalCreateElement = document.createElement.bind(document);
|
|
1043
|
+
document.createElement = function (tagName, options) {
|
|
1044
|
+
const element = originalCreateElement(tagName, options);
|
|
1045
|
+
if (tagName.toLowerCase() === 'div') {
|
|
1046
|
+
const originalAttachShadow = element.attachShadow;
|
|
1047
|
+
element.attachShadow = function (init) {
|
|
1048
|
+
var _a;
|
|
1049
|
+
const shadowRoot = originalAttachShadow.call(this, init);
|
|
1050
|
+
// Prevent watermark styles from being injected
|
|
1051
|
+
const originalInnerHTMLSetter = (_a = Object.getOwnPropertyDescriptor(ShadowRoot.prototype, 'innerHTML')) === null || _a === void 0 ? void 0 : _a.set;
|
|
1052
|
+
console.log('originalInnerHTMLSetter', originalInnerHTMLSetter);
|
|
1053
|
+
if (originalInnerHTMLSetter) {
|
|
1054
|
+
Object.defineProperty(shadowRoot, 'innerHTML', {
|
|
1055
|
+
set: function (value) {
|
|
1056
|
+
// Block watermark injection
|
|
1057
|
+
if (typeof value === 'string' &&
|
|
1058
|
+
value.includes('background-image: url(data:image/webp')) {
|
|
1059
|
+
return; // Don't set the watermark HTML
|
|
1060
|
+
}
|
|
1061
|
+
console.log('value', value);
|
|
1062
|
+
originalInnerHTMLSetter.call(this, value);
|
|
1063
|
+
},
|
|
1064
|
+
get: function () {
|
|
1065
|
+
console.log('this.innerHTML', this.innerHTML);
|
|
1066
|
+
return this.innerHTML;
|
|
1067
|
+
},
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
return shadowRoot;
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
return element;
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1040
1076
|
const LISENSE_KEY = 'eyJkYXRhIjoiZXlKMElqb2liM0puWVc1cGVtRjBhVzl1SWl3aVlYWjFJam94TnpneU5ETXhPVGs1TENKa2JTSTZJbUoxYm01NUxtTnZiU0lzSW00aU9pSmhOV1F5TWpKaFpXTTNOelF5TkdFNUlpd2laWGh3SWpveE56WTJORFEzT1RrNUxDSmtiWFFpT2lKM2FXeGtZMkZ5WkNKOSIsInNpZ25hdHVyZSI6ImdJWW5BYWp0WW1aSHV1b1RrTkZCZnRGYjEzUTJOZXZwQXlKRmszdy9STDNUa08rRXZYWlV0MDZxenBrZWdOK1A4TXlkbFY1aityemQvM1VpYlB5SW1VSzAweHZSVk5hS29EOXB0cVpkbjR5SWRRdE1pU1NjZ0J1K1RkM0NXM2FONVNrdlNJVDEyTGpBMnVVYll2RmJ6RFpMci9hODkwa05sT0NQZURoVjMyd0w3R0NrTnV2Z1MyZlk5Mis0L25FdUdvZXBZR0RPN0Ryb3NaOGVlbnJ6b1BsQ044T204eFlMNXJxdUkvS2xLVTVYaGN0allrdzBTR0FlL0pDR1dTN1dLTDAvYmFvbS9GS1ltNU91VmlzcmlDVlc2UXgvbzBnTGE4bUtXLytMb3pNaHdFemdtU2I2S0xERzZpTEVPL0czQ2pYN2p2dTU1NEc4OUx2aW1BaE5BQT09In0=';
|
|
1041
1077
|
// Custom zoom layout component that uses useZoomContext
|
|
1042
1078
|
const CustomZoomLayout = () => {
|
package/package.json
CHANGED