@starlein/paperclip-plugin-company-wizard 0.4.2 → 0.4.5
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/CHANGELOG.md +39 -0
- package/README.md +1 -1
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.css +6 -3
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +70 -74
- package/dist/ui/index.js.map +3 -3
- package/dist/worker.js +75 -18
- package/dist/worker.js.map +2 -2
- package/package.json +1 -1
- package/templates/bootstrap-instructions.md +1 -1
- package/templates/modules/ci-cd/agents/devops/skills/ci-cd.md +4 -4
- package/templates/modules/ci-cd/agents/engineer/skills/ci-cd.fallback.md +1 -1
- package/templates/modules/ci-cd/module.meta.json +3 -3
- package/templates/modules/ci-cd/skills/ci-cd.bar.md +2 -2
- package/templates/modules/ci-cd/skills/ci-cd.md +4 -4
- package/templates/modules/github-repo/README.md +2 -2
- package/templates/modules/github-repo/agents/engineer/skills/git-workflow.md +2 -2
- package/templates/modules/github-repo/docs/git-workflow.md +27 -2
- package/templates/modules/github-repo/module.meta.json +1 -1
- package/templates/modules/launch-mvp/module.meta.json +1 -1
- package/templates/modules/pr-review/README.md +7 -7
- package/templates/modules/pr-review/agents/code-reviewer/skills/code-review.md +32 -16
- package/templates/modules/pr-review/agents/engineer/skills/pr-workflow.md +12 -11
- package/templates/modules/pr-review/docs/pr-conventions.md +13 -13
- package/templates/modules/pr-review/module.meta.json +3 -3
- package/templates/presets/fast/preset.meta.json +2 -2
- package/templates/presets/repo-maintenance/preset.meta.json +1 -1
- package/templates/roles/engineer/SOUL.md +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -549,8 +549,7 @@ var __iconNode41 = [
|
|
|
549
549
|
var Zap = createLucideIcon("zap", __iconNode41);
|
|
550
550
|
|
|
551
551
|
// src/ui/components/WizardShell.tsx
|
|
552
|
-
import { useEffect as
|
|
553
|
-
import { usePluginAction as usePluginAction6 } from "@paperclipai/plugin-sdk/ui";
|
|
552
|
+
import { useEffect as useEffect7 } from "react";
|
|
554
553
|
|
|
555
554
|
// src/ui/context/WizardContext.tsx
|
|
556
555
|
import { createContext, useCallback, useContext, useState } from "react";
|
|
@@ -722,7 +721,7 @@ function useWizardDispatch() {
|
|
|
722
721
|
}
|
|
723
722
|
|
|
724
723
|
// src/ui/components/steps/StepOnboarding.tsx
|
|
725
|
-
import { useState as useState2 } from "react";
|
|
724
|
+
import { useEffect, useState as useState2 } from "react";
|
|
726
725
|
import { usePluginAction } from "@paperclipai/plugin-sdk/ui";
|
|
727
726
|
|
|
728
727
|
// src/ui/components/ui/card.tsx
|
|
@@ -3975,7 +3974,7 @@ var CardFooter = React.forwardRef(
|
|
|
3975
3974
|
CardFooter.displayName = "CardFooter";
|
|
3976
3975
|
|
|
3977
3976
|
// src/ui/components/steps/StepOnboarding.tsx
|
|
3978
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
3977
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
3979
3978
|
function PathCard({
|
|
3980
3979
|
icon: Icon2,
|
|
3981
3980
|
title,
|
|
@@ -4011,8 +4010,21 @@ function PathCard({
|
|
|
4011
4010
|
function StepOnboarding() {
|
|
4012
4011
|
const dispatch = useWizardDispatch();
|
|
4013
4012
|
const refreshTemplates = usePluginAction("refresh-templates");
|
|
4013
|
+
const checkUpdate = usePluginAction("check-update");
|
|
4014
4014
|
const [refreshing, setRefreshing] = useState2(false);
|
|
4015
4015
|
const [refreshMsg, setRefreshMsg] = useState2(null);
|
|
4016
|
+
const [updateInfo, setUpdateInfo] = useState2(null);
|
|
4017
|
+
useEffect(() => {
|
|
4018
|
+
let cancelled = false;
|
|
4019
|
+
checkUpdate({}).then((result) => {
|
|
4020
|
+
if (!cancelled) setUpdateInfo(result);
|
|
4021
|
+
}).catch(() => {
|
|
4022
|
+
if (!cancelled) setUpdateInfo(null);
|
|
4023
|
+
});
|
|
4024
|
+
return () => {
|
|
4025
|
+
cancelled = true;
|
|
4026
|
+
};
|
|
4027
|
+
}, []);
|
|
4016
4028
|
const handleRefresh = async () => {
|
|
4017
4029
|
setRefreshing(true);
|
|
4018
4030
|
setRefreshMsg(null);
|
|
@@ -4066,7 +4078,7 @@ function StepOnboarding() {
|
|
|
4066
4078
|
}
|
|
4067
4079
|
)
|
|
4068
4080
|
] }),
|
|
4069
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 pt-2", children: [
|
|
4081
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 pt-2", children: [
|
|
4070
4082
|
/* @__PURE__ */ jsxs(
|
|
4071
4083
|
"button",
|
|
4072
4084
|
{
|
|
@@ -4079,6 +4091,31 @@ function StepOnboarding() {
|
|
|
4079
4091
|
]
|
|
4080
4092
|
}
|
|
4081
4093
|
),
|
|
4094
|
+
updateInfo?.ok && updateInfo.updateAvailable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4095
|
+
/* @__PURE__ */ jsx3("span", { className: "text-xs text-muted-foreground/40", children: "|" }),
|
|
4096
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
4097
|
+
/* @__PURE__ */ jsx3("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }),
|
|
4098
|
+
"Company Wizard plugin update: ",
|
|
4099
|
+
updateInfo.currentVersion,
|
|
4100
|
+
" \u2192",
|
|
4101
|
+
" ",
|
|
4102
|
+
updateInfo.latestVersion,
|
|
4103
|
+
updateInfo.url && /* @__PURE__ */ jsxs(
|
|
4104
|
+
"a",
|
|
4105
|
+
{
|
|
4106
|
+
href: updateInfo.url,
|
|
4107
|
+
target: "_blank",
|
|
4108
|
+
rel: "noreferrer",
|
|
4109
|
+
className: "inline-flex items-center gap-0.5 font-medium text-foreground hover:underline",
|
|
4110
|
+
title: "Update the Company Wizard plugin package, then reload Paperclip",
|
|
4111
|
+
children: [
|
|
4112
|
+
"npm",
|
|
4113
|
+
/* @__PURE__ */ jsx3(ExternalLink, { className: "h-3 w-3" })
|
|
4114
|
+
]
|
|
4115
|
+
}
|
|
4116
|
+
)
|
|
4117
|
+
] })
|
|
4118
|
+
] }),
|
|
4082
4119
|
refreshMsg && /* @__PURE__ */ jsx3("span", { className: "text-xs text-muted-foreground", children: refreshMsg })
|
|
4083
4120
|
] })
|
|
4084
4121
|
] });
|
|
@@ -4977,24 +5014,24 @@ function StepRoles() {
|
|
|
4977
5014
|
}
|
|
4978
5015
|
|
|
4979
5016
|
// src/ui/components/steps/StepSummary.tsx
|
|
4980
|
-
import { useEffect as
|
|
5017
|
+
import { useEffect as useEffect4, useRef as useRef3, useState as useState7 } from "react";
|
|
4981
5018
|
import { usePluginAction as usePluginAction3 } from "@paperclipai/plugin-sdk/ui";
|
|
4982
5019
|
|
|
4983
5020
|
// src/ui/components/ConfigReview.tsx
|
|
4984
|
-
import { useEffect as
|
|
5021
|
+
import { useEffect as useEffect3, useState as useState6, useCallback as useCallback6, useRef as useRef2 } from "react";
|
|
4985
5022
|
import { usePluginAction as usePluginAction2 } from "@paperclipai/plugin-sdk/ui";
|
|
4986
5023
|
|
|
4987
5024
|
// src/ui/components/ui/hover-card.tsx
|
|
4988
5025
|
import {
|
|
4989
5026
|
useState as useState5,
|
|
4990
5027
|
useRef,
|
|
4991
|
-
useEffect,
|
|
5028
|
+
useEffect as useEffect2,
|
|
4992
5029
|
useCallback as useCallback5,
|
|
4993
5030
|
createContext as createContext2,
|
|
4994
5031
|
useContext as useContext2
|
|
4995
5032
|
} from "react";
|
|
4996
5033
|
import * as ReactDOM from "react-dom";
|
|
4997
|
-
import { Fragment, jsx as jsx13 } from "react/jsx-runtime";
|
|
5034
|
+
import { Fragment as Fragment2, jsx as jsx13 } from "react/jsx-runtime";
|
|
4998
5035
|
var HoverCardContext = createContext2({ open: false, triggerRef: { current: null } });
|
|
4999
5036
|
function HoverCardRoot({
|
|
5000
5037
|
children,
|
|
@@ -5013,7 +5050,7 @@ function HoverCardRoot({
|
|
|
5013
5050
|
clearTimeout(openTimer.current);
|
|
5014
5051
|
closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
|
|
5015
5052
|
}, [closeDelay]);
|
|
5016
|
-
|
|
5053
|
+
useEffect2(
|
|
5017
5054
|
() => () => {
|
|
5018
5055
|
clearTimeout(openTimer.current);
|
|
5019
5056
|
clearTimeout(closeTimer.current);
|
|
@@ -5032,7 +5069,7 @@ function HoverCardRoot({
|
|
|
5032
5069
|
) });
|
|
5033
5070
|
}
|
|
5034
5071
|
function HoverCardTrigger({ children }) {
|
|
5035
|
-
return /* @__PURE__ */ jsx13(
|
|
5072
|
+
return /* @__PURE__ */ jsx13(Fragment2, { children });
|
|
5036
5073
|
}
|
|
5037
5074
|
function HoverCardContent({
|
|
5038
5075
|
children,
|
|
@@ -5044,7 +5081,7 @@ function HoverCardContent({
|
|
|
5044
5081
|
const { open, triggerRef } = useContext2(HoverCardContext);
|
|
5045
5082
|
const [pos, setPos] = useState5(null);
|
|
5046
5083
|
const contentRef = useRef(null);
|
|
5047
|
-
|
|
5084
|
+
useEffect2(() => {
|
|
5048
5085
|
if (!open || !triggerRef.current) {
|
|
5049
5086
|
setPos(null);
|
|
5050
5087
|
return;
|
|
@@ -5093,7 +5130,7 @@ function HoverCardPortal({ children }) {
|
|
|
5093
5130
|
}
|
|
5094
5131
|
|
|
5095
5132
|
// src/ui/components/ConfigReview.tsx
|
|
5096
|
-
import { Fragment as
|
|
5133
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5097
5134
|
function SummaryRow({
|
|
5098
5135
|
icon: Icon2,
|
|
5099
5136
|
label,
|
|
@@ -5657,7 +5694,7 @@ function ConfigReview() {
|
|
|
5657
5694
|
loadPreview();
|
|
5658
5695
|
}
|
|
5659
5696
|
}, [loadingFiles, previewFiles, repositoryFingerprint, showFiles, loadPreview]);
|
|
5660
|
-
|
|
5697
|
+
useEffect3(() => {
|
|
5661
5698
|
refreshPreview();
|
|
5662
5699
|
}, [refreshPreview]);
|
|
5663
5700
|
const saveRepository = (repo) => {
|
|
@@ -5672,7 +5709,7 @@ function ConfigReview() {
|
|
|
5672
5709
|
});
|
|
5673
5710
|
setEditing(null);
|
|
5674
5711
|
};
|
|
5675
|
-
return /* @__PURE__ */ jsxs8(
|
|
5712
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5676
5713
|
/* @__PURE__ */ jsx14(Card, { children: /* @__PURE__ */ jsxs8(CardContent, { className: "divide-y p-0", children: [
|
|
5677
5714
|
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: Building2, label: "Company", onEdit: () => setEditing("name"), children: editing === "name" ? /* @__PURE__ */ jsx14(
|
|
5678
5715
|
InlineEdit,
|
|
@@ -5685,7 +5722,7 @@ function ConfigReview() {
|
|
|
5685
5722
|
onCancel: () => setEditing(null),
|
|
5686
5723
|
placeholder: "Company name"
|
|
5687
5724
|
}
|
|
5688
|
-
) : /* @__PURE__ */ jsxs8(
|
|
5725
|
+
) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5689
5726
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: state.companyName || "(unnamed)" }),
|
|
5690
5727
|
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground ml-2", children: [
|
|
5691
5728
|
"\u2192 ",
|
|
@@ -5710,7 +5747,7 @@ function ConfigReview() {
|
|
|
5710
5747
|
onCancel: () => setEditing(null),
|
|
5711
5748
|
placeholder: "Leave empty to create a new company, or paste existing company ID"
|
|
5712
5749
|
}
|
|
5713
|
-
) : state.existingCompanyId ? /* @__PURE__ */ jsxs8(
|
|
5750
|
+
) : state.existingCompanyId ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5714
5751
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Existing company" }),
|
|
5715
5752
|
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground ml-2 font-mono text-xs", children: state.existingCompanyId })
|
|
5716
5753
|
] }) : /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Create a new company" })
|
|
@@ -5731,7 +5768,7 @@ function ConfigReview() {
|
|
|
5731
5768
|
type: "button",
|
|
5732
5769
|
onClick: () => setEditing("repository"),
|
|
5733
5770
|
className: "group/repo w-full text-left rounded-md -mx-1 px-1 py-0.5 hover:bg-accent/50 transition-colors",
|
|
5734
|
-
children: isExternalRepo ? /* @__PURE__ */ jsxs8(
|
|
5771
|
+
children: isExternalRepo ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5735
5772
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "External Git repository" }),
|
|
5736
5773
|
/* @__PURE__ */ jsx14("span", { className: "ml-2 text-xs text-muted-foreground underline decoration-dotted underline-offset-2 group-hover/repo:text-foreground", children: "Change" }),
|
|
5737
5774
|
primaryRepoUrl && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5 wrap-break-word", children: primaryRepoUrl }),
|
|
@@ -5739,7 +5776,7 @@ function ConfigReview() {
|
|
|
5739
5776
|
"Ref: ",
|
|
5740
5777
|
primaryRepoRef
|
|
5741
5778
|
] })
|
|
5742
|
-
] }) : /* @__PURE__ */ jsxs8(
|
|
5779
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5743
5780
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Create a new Git repository" }),
|
|
5744
5781
|
/* @__PURE__ */ jsx14("span", { className: "ml-2 text-xs text-muted-foreground underline decoration-dotted underline-offset-2 group-hover/repo:text-foreground", children: "Change \u2014 use an existing repository" }),
|
|
5745
5782
|
/* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
@@ -5782,7 +5819,7 @@ function ConfigReview() {
|
|
|
5782
5819
|
multiline: true
|
|
5783
5820
|
}
|
|
5784
5821
|
)
|
|
5785
|
-
] }) : /* @__PURE__ */ jsxs8(
|
|
5822
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5786
5823
|
/* @__PURE__ */ jsx14("span", { children: state.goals[0]?.title || "(no goal)" }),
|
|
5787
5824
|
state.goals[0]?.description && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: state.goals[0].description }),
|
|
5788
5825
|
state.goals.length > 1 && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
@@ -5925,7 +5962,7 @@ function ConfigReview() {
|
|
|
5925
5962
|
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: previewError })
|
|
5926
5963
|
] })
|
|
5927
5964
|
] }),
|
|
5928
|
-
previewFiles && !loadingFiles && /* @__PURE__ */ jsxs8(
|
|
5965
|
+
previewFiles && !loadingFiles && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5929
5966
|
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
|
|
5930
5967
|
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "Click a file to expand. Use the edit button to override its content before provisioning." }),
|
|
5931
5968
|
/* @__PURE__ */ jsxs8(
|
|
@@ -6010,7 +6047,7 @@ function StepSummary() {
|
|
|
6010
6047
|
const checkAuth = usePluginAction3("check-auth");
|
|
6011
6048
|
const [authError, setAuthError] = useState7(null);
|
|
6012
6049
|
const checked = useRef3(false);
|
|
6013
|
-
|
|
6050
|
+
useEffect4(() => {
|
|
6014
6051
|
if (checked.current) return;
|
|
6015
6052
|
checked.current = true;
|
|
6016
6053
|
checkAuth({}).then((result) => {
|
|
@@ -6055,7 +6092,7 @@ function StepSummary() {
|
|
|
6055
6092
|
}
|
|
6056
6093
|
|
|
6057
6094
|
// src/ui/components/steps/StepAiWizard.tsx
|
|
6058
|
-
import { useState as useState8, useRef as useRef4, useEffect as
|
|
6095
|
+
import { useState as useState8, useRef as useRef4, useEffect as useEffect5 } from "react";
|
|
6059
6096
|
import { usePluginAction as usePluginAction4 } from "@paperclipai/plugin-sdk/ui";
|
|
6060
6097
|
|
|
6061
6098
|
// raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/interview-system.md
|
|
@@ -6232,7 +6269,7 @@ function PhaseIndicator({
|
|
|
6232
6269
|
function ConfiguringAnimation({ ready, onDone }) {
|
|
6233
6270
|
const [step, setStep] = useState8(0);
|
|
6234
6271
|
const [animDone, setAnimDone] = useState8(false);
|
|
6235
|
-
|
|
6272
|
+
useEffect5(() => {
|
|
6236
6273
|
if (step < CONFIG_STEPS.length) {
|
|
6237
6274
|
const timer = setTimeout(() => setStep((s) => s + 1), 600);
|
|
6238
6275
|
return () => clearTimeout(timer);
|
|
@@ -6240,7 +6277,7 @@ function ConfiguringAnimation({ ready, onDone }) {
|
|
|
6240
6277
|
setAnimDone(true);
|
|
6241
6278
|
}
|
|
6242
6279
|
}, [step]);
|
|
6243
|
-
|
|
6280
|
+
useEffect5(() => {
|
|
6244
6281
|
if (animDone && ready) {
|
|
6245
6282
|
const timer = setTimeout(onDone, 300);
|
|
6246
6283
|
return () => clearTimeout(timer);
|
|
@@ -6290,22 +6327,22 @@ function StepAiWizard() {
|
|
|
6290
6327
|
const scrollRef = useRef4(null);
|
|
6291
6328
|
const inputRef = useRef4(null);
|
|
6292
6329
|
const pendingConfigRef = useRef4(null);
|
|
6293
|
-
|
|
6330
|
+
useEffect5(() => {
|
|
6294
6331
|
checkAiConfig({}).then((result) => {
|
|
6295
6332
|
if (!result.ok) setConfigWarning(result.error);
|
|
6296
6333
|
else setConfigWarning(null);
|
|
6297
6334
|
}).catch(() => {
|
|
6298
6335
|
});
|
|
6299
6336
|
}, []);
|
|
6300
|
-
|
|
6337
|
+
useEffect5(() => {
|
|
6301
6338
|
scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" });
|
|
6302
6339
|
}, [messages, loading]);
|
|
6303
|
-
|
|
6340
|
+
useEffect5(() => {
|
|
6304
6341
|
if (!loading && phase === "interview") {
|
|
6305
6342
|
inputRef.current?.focus();
|
|
6306
6343
|
}
|
|
6307
6344
|
}, [loading, phase]);
|
|
6308
|
-
|
|
6345
|
+
useEffect5(() => {
|
|
6309
6346
|
if (!loading) return;
|
|
6310
6347
|
const interval = setInterval(() => {
|
|
6311
6348
|
setLoadingMsg(LOADING_MESSAGES[Math.floor(Math.random() * LOADING_MESSAGES.length)]);
|
|
@@ -6857,7 +6894,7 @@ function StepAiWizard() {
|
|
|
6857
6894
|
}
|
|
6858
6895
|
|
|
6859
6896
|
// src/ui/components/steps/StepProvision.tsx
|
|
6860
|
-
import { useEffect as
|
|
6897
|
+
import { useEffect as useEffect6, useRef as useRef5 } from "react";
|
|
6861
6898
|
import { usePluginAction as usePluginAction5 } from "@paperclipai/plugin-sdk/ui";
|
|
6862
6899
|
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6863
6900
|
function isConfigError(error) {
|
|
@@ -6871,10 +6908,10 @@ function StepProvision() {
|
|
|
6871
6908
|
const started = useRef5(false);
|
|
6872
6909
|
const logEndRef = useRef5(null);
|
|
6873
6910
|
const startProvision = usePluginAction5("start-provision");
|
|
6874
|
-
|
|
6911
|
+
useEffect6(() => {
|
|
6875
6912
|
logEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
6876
6913
|
}, [state.provisionLog]);
|
|
6877
|
-
|
|
6914
|
+
useEffect6(() => {
|
|
6878
6915
|
if (started.current) return;
|
|
6879
6916
|
started.current = true;
|
|
6880
6917
|
dispatch({ type: "SET_PROVISIONING", value: true });
|
|
@@ -7130,52 +7167,11 @@ function StepIndicator() {
|
|
|
7130
7167
|
function WizardShell() {
|
|
7131
7168
|
const state = useWizard();
|
|
7132
7169
|
const dispatch = useWizardDispatch();
|
|
7133
|
-
const checkUpdate = usePluginAction6("check-update");
|
|
7134
|
-
const [updateInfo, setUpdateInfo] = useState9(null);
|
|
7135
7170
|
const StepComponent = STEP_COMPONENTS[state.step];
|
|
7136
|
-
|
|
7171
|
+
useEffect7(() => {
|
|
7137
7172
|
window.scrollTo({ top: 0 });
|
|
7138
7173
|
}, [state.step]);
|
|
7139
|
-
useEffect6(() => {
|
|
7140
|
-
let cancelled = false;
|
|
7141
|
-
checkUpdate({}).then((result) => {
|
|
7142
|
-
if (!cancelled) setUpdateInfo(result);
|
|
7143
|
-
}).catch(() => {
|
|
7144
|
-
if (!cancelled) setUpdateInfo(null);
|
|
7145
|
-
});
|
|
7146
|
-
return () => {
|
|
7147
|
-
cancelled = true;
|
|
7148
|
-
};
|
|
7149
|
-
}, []);
|
|
7150
7174
|
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col", children: [
|
|
7151
|
-
updateInfo?.ok && updateInfo.updateAvailable && /* @__PURE__ */ jsx19("div", { className: "mx-6 mt-4 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-800 dark:text-amber-200", children: /* @__PURE__ */ jsxs13("div", { className: "flex items-start justify-between gap-3", children: [
|
|
7152
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2", children: [
|
|
7153
|
-
/* @__PURE__ */ jsx19(TriangleAlert, { className: "h-4 w-4 shrink-0 mt-0.5" }),
|
|
7154
|
-
/* @__PURE__ */ jsxs13("div", { children: [
|
|
7155
|
-
/* @__PURE__ */ jsx19("p", { className: "font-medium", children: "Company Wizard update available" }),
|
|
7156
|
-
/* @__PURE__ */ jsxs13("p", { className: "mt-0.5 text-amber-700 dark:text-amber-300", children: [
|
|
7157
|
-
"Installed ",
|
|
7158
|
-
updateInfo.currentVersion,
|
|
7159
|
-
"; latest ",
|
|
7160
|
-
updateInfo.latestVersion,
|
|
7161
|
-
". Update the plugin package, then reload Paperclip."
|
|
7162
|
-
] })
|
|
7163
|
-
] })
|
|
7164
|
-
] }),
|
|
7165
|
-
updateInfo.url && /* @__PURE__ */ jsxs13(
|
|
7166
|
-
"a",
|
|
7167
|
-
{
|
|
7168
|
-
href: updateInfo.url,
|
|
7169
|
-
target: "_blank",
|
|
7170
|
-
rel: "noreferrer",
|
|
7171
|
-
className: "inline-flex items-center gap-1 whitespace-nowrap font-medium hover:underline",
|
|
7172
|
-
children: [
|
|
7173
|
-
"npm",
|
|
7174
|
-
/* @__PURE__ */ jsx19(ExternalLink, { className: "h-3 w-3" })
|
|
7175
|
-
]
|
|
7176
|
-
}
|
|
7177
|
-
)
|
|
7178
|
-
] }) }),
|
|
7179
7175
|
getUserStepIndex(state) >= 1 && state.step !== "provision" && state.step !== "done" && /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end px-6 py-3", children: /* @__PURE__ */ jsx19(StepIndicator, {}) }),
|
|
7180
7176
|
/* @__PURE__ */ jsx19("main", { className: "flex-1 flex items-start justify-center p-6", children: /* @__PURE__ */ jsx19("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx19(StepComponent, {}) }) }),
|
|
7181
7177
|
state.error && /* @__PURE__ */ jsxs13("div", { className: "fixed bottom-0 inset-x-0 bg-destructive/10 border-t border-destructive/20 px-6 py-3 text-sm text-destructive flex items-center justify-between", children: [
|