@yr3/ui 1.0.9 → 1.0.10
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 +18 -0
- package/dist/index.js +17 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -561,6 +561,23 @@ function initTheme() {
|
|
|
561
561
|
applyTheme(createTheme());
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
+
// src/inject-style.ts
|
|
565
|
+
var import_meta = {};
|
|
566
|
+
var injectStyles = () => {
|
|
567
|
+
if (typeof document === "undefined") return;
|
|
568
|
+
if (document.getElementById("yr3-styles")) return;
|
|
569
|
+
const link = document.createElement("link");
|
|
570
|
+
link.id = "yr3-styles";
|
|
571
|
+
link.rel = "stylesheet";
|
|
572
|
+
try {
|
|
573
|
+
link.href = new URL("../styles/index.css", import_meta.url).toString();
|
|
574
|
+
} catch (e) {
|
|
575
|
+
console.warn("yr3-ui: style inject fallback", e);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
document.head.appendChild(link);
|
|
579
|
+
};
|
|
580
|
+
|
|
564
581
|
// src/components/Avatar/Avatar.tsx
|
|
565
582
|
var React = __toESM(require("react"), 1);
|
|
566
583
|
|
|
@@ -2682,6 +2699,7 @@ var usePlaces = ({ input, language, apiKey, provider }) => {
|
|
|
2682
2699
|
};
|
|
2683
2700
|
|
|
2684
2701
|
// src/index.ts
|
|
2702
|
+
injectStyles();
|
|
2685
2703
|
initTheme();
|
|
2686
2704
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2687
2705
|
0 && (module.exports = {
|
package/dist/index.js
CHANGED
|
@@ -455,6 +455,22 @@ function initTheme() {
|
|
|
455
455
|
applyTheme(createTheme());
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
+
// src/inject-style.ts
|
|
459
|
+
var injectStyles = () => {
|
|
460
|
+
if (typeof document === "undefined") return;
|
|
461
|
+
if (document.getElementById("yr3-styles")) return;
|
|
462
|
+
const link = document.createElement("link");
|
|
463
|
+
link.id = "yr3-styles";
|
|
464
|
+
link.rel = "stylesheet";
|
|
465
|
+
try {
|
|
466
|
+
link.href = new URL("../styles/index.css", import.meta.url).toString();
|
|
467
|
+
} catch (e) {
|
|
468
|
+
console.warn("yr3-ui: style inject fallback", e);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
document.head.appendChild(link);
|
|
472
|
+
};
|
|
473
|
+
|
|
458
474
|
// src/components/Avatar/Avatar.tsx
|
|
459
475
|
import * as React from "react";
|
|
460
476
|
|
|
@@ -2576,6 +2592,7 @@ var usePlaces = ({ input, language, apiKey, provider }) => {
|
|
|
2576
2592
|
};
|
|
2577
2593
|
|
|
2578
2594
|
// src/index.ts
|
|
2595
|
+
injectStyles();
|
|
2579
2596
|
initTheme();
|
|
2580
2597
|
export {
|
|
2581
2598
|
Avatar,
|