(options: FloatOptions)
| 936 | initial: new globalThis.Date(), |
| 937 | dateMask: "YYYY-MM-DD HH:mm:ss", |
| 938 | validate: Effect.succeed, |
| 939 | ...options, |
| 940 | locales: { |
| 941 | ...defaultLocales, |
| 942 | ...options.locales |
| 943 | } |
| 944 | } |
| 945 | const dateParts = makeDateParts(opts.dateMask, opts.initial, opts.locales) |
| 946 | const initialCursorPosition = dateParts.findIndex((part) => !part.isToken()) |
| 947 | const initialState: DateState = { |
| 948 | dateParts, |
| 949 | typed: "", |
| 950 | cursor: initialCursorPosition, |
| 951 | value: opts.initial, |
| 952 | error: Option.none() |
| 953 | } |
| 954 | return Custom(initialState, { |
| 955 | render: handleDateRender(opts), |
| 956 | process: handleDateProcess(opts), |
| 957 | clear: handleDateClear(opts) |
| 958 | }) |
| 959 | } |
| 960 | |
| 961 | /** |
| 962 | * Creates a file-system selection prompt and returns the selected path. |
| 963 | * |
| 964 | * **Details** |
| 965 | * |
| 966 | * The prompt can be configured to select files, directories, or either path |
| 967 | * type. |
| 968 | * |
| 969 | * You can also type to filter the listed entries. Every printable character is |
| 970 | * appended to the filter query, so navigation is bound to the arrow keys, |
| 971 | * `tab`, and the `Ctrl+P` / `Ctrl+N` chords used by `readline` and `fzf` |
nothing calls this directly
no test coverage detected
searching dependent graphs…