intelligent-system-design-language 0.3.22 → 0.3.24

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 (106) 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 -1444
  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 -1444
  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 -654
  27. package/out/cli/components/css-generator.js +4 -4
  28. package/out/cli/components/damage-roll-generator.js +160 -160
  29. package/out/cli/components/datamodel-generator.js +257 -257
  30. package/out/cli/components/derived-data-generator.js +923 -923
  31. package/out/cli/components/hotbar-drop-hook-generator.js +82 -82
  32. package/out/cli/components/init-hook-generator.js +495 -495
  33. package/out/cli/components/language-generator.js +1 -1
  34. package/out/cli/components/language-generator.js.map +1 -1
  35. package/out/cli/components/measured-template-preview.js +221 -221
  36. package/out/cli/components/method-generator.js +601 -562
  37. package/out/cli/components/method-generator.js.map +1 -1
  38. package/out/cli/components/ready-hook-generator.js +404 -404
  39. package/out/cli/components/token-generator.js +116 -116
  40. package/out/cli/components/vue/base-components/vue-attribute.js +138 -138
  41. package/out/cli/components/vue/base-components/vue-boolean.js +64 -64
  42. package/out/cli/components/vue/base-components/vue-calculator.js +93 -93
  43. package/out/cli/components/vue/base-components/vue-damage-application.js +356 -356
  44. package/out/cli/components/vue/base-components/vue-damage-bonuses.js +165 -165
  45. package/out/cli/components/vue/base-components/vue-damage-resistances.js +196 -196
  46. package/out/cli/components/vue/base-components/vue-damage-track.js +121 -121
  47. package/out/cli/components/vue/base-components/vue-date-time.js +42 -42
  48. package/out/cli/components/vue/base-components/vue-dice.js +98 -98
  49. package/out/cli/components/vue/base-components/vue-die.js +73 -73
  50. package/out/cli/components/vue/base-components/vue-document-choice.js +149 -149
  51. package/out/cli/components/vue/base-components/vue-document-choices.js +179 -179
  52. package/out/cli/components/vue/base-components/vue-document-link.js +60 -60
  53. package/out/cli/components/vue/base-components/vue-extended-choice.js +88 -88
  54. package/out/cli/components/vue/base-components/vue-inventory.js +519 -519
  55. package/out/cli/components/vue/base-components/vue-macro-choice.js +138 -138
  56. package/out/cli/components/vue/base-components/vue-measured-template.js +530 -530
  57. package/out/cli/components/vue/base-components/vue-money.js +483 -483
  58. package/out/cli/components/vue/base-components/vue-number.js +174 -174
  59. package/out/cli/components/vue/base-components/vue-paperdoll.js +43 -43
  60. package/out/cli/components/vue/base-components/vue-parent-property-reference.js +76 -76
  61. package/out/cli/components/vue/base-components/vue-prosemirror.js +18 -18
  62. package/out/cli/components/vue/base-components/vue-resource.js +136 -136
  63. package/out/cli/components/vue/base-components/vue-roll-visualizer.js +285 -285
  64. package/out/cli/components/vue/base-components/vue-self-property-reference.js +62 -62
  65. package/out/cli/components/vue/base-components/vue-string-choice.js +98 -98
  66. package/out/cli/components/vue/base-components/vue-string-choices.js +203 -203
  67. package/out/cli/components/vue/base-components/vue-string.js +60 -60
  68. package/out/cli/components/vue/base-components/vue-text-field.js +53 -53
  69. package/out/cli/components/vue/base-components/vue-tracker.js +431 -431
  70. package/out/cli/components/vue/vue-action-component-generator.js +64 -64
  71. package/out/cli/components/vue/vue-active-effect-sheet-generator.js +856 -856
  72. package/out/cli/components/vue/vue-datatable-sheet-class-generator.js +292 -292
  73. package/out/cli/components/vue/vue-datatable2-component-generator.js +824 -824
  74. package/out/cli/components/vue/vue-document-creation-app.js +121 -121
  75. package/out/cli/components/vue/vue-document-creation-sheet.js +94 -94
  76. package/out/cli/components/vue/vue-generator.js +40 -40
  77. package/out/cli/components/vue/vue-mixin.js +296 -296
  78. package/out/cli/components/vue/vue-pinned-datatable-component-generator.js +260 -260
  79. package/out/cli/components/vue/vue-prompt-generator.js +80 -80
  80. package/out/cli/components/vue/vue-prompt-sheet-class-generator.js +317 -317
  81. package/out/cli/components/vue/vue-sheet-application-generator.js +1171 -1171
  82. package/out/cli/components/vue/vue-sheet-class-generator.js +510 -510
  83. package/out/cli/generator.js +508 -438
  84. package/out/cli/generator.js.map +1 -1
  85. package/out/extension/github/githubManager.js +35 -35
  86. package/out/extension/github/githubQuickActions.js +120 -120
  87. package/out/extension/github/system-workflow.yml +47 -47
  88. package/out/extension/main.cjs +881 -311
  89. package/out/extension/main.cjs.map +3 -3
  90. package/out/extension/package.json +419 -419
  91. package/out/language/generated/ast.js +98 -2
  92. package/out/language/generated/ast.js.map +1 -1
  93. package/out/language/generated/grammar.js +14688 -14240
  94. package/out/language/generated/grammar.js.map +1 -1
  95. package/out/language/intelligent-system-design-language-validator.js +44 -2
  96. package/out/language/intelligent-system-design-language-validator.js.map +1 -1
  97. package/out/language/isdl-scope-provider.js +7 -1
  98. package/out/language/isdl-scope-provider.js.map +1 -1
  99. package/out/language/main.cjs +881 -311
  100. package/out/language/main.cjs.map +3 -3
  101. package/out/package.json +419 -419
  102. package/out/progressbar.min.js +6 -6
  103. package/out/styles.scss +828 -762
  104. package/out/test/validating/diagnostics.test.js +55 -0
  105. package/out/test/validating/diagnostics.test.js.map +1 -1
  106. package/package.json +419 -419
