@arthony/keybook 0.4.0 → 0.4.1

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/cli.js +11 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -795,7 +795,7 @@ function AddEntryForm({ apps, existingTags, onSubmit, onComplete, onCancel, reso
795
795
  const idx = TYPES.indexOf(draft.type);
796
796
  return update({ type: TYPES[key.leftArrow ? (idx + TYPES.length - 1) % TYPES.length : (idx + 1) % TYPES.length] });
797
797
  }
798
- if (key.return) return goReview();
798
+ if (key.return) return setFocused(2);
799
799
  return;
800
800
  }
801
801
  if (focused === 3 && draft.type === "recipe") {
@@ -818,6 +818,7 @@ function AddEntryForm({ apps, existingTags, onSubmit, onComplete, onCancel, reso
818
818
  if (key.backspace || key.delete) return update({ [fieldKey]: draft[fieldKey].slice(0, -1) });
819
819
  if (input && !key.ctrl && !key.meta) return update({ [fieldKey]: draft[fieldKey] + input });
820
820
  });
821
+ const enterHint = focused <= 1 ? "next" : focused === 3 && draft.type === "recipe" ? "add step" : "review";
821
822
  if (screen === "review") return /* @__PURE__ */ jsx(ReviewScreen, {
822
823
  app: resolvedApp(review),
823
824
  entry: draftToEntryInput(review),
@@ -842,12 +843,16 @@ function AddEntryForm({ apps, existingTags, onSubmit, onComplete, onCancel, reso
842
843
  lockedApp
843
844
  })
844
845
  }),
845
- /* @__PURE__ */ jsx(Box, {
846
+ /* @__PURE__ */ jsxs(Box, {
846
847
  marginTop: 1,
847
- children: /* @__PURE__ */ jsx(Text, {
848
- color: hint ? "red" : "gray",
849
- children: hint || "⌃N next · ⌃P prev · ⏎ review · esc cancel"
850
- })
848
+ flexDirection: "column",
849
+ children: [hint ? /* @__PURE__ */ jsx(Text, {
850
+ color: "red",
851
+ children: hint
852
+ }) : null, /* @__PURE__ */ jsx(Text, {
853
+ color: "gray",
854
+ children: `⌃N next · ⌃P prev · ⏎ ${enterHint} · esc cancel`
855
+ })]
851
856
  })
852
857
  ]
853
858
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arthony/keybook",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },