@starlein/paperclip-plugin-company-wizard 0.4.3 → 0.4.5-a
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 +26 -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 +69 -74
- package/dist/ui/index.js.map +3 -3
- package/dist/worker.js +62 -5
- 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,30 @@ 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
|
+
updateInfo.latestVersion,
|
|
4102
|
+
updateInfo.url && /* @__PURE__ */ jsxs(
|
|
4103
|
+
"a",
|
|
4104
|
+
{
|
|
4105
|
+
href: updateInfo.url,
|
|
4106
|
+
target: "_blank",
|
|
4107
|
+
rel: "noreferrer",
|
|
4108
|
+
className: "inline-flex items-center gap-0.5 font-medium text-foreground hover:underline",
|
|
4109
|
+
title: "Update the Company Wizard plugin package, then reload Paperclip",
|
|
4110
|
+
children: [
|
|
4111
|
+
"npm",
|
|
4112
|
+
/* @__PURE__ */ jsx3(ExternalLink, { className: "h-3 w-3" })
|
|
4113
|
+
]
|
|
4114
|
+
}
|
|
4115
|
+
)
|
|
4116
|
+
] })
|
|
4117
|
+
] }),
|
|
4082
4118
|
refreshMsg && /* @__PURE__ */ jsx3("span", { className: "text-xs text-muted-foreground", children: refreshMsg })
|
|
4083
4119
|
] })
|
|
4084
4120
|
] });
|
|
@@ -4977,24 +5013,24 @@ function StepRoles() {
|
|
|
4977
5013
|
}
|
|
4978
5014
|
|
|
4979
5015
|
// src/ui/components/steps/StepSummary.tsx
|
|
4980
|
-
import { useEffect as
|
|
5016
|
+
import { useEffect as useEffect4, useRef as useRef3, useState as useState7 } from "react";
|
|
4981
5017
|
import { usePluginAction as usePluginAction3 } from "@paperclipai/plugin-sdk/ui";
|
|
4982
5018
|
|
|
4983
5019
|
// src/ui/components/ConfigReview.tsx
|
|
4984
|
-
import { useEffect as
|
|
5020
|
+
import { useEffect as useEffect3, useState as useState6, useCallback as useCallback6, useRef as useRef2 } from "react";
|
|
4985
5021
|
import { usePluginAction as usePluginAction2 } from "@paperclipai/plugin-sdk/ui";
|
|
4986
5022
|
|
|
4987
5023
|
// src/ui/components/ui/hover-card.tsx
|
|
4988
5024
|
import {
|
|
4989
5025
|
useState as useState5,
|
|
4990
5026
|
useRef,
|
|
4991
|
-
useEffect,
|
|
5027
|
+
useEffect as useEffect2,
|
|
4992
5028
|
useCallback as useCallback5,
|
|
4993
5029
|
createContext as createContext2,
|
|
4994
5030
|
useContext as useContext2
|
|
4995
5031
|
} from "react";
|
|
4996
5032
|
import * as ReactDOM from "react-dom";
|
|
4997
|
-
import { Fragment, jsx as jsx13 } from "react/jsx-runtime";
|
|
5033
|
+
import { Fragment as Fragment2, jsx as jsx13 } from "react/jsx-runtime";
|
|
4998
5034
|
var HoverCardContext = createContext2({ open: false, triggerRef: { current: null } });
|
|
4999
5035
|
function HoverCardRoot({
|
|
5000
5036
|
children,
|
|
@@ -5013,7 +5049,7 @@ function HoverCardRoot({
|
|
|
5013
5049
|
clearTimeout(openTimer.current);
|
|
5014
5050
|
closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
|
|
5015
5051
|
}, [closeDelay]);
|
|
5016
|
-
|
|
5052
|
+
useEffect2(
|
|
5017
5053
|
() => () => {
|
|
5018
5054
|
clearTimeout(openTimer.current);
|
|
5019
5055
|
clearTimeout(closeTimer.current);
|
|
@@ -5032,7 +5068,7 @@ function HoverCardRoot({
|
|
|
5032
5068
|
) });
|
|
5033
5069
|
}
|
|
5034
5070
|
function HoverCardTrigger({ children }) {
|
|
5035
|
-
return /* @__PURE__ */ jsx13(
|
|
5071
|
+
return /* @__PURE__ */ jsx13(Fragment2, { children });
|
|
5036
5072
|
}
|
|
5037
5073
|
function HoverCardContent({
|
|
5038
5074
|
children,
|
|
@@ -5044,7 +5080,7 @@ function HoverCardContent({
|
|
|
5044
5080
|
const { open, triggerRef } = useContext2(HoverCardContext);
|
|
5045
5081
|
const [pos, setPos] = useState5(null);
|
|
5046
5082
|
const contentRef = useRef(null);
|
|
5047
|
-
|
|
5083
|
+
useEffect2(() => {
|
|
5048
5084
|
if (!open || !triggerRef.current) {
|
|
5049
5085
|
setPos(null);
|
|
5050
5086
|
return;
|
|
@@ -5093,7 +5129,7 @@ function HoverCardPortal({ children }) {
|
|
|
5093
5129
|
}
|
|
5094
5130
|
|
|
5095
5131
|
// src/ui/components/ConfigReview.tsx
|
|
5096
|
-
import { Fragment as
|
|
5132
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5097
5133
|
function SummaryRow({
|
|
5098
5134
|
icon: Icon2,
|
|
5099
5135
|
label,
|
|
@@ -5657,7 +5693,7 @@ function ConfigReview() {
|
|
|
5657
5693
|
loadPreview();
|
|
5658
5694
|
}
|
|
5659
5695
|
}, [loadingFiles, previewFiles, repositoryFingerprint, showFiles, loadPreview]);
|
|
5660
|
-
|
|
5696
|
+
useEffect3(() => {
|
|
5661
5697
|
refreshPreview();
|
|
5662
5698
|
}, [refreshPreview]);
|
|
5663
5699
|
const saveRepository = (repo) => {
|
|
@@ -5672,7 +5708,7 @@ function ConfigReview() {
|
|
|
5672
5708
|
});
|
|
5673
5709
|
setEditing(null);
|
|
5674
5710
|
};
|
|
5675
|
-
return /* @__PURE__ */ jsxs8(
|
|
5711
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5676
5712
|
/* @__PURE__ */ jsx14(Card, { children: /* @__PURE__ */ jsxs8(CardContent, { className: "divide-y p-0", children: [
|
|
5677
5713
|
/* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(SummaryRow, { icon: Building2, label: "Company", onEdit: () => setEditing("name"), children: editing === "name" ? /* @__PURE__ */ jsx14(
|
|
5678
5714
|
InlineEdit,
|
|
@@ -5685,7 +5721,7 @@ function ConfigReview() {
|
|
|
5685
5721
|
onCancel: () => setEditing(null),
|
|
5686
5722
|
placeholder: "Company name"
|
|
5687
5723
|
}
|
|
5688
|
-
) : /* @__PURE__ */ jsxs8(
|
|
5724
|
+
) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5689
5725
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: state.companyName || "(unnamed)" }),
|
|
5690
5726
|
/* @__PURE__ */ jsxs8("span", { className: "text-muted-foreground ml-2", children: [
|
|
5691
5727
|
"\u2192 ",
|
|
@@ -5710,7 +5746,7 @@ function ConfigReview() {
|
|
|
5710
5746
|
onCancel: () => setEditing(null),
|
|
5711
5747
|
placeholder: "Leave empty to create a new company, or paste existing company ID"
|
|
5712
5748
|
}
|
|
5713
|
-
) : state.existingCompanyId ? /* @__PURE__ */ jsxs8(
|
|
5749
|
+
) : state.existingCompanyId ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5714
5750
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Existing company" }),
|
|
5715
5751
|
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground ml-2 font-mono text-xs", children: state.existingCompanyId })
|
|
5716
5752
|
] }) : /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Create a new company" })
|
|
@@ -5731,7 +5767,7 @@ function ConfigReview() {
|
|
|
5731
5767
|
type: "button",
|
|
5732
5768
|
onClick: () => setEditing("repository"),
|
|
5733
5769
|
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(
|
|
5770
|
+
children: isExternalRepo ? /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5735
5771
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "External Git repository" }),
|
|
5736
5772
|
/* @__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
5773
|
primaryRepoUrl && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5 wrap-break-word", children: primaryRepoUrl }),
|
|
@@ -5739,7 +5775,7 @@ function ConfigReview() {
|
|
|
5739
5775
|
"Ref: ",
|
|
5740
5776
|
primaryRepoRef
|
|
5741
5777
|
] })
|
|
5742
|
-
] }) : /* @__PURE__ */ jsxs8(
|
|
5778
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5743
5779
|
/* @__PURE__ */ jsx14("span", { className: "font-medium", children: "Create a new Git repository" }),
|
|
5744
5780
|
/* @__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
5781
|
/* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
@@ -5782,7 +5818,7 @@ function ConfigReview() {
|
|
|
5782
5818
|
multiline: true
|
|
5783
5819
|
}
|
|
5784
5820
|
)
|
|
5785
|
-
] }) : /* @__PURE__ */ jsxs8(
|
|
5821
|
+
] }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5786
5822
|
/* @__PURE__ */ jsx14("span", { children: state.goals[0]?.title || "(no goal)" }),
|
|
5787
5823
|
state.goals[0]?.description && /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: state.goals[0].description }),
|
|
5788
5824
|
state.goals.length > 1 && /* @__PURE__ */ jsxs8("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
@@ -5925,7 +5961,7 @@ function ConfigReview() {
|
|
|
5925
5961
|
/* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground mt-0.5", children: previewError })
|
|
5926
5962
|
] })
|
|
5927
5963
|
] }),
|
|
5928
|
-
previewFiles && !loadingFiles && /* @__PURE__ */ jsxs8(
|
|
5964
|
+
previewFiles && !loadingFiles && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
5929
5965
|
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
|
|
5930
5966
|
/* @__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
5967
|
/* @__PURE__ */ jsxs8(
|
|
@@ -6010,7 +6046,7 @@ function StepSummary() {
|
|
|
6010
6046
|
const checkAuth = usePluginAction3("check-auth");
|
|
6011
6047
|
const [authError, setAuthError] = useState7(null);
|
|
6012
6048
|
const checked = useRef3(false);
|
|
6013
|
-
|
|
6049
|
+
useEffect4(() => {
|
|
6014
6050
|
if (checked.current) return;
|
|
6015
6051
|
checked.current = true;
|
|
6016
6052
|
checkAuth({}).then((result) => {
|
|
@@ -6055,7 +6091,7 @@ function StepSummary() {
|
|
|
6055
6091
|
}
|
|
6056
6092
|
|
|
6057
6093
|
// src/ui/components/steps/StepAiWizard.tsx
|
|
6058
|
-
import { useState as useState8, useRef as useRef4, useEffect as
|
|
6094
|
+
import { useState as useState8, useRef as useRef4, useEffect as useEffect5 } from "react";
|
|
6059
6095
|
import { usePluginAction as usePluginAction4 } from "@paperclipai/plugin-sdk/ui";
|
|
6060
6096
|
|
|
6061
6097
|
// raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/interview-system.md
|
|
@@ -6232,7 +6268,7 @@ function PhaseIndicator({
|
|
|
6232
6268
|
function ConfiguringAnimation({ ready, onDone }) {
|
|
6233
6269
|
const [step, setStep] = useState8(0);
|
|
6234
6270
|
const [animDone, setAnimDone] = useState8(false);
|
|
6235
|
-
|
|
6271
|
+
useEffect5(() => {
|
|
6236
6272
|
if (step < CONFIG_STEPS.length) {
|
|
6237
6273
|
const timer = setTimeout(() => setStep((s) => s + 1), 600);
|
|
6238
6274
|
return () => clearTimeout(timer);
|
|
@@ -6240,7 +6276,7 @@ function ConfiguringAnimation({ ready, onDone }) {
|
|
|
6240
6276
|
setAnimDone(true);
|
|
6241
6277
|
}
|
|
6242
6278
|
}, [step]);
|
|
6243
|
-
|
|
6279
|
+
useEffect5(() => {
|
|
6244
6280
|
if (animDone && ready) {
|
|
6245
6281
|
const timer = setTimeout(onDone, 300);
|
|
6246
6282
|
return () => clearTimeout(timer);
|
|
@@ -6290,22 +6326,22 @@ function StepAiWizard() {
|
|
|
6290
6326
|
const scrollRef = useRef4(null);
|
|
6291
6327
|
const inputRef = useRef4(null);
|
|
6292
6328
|
const pendingConfigRef = useRef4(null);
|
|
6293
|
-
|
|
6329
|
+
useEffect5(() => {
|
|
6294
6330
|
checkAiConfig({}).then((result) => {
|
|
6295
6331
|
if (!result.ok) setConfigWarning(result.error);
|
|
6296
6332
|
else setConfigWarning(null);
|
|
6297
6333
|
}).catch(() => {
|
|
6298
6334
|
});
|
|
6299
6335
|
}, []);
|
|
6300
|
-
|
|
6336
|
+
useEffect5(() => {
|
|
6301
6337
|
scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" });
|
|
6302
6338
|
}, [messages, loading]);
|
|
6303
|
-
|
|
6339
|
+
useEffect5(() => {
|
|
6304
6340
|
if (!loading && phase === "interview") {
|
|
6305
6341
|
inputRef.current?.focus();
|
|
6306
6342
|
}
|
|
6307
6343
|
}, [loading, phase]);
|
|
6308
|
-
|
|
6344
|
+
useEffect5(() => {
|
|
6309
6345
|
if (!loading) return;
|
|
6310
6346
|
const interval = setInterval(() => {
|
|
6311
6347
|
setLoadingMsg(LOADING_MESSAGES[Math.floor(Math.random() * LOADING_MESSAGES.length)]);
|
|
@@ -6857,7 +6893,7 @@ function StepAiWizard() {
|
|
|
6857
6893
|
}
|
|
6858
6894
|
|
|
6859
6895
|
// src/ui/components/steps/StepProvision.tsx
|
|
6860
|
-
import { useEffect as
|
|
6896
|
+
import { useEffect as useEffect6, useRef as useRef5 } from "react";
|
|
6861
6897
|
import { usePluginAction as usePluginAction5 } from "@paperclipai/plugin-sdk/ui";
|
|
6862
6898
|
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6863
6899
|
function isConfigError(error) {
|
|
@@ -6871,10 +6907,10 @@ function StepProvision() {
|
|
|
6871
6907
|
const started = useRef5(false);
|
|
6872
6908
|
const logEndRef = useRef5(null);
|
|
6873
6909
|
const startProvision = usePluginAction5("start-provision");
|
|
6874
|
-
|
|
6910
|
+
useEffect6(() => {
|
|
6875
6911
|
logEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
6876
6912
|
}, [state.provisionLog]);
|
|
6877
|
-
|
|
6913
|
+
useEffect6(() => {
|
|
6878
6914
|
if (started.current) return;
|
|
6879
6915
|
started.current = true;
|
|
6880
6916
|
dispatch({ type: "SET_PROVISIONING", value: true });
|
|
@@ -7130,52 +7166,11 @@ function StepIndicator() {
|
|
|
7130
7166
|
function WizardShell() {
|
|
7131
7167
|
const state = useWizard();
|
|
7132
7168
|
const dispatch = useWizardDispatch();
|
|
7133
|
-
const checkUpdate = usePluginAction6("check-update");
|
|
7134
|
-
const [updateInfo, setUpdateInfo] = useState9(null);
|
|
7135
7169
|
const StepComponent = STEP_COMPONENTS[state.step];
|
|
7136
|
-
|
|
7170
|
+
useEffect7(() => {
|
|
7137
7171
|
window.scrollTo({ top: 0 });
|
|
7138
7172
|
}, [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
7173
|
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
7174
|
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
7175
|
/* @__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
7176
|
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: [
|