@acryldev/blends-frame 0.2.11 → 0.2.12
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/lib/client.js +10 -2
- package/lib/client.js.map +1 -1
- package/lib/index.js +11 -1
- package/lib/index.js.map +1 -1
- package/lib/types/client/plugins-navigator.d.ts +2 -0
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -17604,9 +17604,13 @@ window.__ModuleLoader__.load({
|
|
|
17604
17604
|
*/
|
|
17605
17605
|
/** The command another app runs to take a shared plugin, from its repository address and version. */
|
|
17606
17606
|
function pullCommand(shared) {
|
|
17607
|
+
const onNpm = /^https:\/\/www\.npmjs\.com\/package\/(.+)$/u.exec(shared.url);
|
|
17608
|
+
if (onNpm !== null) return `npm run acryl -- plugin pull npm:${onNpm[1] ?? ""}@${shared.version}`;
|
|
17607
17609
|
const where = /^https:\/\/github\.com\/([^/]+)\/([^/#?]+)/u.exec(shared.url);
|
|
17608
17610
|
return where === null ? void 0 : `npm run acryl -- plugin pull github:${where[1] ?? ""}/${where[2] ?? ""}@${shared.version}`;
|
|
17609
17611
|
}
|
|
17612
|
+
/** Where a share went, in words: npm or GitHub. */
|
|
17613
|
+
const sharedOn = (shared) => /^https:\/\/www\.npmjs\.com\//u.test(shared.url) ? "npm" : "GitHub";
|
|
17610
17614
|
/** What to send a colleague so they can add a shared plugin: the address the Registry tab's "Add by address" takes. */
|
|
17611
17615
|
function colleagueAddress(shared) {
|
|
17612
17616
|
const where = /^https:\/\/github\.com\/([^/]+)\/([^/#?]+)/u.exec(shared.url);
|
|
@@ -47634,6 +47638,7 @@ body[data-bf-settings-full] { --bf-pane-h: calc(100vh - 24px); }
|
|
|
47634
47638
|
const [details, setDetails] = (0, react.useState)(false);
|
|
47635
47639
|
const [copied, setCopied] = (0, react.useState)(void 0);
|
|
47636
47640
|
const [owner, setOwner] = (0, react.useState)("");
|
|
47641
|
+
const [askedNpm, setAskedNpm] = (0, react.useState)(false);
|
|
47637
47642
|
(0, react.useEffect)(() => {
|
|
47638
47643
|
let live = true;
|
|
47639
47644
|
readGithub().then((answer) => {
|
|
@@ -47672,6 +47677,7 @@ body[data-bf-settings-full] { --bf-pane-h: calc(100vh - 24px); }
|
|
|
47672
47677
|
const ask = async (target) => {
|
|
47673
47678
|
if (share === void 0) return;
|
|
47674
47679
|
setDetails(false);
|
|
47680
|
+
setAskedNpm(target === "npm");
|
|
47675
47681
|
setState({
|
|
47676
47682
|
step: "working",
|
|
47677
47683
|
what: "Checking…"
|
|
@@ -47814,7 +47820,7 @@ body[data-bf-settings-full] { --bf-pane-h: calc(100vh - 24px); }
|
|
|
47814
47820
|
},
|
|
47815
47821
|
children: choice.button
|
|
47816
47822
|
})] }, choice.title)) })] }),
|
|
47817
|
-
state.step === "confirm" || state.step === "working" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GithubNote, {
|
|
47823
|
+
state.step === "confirm" || state.step === "working" || state.step === "failed" && askedNpm ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GithubNote, {
|
|
47818
47824
|
github,
|
|
47819
47825
|
copy,
|
|
47820
47826
|
connect: connectGithub,
|
|
@@ -48275,7 +48281,9 @@ body[data-bf-settings-full] { --bf-pane-h: calc(100vh - 24px); }
|
|
|
48275
48281
|
title: "GitHub says this repository no longer exists; Share publishes it again",
|
|
48276
48282
|
children: [plugin.shared.url.replace(/^https:\/\//u, ""), " is gone"]
|
|
48277
48283
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
48278
|
-
"Shared on
|
|
48284
|
+
"Shared on ",
|
|
48285
|
+
sharedOn(plugin.shared),
|
|
48286
|
+
":",
|
|
48279
48287
|
" ",
|
|
48280
48288
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
48281
48289
|
className: "acrylBlendsShared",
|