@industry-theme/github-panels 0.1.65 → 0.1.66
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecentRepositoriesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/RecentRepositoriesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAgBhE,OAAO,KAAK,EACV,gBAAgB,EAEhB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"RecentRepositoriesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/RecentRepositoriesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAgBhE,OAAO,KAAK,EACV,gBAAgB,EAEhB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AAsGzB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAgChE;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CA4BrD;AA2pBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,GAAG;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAEA,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;CAQ3C,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -53058,6 +53058,7 @@ const STORAGE_KEY = "recent-repositories";
|
|
|
53058
53058
|
const OWNERS_STORAGE_KEY = "recent-owners";
|
|
53059
53059
|
const MAX_RECENT_ITEMS = 50;
|
|
53060
53060
|
function loadRecentRepositories() {
|
|
53061
|
+
if (typeof window === "undefined") return [];
|
|
53061
53062
|
try {
|
|
53062
53063
|
const stored = localStorage.getItem(STORAGE_KEY);
|
|
53063
53064
|
if (stored) {
|
|
@@ -53070,6 +53071,7 @@ function loadRecentRepositories() {
|
|
|
53070
53071
|
return [];
|
|
53071
53072
|
}
|
|
53072
53073
|
function loadRecentOwners() {
|
|
53074
|
+
if (typeof window === "undefined") return [];
|
|
53073
53075
|
try {
|
|
53074
53076
|
const stored = localStorage.getItem(OWNERS_STORAGE_KEY);
|
|
53075
53077
|
if (stored) {
|
|
@@ -53081,6 +53083,7 @@ function loadRecentOwners() {
|
|
|
53081
53083
|
return [];
|
|
53082
53084
|
}
|
|
53083
53085
|
function saveRecentRepositories(repos) {
|
|
53086
|
+
if (typeof window === "undefined") return;
|
|
53084
53087
|
try {
|
|
53085
53088
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(repos));
|
|
53086
53089
|
} catch (err) {
|
|
@@ -53088,6 +53091,7 @@ function saveRecentRepositories(repos) {
|
|
|
53088
53091
|
}
|
|
53089
53092
|
}
|
|
53090
53093
|
function saveRecentOwners(owners) {
|
|
53094
|
+
if (typeof window === "undefined") return;
|
|
53091
53095
|
try {
|
|
53092
53096
|
localStorage.setItem(OWNERS_STORAGE_KEY, JSON.stringify(owners));
|
|
53093
53097
|
} catch (err) {
|
|
@@ -53115,7 +53119,9 @@ function addRecentRepository(repo) {
|
|
|
53115
53119
|
};
|
|
53116
53120
|
const updated = [newEntry, ...filtered].slice(0, MAX_RECENT_ITEMS);
|
|
53117
53121
|
saveRecentRepositories(updated);
|
|
53118
|
-
|
|
53122
|
+
if (typeof window !== "undefined") {
|
|
53123
|
+
window.dispatchEvent(new CustomEvent("recent-items-updated"));
|
|
53124
|
+
}
|
|
53119
53125
|
}
|
|
53120
53126
|
function addRecentOwner(owner) {
|
|
53121
53127
|
const recent = loadRecentOwners();
|
|
@@ -53134,7 +53140,9 @@ function addRecentOwner(owner) {
|
|
|
53134
53140
|
};
|
|
53135
53141
|
const updated = [newEntry, ...filtered].slice(0, MAX_RECENT_ITEMS);
|
|
53136
53142
|
saveRecentOwners(updated);
|
|
53137
|
-
|
|
53143
|
+
if (typeof window !== "undefined") {
|
|
53144
|
+
window.dispatchEvent(new CustomEvent("recent-items-updated"));
|
|
53145
|
+
}
|
|
53138
53146
|
}
|
|
53139
53147
|
const RecentRepositoriesPanelContent = ({
|
|
53140
53148
|
events,
|