@smart-cloud/ai-kit-ui 1.1.17 → 1.1.18
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/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/withAiKitShell.tsx +0 -5
package/package.json
CHANGED
package/src/withAiKitShell.tsx
CHANGED
|
@@ -190,11 +190,8 @@ export function withAiKitShell<P extends object>(
|
|
|
190
190
|
STYLE_TEXT_ID,
|
|
191
191
|
) as HTMLStyleElement | null;
|
|
192
192
|
|
|
193
|
-
console.log('injectStyle called', host, host.shadowRoot, existingStyle);
|
|
194
|
-
|
|
195
193
|
if (themeOverrides) {
|
|
196
194
|
if (!existingStyle) {
|
|
197
|
-
console.log('Creating new style element');
|
|
198
195
|
const s = host.shadowRoot!.ownerDocument.createElement("style");
|
|
199
196
|
s.id = STYLE_TEXT_ID;
|
|
200
197
|
s.setAttribute("data-hash", themeOverridesHash);
|
|
@@ -203,12 +200,10 @@ export function withAiKitShell<P extends object>(
|
|
|
203
200
|
} else {
|
|
204
201
|
const prevHash = existingStyle.getAttribute("data-hash") || "";
|
|
205
202
|
if (prevHash !== themeOverridesHash) {
|
|
206
|
-
console.log('Updating existing style element');
|
|
207
203
|
existingStyle.textContent = themeOverrides;
|
|
208
204
|
}
|
|
209
205
|
}
|
|
210
206
|
} else if (existingStyle) {
|
|
211
|
-
console.log('Removing existing style element');
|
|
212
207
|
existingStyle.remove();
|
|
213
208
|
}
|
|
214
209
|
},
|