create-mendix-widget-gleam 2.0.19 → 2.0.21
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 +1 -1
- package/src/i18n.mjs +394 -334
- package/src/index.mjs +284 -231
- package/src/licenses.mjs +147 -0
- package/src/prompts.mjs +247 -142
- package/src/scaffold.mjs +108 -97
- package/src/templates/claude_md.mjs +3 -3
- package/src/templates/readme_md.mjs +10 -10
- package/template/gleam.toml +2 -2
- package/template/package.json +6 -6
- package/template/src/__WidgetName__.xml +1 -1
- package/template/src/package.xml +2 -2
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache +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_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@internal@consts.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache +0 -0
- package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache +0 -0
- package/tui/build/dev/javascript/etch/etch/event.mjs +36 -30
- 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@atom.cache +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@node.cache +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@process.cache +0 -0
- package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache +0 -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@promise.cache +0 -0
- package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache +0 -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@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@bytes_tree.cache +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@dynamic.cache +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_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@function.cache +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@io.cache +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@option.cache +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@pair.cache +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@set.cache +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_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@uri.cache +0 -0
- package/tui/build/dev/javascript/gleam_version +1 -1
- package/tui/build/dev/javascript/prelude.mjs +10 -26
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache +0 -0
- package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_meta +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_meta +0 -0
- package/tui/build/dev/javascript/tui/tui/prompt.mjs +713 -52
- package/tui/build/dev/javascript/tui/tui.mjs +438 -51
- package/tui/build/dev/javascript/tui/tui_ffi.mjs +12 -0
- package/template/LICENSE +0 -15
package/src/scaffold.mjs
CHANGED
|
@@ -1,97 +1,108 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 파일 복사 + 템플릿 치환
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { readdir, readFile, writeFile, mkdir, copyFile } from "node:fs/promises";
|
|
6
|
-
import { join, relative } from "node:path";
|
|
7
|
-
|
|
8
|
-
/** 바이너리 판별용 확장자 */
|
|
9
|
-
const BINARY_EXTS = new Set([".png", ".jpg", ".gif", ".ico", ".woff", ".woff2", ".ttf", ".eot"]);
|
|
10
|
-
|
|
11
|
-
/** 재귀적으로 디렉토리 내 모든 파일 경로를 수집 */
|
|
12
|
-
async function walkDir(dir) {
|
|
13
|
-
const entries = await readdir(dir, { withFileTypes: true });
|
|
14
|
-
const files = [];
|
|
15
|
-
for (const entry of entries) {
|
|
16
|
-
const fullPath = join(dir, entry.name);
|
|
17
|
-
if (entry.isDirectory()) {
|
|
18
|
-
files.push(...(await walkDir(fullPath)));
|
|
19
|
-
} else {
|
|
20
|
-
files.push(fullPath);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return files;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// npm publish 시 제외되는 dotfile을 언더스코어 접두사로 보관하고 복원
|
|
27
|
-
const DOTFILE_MAP = { _gitignore: ".gitignore" };
|
|
28
|
-
|
|
29
|
-
/** 파일명에서 플레이스홀더 치환 + dotfile 복원 */
|
|
30
|
-
function replaceFileName(name, names) {
|
|
31
|
-
if (DOTFILE_MAP[name]) return DOTFILE_MAP[name];
|
|
32
|
-
return name
|
|
33
|
-
.replace(/__WidgetName__/g, names.pascalCase)
|
|
34
|
-
.replace(/__widget_name__/g, names.snakeCase);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** 파일 내용에서 플레이스홀더 치환 */
|
|
38
|
-
function replaceContent(content, names, pmConfig, templateComments) {
|
|
39
|
-
let result = content
|
|
40
|
-
.replace(/\{\{PASCAL_CASE\}\}/g, names.pascalCase)
|
|
41
|
-
.replace(/\{\{SNAKE_CASE\}\}/g, names.snakeCase)
|
|
42
|
-
.replace(/\{\{LOWERCASE\}\}/g, names.lowerCase)
|
|
43
|
-
.replace(/\{\{DISPLAY_NAME\}\}/g, names.displayName)
|
|
44
|
-
.replace(/\{\{KEBAB_CASE\}\}/g, names.kebabCase);
|
|
45
|
-
|
|
46
|
-
if (
|
|
47
|
-
result = result
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 파일 복사 + 템플릿 치환
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { readdir, readFile, writeFile, mkdir, copyFile } from "node:fs/promises";
|
|
6
|
+
import { join, relative } from "node:path";
|
|
7
|
+
|
|
8
|
+
/** 바이너리 판별용 확장자 */
|
|
9
|
+
const BINARY_EXTS = new Set([".png", ".jpg", ".gif", ".ico", ".woff", ".woff2", ".ttf", ".eot"]);
|
|
10
|
+
|
|
11
|
+
/** 재귀적으로 디렉토리 내 모든 파일 경로를 수집 */
|
|
12
|
+
async function walkDir(dir) {
|
|
13
|
+
const entries = await readdir(dir, { withFileTypes: true });
|
|
14
|
+
const files = [];
|
|
15
|
+
for (const entry of entries) {
|
|
16
|
+
const fullPath = join(dir, entry.name);
|
|
17
|
+
if (entry.isDirectory()) {
|
|
18
|
+
files.push(...(await walkDir(fullPath)));
|
|
19
|
+
} else {
|
|
20
|
+
files.push(fullPath);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return files;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// npm publish 시 제외되는 dotfile을 언더스코어 접두사로 보관하고 복원
|
|
27
|
+
const DOTFILE_MAP = { _gitignore: ".gitignore" };
|
|
28
|
+
|
|
29
|
+
/** 파일명에서 플레이스홀더 치환 + dotfile 복원 */
|
|
30
|
+
function replaceFileName(name, names) {
|
|
31
|
+
if (DOTFILE_MAP[name]) return DOTFILE_MAP[name];
|
|
32
|
+
return name
|
|
33
|
+
.replace(/__WidgetName__/g, names.pascalCase)
|
|
34
|
+
.replace(/__widget_name__/g, names.snakeCase);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** 파일 내용에서 플레이스홀더 치환 */
|
|
38
|
+
function replaceContent(content, names, pmConfig, templateComments, options) {
|
|
39
|
+
let result = content
|
|
40
|
+
.replace(/\{\{PASCAL_CASE\}\}/g, names.pascalCase)
|
|
41
|
+
.replace(/\{\{SNAKE_CASE\}\}/g, names.snakeCase)
|
|
42
|
+
.replace(/\{\{LOWERCASE\}\}/g, names.lowerCase)
|
|
43
|
+
.replace(/\{\{DISPLAY_NAME\}\}/g, names.displayName)
|
|
44
|
+
.replace(/\{\{KEBAB_CASE\}\}/g, names.kebabCase);
|
|
45
|
+
|
|
46
|
+
if (options) {
|
|
47
|
+
result = result
|
|
48
|
+
.replace(/\{\{ORGANIZATION\}\}/g, options.organization)
|
|
49
|
+
.replace(/\{\{COPYRIGHT\}\}/g, options.copyright)
|
|
50
|
+
.replace(/\{\{LICENSE_ID\}\}/g, options.license)
|
|
51
|
+
.replace(/\{\{VERSION\}\}/g, options.version)
|
|
52
|
+
.replace(/\{\{AUTHOR\}\}/g, options.author)
|
|
53
|
+
.replace(/\{\{PROJECT_PATH\}\}/g, options.projectPath);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (templateComments) {
|
|
57
|
+
result = result.replace(/\{\{I18N:(\w+)\}\}/g, (_, key) => {
|
|
58
|
+
return templateComments[key] ?? `{{I18N:${key}}}`;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 템플릿을 대상 디렉토리에 스케폴딩
|
|
67
|
+
* @param {string} templateDir - 템플릿 디렉토리 경로
|
|
68
|
+
* @param {string} targetDir - 생성할 프로젝트 디렉토리 경로
|
|
69
|
+
* @param {object} names - 이름 변환 결과
|
|
70
|
+
* @param {object} pmConfig - 패키지 매니저 설정
|
|
71
|
+
* @param {object} [templateComments] - i18n 템플릿 주석 ({{I18N:*}} 치환용)
|
|
72
|
+
* @param {object} [options] - 추가 옵션 (organization, copyright, license, version, author, projectPath)
|
|
73
|
+
*/
|
|
74
|
+
export async function scaffold(templateDir, targetDir, names, pmConfig, templateComments, options) {
|
|
75
|
+
const files = await walkDir(templateDir);
|
|
76
|
+
const created = [];
|
|
77
|
+
|
|
78
|
+
for (const srcPath of files) {
|
|
79
|
+
// 템플릿 기준 상대 경로
|
|
80
|
+
const relPath = relative(templateDir, srcPath);
|
|
81
|
+
|
|
82
|
+
// 경로의 각 부분에서 파일명 치환
|
|
83
|
+
const destRelPath = relPath
|
|
84
|
+
.split(/[\\/]/)
|
|
85
|
+
.map((part) => replaceFileName(part, names))
|
|
86
|
+
.join("/");
|
|
87
|
+
|
|
88
|
+
const destPath = join(targetDir, destRelPath);
|
|
89
|
+
const ext = srcPath.substring(srcPath.lastIndexOf(".")).toLowerCase();
|
|
90
|
+
|
|
91
|
+
// 디렉토리 생성
|
|
92
|
+
await mkdir(join(destPath, ".."), { recursive: true });
|
|
93
|
+
|
|
94
|
+
if (BINARY_EXTS.has(ext)) {
|
|
95
|
+
// 바이너리 파일은 그대로 복사
|
|
96
|
+
await copyFile(srcPath, destPath);
|
|
97
|
+
} else {
|
|
98
|
+
// 텍스트 파일은 내용 치환
|
|
99
|
+
const content = await readFile(srcPath, "utf-8");
|
|
100
|
+
const replaced = replaceContent(content, names, pmConfig, templateComments, options);
|
|
101
|
+
await writeFile(destPath, replaced, "utf-8");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
created.push(destRelPath);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return created;
|
|
108
|
+
}
|
|
@@ -9,7 +9,7 @@ const COMMENT_LANG_INSTRUCTIONS = {
|
|
|
9
9
|
ja: "Use Japanese comments",
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export function generateClaudeMdContent(lang, names, pm, pmConfig) {
|
|
12
|
+
export function generateClaudeMdContent(lang, names, pm, pmConfig, organization) {
|
|
13
13
|
const commentInstruction =
|
|
14
14
|
COMMENT_LANG_INSTRUCTIONS[lang] ?? COMMENT_LANG_INSTRUCTIONS["en"];
|
|
15
15
|
|
|
@@ -72,8 +72,8 @@ src/*.gleam → gleam build → build/dev/javascript/**/*.mjs → Bridge JS (aut
|
|
|
72
72
|
|
|
73
73
|
## Mendix Widget Conventions
|
|
74
74
|
|
|
75
|
-
- Widget ID:
|
|
76
|
-
- \`packagePath: "
|
|
75
|
+
- Widget ID: \`${organization}.${names.lowerCase}.${names.pascalCase}\`
|
|
76
|
+
- \`packagePath: "${organization}"\` in \`package.json\` determines the deployment path
|
|
77
77
|
- \`needsEntityContext="true"\` → Requires Mendix data context
|
|
78
78
|
- \`offlineCapable="true"\` → Offline support
|
|
79
79
|
- \`.mpk\` output: \`dist/\` directory
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* README.md template — 3 language versions
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export function generateReadmeContent(lang, names, pm, pmConfig) {
|
|
5
|
+
export function generateReadmeContent(lang, names, pm, pmConfig, license) {
|
|
6
6
|
const installCmd =
|
|
7
7
|
pm === "npm"
|
|
8
8
|
? "npm install"
|
|
@@ -14,11 +14,11 @@ export function generateReadmeContent(lang, names, pm, pmConfig) {
|
|
|
14
14
|
|
|
15
15
|
switch (lang) {
|
|
16
16
|
case "ko":
|
|
17
|
-
return generateKo(names, pm, installCmd);
|
|
17
|
+
return generateKo(names, pm, installCmd, license);
|
|
18
18
|
case "ja":
|
|
19
|
-
return generateJa(names, pm, installCmd);
|
|
19
|
+
return generateJa(names, pm, installCmd, license);
|
|
20
20
|
default:
|
|
21
|
-
return generateEn(names, pm, installCmd);
|
|
21
|
+
return generateEn(names, pm, installCmd, license);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ export function generateReadmeContent(lang, names, pm, pmConfig) {
|
|
|
26
26
|
// English
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
28
|
|
|
29
|
-
function generateEn(names, pm, installCmd) {
|
|
29
|
+
function generateEn(names, pm, installCmd, license) {
|
|
30
30
|
return `# ${names.pascalCase}
|
|
31
31
|
|
|
32
32
|
A Mendix Pluggable Widget written in Gleam.
|
|
@@ -273,7 +273,7 @@ Widget names use the \`<name>\` value from the \`.mpk\`'s internal XML, and prop
|
|
|
273
273
|
|
|
274
274
|
## License
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
${license}
|
|
277
277
|
`;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -281,7 +281,7 @@ Apache-2.0
|
|
|
281
281
|
// Korean
|
|
282
282
|
// ---------------------------------------------------------------------------
|
|
283
283
|
|
|
284
|
-
function generateKo(names, pm, installCmd) {
|
|
284
|
+
function generateKo(names, pm, installCmd, license) {
|
|
285
285
|
return `# ${names.pascalCase}
|
|
286
286
|
|
|
287
287
|
Gleam 언어로 작성된 Mendix Pluggable Widget.
|
|
@@ -528,7 +528,7 @@ switch.render(props)
|
|
|
528
528
|
|
|
529
529
|
## 라이센스
|
|
530
530
|
|
|
531
|
-
|
|
531
|
+
${license}
|
|
532
532
|
`;
|
|
533
533
|
}
|
|
534
534
|
|
|
@@ -536,7 +536,7 @@ Apache-2.0
|
|
|
536
536
|
// Japanese
|
|
537
537
|
// ---------------------------------------------------------------------------
|
|
538
538
|
|
|
539
|
-
function generateJa(names, pm, installCmd) {
|
|
539
|
+
function generateJa(names, pm, installCmd, license) {
|
|
540
540
|
return `# ${names.pascalCase}
|
|
541
541
|
|
|
542
542
|
Gleam言語で作成されたMendix Pluggable Widget。
|
|
@@ -783,6 +783,6 @@ switch.render(props)
|
|
|
783
783
|
|
|
784
784
|
## ライセンス
|
|
785
785
|
|
|
786
|
-
|
|
786
|
+
${license}
|
|
787
787
|
`;
|
|
788
788
|
}
|
package/template/gleam.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "{{SNAKE_CASE}}"
|
|
2
|
-
version = "
|
|
2
|
+
version = "{{VERSION}}"
|
|
3
3
|
target = "javascript"
|
|
4
4
|
|
|
5
5
|
[javascript]
|
|
@@ -8,4 +8,4 @@ runtime = "node"
|
|
|
8
8
|
|
|
9
9
|
[dependencies]
|
|
10
10
|
gleam_stdlib = ">= 0.44.0 and < 2.0.0"
|
|
11
|
-
glendix = ">= 2.0.
|
|
11
|
+
glendix = ">= 2.0.20 and < 3.0.0"
|
package/template/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{LOWERCASE}}",
|
|
3
3
|
"widgetName": "{{PASCAL_CASE}}",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "{{VERSION}}",
|
|
5
5
|
"description": "My widget description",
|
|
6
|
-
"copyright": "
|
|
7
|
-
"author": "",
|
|
6
|
+
"copyright": "{{COPYRIGHT}}",
|
|
7
|
+
"author": "{{AUTHOR}}",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=16"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "{{LICENSE_ID}}",
|
|
12
12
|
"config": {
|
|
13
|
-
"projectPath": "
|
|
13
|
+
"projectPath": "{{PROJECT_PATH}}",
|
|
14
14
|
"mendixHost": "http://localhost:8080",
|
|
15
15
|
"developmentPort": 3000
|
|
16
16
|
},
|
|
17
|
-
"packagePath": "
|
|
17
|
+
"packagePath": "{{ORGANIZATION}}",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"prerelease": "echo skipping lint"
|
|
20
20
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<widget id="
|
|
2
|
+
<widget id="{{ORGANIZATION}}.{{LOWERCASE}}.{{PASCAL_CASE}}" pluginWidget="true" needsEntityContext="true" offlineCapable="true"
|
|
3
3
|
supportedPlatform="Web"
|
|
4
4
|
xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
5
5
|
xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../node_modules/mendix/custom_widget.xsd">
|
package/template/src/package.xml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<package xmlns="http://www.mendix.com/package/1.0/">
|
|
3
|
-
<clientModule name="{{PASCAL_CASE}}" version="
|
|
3
|
+
<clientModule name="{{PASCAL_CASE}}" version="{{VERSION}}" xmlns="http://www.mendix.com/clientModule/1.0/">
|
|
4
4
|
<widgetFiles>
|
|
5
5
|
<widgetFile path="{{PASCAL_CASE}}.xml"/>
|
|
6
6
|
</widgetFiles>
|
|
7
7
|
<files>
|
|
8
|
-
<file path="
|
|
8
|
+
<file path="{{ORGANIZATION}}/{{LOWERCASE}}"/>
|
|
9
9
|
</files>
|
|
10
10
|
</clientModule>
|
|
11
11
|
</package>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -953,11 +953,13 @@ export function parse_modifier_to_state(modifier_mask) {
|
|
|
953
953
|
let state = new KeyEventState(false, false, false);
|
|
954
954
|
let _block;
|
|
955
955
|
let $ = modifier_mask - 1;
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
956
|
+
{
|
|
957
|
+
let n = $;
|
|
958
|
+
if (n < 0) {
|
|
959
|
+
_block = 0;
|
|
960
|
+
} else {
|
|
961
|
+
_block = $;
|
|
962
|
+
}
|
|
961
963
|
}
|
|
962
964
|
let mask = _block;
|
|
963
965
|
let _block$1;
|
|
@@ -1123,7 +1125,7 @@ export function parse_cb(code) {
|
|
|
1123
1125
|
_block = $result.unwrap(_pipe, 0);
|
|
1124
1126
|
let code$1 = _block;
|
|
1125
1127
|
let _block$1;
|
|
1126
|
-
let _pipe$1 = $int.bitwise_and(code$1,
|
|
1128
|
+
let _pipe$1 = $int.bitwise_and(code$1, 0b11);
|
|
1127
1129
|
_block$1 = $int.bitwise_or(
|
|
1128
1130
|
_pipe$1,
|
|
1129
1131
|
(() => {
|
|
@@ -1411,11 +1413,13 @@ export function parse_sgr_mouse(s) {
|
|
|
1411
1413
|
export function parse_modifiers(code) {
|
|
1412
1414
|
let _block;
|
|
1413
1415
|
let $ = code - 1;
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1416
|
+
{
|
|
1417
|
+
let x = $;
|
|
1418
|
+
if (x < 0) {
|
|
1419
|
+
_block = 0;
|
|
1420
|
+
} else {
|
|
1421
|
+
_block = $;
|
|
1422
|
+
}
|
|
1419
1423
|
}
|
|
1420
1424
|
let mask = _block;
|
|
1421
1425
|
return new Modifiers(
|
|
@@ -1848,31 +1852,33 @@ export function parse_special_key_code(code) {
|
|
|
1848
1852
|
_block$2 = new Ok(new PageDown());
|
|
1849
1853
|
} else {
|
|
1850
1854
|
let k = key$1;
|
|
1851
|
-
|
|
1852
|
-
if ((k$1 >= 11) && (k$1 <= 15)) {
|
|
1853
|
-
_block$2 = new Ok(new F(k$1 - 10));
|
|
1854
|
-
} else {
|
|
1855
|
+
{
|
|
1855
1856
|
let k$1 = k;
|
|
1856
|
-
if ((k$1 >=
|
|
1857
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1857
|
+
if ((k$1 >= 11) && (k$1 <= 15)) {
|
|
1858
|
+
_block$2 = new Ok(new F(k$1 - 10));
|
|
1858
1859
|
} else {
|
|
1859
1860
|
let k$1 = k;
|
|
1860
|
-
if ((k$1 >=
|
|
1861
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1862
|
-
} else if (k === 28) {
|
|
1863
|
-
_block$2 = new Ok(new F(k - 15));
|
|
1864
|
-
} else if (k === 29) {
|
|
1865
|
-
_block$2 = new Ok(new F(k - 15));
|
|
1861
|
+
if ((k$1 >= 17) && (k$1 <= 21)) {
|
|
1862
|
+
_block$2 = new Ok(new F(k$1 - 11));
|
|
1866
1863
|
} else {
|
|
1867
1864
|
let k$1 = k;
|
|
1868
|
-
if ((k$1 >=
|
|
1869
|
-
_block$2 = new Ok(new F(k$1 -
|
|
1865
|
+
if ((k$1 >= 23) && (k$1 <= 26)) {
|
|
1866
|
+
_block$2 = new Ok(new F(k$1 - 12));
|
|
1867
|
+
} else if (k === 28) {
|
|
1868
|
+
_block$2 = new Ok(new F(k - 15));
|
|
1869
|
+
} else if (k === 29) {
|
|
1870
|
+
_block$2 = new Ok(new F(k - 15));
|
|
1870
1871
|
} else {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1872
|
+
let k$1 = k;
|
|
1873
|
+
if ((k$1 >= 31) && (k$1 <= 34)) {
|
|
1874
|
+
_block$2 = new Ok(new F(k$1 - 17));
|
|
1875
|
+
} else {
|
|
1876
|
+
_block$2 = new Error(
|
|
1877
|
+
new FailedToParseEvent(
|
|
1878
|
+
"Failed to parse special key code (CSI <..> ~)",
|
|
1879
|
+
),
|
|
1880
|
+
);
|
|
1881
|
+
}
|
|
1876
1882
|
}
|
|
1877
1883
|
}
|
|
1878
1884
|
}
|
package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache
CHANGED
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache
CHANGED
|
Binary file
|
package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.15.1
|