@@ -7,142 +7,142 @@ export default function generateResourceComponent(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
- systemPath: String,
17
- context: Object,
18
- disabled: Boolean,
19
- primaryColor: String,
20
- secondaryColor: String
21
- });
22
-
23
- const document = inject("rawDocument");
24
-
25
- // Vuetify's up/down stepper buttons update the model without firing a
26
- // native change event, so Foundry's submitOnChange form handler never
27
- // persists them. When the value changes while focus is NOT on a text
28
- // input (i.e. a stepper click, not typing), persist directly. Typing
29
- // still persists via the input's native change on blur/enter.
30
- // ('document' is the injected Foundry document; DOM access uses window.)
31
- const persistOnStep = (path, newValue) => {
32
- if (document && window.document.activeElement?.tagName !== 'INPUT') {
33
- document.update({ [path]: newValue });
34
- }
35
- };
36
-
37
- const value = computed({
38
- get: () => foundry.utils.getProperty(props.context, props.systemPath + ".value"),
39
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".value", newValue)
40
- });
41
-
42
- const max = computed({
43
- get: () => foundry.utils.getProperty(props.context, props.systemPath + ".max"),
44
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".max", newValue)
45
- });
46
-
47
- const temp = computed({
48
- get: () => foundry.utils.getProperty(props.context, props.systemPath + ".temp"),
49
- set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".temp", newValue)
50
- });
51
-
52
- const barMax = computed(() => {
53
- const totalValue = value.value + temp.value;
54
- if (totalValue > max.value) {
55
- return totalValue;
56
- }
57
- return max.value;
58
- });
59
-
60
- const expanded = ref(false);
61
- </script>
62
-
63
- <template>
64
- <v-card elevation="4" class="ml-1 mr-1 resource-card" variant="outlined">
65
- <v-card-title>
66
- {{ game.i18n.localize(label) }}
67
- </v-card-title>
68
-
69
- <v-card-actions>
70
- <v-progress-linear
71
- :height="18"
72
- :color="primaryColor"
73
- bg-color="#92aed9"
74
- rounded
75
- :model-value="value"
76
- min="0"
77
- :max="barMax"
78
- :buffer-value="value + temp"
79
- buffer-opacity="1"
80
- :buffer-color="secondaryColor"
81
- :data-tooltip="\`Value: \${value} / Temp: \${temp} / Max: \${max}\`"
82
- style="font-weight: bold;"
83
- >
84
- <template v-slot:default>
85
- {{ value }} / {{ max }}
86
- </template>
87
- </v-progress-linear>
88
- <v-spacer></v-spacer>
89
- <v-btn :icon="expanded ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'" @click="expanded = !expanded" color="primary">
90
- </v-btn>
91
- </v-card-actions>
92
-
93
- <v-expand-transition>
94
- <div v-show="expanded">
95
- <v-card-text>
96
- <div class="d-flex flex-row">
97
- <v-number-input
98
- :model-value="value"
99
- @update:model-value="(v) => { value = v; persistOnStep(systemPath + '.value', v); }"
100
- :name="systemPath + '.value'"
101
- label="Value"
102
- controlVariant="stacked"
103
- density="compact"
104
- variant="outlined"
105
- class="flex-grow-1"
106
- style="min-width: 100px;"
107
- hide-details="true"
108
- />
109
- <v-number-input
110
- :model-value="temp"
111
- @update:model-value="(v) => { temp = v; persistOnStep(systemPath + '.temp', v); }"
112
- :name="systemPath + '.temp'"
113
- label="Temp"
114
- controlVariant="stacked"
115
- density="compact"
116
- variant="outlined"
117
- class="flex-grow-1"
118
- style="min-width: 100px;"
119
- hide-details="true"
120
- />
121
- <v-number-input
122
- :model-value="max"
123
- @update:model-value="(v) => { max = v; persistOnStep(systemPath + '.max', v); }"
124
- :name="systemPath + '.max'"
125
- label="Max"
126
- :disabled="disabled"
127
- controlVariant="stacked"
128
- density="compact"
129
- variant="outlined"
130
- class="flex-grow-1"
131
- style="min-width: 100px;"
132
- hide-details="true"
133
- />
134
- </div>
135
- </v-card-text>
136
- </div>
137
- </v-expand-transition>
138
- </v-card>
139
- </template>
140
-
141
- <style>
142
- .resource-card {
143
- min-width: 300px;
144
- }
145
- </style>
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
+ disabled: Boolean,
19
+ primaryColor: String,
20
+ secondaryColor: String
21
+ });
22
+
23
+ const document = inject("rawDocument");
24
+
25
+ // Vuetify's up/down stepper buttons update the model without firing a
26
+ // native change event, so Foundry's submitOnChange form handler never
27
+ // persists them. When the value changes while focus is NOT on a text
28
+ // input (i.e. a stepper click, not typing), persist directly. Typing
29
+ // still persists via the input's native change on blur/enter.
30
+ // ('document' is the injected Foundry document; DOM access uses window.)
31
+ const persistOnStep = (path, newValue) => {
32
+ if (document && window.document.activeElement?.tagName !== 'INPUT') {
33
+ document.update({ [path]: newValue });
34
+ }
35
+ };
36
+
37
+ const value = computed({
38
+ get: () => foundry.utils.getProperty(props.context, props.systemPath + ".value"),
39
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".value", newValue)
40
+ });
41
+
42
+ const max = computed({
43
+ get: () => foundry.utils.getProperty(props.context, props.systemPath + ".max"),
44
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".max", newValue)
45
+ });
46
+
47
+ const temp = computed({
48
+ get: () => foundry.utils.getProperty(props.context, props.systemPath + ".temp"),
49
+ set: (newValue) => foundry.utils.setProperty(props.context, props.systemPath + ".temp", newValue)
50
+ });
51
+
52
+ const barMax = computed(() => {
53
+ const totalValue = value.value + temp.value;
54
+ if (totalValue > max.value) {
55
+ return totalValue;
56
+ }
57
+ return max.value;
58
+ });
59
+
60
+ const expanded = ref(false);
61
+ </script>
62
+
63
+ <template>
64
+ <v-card elevation="4" class="ml-1 mr-1 resource-card" variant="outlined">
65
+ <v-card-title>
66
+ {{ game.i18n.localize(label) }}
67
+ </v-card-title>
68
+
69
+ <v-card-actions>
70
+ <v-progress-linear
71
+ :height="18"
72
+ :color="primaryColor"
73
+ bg-color="#92aed9"
74
+ rounded
75
+ :model-value="value"
76
+ min="0"
77
+ :max="barMax"
78
+ :buffer-value="value + temp"
79
+ buffer-opacity="1"
80
+ :buffer-color="secondaryColor"
81
+ :data-tooltip="\`Value: \${value} / Temp: \${temp} / Max: \${max}\`"
82
+ style="font-weight: bold;"
83
+ >
84
+ <template v-slot:default>
85
+ {{ value }} / {{ max }}
86
+ </template>
87
+ </v-progress-linear>
88
+ <v-spacer></v-spacer>
89
+ <v-btn :icon="expanded ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'" @click="expanded = !expanded" color="primary">
90
+ </v-btn>
91
+ </v-card-actions>
92
+
93
+ <v-expand-transition>
94
+ <div v-show="expanded">
95
+ <v-card-text>
96
+ <div class="d-flex flex-row">
97
+ <v-number-input
98
+ :model-value="value"
99
+ @update:model-value="(v) => { value = v; persistOnStep(systemPath + '.value', v); }"
100
+ :name="systemPath + '.value'"
101
+ label="Value"
102
+ controlVariant="stacked"
103
+ density="compact"
104
+ variant="outlined"
105
+ class="flex-grow-1"
106
+ style="min-width: 100px;"
107
+ hide-details="true"
108
+ />
109
+ <v-number-input
110
+ :model-value="temp"
111
+ @update:model-value="(v) => { temp = v; persistOnStep(systemPath + '.temp', v); }"
112
+ :name="systemPath + '.temp'"
113
+ label="Temp"
114
+ controlVariant="stacked"
115
+ density="compact"
116
+ variant="outlined"
117
+ class="flex-grow-1"
118
+ style="min-width: 100px;"
119
+ hide-details="true"
120
+ />
121
+ <v-number-input
122
+ :model-value="max"
123
+ @update:model-value="(v) => { max = v; persistOnStep(systemPath + '.max', v); }"
124
+ :name="systemPath + '.max'"
125
+ label="Max"
126
+ :disabled="disabled"
127
+ controlVariant="stacked"
128
+ density="compact"
129
+ variant="outlined"
130
+ class="flex-grow-1"
131
+ style="min-width: 100px;"
132
+ hide-details="true"
133
+ />
134
+ </div>
135
+ </v-card-text>
136
+ </div>
137
+ </v-expand-transition>
138
+ </v-card>
139
+ </template>
140
+
141
+ <style>
142
+ .resource-card {
143
+ min-width: 300px;
144
+ }
145
+ </style>
146
146
  `;
147
147
  fs.writeFileSync(generatedFilePath, toString(fileNode));
148
148
  }