create-mendix-widget-gleam 2.0.14 → 2.0.16
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/README.md +1 -1
- package/package.json +5 -1
- package/src/index.mjs +32 -12
- package/template/gleam.toml +1 -1
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache_inline +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache_meta +0 -0
- package/tui/build/dev/javascript/etch/etch/command.mjs +479 -0
- package/tui/build/dev/javascript/etch/etch/cursor.mjs +164 -0
- package/tui/build/dev/javascript/etch/etch/event.mjs +2399 -0
- package/tui/build/dev/javascript/etch/etch/internal/consts.mjs +3 -0
- package/tui/build/dev/javascript/etch/etch/stdout.mjs +375 -0
- package/tui/build/dev/javascript/etch/etch/style.mjs +741 -0
- package/tui/build/dev/javascript/etch/etch/terminal.mjs +137 -0
- package/tui/build/dev/javascript/etch/gleam.mjs +1 -0
- package/tui/build/dev/javascript/etch/input/event_ffi.erl +73 -0
- package/tui/build/dev/javascript/etch/input/input_ffi.mjs +192 -0
- package/tui/build/dev/javascript/etch/input/signal_handler.erl +33 -0
- package/tui/build/dev/javascript/etch/terminal/terminal_ffi.erl +22 -0
- package/tui/build/dev/javascript/etch/terminal/terminal_ffi.mjs +37 -0
- package/tui/build/dev/javascript/etch/terminal/tty_state.erl +29 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/application.mjs +38 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/atom.mjs +2 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/charlist.mjs +1 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/node.mjs +12 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/port.mjs +1 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/process.mjs +161 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/reference.mjs +1 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam.mjs +1 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@application.erl +43 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@atom.erl +94 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@charlist.erl +42 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@node.erl +80 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@port.erl +8 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@process.erl +868 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@reference.erl +21 -0
- package/tui/build/dev/javascript/gleam_erlang/gleam_erlang_ffi.erl +164 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/array.mjs +24 -0
- package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/promise.mjs +105 -0
- package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/symbol.mjs +7 -0
- package/tui/build/dev/javascript/gleam_javascript/gleam.mjs +1 -0
- package/tui/build/dev/javascript/gleam_javascript/gleam_javascript_ffi.mjs +133 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_inline +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_meta +0 -0
- package/tui/build/dev/javascript/gleam_stdlib/dict.mjs +710 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/bit_array.mjs +286 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/bool.mjs +295 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/bytes_tree.mjs +225 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/dict.mjs +455 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/dynamic/decode.mjs +993 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/dynamic.mjs +35 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/float.mjs +528 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/function.mjs +6 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/int.mjs +764 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/io.mjs +8 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/list.mjs +3063 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/option.mjs +386 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/order.mjs +166 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/pair.mjs +96 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/result.mjs +448 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/set.mjs +413 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/string.mjs +695 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/string_tree.mjs +128 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam/uri.mjs +1151 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam.mjs +1 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@bit_array.erl +347 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@bool.erl +334 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@bytes_tree.erl +211 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@dict.erl +513 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@dynamic.erl +105 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@dynamic@decode.erl +1114 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@float.erl +711 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@function.erl +18 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@int.erl +972 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@io.erl +76 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@list.erl +2735 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@option.erl +381 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@order.erl +188 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@pair.erl +104 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@result.erl +500 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@set.erl +430 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@string.erl +964 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@string_tree.erl +202 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam@uri.erl +1042 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam_stdlib.erl +534 -0
- package/tui/build/dev/javascript/gleam_stdlib/gleam_stdlib.mjs +1133 -0
- package/tui/build/dev/javascript/gleam_version +1 -0
- package/tui/build/dev/javascript/prelude.mjs +1575 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_inline +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_meta +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_warnings +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_inline +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_meta +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_warnings +0 -0
- package/tui/build/dev/javascript/tui/gleam.mjs +1 -0
- package/tui/build/dev/javascript/tui/tui/prompt.mjs +521 -0
- package/tui/build/dev/javascript/tui/tui.mjs +334 -0
- package/tui/build/dev/javascript/tui/tui_ffi.mjs +32 -0
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ my-widget/
|
|
|
30
30
|
widgets/ # .mpk 위젯 파일 (glendix/widget로 바인딩)
|
|
31
31
|
bindings.json # 외부 React 컴포넌트 바인딩 설정
|
|
32
32
|
package.json # npm 의존성 (React, 외부 라이브러리 등)
|
|
33
|
-
gleam.toml # Gleam 프로젝트 설정 (glendix >= 2.0.
|
|
33
|
+
gleam.toml # Gleam 프로젝트 설정 (glendix >= 2.0.16 의존성 포함)
|
|
34
34
|
CLAUDE.md # AI 어시스턴트용 프로젝트 컨텍스트
|
|
35
35
|
```
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mendix-widget-gleam",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "Scaffold a Mendix Pluggable Widget powered by Gleam",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
"bin/",
|
|
10
10
|
"src/",
|
|
11
11
|
"template/",
|
|
12
|
+
"tui/build/dev/javascript/",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build:tui": "cd tui && gleam build --target javascript"
|
|
17
|
+
},
|
|
14
18
|
"engines": {
|
|
15
19
|
"node": ">=18"
|
|
16
20
|
},
|
package/src/index.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { resolve, dirname, join } from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
8
8
|
import { execSync } from "node:child_process";
|
|
9
|
+
import { collect_options } from "../tui/build/dev/javascript/tui/tui.mjs";
|
|
9
10
|
import { collectOptions } from "./prompts.mjs";
|
|
10
11
|
import { generateNames } from "./naming.mjs";
|
|
11
12
|
import { getPmConfig } from "./pm.mjs";
|
|
@@ -53,16 +54,30 @@ export async function main(args) {
|
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
console.log(
|
|
57
|
-
`\n${BOLD}${CYAN}create-mendix-widget-gleam${RESET} ${DIM}v${VERSION}${RESET}\n`,
|
|
58
|
-
);
|
|
59
|
-
|
|
60
57
|
// Extract project name from CLI args (excluding flags)
|
|
61
58
|
const positional = args.filter((a) => !a.startsWith("-"));
|
|
62
|
-
const cliProjectName = positional[0] ||
|
|
59
|
+
const cliProjectName = positional[0] || "";
|
|
63
60
|
|
|
64
|
-
// Collect options
|
|
65
|
-
const
|
|
61
|
+
// Collect options — etch TUI (TTY) with readline fallback (non-TTY/pipe)
|
|
62
|
+
const header = `\n${BOLD}${CYAN}create-mendix-widget-gleam${RESET} ${DIM}v${VERSION}${RESET}\n`;
|
|
63
|
+
let projectName, pm, lang;
|
|
64
|
+
let usedFallback = false;
|
|
65
|
+
try {
|
|
66
|
+
const options = await collect_options(cliProjectName);
|
|
67
|
+
projectName = options.project_name;
|
|
68
|
+
pm = options.pm;
|
|
69
|
+
lang = options.lang;
|
|
70
|
+
} catch {
|
|
71
|
+
// Fallback: readline prompts (non-TTY, CI, pipe, etc.)
|
|
72
|
+
usedFallback = true;
|
|
73
|
+
console.log(header);
|
|
74
|
+
const result = await collectOptions(cliProjectName || null);
|
|
75
|
+
projectName = result.projectName;
|
|
76
|
+
pm = result.pm;
|
|
77
|
+
lang = result.lang;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (!usedFallback) console.log(header);
|
|
66
81
|
|
|
67
82
|
// Name transformations
|
|
68
83
|
const names = generateNames(projectName);
|
|
@@ -121,15 +136,17 @@ export async function main(args) {
|
|
|
121
136
|
// git not available — continue
|
|
122
137
|
}
|
|
123
138
|
|
|
124
|
-
// Gleam → JS compilation
|
|
125
|
-
console.log(`\n${BOLD}${t(lang, "progress.gleamCompiling")}${RESET}
|
|
139
|
+
// Gleam → JS compilation (pipe로 Erlang 관련 Unused value warning 숨김)
|
|
140
|
+
console.log(`\n${BOLD}${t(lang, "progress.gleamCompiling")}${RESET}`);
|
|
126
141
|
try {
|
|
127
142
|
execSync("gleam build --target javascript", {
|
|
128
143
|
cwd: targetDir,
|
|
129
|
-
stdio: "
|
|
144
|
+
stdio: "pipe",
|
|
130
145
|
});
|
|
131
|
-
console.log(
|
|
132
|
-
} catch {
|
|
146
|
+
console.log(`${GREEN}✓${RESET} ${t(lang, "progress.gleamCompiled")}`);
|
|
147
|
+
} catch (e) {
|
|
148
|
+
const output = (e.stderr || e.stdout || "").toString();
|
|
149
|
+
if (output) console.error(output);
|
|
133
150
|
console.error(
|
|
134
151
|
`\n${YELLOW}${t(lang, "error.gleamCompileFail")}${RESET}`,
|
|
135
152
|
);
|
|
@@ -208,4 +225,7 @@ ${BOLD}${t(lang, "done.nextSteps")}${RESET}
|
|
|
208
225
|
${CYAN}gleam run -m glendix/build${RESET} ${DIM}${t(lang, "done.prodBuild")}${RESET}
|
|
209
226
|
${CYAN}gleam run -m glendix/marketplace${RESET} ${DIM}${t(lang, "done.marketplace")}${RESET}
|
|
210
227
|
`);
|
|
228
|
+
|
|
229
|
+
// etch TUI 이벤트 서버의 stdin 리스너가 이벤트 루프를 유지하므로 명시적 종료
|
|
230
|
+
process.exit(0);
|
|
211
231
|
}
|
package/template/gleam.toml
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import * as $cursor from "../etch/cursor.mjs";
|
|
2
|
+
import * as $event from "../etch/event.mjs";
|
|
3
|
+
import * as $style from "../etch/style.mjs";
|
|
4
|
+
import * as $terminal from "../etch/terminal.mjs";
|
|
5
|
+
import { CustomType as $CustomType } from "../gleam.mjs";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Prints text.
|
|
9
|
+
*/
|
|
10
|
+
export class Print extends $CustomType {
|
|
11
|
+
constructor(s) {
|
|
12
|
+
super();
|
|
13
|
+
this.s = s;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export const Command$Print = (s) => new Print(s);
|
|
17
|
+
export const Command$isPrint = (value) => value instanceof Print;
|
|
18
|
+
export const Command$Print$s = (value) => value.s;
|
|
19
|
+
export const Command$Print$0 = (value) => value.s;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Prints text and resets its [`Colors`](style.html#Color)
|
|
23
|
+
* and [`Attributes`](style.html#Attribute).
|
|
24
|
+
*/
|
|
25
|
+
export class PrintReset extends $CustomType {
|
|
26
|
+
constructor(s) {
|
|
27
|
+
super();
|
|
28
|
+
this.s = s;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export const Command$PrintReset = (s) => new PrintReset(s);
|
|
32
|
+
export const Command$isPrintReset = (value) => value instanceof PrintReset;
|
|
33
|
+
export const Command$PrintReset$s = (value) => value.s;
|
|
34
|
+
export const Command$PrintReset$0 = (value) => value.s;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Prints text and moves the caret to the beginning of a new line.
|
|
38
|
+
*/
|
|
39
|
+
export class Println extends $CustomType {
|
|
40
|
+
constructor(s) {
|
|
41
|
+
super();
|
|
42
|
+
this.s = s;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export const Command$Println = (s) => new Println(s);
|
|
46
|
+
export const Command$isPrintln = (value) => value instanceof Println;
|
|
47
|
+
export const Command$Println$s = (value) => value.s;
|
|
48
|
+
export const Command$Println$0 = (value) => value.s;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Prints text, resets its [`Colors`](style.html#Color)
|
|
52
|
+
* and [`Attributes`](style.html#Attribute)
|
|
53
|
+
* and moves the caret to the beginning of a new line.
|
|
54
|
+
*/
|
|
55
|
+
export class PrintlnReset extends $CustomType {
|
|
56
|
+
constructor(s) {
|
|
57
|
+
super();
|
|
58
|
+
this.s = s;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export const Command$PrintlnReset = (s) => new PrintlnReset(s);
|
|
62
|
+
export const Command$isPrintlnReset = (value) => value instanceof PrintlnReset;
|
|
63
|
+
export const Command$PrintlnReset$s = (value) => value.s;
|
|
64
|
+
export const Command$PrintlnReset$0 = (value) => value.s;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Moves the cursor n lines up.
|
|
68
|
+
*/
|
|
69
|
+
export class MoveUp extends $CustomType {
|
|
70
|
+
constructor(n) {
|
|
71
|
+
super();
|
|
72
|
+
this.n = n;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export const Command$MoveUp = (n) => new MoveUp(n);
|
|
76
|
+
export const Command$isMoveUp = (value) => value instanceof MoveUp;
|
|
77
|
+
export const Command$MoveUp$n = (value) => value.n;
|
|
78
|
+
export const Command$MoveUp$0 = (value) => value.n;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Moves the cursor n lines down.
|
|
82
|
+
*/
|
|
83
|
+
export class MoveDown extends $CustomType {
|
|
84
|
+
constructor(n) {
|
|
85
|
+
super();
|
|
86
|
+
this.n = n;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export const Command$MoveDown = (n) => new MoveDown(n);
|
|
90
|
+
export const Command$isMoveDown = (value) => value instanceof MoveDown;
|
|
91
|
+
export const Command$MoveDown$n = (value) => value.n;
|
|
92
|
+
export const Command$MoveDown$0 = (value) => value.n;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Moves the cursor n characters left.
|
|
96
|
+
*/
|
|
97
|
+
export class MoveLeft extends $CustomType {
|
|
98
|
+
constructor(n) {
|
|
99
|
+
super();
|
|
100
|
+
this.n = n;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export const Command$MoveLeft = (n) => new MoveLeft(n);
|
|
104
|
+
export const Command$isMoveLeft = (value) => value instanceof MoveLeft;
|
|
105
|
+
export const Command$MoveLeft$n = (value) => value.n;
|
|
106
|
+
export const Command$MoveLeft$0 = (value) => value.n;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Moves the cursor n characters right.
|
|
110
|
+
*/
|
|
111
|
+
export class MoveRight extends $CustomType {
|
|
112
|
+
constructor(n) {
|
|
113
|
+
super();
|
|
114
|
+
this.n = n;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export const Command$MoveRight = (n) => new MoveRight(n);
|
|
118
|
+
export const Command$isMoveRight = (value) => value instanceof MoveRight;
|
|
119
|
+
export const Command$MoveRight$n = (value) => value.n;
|
|
120
|
+
export const Command$MoveRight$0 = (value) => value.n;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Moves the cursor n lines down and moves the caret
|
|
124
|
+
* to the beginning of the line.
|
|
125
|
+
*/
|
|
126
|
+
export class MoveToNextLine extends $CustomType {
|
|
127
|
+
constructor(n) {
|
|
128
|
+
super();
|
|
129
|
+
this.n = n;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export const Command$MoveToNextLine = (n) => new MoveToNextLine(n);
|
|
133
|
+
export const Command$isMoveToNextLine = (value) =>
|
|
134
|
+
value instanceof MoveToNextLine;
|
|
135
|
+
export const Command$MoveToNextLine$n = (value) => value.n;
|
|
136
|
+
export const Command$MoveToNextLine$0 = (value) => value.n;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Moves the cursor n lines up and moves the caret
|
|
140
|
+
* to the beginning of the line.
|
|
141
|
+
*/
|
|
142
|
+
export class MoveToPreviousLine extends $CustomType {
|
|
143
|
+
constructor(n) {
|
|
144
|
+
super();
|
|
145
|
+
this.n = n;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export const Command$MoveToPreviousLine = (n) => new MoveToPreviousLine(n);
|
|
149
|
+
export const Command$isMoveToPreviousLine = (value) =>
|
|
150
|
+
value instanceof MoveToPreviousLine;
|
|
151
|
+
export const Command$MoveToPreviousLine$n = (value) => value.n;
|
|
152
|
+
export const Command$MoveToPreviousLine$0 = (value) => value.n;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Moves the cursor to the given column while the row remains the same.
|
|
156
|
+
*/
|
|
157
|
+
export class MoveToColumn extends $CustomType {
|
|
158
|
+
constructor(n) {
|
|
159
|
+
super();
|
|
160
|
+
this.n = n;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export const Command$MoveToColumn = (n) => new MoveToColumn(n);
|
|
164
|
+
export const Command$isMoveToColumn = (value) => value instanceof MoveToColumn;
|
|
165
|
+
export const Command$MoveToColumn$n = (value) => value.n;
|
|
166
|
+
export const Command$MoveToColumn$0 = (value) => value.n;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Moves the cursor to the given row while the column remains the same.
|
|
170
|
+
*/
|
|
171
|
+
export class MoveToRow extends $CustomType {
|
|
172
|
+
constructor(n) {
|
|
173
|
+
super();
|
|
174
|
+
this.n = n;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export const Command$MoveToRow = (n) => new MoveToRow(n);
|
|
178
|
+
export const Command$isMoveToRow = (value) => value instanceof MoveToRow;
|
|
179
|
+
export const Command$MoveToRow$n = (value) => value.n;
|
|
180
|
+
export const Command$MoveToRow$0 = (value) => value.n;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Moves the cursor to the given row and column.
|
|
184
|
+
*/
|
|
185
|
+
export class MoveTo extends $CustomType {
|
|
186
|
+
constructor(column, row) {
|
|
187
|
+
super();
|
|
188
|
+
this.column = column;
|
|
189
|
+
this.row = row;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
export const Command$MoveTo = (column, row) => new MoveTo(column, row);
|
|
193
|
+
export const Command$isMoveTo = (value) => value instanceof MoveTo;
|
|
194
|
+
export const Command$MoveTo$column = (value) => value.column;
|
|
195
|
+
export const Command$MoveTo$0 = (value) => value.column;
|
|
196
|
+
export const Command$MoveTo$row = (value) => value.row;
|
|
197
|
+
export const Command$MoveTo$1 = (value) => value.row;
|
|
198
|
+
|
|
199
|
+
export class SavePosition extends $CustomType {}
|
|
200
|
+
export const Command$SavePosition = () => new SavePosition();
|
|
201
|
+
export const Command$isSavePosition = (value) => value instanceof SavePosition;
|
|
202
|
+
|
|
203
|
+
export class RestorePosition extends $CustomType {}
|
|
204
|
+
export const Command$RestorePosition = () => new RestorePosition();
|
|
205
|
+
export const Command$isRestorePosition = (value) =>
|
|
206
|
+
value instanceof RestorePosition;
|
|
207
|
+
|
|
208
|
+
export class ShowCursor extends $CustomType {}
|
|
209
|
+
export const Command$ShowCursor = () => new ShowCursor();
|
|
210
|
+
export const Command$isShowCursor = (value) => value instanceof ShowCursor;
|
|
211
|
+
|
|
212
|
+
export class HideCursor extends $CustomType {}
|
|
213
|
+
export const Command$HideCursor = () => new HideCursor();
|
|
214
|
+
export const Command$isHideCursor = (value) => value instanceof HideCursor;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Sets cursor style. See [`CursorStyle`](cursor.html#CursorStyle).
|
|
218
|
+
*/
|
|
219
|
+
export class SetCursorStyle extends $CustomType {
|
|
220
|
+
constructor(style) {
|
|
221
|
+
super();
|
|
222
|
+
this.style = style;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export const Command$SetCursorStyle = (style) => new SetCursorStyle(style);
|
|
226
|
+
export const Command$isSetCursorStyle = (value) =>
|
|
227
|
+
value instanceof SetCursorStyle;
|
|
228
|
+
export const Command$SetCursorStyle$style = (value) => value.style;
|
|
229
|
+
export const Command$SetCursorStyle$0 = (value) => value.style;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Scrolls the terminal n lines up.
|
|
233
|
+
*/
|
|
234
|
+
export class ScrollUp extends $CustomType {
|
|
235
|
+
constructor(n) {
|
|
236
|
+
super();
|
|
237
|
+
this.n = n;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
export const Command$ScrollUp = (n) => new ScrollUp(n);
|
|
241
|
+
export const Command$isScrollUp = (value) => value instanceof ScrollUp;
|
|
242
|
+
export const Command$ScrollUp$n = (value) => value.n;
|
|
243
|
+
export const Command$ScrollUp$0 = (value) => value.n;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Scrolls the terminal n lines down.
|
|
247
|
+
*/
|
|
248
|
+
export class ScrollDown extends $CustomType {
|
|
249
|
+
constructor(n) {
|
|
250
|
+
super();
|
|
251
|
+
this.n = n;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export const Command$ScrollDown = (n) => new ScrollDown(n);
|
|
255
|
+
export const Command$isScrollDown = (value) => value instanceof ScrollDown;
|
|
256
|
+
export const Command$ScrollDown$n = (value) => value.n;
|
|
257
|
+
export const Command$ScrollDown$0 = (value) => value.n;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Clears the terminal. See [`ClearType`](terminal.html#ClearType).
|
|
261
|
+
*/
|
|
262
|
+
export class Clear extends $CustomType {
|
|
263
|
+
constructor(clear_type) {
|
|
264
|
+
super();
|
|
265
|
+
this.clear_type = clear_type;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
export const Command$Clear = (clear_type) => new Clear(clear_type);
|
|
269
|
+
export const Command$isClear = (value) => value instanceof Clear;
|
|
270
|
+
export const Command$Clear$clear_type = (value) => value.clear_type;
|
|
271
|
+
export const Command$Clear$0 = (value) => value.clear_type;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Sets terminal size.
|
|
275
|
+
*/
|
|
276
|
+
export class SetSize extends $CustomType {
|
|
277
|
+
constructor(columns, rows) {
|
|
278
|
+
super();
|
|
279
|
+
this.columns = columns;
|
|
280
|
+
this.rows = rows;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
export const Command$SetSize = (columns, rows) => new SetSize(columns, rows);
|
|
284
|
+
export const Command$isSetSize = (value) => value instanceof SetSize;
|
|
285
|
+
export const Command$SetSize$columns = (value) => value.columns;
|
|
286
|
+
export const Command$SetSize$0 = (value) => value.columns;
|
|
287
|
+
export const Command$SetSize$rows = (value) => value.rows;
|
|
288
|
+
export const Command$SetSize$1 = (value) => value.rows;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Sets terminal title.
|
|
292
|
+
*/
|
|
293
|
+
export class SetTitle extends $CustomType {
|
|
294
|
+
constructor(title) {
|
|
295
|
+
super();
|
|
296
|
+
this.title = title;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
export const Command$SetTitle = (title) => new SetTitle(title);
|
|
300
|
+
export const Command$isSetTitle = (value) => value instanceof SetTitle;
|
|
301
|
+
export const Command$SetTitle$title = (value) => value.title;
|
|
302
|
+
export const Command$SetTitle$0 = (value) => value.title;
|
|
303
|
+
|
|
304
|
+
export class DisableLineWrap extends $CustomType {}
|
|
305
|
+
export const Command$DisableLineWrap = () => new DisableLineWrap();
|
|
306
|
+
export const Command$isDisableLineWrap = (value) =>
|
|
307
|
+
value instanceof DisableLineWrap;
|
|
308
|
+
|
|
309
|
+
export class EnableLineWrap extends $CustomType {}
|
|
310
|
+
export const Command$EnableLineWrap = () => new EnableLineWrap();
|
|
311
|
+
export const Command$isEnableLineWrap = (value) =>
|
|
312
|
+
value instanceof EnableLineWrap;
|
|
313
|
+
|
|
314
|
+
export class EnterAlternateScreen extends $CustomType {}
|
|
315
|
+
export const Command$EnterAlternateScreen = () => new EnterAlternateScreen();
|
|
316
|
+
export const Command$isEnterAlternateScreen = (value) =>
|
|
317
|
+
value instanceof EnterAlternateScreen;
|
|
318
|
+
|
|
319
|
+
export class LeaveAlternateScreen extends $CustomType {}
|
|
320
|
+
export const Command$LeaveAlternateScreen = () => new LeaveAlternateScreen();
|
|
321
|
+
export const Command$isLeaveAlternateScreen = (value) =>
|
|
322
|
+
value instanceof LeaveAlternateScreen;
|
|
323
|
+
|
|
324
|
+
export class EnableMouseCapture extends $CustomType {}
|
|
325
|
+
export const Command$EnableMouseCapture = () => new EnableMouseCapture();
|
|
326
|
+
export const Command$isEnableMouseCapture = (value) =>
|
|
327
|
+
value instanceof EnableMouseCapture;
|
|
328
|
+
|
|
329
|
+
export class DisableMouseCapture extends $CustomType {}
|
|
330
|
+
export const Command$DisableMouseCapture = () => new DisableMouseCapture();
|
|
331
|
+
export const Command$isDisableMouseCapture = (value) =>
|
|
332
|
+
value instanceof DisableMouseCapture;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Pushes keyboard enhancement flags.
|
|
336
|
+
* See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
|
|
337
|
+
*/
|
|
338
|
+
export class PushKeyboardEnhancementFlags extends $CustomType {
|
|
339
|
+
constructor(flags) {
|
|
340
|
+
super();
|
|
341
|
+
this.flags = flags;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
export const Command$PushKeyboardEnhancementFlags = (flags) =>
|
|
345
|
+
new PushKeyboardEnhancementFlags(flags);
|
|
346
|
+
export const Command$isPushKeyboardEnhancementFlags = (value) =>
|
|
347
|
+
value instanceof PushKeyboardEnhancementFlags;
|
|
348
|
+
export const Command$PushKeyboardEnhancementFlags$flags = (value) =>
|
|
349
|
+
value.flags;
|
|
350
|
+
export const Command$PushKeyboardEnhancementFlags$0 = (value) => value.flags;
|
|
351
|
+
|
|
352
|
+
export class PopKeyboardEnhancementFlags extends $CustomType {}
|
|
353
|
+
export const Command$PopKeyboardEnhancementFlags = () =>
|
|
354
|
+
new PopKeyboardEnhancementFlags();
|
|
355
|
+
export const Command$isPopKeyboardEnhancementFlags = (value) =>
|
|
356
|
+
value instanceof PopKeyboardEnhancementFlags;
|
|
357
|
+
|
|
358
|
+
export class EnableFocusChange extends $CustomType {}
|
|
359
|
+
export const Command$EnableFocusChange = () => new EnableFocusChange();
|
|
360
|
+
export const Command$isEnableFocusChange = (value) =>
|
|
361
|
+
value instanceof EnableFocusChange;
|
|
362
|
+
|
|
363
|
+
export class DisableFocusChange extends $CustomType {}
|
|
364
|
+
export const Command$DisableFocusChange = () => new DisableFocusChange();
|
|
365
|
+
export const Command$isDisableFocusChange = (value) =>
|
|
366
|
+
value instanceof DisableFocusChange;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Sets foreground [`Color`](style.html#Color).
|
|
370
|
+
* Using [`SetForegroundAndBackgroundColors`](command.html#SetForegroundAndBackgroundColors)
|
|
371
|
+
* is prefered to set both the background and foreground colors.
|
|
372
|
+
*/
|
|
373
|
+
export class SetForegroundColor extends $CustomType {
|
|
374
|
+
constructor(fg) {
|
|
375
|
+
super();
|
|
376
|
+
this.fg = fg;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
export const Command$SetForegroundColor = (fg) => new SetForegroundColor(fg);
|
|
380
|
+
export const Command$isSetForegroundColor = (value) =>
|
|
381
|
+
value instanceof SetForegroundColor;
|
|
382
|
+
export const Command$SetForegroundColor$fg = (value) => value.fg;
|
|
383
|
+
export const Command$SetForegroundColor$0 = (value) => value.fg;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Sets background [`Color`](style.html#Color).
|
|
387
|
+
* Using [`SetForegroundAndBackgroundColors`](command.html#SetForegroundAndBackgroundColors)
|
|
388
|
+
* is prefered to set both the background and foreground colors.
|
|
389
|
+
*/
|
|
390
|
+
export class SetBackgroundColor extends $CustomType {
|
|
391
|
+
constructor(bg) {
|
|
392
|
+
super();
|
|
393
|
+
this.bg = bg;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
export const Command$SetBackgroundColor = (bg) => new SetBackgroundColor(bg);
|
|
397
|
+
export const Command$isSetBackgroundColor = (value) =>
|
|
398
|
+
value instanceof SetBackgroundColor;
|
|
399
|
+
export const Command$SetBackgroundColor$bg = (value) => value.bg;
|
|
400
|
+
export const Command$SetBackgroundColor$0 = (value) => value.bg;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Sets foreground and background [`Colors`](style.html#Color).
|
|
404
|
+
* Using this is prefered to set both the background and foreground colors.
|
|
405
|
+
*/
|
|
406
|
+
export class SetForegroundAndBackgroundColors extends $CustomType {
|
|
407
|
+
constructor(fg, bg) {
|
|
408
|
+
super();
|
|
409
|
+
this.fg = fg;
|
|
410
|
+
this.bg = bg;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
export const Command$SetForegroundAndBackgroundColors = (fg, bg) =>
|
|
414
|
+
new SetForegroundAndBackgroundColors(fg, bg);
|
|
415
|
+
export const Command$isSetForegroundAndBackgroundColors = (value) =>
|
|
416
|
+
value instanceof SetForegroundAndBackgroundColors;
|
|
417
|
+
export const Command$SetForegroundAndBackgroundColors$fg = (value) => value.fg;
|
|
418
|
+
export const Command$SetForegroundAndBackgroundColors$0 = (value) => value.fg;
|
|
419
|
+
export const Command$SetForegroundAndBackgroundColors$bg = (value) => value.bg;
|
|
420
|
+
export const Command$SetForegroundAndBackgroundColors$1 = (value) => value.bg;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Sets [`Style`](style.html#Style)
|
|
424
|
+
* Example:
|
|
425
|
+
* ```gleam
|
|
426
|
+
* execute([
|
|
427
|
+
* command.SetStyle(Style(fg: style.Red, bg: style.Black, attributes: [style.Underline])),
|
|
428
|
+
* command.Print("my string"),
|
|
429
|
+
* command.ResetStyle,
|
|
430
|
+
* ])
|
|
431
|
+
*/
|
|
432
|
+
export class SetStyle extends $CustomType {
|
|
433
|
+
constructor(style) {
|
|
434
|
+
super();
|
|
435
|
+
this.style = style;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
export const Command$SetStyle = (style) => new SetStyle(style);
|
|
439
|
+
export const Command$isSetStyle = (value) => value instanceof SetStyle;
|
|
440
|
+
export const Command$SetStyle$style = (value) => value.style;
|
|
441
|
+
export const Command$SetStyle$0 = (value) => value.style;
|
|
442
|
+
|
|
443
|
+
export class ResetStyle extends $CustomType {}
|
|
444
|
+
export const Command$ResetStyle = () => new ResetStyle();
|
|
445
|
+
export const Command$isResetStyle = (value) => value instanceof ResetStyle;
|
|
446
|
+
|
|
447
|
+
export class ResetColor extends $CustomType {}
|
|
448
|
+
export const Command$ResetColor = () => new ResetColor();
|
|
449
|
+
export const Command$isResetColor = (value) => value instanceof ResetColor;
|
|
450
|
+
|
|
451
|
+
export class ResetForeground extends $CustomType {}
|
|
452
|
+
export const Command$ResetForeground = () => new ResetForeground();
|
|
453
|
+
export const Command$isResetForeground = (value) =>
|
|
454
|
+
value instanceof ResetForeground;
|
|
455
|
+
|
|
456
|
+
export class ResetBackground extends $CustomType {}
|
|
457
|
+
export const Command$ResetBackground = () => new ResetBackground();
|
|
458
|
+
export const Command$isResetBackground = (value) =>
|
|
459
|
+
value instanceof ResetBackground;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Sets [`Attributes`](style.html#Attribute).
|
|
463
|
+
*/
|
|
464
|
+
export class SetAttributes extends $CustomType {
|
|
465
|
+
constructor(attrs) {
|
|
466
|
+
super();
|
|
467
|
+
this.attrs = attrs;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
export const Command$SetAttributes = (attrs) => new SetAttributes(attrs);
|
|
471
|
+
export const Command$isSetAttributes = (value) =>
|
|
472
|
+
value instanceof SetAttributes;
|
|
473
|
+
export const Command$SetAttributes$attrs = (value) => value.attrs;
|
|
474
|
+
export const Command$SetAttributes$0 = (value) => value.attrs;
|
|
475
|
+
|
|
476
|
+
export class ResetAttributes extends $CustomType {}
|
|
477
|
+
export const Command$ResetAttributes = () => new ResetAttributes();
|
|
478
|
+
export const Command$isResetAttributes = (value) =>
|
|
479
|
+
value instanceof ResetAttributes;
|