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
|
@@ -7,70 +7,70 @@ export default function generateBooleanComponent(destination, entry) {
|
|
|
7
7
|
if (!fs.existsSync(generatedFileDir)) {
|
|
8
8
|
fs.mkdirSync(generatedFileDir, { recursive: true });
|
|
9
9
|
}
|
|
10
|
-
const fileNode = expandToNode `
|
|
11
|
-
<script setup>
|
|
12
|
-
import { ref, computed, inject } from "vue";
|
|
13
|
-
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
label: String,
|
|
16
|
-
systemPath: String,
|
|
17
|
-
context: Object,
|
|
18
|
-
visibility: String,
|
|
19
|
-
editMode: Boolean,
|
|
20
|
-
icon: String,
|
|
21
|
-
color: String,
|
|
22
|
-
disabled: Boolean
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const document = inject("rawDocument");
|
|
26
|
-
|
|
27
|
-
const value = computed({
|
|
28
|
-
get: () => foundry.utils.getProperty(props.context, props.systemPath),
|
|
29
|
-
set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath, newValue)
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const isHidden = computed(() => {
|
|
33
|
-
if (props.visibility === "hidden") {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
if (props.visibility === "gm" && !game.user.isGM) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
return false;
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const isDisabled = computed(() => {
|
|
43
|
-
return props.disabled ||
|
|
44
|
-
props.visibility === "locked" ||
|
|
45
|
-
props.visibility === "readonly" ||
|
|
46
|
-
(props.visibility === "gmOnly" && !game.user.isGM);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const checkboxColor = computed(() => {
|
|
50
|
-
return props.color || 'primary';
|
|
51
|
-
});
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<div v-if="!isHidden" class="isdl-boolean single-wide">
|
|
56
|
-
<v-checkbox
|
|
57
|
-
v-model="value"
|
|
58
|
-
:name="props.systemPath"
|
|
59
|
-
:disabled="isDisabled"
|
|
60
|
-
:color="checkboxColor"
|
|
61
|
-
density="compact"
|
|
62
|
-
class="single-wide"
|
|
63
|
-
variant="outlined"
|
|
64
|
-
>
|
|
65
|
-
<template #label>
|
|
66
|
-
<span class="field-label">
|
|
67
|
-
<v-icon v-if="props.icon" :icon="props.icon" size="small" class="me-1"></v-icon>
|
|
68
|
-
{{ game.i18n.localize(props.label) }}
|
|
69
|
-
</span>
|
|
70
|
-
</template>
|
|
71
|
-
</v-checkbox>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
10
|
+
const fileNode = expandToNode `
|
|
11
|
+
<script setup>
|
|
12
|
+
import { ref, computed, inject } from "vue";
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
label: String,
|
|
16
|
+
systemPath: String,
|
|
17
|
+
context: Object,
|
|
18
|
+
visibility: String,
|
|
19
|
+
editMode: Boolean,
|
|
20
|
+
icon: String,
|
|
21
|
+
color: String,
|
|
22
|
+
disabled: Boolean
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const document = inject("rawDocument");
|
|
26
|
+
|
|
27
|
+
const value = computed({
|
|
28
|
+
get: () => foundry.utils.getProperty(props.context, props.systemPath),
|
|
29
|
+
set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath, newValue)
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const isHidden = computed(() => {
|
|
33
|
+
if (props.visibility === "hidden") {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
if (props.visibility === "gm" && !game.user.isGM) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const isDisabled = computed(() => {
|
|
43
|
+
return props.disabled ||
|
|
44
|
+
props.visibility === "locked" ||
|
|
45
|
+
props.visibility === "readonly" ||
|
|
46
|
+
(props.visibility === "gmOnly" && !game.user.isGM);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const checkboxColor = computed(() => {
|
|
50
|
+
return props.color || 'primary';
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<div v-if="!isHidden" class="isdl-boolean single-wide">
|
|
56
|
+
<v-checkbox
|
|
57
|
+
v-model="value"
|
|
58
|
+
:name="props.systemPath"
|
|
59
|
+
:disabled="isDisabled"
|
|
60
|
+
:color="checkboxColor"
|
|
61
|
+
density="compact"
|
|
62
|
+
class="single-wide"
|
|
63
|
+
variant="outlined"
|
|
64
|
+
>
|
|
65
|
+
<template #label>
|
|
66
|
+
<span class="field-label">
|
|
67
|
+
<v-icon v-if="props.icon" :icon="props.icon" size="small" class="me-1"></v-icon>
|
|
68
|
+
{{ game.i18n.localize(props.label) }}
|
|
69
|
+
</span>
|
|
70
|
+
</template>
|
|
71
|
+
</v-checkbox>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
74
|
`.appendNewLine();
|
|
75
75
|
fs.writeFileSync(generatedFilePath, toString(fileNode));
|
|
76
76
|
}
|
|
@@ -7,99 +7,99 @@ export default function generateCalculator(destination) {
|
|
|
7
7
|
if (!fs.existsSync(generatedFileDir)) {
|
|
8
8
|
fs.mkdirSync(generatedFileDir, { recursive: true });
|
|
9
9
|
}
|
|
10
|
-
const fileNode = expandToNode `
|
|
11
|
-
<script setup>
|
|
12
|
-
import { ref, computed, inject } from "vue";
|
|
13
|
-
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
systemPath: String,
|
|
16
|
-
context: Object,
|
|
17
|
-
primaryColor: String,
|
|
18
|
-
secondaryColor: String
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const document = inject("rawDocument");
|
|
22
|
-
|
|
23
|
-
const open = ref(false);
|
|
24
|
-
const value = ref(0);
|
|
25
|
-
const mode = ref("add");
|
|
26
|
-
const btn = ref(null);
|
|
27
|
-
|
|
28
|
-
const toggleCalculator = () => {
|
|
29
|
-
open.value = !open.value;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const swapMode = (modeName) => {
|
|
33
|
-
mode.value = modeName;
|
|
34
|
-
console.log("Swapping mode to", modeName);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const isActive = (modeName) => {
|
|
38
|
-
return mode.value === modeName ? "active" : "";
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const submit = () => {
|
|
42
|
-
const update = {};
|
|
43
|
-
const currentValue = foundry.utils.getProperty(document, props.systemPath);
|
|
44
|
-
let updateValue = value.value;
|
|
45
|
-
if (mode.value === "add") {
|
|
46
|
-
updateValue = currentValue + value.value;
|
|
47
|
-
} else if (mode.value === "subtract") {
|
|
48
|
-
updateValue = currentValue - value.value;
|
|
49
|
-
} else if (mode.value === "multiply") {
|
|
50
|
-
updateValue = currentValue * value.value;
|
|
51
|
-
} else if (mode.value === "divide") {
|
|
52
|
-
updateValue = currentValue / value.value;
|
|
53
|
-
}
|
|
54
|
-
if (isNaN(updateValue)) {
|
|
55
|
-
console.error("Invalid value", updateValue);
|
|
56
|
-
updateValue = 0;
|
|
57
|
-
}
|
|
58
|
-
update[props.systemPath] = updateValue;
|
|
59
|
-
document.update(update);
|
|
60
|
-
open.value = false;
|
|
61
|
-
};
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<template>
|
|
65
|
-
<div>
|
|
66
|
-
<v-icon icon="fa-solid fa-calculator" @click="toggleCalculator">
|
|
67
|
-
</v-icon>
|
|
68
|
-
<v-dialog v-model="open" max-width="340">
|
|
69
|
-
<template v-slot:default="{ open }">
|
|
70
|
-
<v-card title="Calculator">
|
|
71
|
-
<v-card-text>
|
|
72
|
-
<v-number-input
|
|
73
|
-
v-model="value"
|
|
74
|
-
label="Value"
|
|
75
|
-
controlVariant="stacked"
|
|
76
|
-
density="compact"
|
|
77
|
-
variant="outlined"
|
|
78
|
-
></v-number-input>
|
|
79
|
-
<v-btn-toggle v-model="mode" class="flexrow" mandatory divided>
|
|
80
|
-
<v-btn value="add" data-tooltip="Add" :color="primaryColor">
|
|
81
|
-
<v-icon icon="fa-solid fa-plus"></v-icon>
|
|
82
|
-
</v-btn>
|
|
83
|
-
<v-btn value="subtract" data-tooltip="Subtract" :color="primaryColor">
|
|
84
|
-
<v-icon icon="fa-solid fa-minus"></v-icon>
|
|
85
|
-
</v-btn>
|
|
86
|
-
<v-btn value="multiply" data-tooltip="Multiply" :color="primaryColor">
|
|
87
|
-
<v-icon icon="fa-solid fa-times"></v-icon>
|
|
88
|
-
</v-btn>
|
|
89
|
-
<v-btn value="divide" data-tooltip="Divide" :color="primaryColor">
|
|
90
|
-
<v-icon icon="fa-solid fa-divide"></v-icon>
|
|
91
|
-
</v-btn>
|
|
92
|
-
</v-btn-toggle>
|
|
93
|
-
</v-card-text>
|
|
94
|
-
<v-card-actions class="flexrow">
|
|
95
|
-
<v-btn text="Submit" @click="submit" prepend-icon="fa-solid fa-check" :color="primaryColor"></v-btn>
|
|
96
|
-
<v-btn text="Cancel" @click="toggleCalculator" prepend-icon="fa-solid fa-xmark" :color="secondaryColor"></v-btn>
|
|
97
|
-
</v-card-actions>
|
|
98
|
-
</v-card>
|
|
99
|
-
</template>
|
|
100
|
-
</v-dialog>
|
|
101
|
-
</div>
|
|
102
|
-
</template>
|
|
10
|
+
const fileNode = expandToNode `
|
|
11
|
+
<script setup>
|
|
12
|
+
import { ref, computed, inject } from "vue";
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
systemPath: String,
|
|
16
|
+
context: Object,
|
|
17
|
+
primaryColor: String,
|
|
18
|
+
secondaryColor: String
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const document = inject("rawDocument");
|
|
22
|
+
|
|
23
|
+
const open = ref(false);
|
|
24
|
+
const value = ref(0);
|
|
25
|
+
const mode = ref("add");
|
|
26
|
+
const btn = ref(null);
|
|
27
|
+
|
|
28
|
+
const toggleCalculator = () => {
|
|
29
|
+
open.value = !open.value;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const swapMode = (modeName) => {
|
|
33
|
+
mode.value = modeName;
|
|
34
|
+
console.log("Swapping mode to", modeName);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const isActive = (modeName) => {
|
|
38
|
+
return mode.value === modeName ? "active" : "";
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const submit = () => {
|
|
42
|
+
const update = {};
|
|
43
|
+
const currentValue = foundry.utils.getProperty(document, props.systemPath);
|
|
44
|
+
let updateValue = value.value;
|
|
45
|
+
if (mode.value === "add") {
|
|
46
|
+
updateValue = currentValue + value.value;
|
|
47
|
+
} else if (mode.value === "subtract") {
|
|
48
|
+
updateValue = currentValue - value.value;
|
|
49
|
+
} else if (mode.value === "multiply") {
|
|
50
|
+
updateValue = currentValue * value.value;
|
|
51
|
+
} else if (mode.value === "divide") {
|
|
52
|
+
updateValue = currentValue / value.value;
|
|
53
|
+
}
|
|
54
|
+
if (isNaN(updateValue)) {
|
|
55
|
+
console.error("Invalid value", updateValue);
|
|
56
|
+
updateValue = 0;
|
|
57
|
+
}
|
|
58
|
+
update[props.systemPath] = updateValue;
|
|
59
|
+
document.update(update);
|
|
60
|
+
open.value = false;
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<div>
|
|
66
|
+
<v-icon icon="fa-solid fa-calculator" @click="toggleCalculator">
|
|
67
|
+
</v-icon>
|
|
68
|
+
<v-dialog v-model="open" max-width="340">
|
|
69
|
+
<template v-slot:default="{ open }">
|
|
70
|
+
<v-card title="Calculator">
|
|
71
|
+
<v-card-text>
|
|
72
|
+
<v-number-input
|
|
73
|
+
v-model="value"
|
|
74
|
+
label="Value"
|
|
75
|
+
controlVariant="stacked"
|
|
76
|
+
density="compact"
|
|
77
|
+
variant="outlined"
|
|
78
|
+
></v-number-input>
|
|
79
|
+
<v-btn-toggle v-model="mode" class="flexrow" mandatory divided>
|
|
80
|
+
<v-btn value="add" data-tooltip="Add" :color="primaryColor">
|
|
81
|
+
<v-icon icon="fa-solid fa-plus"></v-icon>
|
|
82
|
+
</v-btn>
|
|
83
|
+
<v-btn value="subtract" data-tooltip="Subtract" :color="primaryColor">
|
|
84
|
+
<v-icon icon="fa-solid fa-minus"></v-icon>
|
|
85
|
+
</v-btn>
|
|
86
|
+
<v-btn value="multiply" data-tooltip="Multiply" :color="primaryColor">
|
|
87
|
+
<v-icon icon="fa-solid fa-times"></v-icon>
|
|
88
|
+
</v-btn>
|
|
89
|
+
<v-btn value="divide" data-tooltip="Divide" :color="primaryColor">
|
|
90
|
+
<v-icon icon="fa-solid fa-divide"></v-icon>
|
|
91
|
+
</v-btn>
|
|
92
|
+
</v-btn-toggle>
|
|
93
|
+
</v-card-text>
|
|
94
|
+
<v-card-actions class="flexrow">
|
|
95
|
+
<v-btn text="Submit" @click="submit" prepend-icon="fa-solid fa-check" :color="primaryColor"></v-btn>
|
|
96
|
+
<v-btn text="Cancel" @click="toggleCalculator" prepend-icon="fa-solid fa-xmark" :color="secondaryColor"></v-btn>
|
|
97
|
+
</v-card-actions>
|
|
98
|
+
</v-card>
|
|
99
|
+
</template>
|
|
100
|
+
</v-dialog>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
103
|
`;
|
|
104
104
|
fs.writeFileSync(generatedFilePath, toString(fileNode));
|
|
105
105
|
}
|