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.
Files changed (116) hide show
  1. package/.claude/agents/langium-language-designer.md +38 -38
  2. package/.claude/agents/typescript-vscode-expert.md +29 -29
  3. package/.claude/agents/ui-ux-designer.md +36 -36
  4. package/.claude/settings.local.json +33 -33
  5. package/.idea/inspectionProfiles/Project_Default.xml +6 -6
  6. package/.idea/isdl.iml +13 -13
  7. package/.idea/modules.xml +8 -8
  8. package/.idea/vcs.xml +6 -6
  9. package/.idea/watcherTasks.xml +3 -3
  10. package/.vscodeignore +18 -18
  11. package/LICENSE +673 -673
  12. package/README.md +86 -86
  13. package/bin/cli.js +4 -4
  14. package/bin/lsp.js +8 -8
  15. package/out/_backgrounds.scss +91 -91
  16. package/out/_handlebars.scss +497 -497
  17. package/out/_isdlStyles.scss +1444 -1381
  18. package/out/_vuetifyOverrides.scss +425 -425
  19. package/out/_vuetifyStyles.scss +31957 -31957
  20. package/out/cli/components/_backgrounds.scss +91 -91
  21. package/out/cli/components/_handlebars.scss +497 -497
  22. package/out/cli/components/_isdlStyles.scss +1444 -1381
  23. package/out/cli/components/_vuetifyOverrides.scss +425 -425
  24. package/out/cli/components/_vuetifyStyles.scss +31957 -31957
  25. package/out/cli/components/active-effect-sheet-generator.js +453 -453
  26. package/out/cli/components/chat-card-generator.js +654 -651
  27. package/out/cli/components/chat-card-generator.js.map +1 -1
  28. package/out/cli/components/css-generator.js +4 -4
  29. package/out/cli/components/damage-roll-generator.js +160 -160
  30. package/out/cli/components/datamodel-generator.js +264 -257
  31. package/out/cli/components/datamodel-generator.js.map +1 -1
  32. package/out/cli/components/derived-data-generator.js +923 -923
  33. package/out/cli/components/hotbar-drop-hook-generator.js +82 -82
  34. package/out/cli/components/init-hook-generator.js +495 -495
  35. package/out/cli/components/language-generator.js +1 -1
  36. package/out/cli/components/language-generator.js.map +1 -1
  37. package/out/cli/components/measured-template-preview.js +221 -221
  38. package/out/cli/components/method-generator.js +979 -887
  39. package/out/cli/components/method-generator.js.map +1 -1
  40. package/out/cli/components/ready-hook-generator.js +404 -404
  41. package/out/cli/components/token-generator.js +116 -116
  42. package/out/cli/components/vue/base-components/vue-attribute.js +138 -138
  43. package/out/cli/components/vue/base-components/vue-boolean.js +64 -64
  44. package/out/cli/components/vue/base-components/vue-calculator.js +93 -93
  45. package/out/cli/components/vue/base-components/vue-damage-application.js +356 -356
  46. package/out/cli/components/vue/base-components/vue-damage-bonuses.js +165 -165
  47. package/out/cli/components/vue/base-components/vue-damage-resistances.js +196 -196
  48. package/out/cli/components/vue/base-components/vue-damage-track.js +121 -121
  49. package/out/cli/components/vue/base-components/vue-date-time.js +42 -42
  50. package/out/cli/components/vue/base-components/vue-dice.js +98 -98
  51. package/out/cli/components/vue/base-components/vue-die.js +73 -73
  52. package/out/cli/components/vue/base-components/vue-document-choice.js +149 -149
  53. package/out/cli/components/vue/base-components/vue-document-choices.js +179 -179
  54. package/out/cli/components/vue/base-components/vue-document-link.js +60 -60
  55. package/out/cli/components/vue/base-components/vue-extended-choice.js +88 -88
  56. package/out/cli/components/vue/base-components/vue-inventory.js +519 -519
  57. package/out/cli/components/vue/base-components/vue-macro-choice.js +138 -138
  58. package/out/cli/components/vue/base-components/vue-measured-template.js +530 -530
  59. package/out/cli/components/vue/base-components/vue-money.js +483 -483
  60. package/out/cli/components/vue/base-components/vue-number.js +174 -174
  61. package/out/cli/components/vue/base-components/vue-paperdoll.js +43 -43
  62. package/out/cli/components/vue/base-components/vue-parent-property-reference.js +76 -76
  63. package/out/cli/components/vue/base-components/vue-prosemirror.js +18 -18
  64. package/out/cli/components/vue/base-components/vue-resource.js +136 -136
  65. package/out/cli/components/vue/base-components/vue-roll-visualizer.js +286 -109
  66. package/out/cli/components/vue/base-components/vue-roll-visualizer.js.map +1 -1
  67. package/out/cli/components/vue/base-components/vue-self-property-reference.js +62 -62
  68. package/out/cli/components/vue/base-components/vue-string-choice.js +98 -98
  69. package/out/cli/components/vue/base-components/vue-string-choices.js +203 -203
  70. package/out/cli/components/vue/base-components/vue-string.js +60 -60
  71. package/out/cli/components/vue/base-components/vue-text-field.js +53 -53
  72. package/out/cli/components/vue/base-components/vue-tracker.js +431 -431
  73. package/out/cli/components/vue/vue-action-component-generator.js +64 -64
  74. package/out/cli/components/vue/vue-active-effect-sheet-generator.js +856 -856
  75. package/out/cli/components/vue/vue-datatable-sheet-class-generator.js +292 -292
  76. package/out/cli/components/vue/vue-datatable2-component-generator.js +824 -824
  77. package/out/cli/components/vue/vue-document-creation-app.js +121 -121
  78. package/out/cli/components/vue/vue-document-creation-sheet.js +94 -94
  79. package/out/cli/components/vue/vue-generator.js +40 -40
  80. package/out/cli/components/vue/vue-mixin.js +296 -296
  81. package/out/cli/components/vue/vue-pinned-datatable-component-generator.js +260 -260
  82. package/out/cli/components/vue/vue-prompt-generator.js +91 -76
  83. package/out/cli/components/vue/vue-prompt-generator.js.map +1 -1
  84. package/out/cli/components/vue/vue-prompt-sheet-class-generator.js +317 -317
  85. package/out/cli/components/vue/vue-sheet-application-generator.js +1177 -1167
  86. package/out/cli/components/vue/vue-sheet-application-generator.js.map +1 -1
  87. package/out/cli/components/vue/vue-sheet-class-generator.js +510 -510
  88. package/out/cli/generator.js +438 -433
  89. package/out/cli/generator.js.map +1 -1
  90. package/out/extension/github/githubAuthProvider.js +71 -29
  91. package/out/extension/github/githubAuthProvider.js.map +1 -1
  92. package/out/extension/github/githubGistManager.js +4 -3
  93. package/out/extension/github/githubGistManager.js.map +1 -1
  94. package/out/extension/github/githubManager.js +40 -38
  95. package/out/extension/github/githubManager.js.map +1 -1
  96. package/out/extension/github/githubQuickActions.js +120 -120
  97. package/out/extension/github/system-workflow.yml +47 -47
  98. package/out/extension/main.cjs +909 -532
  99. package/out/extension/main.cjs.map +3 -3
  100. package/out/extension/package.json +419 -419
  101. package/out/language/generated/ast.js +51 -2
  102. package/out/language/generated/ast.js.map +1 -1
  103. package/out/language/generated/grammar.js +14240 -13991
  104. package/out/language/generated/grammar.js.map +1 -1
  105. package/out/language/intelligent-system-design-language-validator.js +32 -2
  106. package/out/language/intelligent-system-design-language-validator.js.map +1 -1
  107. package/out/language/isdl-scope-provider.js +14 -1
  108. package/out/language/isdl-scope-provider.js.map +1 -1
  109. package/out/language/main.cjs +913 -569
  110. package/out/language/main.cjs.map +3 -3
  111. package/out/package.json +419 -419
  112. package/out/progressbar.min.js +6 -6
  113. package/out/styles.scss +762 -747
  114. package/out/test/validating/diagnostics.test.js +40 -0
  115. package/out/test/validating/diagnostics.test.js.map +1 -1
  116. package/package.json +419 -419
