intelligent-system-design-language 0.3.21 → 0.3.23
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/.claude/agents/langium-language-designer.md +38 -38
- package/.claude/agents/typescript-vscode-expert.md +29 -29
- package/.claude/agents/ui-ux-designer.md +36 -36
- package/.claude/settings.local.json +33 -33
- package/.idea/inspectionProfiles/Project_Default.xml +6 -6
- package/.idea/isdl.iml +13 -13
- package/.idea/modules.xml +8 -8
- package/.idea/vcs.xml +6 -6
- package/.idea/watcherTasks.xml +3 -3
- package/.vscodeignore +18 -18
- package/LICENSE +673 -673
- package/README.md +86 -86
- package/bin/cli.js +4 -4
- package/bin/lsp.js +8 -8
- package/out/_backgrounds.scss +91 -91
- package/out/_handlebars.scss +497 -497
- package/out/_isdlStyles.scss +1444 -1381
- package/out/_vuetifyOverrides.scss +425 -425
- package/out/_vuetifyStyles.scss +31957 -31957
- package/out/cli/components/_backgrounds.scss +91 -91
- package/out/cli/components/_handlebars.scss +497 -497
- package/out/cli/components/_isdlStyles.scss +1444 -1381
- package/out/cli/components/_vuetifyOverrides.scss +425 -425
- package/out/cli/components/_vuetifyStyles.scss +31957 -31957
- package/out/cli/components/active-effect-sheet-generator.js +453 -453
- package/out/cli/components/chat-card-generator.js +654 -651
- package/out/cli/components/chat-card-generator.js.map +1 -1
- package/out/cli/components/css-generator.js +4 -4
- package/out/cli/components/damage-roll-generator.js +160 -160
- package/out/cli/components/datamodel-generator.js +264 -257
- package/out/cli/components/datamodel-generator.js.map +1 -1
- package/out/cli/components/derived-data-generator.js +923 -923
- package/out/cli/components/hotbar-drop-hook-generator.js +82 -82
- package/out/cli/components/init-hook-generator.js +495 -495
- package/out/cli/components/language-generator.js +1 -1
- package/out/cli/components/language-generator.js.map +1 -1
- package/out/cli/components/measured-template-preview.js +221 -221
- package/out/cli/components/method-generator.js +979 -887
- package/out/cli/components/method-generator.js.map +1 -1
- package/out/cli/components/ready-hook-generator.js +404 -404
- package/out/cli/components/token-generator.js +116 -116
- package/out/cli/components/vue/base-components/vue-attribute.js +138 -138
- package/out/cli/components/vue/base-components/vue-boolean.js +64 -64
- package/out/cli/components/vue/base-components/vue-calculator.js +93 -93
- package/out/cli/components/vue/base-components/vue-damage-application.js +356 -356
- package/out/cli/components/vue/base-components/vue-damage-bonuses.js +165 -165
- package/out/cli/components/vue/base-components/vue-damage-resistances.js +196 -196
- package/out/cli/components/vue/base-components/vue-damage-track.js +121 -121
- package/out/cli/components/vue/base-components/vue-date-time.js +42 -42
- package/out/cli/components/vue/base-components/vue-dice.js +98 -98
- package/out/cli/components/vue/base-components/vue-die.js +73 -73
- package/out/cli/components/vue/base-components/vue-document-choice.js +149 -149
- package/out/cli/components/vue/base-components/vue-document-choices.js +179 -179
- package/out/cli/components/vue/base-components/vue-document-link.js +60 -60
- package/out/cli/components/vue/base-components/vue-extended-choice.js +88 -88
- package/out/cli/components/vue/base-components/vue-inventory.js +519 -519
- package/out/cli/components/vue/base-components/vue-macro-choice.js +138 -138
- package/out/cli/components/vue/base-components/vue-measured-template.js +530 -530
- package/out/cli/components/vue/base-components/vue-money.js +483 -483
- package/out/cli/components/vue/base-components/vue-number.js +174 -174
- package/out/cli/components/vue/base-components/vue-paperdoll.js +43 -43
- package/out/cli/components/vue/base-components/vue-parent-property-reference.js +76 -76
- package/out/cli/components/vue/base-components/vue-prosemirror.js +18 -18
- package/out/cli/components/vue/base-components/vue-resource.js +136 -136
- package/out/cli/components/vue/base-components/vue-roll-visualizer.js +286 -109
- package/out/cli/components/vue/base-components/vue-roll-visualizer.js.map +1 -1
- package/out/cli/components/vue/base-components/vue-self-property-reference.js +62 -62
- package/out/cli/components/vue/base-components/vue-string-choice.js +98 -98
- package/out/cli/components/vue/base-components/vue-string-choices.js +203 -203
- package/out/cli/components/vue/base-components/vue-string.js +60 -60
- package/out/cli/components/vue/base-components/vue-text-field.js +53 -53
- package/out/cli/components/vue/base-components/vue-tracker.js +431 -431
- package/out/cli/components/vue/vue-action-component-generator.js +64 -64
- package/out/cli/components/vue/vue-active-effect-sheet-generator.js +856 -856
- package/out/cli/components/vue/vue-datatable-sheet-class-generator.js +292 -292
- package/out/cli/components/vue/vue-datatable2-component-generator.js +824 -824
- package/out/cli/components/vue/vue-document-creation-app.js +121 -121
- package/out/cli/components/vue/vue-document-creation-sheet.js +94 -94
- package/out/cli/components/vue/vue-generator.js +40 -40
- package/out/cli/components/vue/vue-mixin.js +296 -296
- package/out/cli/components/vue/vue-pinned-datatable-component-generator.js +260 -260
- package/out/cli/components/vue/vue-prompt-generator.js +91 -76
- package/out/cli/components/vue/vue-prompt-generator.js.map +1 -1
- package/out/cli/components/vue/vue-prompt-sheet-class-generator.js +317 -317
- package/out/cli/components/vue/vue-sheet-application-generator.js +1177 -1167
- package/out/cli/components/vue/vue-sheet-application-generator.js.map +1 -1
- package/out/cli/components/vue/vue-sheet-class-generator.js +510 -510
- package/out/cli/generator.js +438 -433
- package/out/cli/generator.js.map +1 -1
- package/out/extension/github/githubAuthProvider.js +71 -29
- package/out/extension/github/githubAuthProvider.js.map +1 -1
- package/out/extension/github/githubGistManager.js +4 -3
- package/out/extension/github/githubGistManager.js.map +1 -1
- package/out/extension/github/githubManager.js +40 -38
- package/out/extension/github/githubManager.js.map +1 -1
- package/out/extension/github/githubQuickActions.js +120 -120
- package/out/extension/github/system-workflow.yml +47 -47
- package/out/extension/main.cjs +909 -532
- package/out/extension/main.cjs.map +3 -3
- package/out/extension/package.json +419 -419
- package/out/language/generated/ast.js +51 -2
- package/out/language/generated/ast.js.map +1 -1
- package/out/language/generated/grammar.js +14240 -13991
- package/out/language/generated/grammar.js.map +1 -1
- package/out/language/intelligent-system-design-language-validator.js +32 -2
- package/out/language/intelligent-system-design-language-validator.js.map +1 -1
- package/out/language/isdl-scope-provider.js +14 -1
- package/out/language/isdl-scope-provider.js.map +1 -1
- package/out/language/main.cjs +913 -569
- package/out/language/main.cjs.map +3 -3
- package/out/package.json +419 -419
- package/out/progressbar.min.js +6 -6
- package/out/styles.scss +762 -747
- package/out/test/validating/diagnostics.test.js +40 -0
- package/out/test/validating/diagnostics.test.js.map +1 -1
- package/package.json +419 -419
|
@@ -54,171 +54,171 @@ export default function generateDamageBonusesComponent(destination, entry) {
|
|
|
54
54
|
return JSON.stringify(damageTypeMap, null, 8);
|
|
55
55
|
}
|
|
56
56
|
const damageTypesObject = extractDamageTypes();
|
|
57
|
-
const fileNode = expandToNode `
|
|
58
|
-
<script setup>
|
|
59
|
-
import { ref, computed, inject, watchEffect } from "vue";
|
|
60
|
-
|
|
61
|
-
const props = defineProps({
|
|
62
|
-
label: String,
|
|
63
|
-
systemPath: String,
|
|
64
|
-
context: Object,
|
|
65
|
-
visibility: String,
|
|
66
|
-
editMode: Boolean,
|
|
67
|
-
icon: String
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const document = inject("rawDocument");
|
|
71
|
-
|
|
72
|
-
// Static damage type configuration extracted from AST
|
|
73
|
-
const damageTypeConfig = ${damageTypesObject};
|
|
74
|
-
|
|
75
|
-
const isHidden = computed(() => {
|
|
76
|
-
if (props.visibility === "hidden") {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
if (props.visibility === "gm" && !game.user.isGM) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
return false;
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// Get all damage bonuses from the actor's system
|
|
86
|
-
const damageBonuses = computed(() => {
|
|
87
|
-
const system = document.system;
|
|
88
|
-
const bonusInfo = {};
|
|
89
|
-
|
|
90
|
-
// Scan all system properties for bonus damage fields
|
|
91
|
-
for (const [key, value] of Object.entries(system)) {
|
|
92
|
-
const bonusMatch = key.match(/^(.+)bonusdamage$/);
|
|
93
|
-
|
|
94
|
-
if (bonusMatch) {
|
|
95
|
-
const damageType = bonusMatch[1];
|
|
96
|
-
const damageTypeObj = damageTypeConfig[damageType] || {};
|
|
97
|
-
|
|
98
|
-
bonusInfo[damageType] = {
|
|
99
|
-
type: damageType,
|
|
100
|
-
label: damageTypeObj.label || damageType,
|
|
101
|
-
icon: damageTypeObj.icon || 'fa-solid fa-circle-info',
|
|
102
|
-
color: damageTypeObj.color || '#666666',
|
|
103
|
-
bonus: Number(value) || 0
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Convert to array and sort by damage type name
|
|
109
|
-
return Object.values(bonusInfo).sort((a, b) => a.type.localeCompare(b.type));
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Helper function to capitalize damage type names
|
|
113
|
-
const capitalize = (str) => {
|
|
114
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// Helper function to format bonus values
|
|
118
|
-
const formatBonus = (value) => {
|
|
119
|
-
const numValue = Number(value) || 0;
|
|
120
|
-
return numValue > 0 ? \`+\${numValue}\` : \`\${numValue}\`;
|
|
121
|
-
};
|
|
122
|
-
</script>
|
|
123
|
-
|
|
124
|
-
<template>
|
|
125
|
-
<div v-if="!isHidden" class="isdl-damage-bonuses pt-2 single-wide">
|
|
126
|
-
<v-card class="damage-bonuses-card" variant="outlined" theme="light" color="white">
|
|
127
|
-
<v-card-title class="damage-bonuses-header bg-grey-darken-3 text-white">
|
|
128
|
-
<v-icon v-if="icon" class="me-2">{{ icon }}</v-icon>
|
|
129
|
-
<span>{{ game.i18n.localize(label) }}</span>
|
|
130
|
-
</v-card-title>
|
|
131
|
-
|
|
132
|
-
<v-card-text class="pa-0">
|
|
133
|
-
<div v-if="damageBonuses.length === 0" class="text-center text-disabled pa-2">
|
|
134
|
-
No damage bonuses found
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<v-table v-else density="compact" class="damage-bonuses-table">
|
|
138
|
-
<thead>
|
|
139
|
-
<tr>
|
|
140
|
-
<th class="text-left text-white">Type</th>
|
|
141
|
-
<th class="text-center text-white">Bonus</th>
|
|
142
|
-
</tr>
|
|
143
|
-
</thead>
|
|
144
|
-
<tbody>
|
|
145
|
-
<tr v-for="damage in damageBonuses" :key="damage.type" class="damage-type-row">
|
|
146
|
-
<td class="damage-type-name">
|
|
147
|
-
<div class="damage-type-header">
|
|
148
|
-
<v-icon :color="damage.color" size="small" class="me-2">{{ damage.icon }}</v-icon>
|
|
149
|
-
<span class="text-subtitle-2">{{ damage.label || capitalize(damage.type) }}</span>
|
|
150
|
-
</div>
|
|
151
|
-
</td>
|
|
152
|
-
<td class="text-center">
|
|
153
|
-
<v-chip
|
|
154
|
-
size="small"
|
|
155
|
-
:color="Number(damage.bonus) > 0 ? 'success' : Number(damage.bonus) < 0 ? 'error' : 'default'"
|
|
156
|
-
variant="flat"
|
|
157
|
-
class="text-white font-weight-bold"
|
|
158
|
-
>
|
|
159
|
-
{{ formatBonus(damage.bonus) }}
|
|
160
|
-
</v-chip>
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
</tbody>
|
|
164
|
-
</v-table>
|
|
165
|
-
</v-card-text>
|
|
166
|
-
</v-card>
|
|
167
|
-
</div>
|
|
168
|
-
</template>
|
|
169
|
-
|
|
170
|
-
<style scoped>
|
|
171
|
-
.damage-bonuses-card {
|
|
172
|
-
border-radius: 6px;
|
|
173
|
-
background: #ffffff;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.damage-bonuses-header {
|
|
177
|
-
background: #424242;
|
|
178
|
-
color: #ffffff;
|
|
179
|
-
padding: 6px 12px;
|
|
180
|
-
font-size: 0.85rem;
|
|
181
|
-
font-weight: 600;
|
|
182
|
-
border-bottom: 1px solid #333;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.damage-bonuses-table {
|
|
186
|
-
background: #ffffff;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.damage-type-row:hover {
|
|
190
|
-
background-color: #f9f9f9;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.damage-type-name {
|
|
194
|
-
font-weight: 500;
|
|
195
|
-
min-width: 120px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.damage-type-header {
|
|
199
|
-
display: flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
gap: 4px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.v-table th {
|
|
205
|
-
font-weight: 600;
|
|
206
|
-
font-size: 0.8rem;
|
|
207
|
-
color: #555;
|
|
208
|
-
background: #fafafa;
|
|
209
|
-
border-bottom: 1px solid #e0e0e0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.v-table td {
|
|
213
|
-
padding: 4px 12px;
|
|
214
|
-
border-bottom: 1px solid #f0f0f0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.v-chip {
|
|
218
|
-
min-width: 48px;
|
|
219
|
-
justify-content: center;
|
|
220
|
-
}
|
|
221
|
-
</style>
|
|
57
|
+
const fileNode = expandToNode `
|
|
58
|
+
<script setup>
|
|
59
|
+
import { ref, computed, inject, watchEffect } from "vue";
|
|
60
|
+
|
|
61
|
+
const props = defineProps({
|
|
62
|
+
label: String,
|
|
63
|
+
systemPath: String,
|
|
64
|
+
context: Object,
|
|
65
|
+
visibility: String,
|
|
66
|
+
editMode: Boolean,
|
|
67
|
+
icon: String
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const document = inject("rawDocument");
|
|
71
|
+
|
|
72
|
+
// Static damage type configuration extracted from AST
|
|
73
|
+
const damageTypeConfig = ${damageTypesObject};
|
|
74
|
+
|
|
75
|
+
const isHidden = computed(() => {
|
|
76
|
+
if (props.visibility === "hidden") {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
if (props.visibility === "gm" && !game.user.isGM) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Get all damage bonuses from the actor's system
|
|
86
|
+
const damageBonuses = computed(() => {
|
|
87
|
+
const system = document.system;
|
|
88
|
+
const bonusInfo = {};
|
|
89
|
+
|
|
90
|
+
// Scan all system properties for bonus damage fields
|
|
91
|
+
for (const [key, value] of Object.entries(system)) {
|
|
92
|
+
const bonusMatch = key.match(/^(.+)bonusdamage$/);
|
|
93
|
+
|
|
94
|
+
if (bonusMatch) {
|
|
95
|
+
const damageType = bonusMatch[1];
|
|
96
|
+
const damageTypeObj = damageTypeConfig[damageType] || {};
|
|
97
|
+
|
|
98
|
+
bonusInfo[damageType] = {
|
|
99
|
+
type: damageType,
|
|
100
|
+
label: damageTypeObj.label || damageType,
|
|
101
|
+
icon: damageTypeObj.icon || 'fa-solid fa-circle-info',
|
|
102
|
+
color: damageTypeObj.color || '#666666',
|
|
103
|
+
bonus: Number(value) || 0
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Convert to array and sort by damage type name
|
|
109
|
+
return Object.values(bonusInfo).sort((a, b) => a.type.localeCompare(b.type));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Helper function to capitalize damage type names
|
|
113
|
+
const capitalize = (str) => {
|
|
114
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Helper function to format bonus values
|
|
118
|
+
const formatBonus = (value) => {
|
|
119
|
+
const numValue = Number(value) || 0;
|
|
120
|
+
return numValue > 0 ? \`+\${numValue}\` : \`\${numValue}\`;
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<template>
|
|
125
|
+
<div v-if="!isHidden" class="isdl-damage-bonuses pt-2 single-wide">
|
|
126
|
+
<v-card class="damage-bonuses-card" variant="outlined" theme="light" color="white">
|
|
127
|
+
<v-card-title class="damage-bonuses-header bg-grey-darken-3 text-white">
|
|
128
|
+
<v-icon v-if="icon" class="me-2">{{ icon }}</v-icon>
|
|
129
|
+
<span>{{ game.i18n.localize(label) }}</span>
|
|
130
|
+
</v-card-title>
|
|
131
|
+
|
|
132
|
+
<v-card-text class="pa-0">
|
|
133
|
+
<div v-if="damageBonuses.length === 0" class="text-center text-disabled pa-2">
|
|
134
|
+
No damage bonuses found
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<v-table v-else density="compact" class="damage-bonuses-table">
|
|
138
|
+
<thead>
|
|
139
|
+
<tr>
|
|
140
|
+
<th class="text-left text-white">Type</th>
|
|
141
|
+
<th class="text-center text-white">Bonus</th>
|
|
142
|
+
</tr>
|
|
143
|
+
</thead>
|
|
144
|
+
<tbody>
|
|
145
|
+
<tr v-for="damage in damageBonuses" :key="damage.type" class="damage-type-row">
|
|
146
|
+
<td class="damage-type-name">
|
|
147
|
+
<div class="damage-type-header">
|
|
148
|
+
<v-icon :color="damage.color" size="small" class="me-2">{{ damage.icon }}</v-icon>
|
|
149
|
+
<span class="text-subtitle-2">{{ damage.label || capitalize(damage.type) }}</span>
|
|
150
|
+
</div>
|
|
151
|
+
</td>
|
|
152
|
+
<td class="text-center">
|
|
153
|
+
<v-chip
|
|
154
|
+
size="small"
|
|
155
|
+
:color="Number(damage.bonus) > 0 ? 'success' : Number(damage.bonus) < 0 ? 'error' : 'default'"
|
|
156
|
+
variant="flat"
|
|
157
|
+
class="text-white font-weight-bold"
|
|
158
|
+
>
|
|
159
|
+
{{ formatBonus(damage.bonus) }}
|
|
160
|
+
</v-chip>
|
|
161
|
+
</td>
|
|
162
|
+
</tr>
|
|
163
|
+
</tbody>
|
|
164
|
+
</v-table>
|
|
165
|
+
</v-card-text>
|
|
166
|
+
</v-card>
|
|
167
|
+
</div>
|
|
168
|
+
</template>
|
|
169
|
+
|
|
170
|
+
<style scoped>
|
|
171
|
+
.damage-bonuses-card {
|
|
172
|
+
border-radius: 6px;
|
|
173
|
+
background: #ffffff;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.damage-bonuses-header {
|
|
177
|
+
background: #424242;
|
|
178
|
+
color: #ffffff;
|
|
179
|
+
padding: 6px 12px;
|
|
180
|
+
font-size: 0.85rem;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
border-bottom: 1px solid #333;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.damage-bonuses-table {
|
|
186
|
+
background: #ffffff;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.damage-type-row:hover {
|
|
190
|
+
background-color: #f9f9f9;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.damage-type-name {
|
|
194
|
+
font-weight: 500;
|
|
195
|
+
min-width: 120px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.damage-type-header {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
gap: 4px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.v-table th {
|
|
205
|
+
font-weight: 600;
|
|
206
|
+
font-size: 0.8rem;
|
|
207
|
+
color: #555;
|
|
208
|
+
background: #fafafa;
|
|
209
|
+
border-bottom: 1px solid #e0e0e0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.v-table td {
|
|
213
|
+
padding: 4px 12px;
|
|
214
|
+
border-bottom: 1px solid #f0f0f0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.v-chip {
|
|
218
|
+
min-width: 48px;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
}
|
|
221
|
+
</style>
|
|
222
222
|
`.appendNewLine();
|
|
223
223
|
fs.writeFileSync(generatedFilePath, toString(fileNode));
|
|
224
224
|
}
|