@ibgib/web-gib 0.0.36 → 0.0.43

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 (46) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/README.md +116 -0
  3. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  4. package/dist/AUTO-GENERATED-version.mjs +1 -1
  5. package/dist/api/commands/ui/ui-index.mjs +2 -2
  6. package/dist/api/commands/ui/ui-index.mjs.map +1 -1
  7. package/dist/api/commands/ui/update-css-variables.d.mts +13 -1
  8. package/dist/api/commands/ui/update-css-variables.d.mts.map +1 -1
  9. package/dist/api/commands/ui/update-css-variables.mjs +46 -36
  10. package/dist/api/commands/ui/update-css-variables.mjs.map +1 -1
  11. package/dist/app-bootstrap/types.d.mts +20 -0
  12. package/dist/app-bootstrap/types.d.mts.map +1 -1
  13. package/dist/identity/identity-constants.d.mts +72 -0
  14. package/dist/identity/identity-constants.d.mts.map +1 -0
  15. package/dist/identity/identity-constants.mjs +94 -0
  16. package/dist/identity/identity-constants.mjs.map +1 -0
  17. package/dist/identity/identity-types.d.mts +214 -0
  18. package/dist/identity/identity-types.d.mts.map +1 -0
  19. package/dist/identity/identity-types.mjs +17 -0
  20. package/dist/identity/identity-types.mjs.map +1 -0
  21. package/dist/ui/ui-helpers.d.mts +31 -0
  22. package/dist/ui/ui-helpers.d.mts.map +1 -1
  23. package/dist/ui/ui-helpers.mjs +50 -1
  24. package/dist/ui/ui-helpers.mjs.map +1 -1
  25. package/package.json +5 -26
  26. package/src/AUTO-GENERATED-version.mts +1 -1
  27. package/src/api/commands/ui/ui-index.mts +2 -2
  28. package/src/api/commands/ui/update-css-variables.mts +53 -35
  29. package/src/app-bootstrap/types.mts +25 -0
  30. package/src/identity/identity-constants.mts +107 -0
  31. package/src/identity/identity-types.mts +250 -0
  32. package/src/ui/ui-helpers.mts +57 -1
  33. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/SKILL.md +11 -10
  34. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/constants.mts.template +1 -1
  35. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/helpers.web.mts.template +3 -3
  36. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/index.html.template +1 -0
  37. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/index.mts.template +1 -1
  38. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/script.mts.template +17 -0
  39. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-core/templates/types.mts.template +1 -115
  40. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-witness/templates/witness/app/app-v1.mts.template +1 -1
  41. package/tools/auto-generated-agent-skills/skills/ibgib-create-app-witness/templates/witness/app/helper.mts.template +1 -1
  42. package/tools/auto-generated-agent-skills/skills/ibgib-create-shell/SKILL.md +8 -2
  43. package/.vscode/ibgib-snippets.code-snippets +0 -309
  44. package/.vscode/launch.json +0 -25
  45. package/.vscode/settings.json +0 -68
  46. package/.vscode/tasks.json +0 -38
@@ -24,11 +24,17 @@ The skill will generate:
24
24
  1. `src/ui/shell/{{APP_DIR_NAME}}-shell-service.mts`
25
25
  2. `src/ui/shell/{{APP_DIR_NAME}}-shell-constants.mts`
26
26
  3. `src/ui/shell/{{APP_DIR_NAME}}-shell-types.mts`
27
+ 4. `src/script.mts`
27
28
 
28
29
  ## Usage Instructions
29
30
  1. Ensure the `src/ui/shell` directory exists or the tool will create it.
