@algolia/wizard 0.6.0-rc.51.28 → 0.6.0-rc.55.29

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.
Files changed (2) hide show
  1. package/dist/main.js +17 -17
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -196,7 +196,7 @@ var useWizard = create((set, get) => ({
196
196
  openLearnMore: () => set({ homeScreen: "learnMore" }),
197
197
  backToHome: () => set({ homeScreen: "home" }),
198
198
  // Resolves once the phase leaves 'idle', whether that happens before or
199
- // after this is called (the welcome screen's spacebar handler is what
199
+ // after this is called (the welcome screen's enter handler is what
200
200
  // drives the transition via `confirmStart`).
201
201
  waitForStart: () => new Promise((resolve4) => {
202
202
  if (get().phase !== "idle") {
@@ -666,20 +666,20 @@ function SelectPrompt({
666
666
  // src/ui/PromptInput.tsx
667
667
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
668
668
  var ACCEPT_REJECT_OPTIONS = ["Accept", "Reject"];
669
- function SpaceToContinuePrompt({
669
+ function EnterToContinuePrompt({
670
670
  question,
671
671
  messages,
672
672
  onDecide
673
673
  }) {
674
- useInput2((input, key) => {
675
- if (input === " ") onDecide(true);
674
+ useInput2((_input, key) => {
675
+ if (key.return) onDecide(true);
676
676
  else if (key.escape) onDecide(false);
677
677
  });
678
678
  return /* @__PURE__ */ jsxs4(Box5, { flexDirection: "column", gap: 1, children: [
679
679
  messages?.map((m, i) => /* @__PURE__ */ jsx5(Text5, { color: COLORS.muted, children: m }, `msg-${i}`)),
680
680
  question && /* @__PURE__ */ jsx5(Text5, { color: COLORS.primary, children: question }),
681
681
  /* @__PURE__ */ jsxs4(Box5, { gap: 1, flexDirection: "column", children: [
682
- /* @__PURE__ */ jsx5(NextAction, { action: "continue", keyHint: "space" }),
682
+ /* @__PURE__ */ jsx5(NextAction, { action: "continue", keyHint: "enter" }),
683
683
  /* @__PURE__ */ jsx5(NextAction, { action: "decline", keyHint: "esc", hierarchy: "secondary" })
684
684
  ] })
685
685
  ] });
@@ -734,9 +734,9 @@ function PromptInput() {
734
734
  }
735
735
  ) });
736
736
  }
737
- if (inputReq.promptType === "spaceToContinue") {
737
+ if (inputReq.promptType === "enterToContinue") {
738
738
  return /* @__PURE__ */ jsx5(
739
- SpaceToContinuePrompt,
739
+ EnterToContinuePrompt,
740
740
  {
741
741
  question: inputReq.prompt,
742
742
  messages: inputReq.messages,
@@ -832,8 +832,8 @@ function Welcome() {
832
832
  const confirmStart = useWizard((s) => s.confirmStart);
833
833
  const openLearnMore = useWizard((s) => s.openLearnMore);
834
834
  const { rows } = useWindowSize4();
835
- useInput3((input) => {
836
- if (input === " ") confirmStart();
835
+ useInput3((input, key) => {
836
+ if (key.return) confirmStart();
837
837
  else if (input === "i") openLearnMore();
838
838
  });
839
839
  const scales = {
@@ -872,7 +872,7 @@ function Welcome() {
872
872
  ) }),
873
873
  /* @__PURE__ */ jsx6(Text6, { color: COLORS.muted, children: "\u2726 From zero \u2192 working search in ~10 minutes" }),
874
874
  /* @__PURE__ */ jsxs5(Box6, { gap: 1, flexDirection: "column", children: [
875
- /* @__PURE__ */ jsx6(NextAction, { action: "start wizard", keyHint: "space" }),
875
+ /* @__PURE__ */ jsx6(NextAction, { action: "start wizard", keyHint: "enter" }),
876
876
  /* @__PURE__ */ jsx6(NextAction, { action: "learn more", keyHint: "i", hierarchy: "secondary" })
877
877
  ] })
878
878
  ] })
@@ -965,9 +965,9 @@ function LearnMore() {
965
965
  const backToHome = useWizard((s) => s.backToHome);
966
966
  const { columns } = useWindowSize5();
967
967
  const dividerWidth = Math.max(0, columns - PADDING_X * 2);
968
- useInput4((input, key) => {
968
+ useInput4((_input, key) => {
969
969
  if (key.escape) backToHome();
970
- else if (input === " ") confirmStart();
970
+ else if (key.return) confirmStart();
971
971
  });
972
972
  return /* @__PURE__ */ jsxs6(
973
973
  Box7,
@@ -1029,7 +1029,7 @@ function LearnMore() {
1029
1029
  ] }),
1030
1030
  /* @__PURE__ */ jsxs6(Box7, { flexDirection: "row", gap: 1, children: [
1031
1031
  /* @__PURE__ */ jsx7(Text7, { color: COLORS.muted, children: "[" }),
1032
- /* @__PURE__ */ jsx7(Text7, { color: COLORS.primary, children: "space" }),
1032
+ /* @__PURE__ */ jsx7(Text7, { color: COLORS.primary, children: "enter" }),
1033
1033
  /* @__PURE__ */ jsx7(Text7, { color: COLORS.muted, children: "]" }),
1034
1034
  /* @__PURE__ */ jsx7(Text7, { color: COLORS.success, bold: true, children: "start wizard" })
1035
1035
  ] })
@@ -1327,7 +1327,7 @@ function App() {
1327
1327
  });
1328
1328
  }
1329
1329
  });
1330
- const escOwnedElsewhere = phase === "idle" || phase === "awaitingInput" && inputReq?.promptType === "spaceToContinue";
1330
+ const escOwnedElsewhere = phase === "idle" || phase === "awaitingInput" && inputReq?.promptType === "enterToContinue";
1331
1331
  useInput6((_input, key) => {
1332
1332
  if (escOwnedElsewhere) return;
1333
1333
  if (key.escape) {
@@ -1626,7 +1626,7 @@ async function ensureConsent() {
1626
1626
  const store2 = useWizard.getState();
1627
1627
  const answer = await store2.requestUserInput({
1628
1628
  prompt: "Wizard will make AI-authored changes to this repository.",
1629
- promptType: "spaceToContinue",
1629
+ promptType: "enterToContinue",
1630
1630
  options: []
1631
1631
  });
1632
1632
  if (answer !== true) {
@@ -3467,7 +3467,7 @@ async function runAnalysis(mode, extraInstructions = []) {
3467
3467
  // package.json
3468
3468
  var package_default = {
3469
3469
  name: "@algolia/wizard",
3470
- version: "0.6.0-rc.51.28",
3470
+ version: "0.6.0-rc.55.29",
3471
3471
  description: "Magically implement Algolia functionality in your codebase",
3472
3472
  type: "module",
3473
3473
  engines: {
@@ -4900,7 +4900,7 @@ ${run.output}` : status;
4900
4900
  // No question being asked here, just an acknowledgement — the
4901
4901
  // continue/decline hints below already say "continue".
4902
4902
  prompt: "",
4903
- promptType: "spaceToContinue",
4903
+ promptType: "enterToContinue",
4904
4904
  options: [],
4905
4905
  messages: ingestOutcomeMessage ? [ingestOutcomeMessage, ...commandMessages] : commandMessages
4906
4906
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.6.0-rc.51.28",
3
+ "version": "0.6.0-rc.55.29",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {