@effected/cli 0.19.0 → 0.21.0

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 (89) hide show
  1. package/Cancelled.js +1 -2
  2. package/CliAudience.js +1 -2
  3. package/CliColor.js +1 -2
  4. package/CliEnv.js +1 -2
  5. package/CliExit.js +1 -2
  6. package/CliFailure.js +1 -2
  7. package/CliInteractive.js +1 -2
  8. package/CliLinks.js +1 -2
  9. package/CliLog.js +1 -2
  10. package/CliLogger.js +1 -2
  11. package/CliMessage.js +1 -2
  12. package/CliPrompt.js +1 -2
  13. package/CliRuntime.js +1 -2
  14. package/CliTest.js +1 -2
  15. package/CliTheme.js +1 -2
  16. package/ConfigIssueRenderer.js +1 -2
  17. package/Doc.js +1 -2
  18. package/Fmt.js +15 -6
  19. package/GithubAnnotation.js +1 -2
  20. package/Glyphs.js +1 -2
  21. package/NotInteractive.js +1 -2
  22. package/Render.js +1 -2
  23. package/SchemaIssueRenderer.js +1 -2
  24. package/Status.js +1 -2
  25. package/TestTerminal.js +1 -2
  26. package/Token.js +1 -2
  27. package/index.d.ts +10 -53
  28. package/internal/ExitRequested.js +1 -2
  29. package/internal/HelpRouting.js +1 -2
  30. package/internal/ansi.js +1 -2
  31. package/internal/autoFormat.js +1 -2
  32. package/internal/canPrompt.js +1 -2
  33. package/internal/counts.js +1 -2
  34. package/internal/diagnostics.js +1 -2
  35. package/internal/displayWidth.js +1 -2
  36. package/internal/failureTarget.js +1 -2
  37. package/internal/fallbackAnswer.js +1 -2
  38. package/internal/fileSink.js +1 -2
  39. package/internal/format.js +1 -2
  40. package/internal/isExitCode.js +1 -2
  41. package/internal/layout.js +1 -2
  42. package/internal/linkScheme.js +1 -2
  43. package/internal/linkTarget.js +1 -2
  44. package/internal/logSafety.js +1 -2
  45. package/internal/renderAnsi.js +1 -2
  46. package/internal/renderDoc.js +1 -2
  47. package/internal/renderGithubLog.js +1 -2
  48. package/internal/renderMarkdown.js +1 -2
  49. package/internal/renderPlain.js +1 -2
  50. package/internal/scanAudience.js +1 -2
  51. package/internal/splitFrame.js +1 -2
  52. package/internal/wizardGate.js +1 -2
  53. package/package.json +6 -6
  54. package/testing.d.ts +0 -4
  55. package/ui/CliUi.js +3 -4
  56. package/ui/CliUiLive.js +1 -2
  57. package/ui/Confirm.js +1 -2
  58. package/ui/DocView.js +1 -2
  59. package/ui/KeyHelp.js +1 -2
  60. package/ui/KeyTable.js +1 -2
  61. package/ui/MultiSelect.js +1 -2
  62. package/ui/Select.js +1 -2
  63. package/ui/Tabs.js +1 -2
  64. package/ui/TextInput.js +1 -2
  65. package/ui/Toggle.js +1 -2
  66. package/ui/UiKey.js +2 -3
  67. package/ui/UiProvider.js +1 -2
  68. package/ui/UiStreams.js +1 -2
  69. package/ui/UiTheme.js +1 -2
  70. package/ui/Viewport.js +1 -2
  71. package/ui/internal/ErrorBoundary.js +1 -2
  72. package/ui/internal/Holder.js +1 -2
  73. package/ui/internal/ScreenContext.js +1 -2
  74. package/ui/internal/UiProviders.js +1 -2
  75. package/ui/internal/ink.js +1 -2
  76. package/ui/internal/inkChalk.js +1 -2
  77. package/ui/internal/inkConsole.js +1 -2
  78. package/ui/internal/lazyView.js +1 -2
  79. package/ui/internal/lineText.js +1 -2
  80. package/ui/internal/mountPermit.js +1 -2
  81. package/ui/internal/processStreams.js +1 -2
  82. package/ui/internal/renderOptions.js +1 -2
  83. package/ui/testing/CliUiTest.js +1 -2
  84. package/ui/testing/fakeStreams.js +1 -2
  85. package/ui/testing/terminalModel.js +1 -2
  86. package/ui-testing-serializer.d.ts +0 -2
  87. package/ui-testing-serializer.js +1 -2
  88. package/ui-testing.d.ts +0 -2
  89. package/ui.d.ts +5 -37
package/ui.d.ts CHANGED
@@ -4,7 +4,6 @@ import { Param } from "effect/cli";
4
4
  import { ReactElement, ReactNode } from "react";
5
5
  import { Key } from "ink";
6
6
  import { ColorLevel } from "@effected/env";
7
- //#region src/ui/CliUiLive.d.ts
8
7
  /**
9
8
  * Options for `CliUi.live`.
10
9
  *
@@ -178,8 +177,6 @@ interface LiveHandle<S> {
178
177
  */
179
178
  readonly close: Effect.Effect<void>;
180
179
  }
181
- //#endregion
182
- //#region src/ui/UiProvider.d.ts
183
180
  /**
184
181
  * What the kit's hooks read in a tree the kit did not mount: the theme, the glyph set, and optionally the size.
185
182
  *
@@ -245,8 +242,6 @@ interface UiProviderProps {
245
242
  * @public
246
243
  */
247
244
  export declare const UiProvider: (props: UiProviderProps) => ReactElement;
248
- //#endregion
249
- //#region src/ui/CliUi.d.ts
250
245
  /**
251
246
  * How a screen ends: with a result, or cancelled for a reason.
252
247
  *
@@ -489,7 +484,7 @@ export declare class CliUi {
489
484
  * so core renders its own message and `CliRuntime.main` exits `64`. Name the parameter with `flag` (the name
490
485
  * without dashes) or `argument` so that error can be built.
491
486
  *
492
- * The options are {@link @effected/cli!CliPromptFallbackOptions}, the same as `CliPrompt.fallback`'s, and `clear`
487
+ * The options are `CliPromptFallbackOptions` (from `@effected/cli`), the same as `CliPrompt.fallback`'s, and `clear`
493
488
  * as for {@link CliUi.run}.
494
489
  *
495
490
  * It runs during parsing, whose environment is core's alone, so it reads `CliTheme` if one is there: with
@@ -598,8 +593,6 @@ export declare class CliUi {
598
593
  */
599
594
  static readonly map: <A, B>(screen: Screen<A>, f: (value: A) => B) => Screen<B>;
600
595
  }
601
- //#endregion
602
- //#region src/ui/UiKey.d.ts
603
596
  /**
604
597
  * The named keys a screen understands and a test can press.
605
598
  *
@@ -626,7 +619,7 @@ export type UiKey = {
626
619
  readonly char: string;
627
620
  };
628
621
  /**
629
- * Normalising Ink's input into {@link UiKey}s.
622
+ * Normalising Ink's input into {@link (UiKey:type)}s.
630
623
  *
631
624
  * @public
632
625
  */
@@ -641,8 +634,6 @@ export declare const UiKey: {
641
634
  /** Typed text. */
642
635
  readonly char: (char: string) => UiKey;
643
636
  };
644
- //#endregion
645
- //#region src/ui/KeyTable.d.ts
646
637
  /**
647
638
  * One row of a {@link KeyTable}: the keys that trigger an action, and the help line that names it.
648
639
  *
@@ -751,8 +742,6 @@ export declare class KeyTable<Action> {
751
742
  * @public
752
743
  */
753
744
  export declare const useKeys: <Action>(table: KeyTable<Action>, dispatch: (action: Action) => void, options?: UseKeysOptions) => void;
754
- //#endregion
755
- //#region src/ui/Confirm.d.ts
756
745
  /**
757
746
  * An extra on/off row a {@link Confirm} hosts beneath its yes/no answer.
758
747
  *
@@ -903,8 +892,6 @@ export declare class Confirm {
903
892
  */
904
893
  static readonly screen: <K extends string>(options: ConfirmScreenOptions<K>) => Screen<ConfirmResult<K>>;
905
894
  }
906
- //#endregion
907
- //#region src/ui/DocView.d.ts
908
895
  /**
909
896
  * Props of {@link DocView}.
910
897
  *
@@ -941,8 +928,6 @@ interface DocViewProps {
941
928
  * @public
942
929
  */
943
930
  export declare const DocView: (props: DocViewProps) => ReactElement;
944
- //#endregion
945
- //#region src/ui/KeyHelp.d.ts
946
931
  /**
947
932
  * Props of {@link KeyHelp}.
948
933
  *
@@ -969,8 +954,6 @@ interface KeyHelpProps {
969
954
  * @public
970
955
  */
971
956
  export declare const KeyHelp: (props: KeyHelpProps) => ReactElement;
972
- //#endregion
973
- //#region src/ui/Viewport.d.ts
974
957
  /**
975
958
  * Where a viewport is: the selected item, the first item in view, how many items fit, and how many there are.
976
959
  *
@@ -1069,8 +1052,6 @@ export declare class Viewport {
1069
1052
  */
1070
1053
  static readonly View: (props: ViewportViewProps) => ReactElement;
1071
1054
  }
1072
- //#endregion
1073
- //#region src/ui/MultiSelect.d.ts
1074
1055
  /**
1075
1056
  * One item of a {@link MultiSelect} section.
1076
1057
  *
@@ -1234,8 +1215,6 @@ export declare class MultiSelect {
1234
1215
  */