@@ -7,48 +7,48 @@ export default function generateDateTimeComponent(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
- label: String,
16
- type: String,
17
- systemPath: String,
18
- context: Object,
19
- disabled: Boolean
20
- });
21
-
22
- const value = ref(foundry.utils.getProperty(props.context, props.systemPath));
23
- const document = inject("rawDocument");
24
-
25
- const debouncedPersist = foundry.utils.debounce((newValue) => {
26
- const update = {};
27
- value.value = newValue;
28
- update[props.systemPath] = newValue;
29
- document.update(update);
30
- }, 150);
31
-
32
- const update = (newValue) => {
33
- value.value = newValue;
34
- debouncedPersist(newValue);
35
- };
36
- </script>
37
- <template>
38
- <v-input v-model="value" class="isdl-datetime">
39
- <template #default>
40
- <v-field
41
- class="v-field--active"
42
- density="compact"
43
- variant="outlined"
44
- :disabled="disabled"
45
- :label="game.i18n.localize(label)"
46
- >
47
- <input :type="type" :name="systemPath" v-model="value" :disabled="disabled" />
48
- </v-field>
49
- </template>
50
- </v-input>
51
- </template>
10
+ const fileNode = expandToNode `
11
+ <script setup>
12
+ import { ref, computed, inject } from "vue";
13
+
14
+ const props = defineProps({
15
+ label: String,
16
+ type: String,
17
+ systemPath: String,
18
+ context: Object,
19
+ disabled: Boolean
20
+ });
21
+
22
+ const value = ref(foundry.utils.getProperty(props.context, props.systemPath));
23
+ const document = inject("rawDocument");
24
+
25
+ const debouncedPersist = foundry.utils.debounce((newValue) => {
26
+ const update = {};
27
+ value.value = newValue;
28
+ update[props.systemPath] = newValue;
29
+ document.update(update);
30
+ }, 150);
31
+
32
+ const update = (newValue) => {
33
+ value.value = newValue;
34
+ debouncedPersist(newValue);
35
+ };
36
+ </script>
37
+ <template>
38
+ <v-input v-model="value" class="isdl-datetime">
39
+ <template #default>
40
+ <v-field
41
+ class="v-field--active"
42
+ density="compact"
43
+ variant="outlined"
44
+ :disabled="disabled"
45
+ :label="game.i18n.localize(label)"
46
+ >
47
+ <input :type="type" :name="systemPath" v-model="value" :disabled="disabled" />
48
+ </v-field>
49
+ </template>
50
+ </v-input>
51
+ </template>
52
52
  `;