30
- 2. Generate the three files from templates.
31
- 3. Update `src/bootstrap.mts` to import and call `get{{APP_CLASSNAME_PREFIX}}ShellSvc().onEngineReady()` in the `execFromArgs` function.
31
+ 2. Generate the shell service, constants, and types from templates.
32
+ 3. Update `src/script.mts` to import and call the shell factory:
33
+ ```typescript
34
+ import { get{{APP_CLASSNAME_PREFIX}}ShellSvc } from "./ui/shell/{{APP_DIR_NAME}}-shell-service.mjs";
35
+ get{{APP_CLASSNAME_PREFIX}}ShellSvc();
36
+ ```
37
+ 4. Update `src/bootstrap.mts` to import and call `get{{APP_CLASSNAME_PREFIX}}ShellSvc().onEngineReady()` in the `execFromArgs` function.
32
38
 
33
39
  ## Integration Note
34
40
  The shell service provides an `onEngineReady()` hook. This is where you should put logic to "activate" the UI once the ibgib metaspace and app witness are fully initialized.
@@ -1,309 +0,0 @@
1
- {
2
- // Place your ionic-gib workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3
- // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4
- // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5
- // used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6
- // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7
- // Placeholders with the same ids are connected.
8
- // Example:
9
- // "Print to console": {
10
- // "scope": "javascript,typescript",
11
- // "prefix": "log",
12
- // "body": [
13
- // "console.log('$1');",
14
- // "$2"
15
- // ],
16
- // "description": "Log output to console"
17
- // }
18
- "this Fn lc try..catch rethrow": {
19
- "scope": "javascript,typescript",
20
- "prefix": "lc_trycatch_rethrow_this",
21
- "body": [
22
- "const lc = `\\${this.lc}[\\${this.$1.name}]`;",
23
- "try {",
24
- "\t$SELECTION$0",
25
- "} catch (error) {",
26
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
27
- "\tthrow error;",
28
- "}"
29
- ],
30
- },
31
- "this Fn lc try..catch..finally rethrow": {
32
- "scope": "javascript,typescript",
33
- "prefix": "lc_trycatchfinally_rethrow_this",
34
- "body": [
35
- "const lc = `\\${this.lc}[\\${this.$1.name}]`;",
36
- "try {",
37
- "\t$SELECTION$0",
38
- "} catch (error) {",
39
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
40
- "\tthrow error;",
41
- "} finally {",
42
- "\t$2",
43
- "}"
44
- ],
45
- },
46
- "this Fn lc try..catch..finally rethrow with logging": {
47
- "scope": "javascript,typescript",
48
- "prefix": "lc_trycatchfinally_rethrow_withlogging_this",
49
- "body": [
50
- "const lc = `\\${this.lc}[\\${this.$1.name}]`;",
51
- "try {",
52
- "\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
53
- "\t$SELECTION$0",
54
- "} catch (error) {",
55
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
56
- "\tthrow error;",
57
- "} finally {",
58
- "\tif (logalot) { console.log(`\\${lc} complete.`); }",
59
- "}"
60
- ],
61
- },
62
- "this Fn func async lc try..catch rethrow": {
63
- "scope": "javascript,typescript",
64
- "prefix": "this_func_lc_trycatch_rethrow_this",
65
- "body": [
66
- "${1:async function} ${2:fnName}({",
67
- "\t$3,",
68
- "}: {",
69
- "\t$3: $4,",
70
- "}): Promise<$5> {",
71
- "\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
72
- "\ttry {",
73
- "\t\t$SELECTION$0",
74
- "\t} catch (error) {",
75
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
76
- "\t\tthrow error;",
77
- "\t}",
78
- "}"
79
- ],
80
- },
81
- "this Fn func async lc try..catch..finally rethrow": {
82
- "scope": "javascript,typescript",
83
- "prefix": "this_func_lc_trycatchfinally_rethrow_this",
84
- "body": [
85
- "${1:async function} ${2:fnName}({",
86
- "\t$3,",
87
- "}: {",
88
- "\t$3: $4,",
89
- "}): Promise<$5> {",
90
- "\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
91
- "\ttry {",
92
- "\t\t$SELECTION$0",
93
- "\t} catch (error) {",
94
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
95
- "\t\tthrow error;",
96
- "\t} finally {",
97
- "\t\t$6",
98
- "\t}",
99
- "}"
100
- ],
101
- },
102
- "this Fn func async lc try..catch..finally rethrow with logging": {
103
- "scope": "javascript,typescript",
104
- "prefix": "this_func_lc_trycatchfinally_rethrow_withlogging_this",
105
- "body": [
106
- "${1:async function} ${2:fnName}({",
107
- "\t$3,",
108
- "}: {",
109
- "\t$3: $4,",
110
- "}): Promise<$5> {",
111
- "\tconst lc = `\\${this.lc}[\\${this.$2.name}]`;",
112
- "\ttry {",
113
- "\t\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
114
- "\t\t$SELECTION$0",
115
- "\t} catch (error) {",
116
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
117
- "\t\tthrow error;",
118
- "\t} finally {",
119
- "\t\tif (logalot) { console.log(`\\${lc} complete.`); }",
120
- "\t}",
121
- "}"
122
- ],
123
- },
124
- "Fn lc try..catch rethrow": {
125
- "scope": "javascript,typescript",
126
- "prefix": "lc_trycatch_rethrow",
127
- "body": [
128
- "const lc = `[\\${$1.name}]`;",
129
- "try {",
130
- "\t$SELECTION$0",
131
- "} catch (error) {",
132
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
133
- "\tthrow error;",
134
- "}"
135
- ],
136
- },
137
- "Fn lc try..catch..finally rethrow": {
138
- "scope": "javascript,typescript",
139
- "prefix": "lc_trycatchfinally_rethrow",
140
- "body": [
141
- "const lc = `[\\${$1.name}]`;",
142
- "try {",
143
- "\t$SELECTION$0",
144
- "} catch (error) {",
145
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
146
- "\tthrow error;",
147
- "} finally {",
148
- "\t$2",
149
- "}"
150
- ],
151
- },
152
- "Fn lc try..catch..finally rethrow with logging": {
153
- "scope": "javascript,typescript",
154
- "prefix": "lc_trycatchfinally_rethrow_withlogging",
155
- "body": [
156
- "const lc = `[\\${$1.name}]`;",
157
- "try {",
158
- "\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
159
- "\t$SELECTION$0",
160
- "} catch (error) {",
161
- "\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
162
- "\tthrow error;",
163
- "} finally {",
164
- "\tif (logalot) { console.log(`\\${lc} complete.`); }",
165
- "}"
166
- ],
167
- },
168
- "Fn func async lc try..catch rethrow": {
169
- "scope": "javascript,typescript",
170
- "prefix": "func_lc_trycatch_rethrow",
171
- "body": [
172
- "${1:export async function} ${2:fnName}({",
173
- "\t$3,",
174
- "}: {",
175
- "\t$3: $4,",
176
- "}): Promise<$5> {",
177
- "\tconst lc = `[\\${$2.name}]`;",
178
- "\ttry {",
179
- "\t\t$SELECTION$0",
180
- "\t} catch (error) {",
181
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
182
- "\t\tthrow error;",
183
- "\t}",
184
- "}"
185
- ],
186
- },
187
- "Fn func async lc try..catch..finally rethrow": {
188
- "scope": "javascript,typescript",
189
- "prefix": "func_lc_trycatchfinally_rethrow",
190
- "body": [
191
- "${1:export async function} ${2:fnName}({",
192
- "\t$3,",
193
- "}: {",
194
- "\t$3: $4,",
195
- "}): Promise<$5> {",
196
- "\tconst lc = `[\\${$2.name}]`;",
197
- "\ttry {",
198
- "\t\t$SELECTION$0",
199
- "\t} catch (error) {",
200
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
201
- "\t\tthrow error;",
202
- "\t} finally {",
203
- "\t\t$6",
204
- "\t}",
205
- "}"
206
- ],
207
- },
208
- "Fn func async lc try..catch..finally rethrow with logging": {
209
- "scope": "javascript,typescript",
210
- "prefix": "func_lc_trycatchfinally_rethrow_withlogging",
211
- "body": [
212
- "${1:export async function} ${2:fnName}({",
213
- "\t$3,",
214
- "}: {",
215
- "\t$3: $4,",
216
- "}): Promise<$5> {",
217
- "\tconst lc = `[\\${$2.name}]`;",
218
- "\ttry {",
219
- "\t\tif (logalot) { console.log(`\\${lc} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }",
220
- "\t\t$SELECTION$0",
221
- "\t} catch (error) {",
222
- "\t\tconsole.error(`\\${lc} \\${extractErrorMsg(error)}`);",
223
- "\t\tthrow error;",
224
- "\t} finally {",
225
- "\t\tif (logalot) { console.log(`\\${lc} complete.`); }",
226
- "\t}",
227
- "}"
228
- ],
229
- },
230
- "throw new error with guid": {
231
- "scope": "javascript,typescript",
232
- "prefix": "throw_new_error_with_guid",
233
- "body": [
234
- "$0throw new Error(`$1 (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
235
- ],
236
- },
237
- "throw new error with guid (UNEXPECTED)": {
238
- "scope": "javascript,typescript",
239
- "prefix": "throw_new_error_with_guid_unexpected",
240
- "body": [
241
- "$0throw new Error(`(UNEXPECTED) $1? (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
242
- ],
243
- },
244
- "throw new error with guid not implemented": {
245
- "scope": "javascript,typescript",
246
- "prefix": "throw_new_error_with_guid_not_impl",
247
- "body": [
248
- "$0throw new Error(`not implemented (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); "
249
- ],
250
- },
251
- "if..throw with guid": {
252
- "scope": "javascript,typescript",
253
- "prefix": "if_throw_with_guid",
254
- "body": [
255
- "$0if ($1) { throw new Error(`$2 (E: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }"
256
- ],
257
- },
258
- "if logalot log": {
259
- "scope": "javascript,typescript",
260
- "prefix": "if_logalot_log",
261
- "body": [
262
- "$0if (logalot$1) { console.${2:log}(`\\${lc} $3 (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`); }"
263
- ],
264
- },
265
- "surround log if logalot log": {
266
- "scope": "javascript,typescript",
267
- "prefix": "surround_log_if_logalot",
268
- "body": [
269
- "if (logalot) { $SELECTION }"
270
- ],
271
- },
272
- "surround if logalot timer console time-timeEnd": {
273
- "scope": "javascript,typescript",
274
- "prefix": "surround_if_logalot_timer_console_time_timeend",
275
- "body": [
276
- "let timerName: string;",
277
- "const timerEnabled = true",
278
- "if (logalot && timerEnabled) {",
279
- "\ttimerName = lc.substring(0, ${1:24}) + '[timer $RANDOM_HEX]';",
280
- "\tconsole.log(`\\${timerName} starting... (I: $RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$RANDOM_HEX$CURRENT_YEAR_SHORT)`);",
281
- "\tconsole.time(timerName);",
282
- "}",
283
- "// can intersperse with calls to console.timeLog for intermediate times",
284
- "// if (logalot) { console.timeLog(timerName); }",
285
- "",
286
- "$0$SELECTION",
287
- "",
288
- "if (logalot && timerEnabled) {",
289
- "\tconsole.timeEnd(timerName);",
290
- "\tconsole.log(`\\${timerName} complete.`);",
291
- "}",
292
- ],
293
- },
294
- "if logalot global ibgib timer": {
295
- "scope": "javascript,typescript",
296
- "prefix": "if_logalot_ibgib_timer",
297
- "body": [
298
- "if (logalot) { console.log(`\\${lc}\\${c.GLOBAL_TIMER_NAME}`); console.timeLog(c.GLOBAL_TIMER_NAME); }$0"
299
- ],
300
- },
301
- "return early": {
302
- "scope": "javascript,typescript",
303
- "prefix": "return_early",
304
- "description": "I like to indicate returning early in a function in a comment, so it's more obvious in the editor if I'm scanning for comments.",
305
- "body": [
306
- "return$1; /* <<<< returns early */$0",
307
- ],
308
- },
309
- }
@@ -1,25 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "npm debug",
11
- "runtimeExecutable": "npm",
12
- "runtimeArgs": [
13
- "run",
14
- "debug",
15
- ],
16
- "port": 9229,
17
- "sourceMaps": true,
18
- "skipFiles": [
19
- "<node_internals>/**"
20
- ]
21
- },
22
-
23
- ]
24
- }filename
25
- filename
@@ -1,68 +0,0 @@
1
- {
2
- "typescript.tsdk": "node_modules/typescript/lib",
3
- "search.exclude": {
4
- "**/*.BAK": true,
5
- "**/*.bak": true,
6
- "**/dist": true
7
- },
8
- "files.watcherExclude": {
9
- "**/*.BAK": true,
10
- "**/*.bak": true
11
- },
12
- "editor.formatOnSave": true,
13
- "files.insertFinalNewline": true,
14
- "files.trimTrailingWhitespace": true,
15
- "files.trimFinalNewlines": true,
16
- "workbench.colorTheme": "Kimbie Dark",
17
- "workbench.colorCustomizations": {
18
- "editor.background": "#3e033e",
19
- "sideBar.background": "#3e0333",
20
- "editor.lineHighlightBackground": "#00ffb718",
21
- "activityBar.activeBackground": "#cc3636",
22
- "activityBar.background": "#cc3636",
23
- "activityBar.foreground": "#e7e7e7",
24
- "activityBar.inactiveForeground": "#e7e7e799",
25
- "activityBarBadge.background": "#134c13",
26
- "activityBarBadge.foreground": "#e7e7e7",
27
- "commandCenter.border": "#e7e7e799",
28
- "sash.hoverBorder": "#cc3636",
29
- "statusBar.background": "#a52a2a",
30
- "statusBar.foreground": "#e7e7e7",
31
- "statusBarItem.hoverBackground": "#cc3636",
32
- "statusBarItem.remoteBackground": "#a52a2a",
33
- "statusBarItem.remoteForeground": "#e7e7e7",
34
- "titleBar.activeBackground": "#a52a2a",
35
- "titleBar.activeForeground": "#e7e7e7",
36
- "titleBar.inactiveBackground": "#a52a2a99",
37
- "titleBar.inactiveForeground": "#e7e7e799"
38
- },
39
- "editor.tokenColorCustomizations": {
40
- "[Kimbie Dark]": {
41
- "variables": "#3e8a17",
42
- "comments": "#598cdf8c",
43
- "textMateRules": [
44
- {
45
- "name": "Lists",
46
- "scope": "markup.list",
47
- "settings": {
48
- "foreground": "#cb76d6"
49
- }
50
- },
51
- {
52
- "scope": "entity.name.tag",
53
- "settings": {
54
- "foreground": "#6cb548"
55
- }
56
- },
57
- {
58
- "scope": "string",
59
- "settings": {
60
- "foreground": "#84cad3"
61
- }
62
- }
63
- ],
64
- }
65
- },
66
- "peacock.color": "brown",
67
- "insertGuid.pasteAutomatically": "{n}",
68
- }
@@ -1,38 +0,0 @@
1
- {
2
- // See https://go.microsoft.com/fwlink/?LinkId=733558
3
- // for the documentation about the tasks.json format
4
- "version": "2.0.0",
5
- "tasks": [
6
- {
7
- "type": "npm",
8
- "script": "build",
9
- "group": "build",
10
- "problemMatcher": []
11
- },
12
- {
13
- "type": "npm",
14
- "script": "test",
15
- "group": "build",
16
- "problemMatcher": []
17
- },
18
- {
19
- "type": "npm",
20
- "script": "clean",
21
- "group": "build",
22
- "problemMatcher": []
23
- },
24
- {
25
- "type": "npm",
26
- "script": "build:test",
27
- "group": "build",
28
- "problemMatcher": []
29
- },
30
- {
31
- "type": "npm",
32
- "script": "prepare:publish",
33
- "group": "build",
34
- "problemMatcher": []
35
- }
36
- ],
37
- }filename
38
- filename