1235
1216
  static readonly screen: <A>(options: MultiSelectScreenOptions<A>) => Screen<ReadonlyArray<A>>;
1236
1217
  }
1237
- //#endregion
1238
- //#region src/ui/Select.d.ts
1239
1218
  /**
1240
1219
  * One choice of a {@link Select}.
1241
1220
  *
@@ -1393,8 +1372,6 @@ export declare class Select {
1393
1372
  */
1394
1373
  static readonly screen: <A>(options: SelectScreenOptions<A>) => Screen<A>;
1395
1374
  }
1396
- //#endregion
1397
- //#region src/ui/Tabs.d.ts
1398
1375
  /**
1399
1376
  * What a key does to a {@link Tabs} row: move to the previous or next tab (wrapping), or jump to one by index.
1400
1377
  *
@@ -1482,8 +1459,6 @@ export declare class Tabs {
1482
1459
  */
1483
1460
  static readonly View: <N extends string>(props: TabsProps<N>) => ReactElement;
1484
1461
  }
1485
- //#endregion
1486
- //#region src/ui/TextInput.d.ts
1487
1462
  /**
1488
1463
  * Where a {@link TextInput} is: its value, the cursor within it, and whether enter was pressed.
1489
1464
  *
@@ -1542,8 +1517,8 @@ interface TextInputScreenOptions {
1542
1517
  * does the scrollback; erase the frame as well with `clear: true` on the run when even the mask's length should not
1543
1518
  * stay behind.
1544
1519
  *
1545
- * The message `validate` returns is drawn as it is, unmasked: a message that echoes the value (`"ghp_abc is a
1546
- * token"`) draws the secret in the frame. Say what is wrong without quoting the value.
1520
+ * The message `validate` returns is drawn as it is, unmasked: a message that echoes the value
1521
+ * (`"ghp_abc is a token"`) draws the secret in the frame. Say what is wrong without quoting the value.
1547
1522
  */
1548
1523
  readonly mask?: string | true | ((value: string) => boolean);
1549
1524
  }
@@ -1629,8 +1604,6 @@ export declare class TextInput {
1629
1604
  */
1630
1605
  static readonly screen: (options: TextInputScreenOptions) => Screen<string>;
1631
1606
  }
1632
- //#endregion
1633
- //#region src/ui/Toggle.d.ts
1634
1607
  /**
1635
1608
  * Props of {@link Toggle.View}.
1636
1609
  *
@@ -1659,8 +1632,6 @@ export declare class Toggle {
1659
1632
  */
1660
1633
  static readonly View: (props: ToggleViewProps) => ReactElement;
1661
1634
  }
1662
- //#endregion
1663
- //#region src/ui/UiStreams.d.ts
1664
1635
  /**
1665
1636
  * The streams a screen mounts on: Node streams, because Ink's stream contract is Node's.
1666
1637
  *
@@ -1693,10 +1664,8 @@ declare const UiStreams_base: Context.Reference<UiStreamsShape>;
1693
1664
  * @public
1694
1665
  */
1695
1666
  export declare class UiStreams extends UiStreams_base {}
1696
- //#endregion
1697
- //#region src/ui/UiTheme.d.ts
1698
1667
  /**
1699
- * The styling props of an Ink `Text` that a {@link @effected/cli!Style} maps to.
1668
+ * The styling props of an Ink `Text` that a `Style` (from `@effected/cli`) maps to.
1700
1669
  *
1701
1670
  * @public
1702
1671
  */
@@ -1812,6 +1781,5 @@ export declare const Styled: (props: StyledProps) => ReactElement;
1812
1781
  * @public
1813
1782
  */
1814
1783
  export declare const useTerminalSize: () => TerminalSize;
1815
- //#endregion
1816
1784
  export type { Binding, CliUiFallbackOptions, CliUiPromptOptions, CliUiRunOptions, ConfirmAction, ConfirmInitOptions, ConfirmResult, ConfirmScreenOptions, ConfirmState, ConfirmToggle, ConfirmViewProps, DocViewProps, InkTextProps, KeyHelpProps, KeyHelpRow, KeyName, LiveHandle, LiveOptions, MultiSelectAction, MultiSelectInitOptions, MultiSelectItem, MultiSelectScreenOptions, MultiSelectSection, MultiSelectState, MultiSelectViewProps, Screen, ScreenControl, SelectAction, SelectChoice, SelectInitOptions, SelectScreenOptions, SelectState, SelectViewProps, StyledProps, Tab, TabsAction, TabsProps, TerminalSize, TextInputInitOptions, TextInputScreenOptions, TextInputState, TextInputViewProps, ToggleViewProps, UiContextValue, UiProviderProps, UiStreamsShape, UseKeysOptions, ViewportMove, ViewportRow, ViewportState, ViewportViewProps };
1817
1785
  //# sourceMappingURL=ui.d.ts.map