53
53
  fs.writeFileSync(generatedFilePath, toString(fileNode));
54
54
  }
@@ -7,104 +7,104 @@ export default function generateDiceComponent(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, watch } from "vue";
13
-
14
- const props = defineProps({
15
- label: String,
16
- icon: String,
17
- systemPath: String,
18
- context: Object,
19
- editMode: Boolean,
20
- disabled: Boolean,
21
- choices: Array,
22
- primaryColor: String,
23
- secondaryColor: String
24
- });
25
-
26
- const document = inject("rawDocument");
27
-
28
- const getLabel = (label, icon) => {
29
- const localized = game.i18n.localize(label);
30
- if (icon) {
31
- return \`<i class="\${icon}"></i> \${localized}\`;
32
- }
33
- return localized;
34
- };
35
-
36
- const numberValue = computed({
37
- get: () => foundry.utils.getProperty(props.context, props.systemPath + ".number") ?? 1,
38
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".number", newValue)
39
- });
40
-
41
- const dieValue = computed({
42
- get: () => foundry.utils.getProperty(props.context, props.systemPath + ".die") ?? "d6",
43
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".die", newValue)
44
- });
45
-
46
- watch(numberValue, (newVal) => {
47
- if (document) document.update({ [\`\${props.systemPath}.number\`]: newVal });
48
- });
49
- watch(dieValue, (newVal) => {
50
- if (document) document.update({ [\`\${props.systemPath}.die\`]: newVal });
51
- });
52
- </script>
53
-
54
- <template>
55
- <v-input
56
- class="isdl-dice-field"
57
- :disabled="disabled"
58
- hide-details
59
- >
60
-
61
- <template #default>
62
- <v-field
63
- class="v-field--active"
64
- variant="outlined"
65
- density="compact"
66
- :disabled="disabled"
67
- >
68
- <template #label>
69
- <span v-html="getLabel(label, icon)" />
70
- </template>
71
- <div class="flexrow align-center inner-content">
72
- <v-number-input
73
- :name="systemPath + '.number'"
74
- v-model="numberValue"
75
- :min="0"
76
- :step="1"
77
- variant="plain"
78
- density="compact"
79
- :disabled="disabled"
80
- hide-details
81
- class="dice-number-input inner-input"
82
- style="flex: 1; min-width: 50px; text-align: center; margin-right: 0.5rem;"
83
- control-variant="stacked"
84
- />
85
-
86
- <v-select
87
- :name="systemPath + '.die'"
88
- v-model="dieValue"
89
- :items="choices"
90
- item-value="value"
91
- item-title="label"
92
- :disabled="disabled"
93
- variant="plain"
94
- density="compact"
95
- hide-details
96
- class="dice-type-select inner-input"
97
- style="flex: 2; min-width: 100px;"
98
- >
99
- <template #prepend-inner>
100
- <i :class="'fa-solid fa-dice-' + dieValue" style="padding-right: 6px;"></i>
101
- </template>
102
- </v-select>
103
- </div>
104
- </v-field>
105
- </template>
106
- </v-input>
107
- </template>
10
+ const fileNode = expandToNode `
11
+ <script setup>
12
+ import { ref, computed, inject, watch } from "vue";
13
+
14
+ const props = defineProps({
15
+ label: String,
16
+ icon: String,
17
+ systemPath: String,
18
+ context: Object,
19
+ editMode: Boolean,
20
+ disabled: Boolean,
21
+ choices: Array,
22
+ primaryColor: String,
23
+ secondaryColor: String
24
+ });
25
+
26
+ const document = inject("rawDocument");
27
+
28
+ const getLabel = (label, icon) => {
29
+ const localized = game.i18n.localize(label);
30
+ if (icon) {
31
+ return \`<i class="\${icon}"></i> \${localized}\`;
32
+ }
33
+ return localized;
34
+ };
35
+
36
+ const numberValue = computed({
37
+ get: () => foundry.utils.getProperty(props.context, props.systemPath + ".number") ?? 1,
38
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".number", newValue)
39
+ });
40
+
41
+ const dieValue = computed({
42
+ get: () => foundry.utils.getProperty(props.context, props.systemPath + ".die") ?? "d6",
43
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".die", newValue)
44
+ });
45
+
46
+ watch(numberValue, (newVal) => {
47
+ if (document) document.update({ [\`\${props.systemPath}.number\`]: newVal });
48
+ });
49
+ watch(dieValue, (newVal) => {
50
+ if (document) document.update({ [\`\${props.systemPath}.die\`]: newVal });
51
+ });
52
+ </script>
53
+
54
+ <template>
55
+ <v-input
56
+ class="isdl-dice-field"
57
+ :disabled="disabled"
58
+ hide-details
59
+ >
60
+
61
+ <template #default>
62
+ <v-field
63
+ class="v-field--active"
64
+ variant="outlined"
65
+ density="compact"
66
+ :disabled="disabled"
67
+ >
68
+ <template #label>
69
+ <span v-html="getLabel(label, icon)" />
70
+ </template>
71
+ <div class="flexrow align-center inner-content">
72
+ <v-number-input
73
+ :name="systemPath + '.number'"
74
+ v-model="numberValue"
75
+ :min="0"
76
+ :step="1"
77
+ variant="plain"
78
+ density="compact"
79
+ :disabled="disabled"
80
+ hide-details
81
+ class="dice-number-input inner-input"
82
+ style="flex: 1; min-width: 50px; text-align: center; margin-right: 0.5rem;"
83
+ control-variant="stacked"
84
+ />
85
+
86
+ <v-select
87
+ :name="systemPath + '.die'"
88
+ v-model="dieValue"
89
+ :items="choices"
90
+ item-value="value"
91
+ item-title="label"
92
+ :disabled="disabled"
93
+ variant="plain"
94
+ density="compact"
95
+ hide-details
96
+ class="dice-type-select inner-input"
97
+ style="flex: 2; min-width: 100px;"
98
+ >
99
+ <template #prepend-inner>
100
+ <i :class="'fa-solid fa-dice-' + dieValue" style="padding-right: 6px;"></i>
101
+ </template>
102
+ </v-select>
103
+ </div>
104
+ </v-field>
105
+ </template>
106
+ </v-input>
107
+ </template>
108
108
  `.appendNewLine();
109
109
  fs.writeFileSync(generatedFilePath, toString(fileNode));
110
110
  }
@@ -7,79 +7,79 @@ export default function generateDieComponent(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, watch } from "vue";
13
-
14
- const props = defineProps({
15
- label: String,
16
- systemPath: String,
17
- context: Object,
18
- visibility: String,
19
- disabled: Boolean,
20
- icon: String,
21
- color: String,
22
- none: {
23
- type: Boolean,
24
- default: false
25
- },
26
- choices: {
27
- type: Array,
28
- default: () => ['d4', 'd6', 'd8', 'd10', 'd12', 'd20']
29
- }
30
- });
31
-
32
- const document = inject("rawDocument");
33
-
34
- const selectColor = computed(() => {
35
- return props.color || 'primary';
36
- });
37
-
38
- const allChoices = computed(() => {
39
- return props.none ? ['none', ...props.choices] : props.choices;
40
- });
41
-
42
- const value = computed({
43
- get: () => foundry.utils.getProperty(props.context, props.systemPath),
44
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath, newValue)
45
- });
46
-
47
- watch(value, (newVal) => {
48
- if (document) document.update({ [props.systemPath]: newVal });
49
- });
50
-
51
- const dieIcon = computed(() => {
52
- const currentValue = value.value;
53
- if (!currentValue || currentValue === 'none') return 'fa-solid fa-ban';
54
- if (currentValue.startsWith('d')) {
55
- return \`fa-solid fa-dice-\${currentValue}\`;
56
- }
57
- return 'fa-solid fa-dice';
58
- });
59
- </script>
60
-
61
- <template>
62
- <v-select
63
- v-model="value"
64
- :name="props.systemPath"
65
- :items="allChoices"
66
- :disabled="disabled"
67
- :color="selectColor"
68
- density="compact"
69
- variant="outlined"
70
- class="isdl-die single-wide"
71
- >
72
- <template #label>
73
- <span class="field-label">
74
- <v-icon v-if="props.icon" :icon="props.icon" size="small" class="me-1"></v-icon>
75
- {{ game.i18n.localize(props.label) }}
76
- </span>
77
- </template>
78
- <template #prepend-inner>
79
- <v-icon :icon="dieIcon" size="small"></v-icon>
80
- </template>
81
- </v-select>
82
- </template>
10
+ const fileNode = expandToNode `
11
+ <script setup>
12
+ import { ref, computed, inject, watch } from "vue";
13
+
14
+ const props = defineProps({
15
+ label: String,
16
+ systemPath: String,
17
+ context: Object,
18
+ visibility: String,
19
+ disabled: Boolean,
20
+ icon: String,
21
+ color: String,
22
+ none: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ choices: {
27
+ type: Array,
28
+ default: () => ['d4', 'd6', 'd8', 'd10', 'd12', 'd20']
29
+ }
30
+ });
31
+
32
+ const document = inject("rawDocument");
33
+
34
+ const selectColor = computed(() => {
35
+ return props.color || 'primary';
36
+ });
37
+
38
+ const allChoices = computed(() => {
39
+ return props.none ? ['none', ...props.choices] : props.choices;
40
+ });
41
+
42
+ const value = computed({
43
+ get: () => foundry.utils.getProperty(props.context, props.systemPath),
44
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath, newValue)
45
+ });
46
+
47
+ watch(value, (newVal) => {
48
+ if (document) document.update({ [props.systemPath]: newVal });
49
+ });
50
+
51
+ const dieIcon = computed(() => {
52
+ const currentValue = value.value;
53
+ if (!currentValue || currentValue === 'none') return 'fa-solid fa-ban';
54
+ if (currentValue.startsWith('d')) {
55
+ return \`fa-solid fa-dice-\${currentValue}\`;
56
+ }
57
+ return 'fa-solid fa-dice';
58
+ });
59
+ </script>
60
+
61
+ <template>
62
+ <v-select
63
+ v-model="value"
64
+ :name="props.systemPath"
65
+ :items="allChoices"
66
+ :disabled="disabled"
67
+ :color="selectColor"
68
+ density="compact"
69
+ variant="outlined"
70
+ class="isdl-die single-wide"
71
+ >
72
+ <template #label>
73
+ <span class="field-label">
74
+ <v-icon v-if="props.icon" :icon="props.icon" size="small" class="me-1"></v-icon>
75
+ {{ game.i18n.localize(props.label) }}
76
+ </span>
77
+ </template>
78
+ <template #prepend-inner>
79
+ <v-icon :icon="dieIcon" size="small"></v-icon>
80
+ </template>
81
+ </v-select>
82
+ </template>
83
83
  `.appendNewLine();
84
84
  fs.writeFileSync(generatedFilePath, toString(fileNode));
85
85
  }