intelligent-system-design-language 0.3.22 → 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 (91) 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/measured-template-preview.js +221 -221
  34. package/out/cli/components/method-generator.js +548 -548
  35. package/out/cli/components/ready-hook-generator.js +404 -404
  36. package/out/cli/components/token-generator.js +116 -116
  37. package/out/cli/components/vue/base-components/vue-attribute.js +138 -138
  38. package/out/cli/components/vue/base-components/vue-boolean.js +64 -64
  39. package/out/cli/components/vue/base-components/vue-calculator.js +93 -93
  40. package/out/cli/components/vue/base-components/vue-damage-application.js +356 -356
  41. package/out/cli/components/vue/base-components/vue-damage-bonuses.js +165 -165
  42. package/out/cli/components/vue/base-components/vue-damage-resistances.js +196 -196
  43. package/out/cli/components/vue/base-components/vue-damage-track.js +121 -121
  44. package/out/cli/components/vue/base-components/vue-date-time.js +42 -42
  45. package/out/cli/components/vue/base-components/vue-dice.js +98 -98
  46. package/out/cli/components/vue/base-components/vue-die.js +73 -73
  47. package/out/cli/components/vue/base-components/vue-document-choice.js +149 -149
  48. package/out/cli/components/vue/base-components/vue-document-choices.js +179 -179
  49. package/out/cli/components/vue/base-components/vue-document-link.js +60 -60
  50. package/out/cli/components/vue/base-components/vue-extended-choice.js +88 -88
  51. package/out/cli/components/vue/base-components/vue-inventory.js +519 -519
  52. package/out/cli/components/vue/base-components/vue-macro-choice.js +138 -138
  53. package/out/cli/components/vue/base-components/vue-measured-template.js +530 -530
  54. package/out/cli/components/vue/base-components/vue-money.js +483 -483
  55. package/out/cli/components/vue/base-components/vue-number.js +174 -174
  56. package/out/cli/components/vue/base-components/vue-paperdoll.js +43 -43
  57. package/out/cli/components/vue/base-components/vue-parent-property-reference.js +76 -76
  58. package/out/cli/components/vue/base-components/vue-prosemirror.js +18 -18
  59. package/out/cli/components/vue/base-components/vue-resource.js +136 -136
  60. package/out/cli/components/vue/base-components/vue-roll-visualizer.js +285 -285
  61. package/out/cli/components/vue/base-components/vue-self-property-reference.js +62 -62
  62. package/out/cli/components/vue/base-components/vue-string-choice.js +98 -98
  63. package/out/cli/components/vue/base-components/vue-string-choices.js +203 -203
  64. package/out/cli/components/vue/base-components/vue-string.js +60 -60
  65. package/out/cli/components/vue/base-components/vue-text-field.js +53 -53
  66. package/out/cli/components/vue/base-components/vue-tracker.js +431 -431
  67. package/out/cli/components/vue/vue-action-component-generator.js +64 -64
  68. package/out/cli/components/vue/vue-active-effect-sheet-generator.js +856 -856
  69. package/out/cli/components/vue/vue-datatable-sheet-class-generator.js +292 -292
  70. package/out/cli/components/vue/vue-datatable2-component-generator.js +824 -824
  71. package/out/cli/components/vue/vue-document-creation-app.js +121 -121
  72. package/out/cli/components/vue/vue-document-creation-sheet.js +94 -94
  73. package/out/cli/components/vue/vue-generator.js +40 -40
  74. package/out/cli/components/vue/vue-mixin.js +296 -296
  75. package/out/cli/components/vue/vue-pinned-datatable-component-generator.js +260 -260
  76. package/out/cli/components/vue/vue-prompt-generator.js +80 -80
  77. package/out/cli/components/vue/vue-prompt-sheet-class-generator.js +317 -317
  78. package/out/cli/components/vue/vue-sheet-application-generator.js +1171 -1171
  79. package/out/cli/components/vue/vue-sheet-class-generator.js +510 -510
  80. package/out/cli/generator.js +438 -438
  81. package/out/extension/github/githubManager.js +35 -35
  82. package/out/extension/github/githubQuickActions.js +120 -120
  83. package/out/extension/github/system-workflow.yml +47 -47
  84. package/out/extension/main.cjs.map +1 -1
  85. package/out/extension/package.json +419 -419
  86. package/out/language/generated/grammar.js +14240 -14240
  87. package/out/language/main.cjs.map +1 -1
  88. package/out/package.json +419 -419
  89. package/out/progressbar.min.js +6 -6
  90. package/out/styles.scss +762 -762
  91. package/package.json +419 -419
@@ -17,156 +17,156 @@ export function generateDocumentChoiceComponent(entry, id, document, documentCho
17
17
  }
18
18
  const unlocked = documentChoice.modifier === 'unlocked';
19
19
  console.log("Generating document choice component", documentChoice.name);
20
- const fileNode = expandToNode `
21
- <script setup>
22
- import { ref, inject, computed } from "vue";
23
-
24
- const props = defineProps({
25
- context: Object,
26
- editMode: Boolean,
27
- disabled: Boolean,
28
- primaryColor: String,
29
- secondaryColor: String
30
- });
31
-
32
- const document = inject('rawDocument');
33
- const unlocked = ${unlocked};
34
-
35
- const value = ref(foundry.utils.getProperty(document, '${getSystemPath(documentChoice)}'));
36
- const onChange = (value) => {
37
- document.update({ '${getSystemPath(documentChoice)}': value });
38
- const updated = fromUuidSync(value);
39
- if (updated) selectedImage.value = updated.img;
40
- };
41
-
42
- const selectedImage = ref(value.value?.img);
43
-
44
- const disabled = computed(() => {
45
- let item = value.value?.length > 0 ? value.value[0] : value.value;
46
- let system = props.context.system;
47
- return ${false} || (!props.editMode && !unlocked);
48
- });
49
-
50
- const hidden = computed(() => {
51
- let item = value.value?.length > 0 ? value.value[0] : value.value;
52
- let system = props.context.system;
53
- return ${false}
54
- });
55
-
56
- const choices = computed(() => {
57
- let system = props.context.system;
58
- let allChoices = Array.from(document.items);
59
-
20
+ const fileNode = expandToNode `
21
+ <script setup>
22
+ import { ref, inject, computed } from "vue";
23
+
24
+ const props = defineProps({
25
+ context: Object,
26
+ editMode: Boolean,
27
+ disabled: Boolean,
28
+ primaryColor: String,
29
+ secondaryColor: String
30
+ });
31
+
32
+ const document = inject('rawDocument');
33
+ const unlocked = ${unlocked};
34
+
35
+ const value = ref(foundry.utils.getProperty(document, '${getSystemPath(documentChoice)}'));
36
+ const onChange = (value) => {
37
+ document.update({ '${getSystemPath(documentChoice)}': value });
38
+ const updated = fromUuidSync(value);
39
+ if (updated) selectedImage.value = updated.img;
40
+ };
41
+
42
+ const selectedImage = ref(value.value?.img);
43
+
44
+ const disabled = computed(() => {
45
+ let item = value.value?.length > 0 ? value.value[0] : value.value;
46
+ let system = props.context.system;
47
+ return ${false} || (!props.editMode && !unlocked);
48
+ });
49
+
50
+ const hidden = computed(() => {
51
+ let item = value.value?.length > 0 ? value.value[0] : value.value;
52
+ let system = props.context.system;
53
+ return ${false}
54
+ });
55
+
56
+ const choices = computed(() => {
57
+ let system = props.context.system;
58
+ let allChoices = Array.from(document.items);
59
+
60
60
  ${globalAllowed ?
61
- `
62
- let gameItems = game.items.filter(item => item.type === '${(_b = documentChoice.document.ref) === null || _b === void 0 ? void 0 : _b.name.toLowerCase()}');
63
- allChoices = allChoices.concat(gameItems);
64
-
65
- let itemPacks = game.packs.filter(pack => pack.documentName === 'Item');
66
- for (let pack of itemPacks) {
67
- const packItems = pack.index.contents;
68
- packItems.forEach(item => {
69
- item.compendium = pack;
70
- });
71
- allChoices = allChoices.concat(packItems);
72
- }
73
- ` : ''}
74
-
75
- allChoices = allChoices.filter(item => {
76
- if (item.type !== '${(_c = documentChoice.document.ref) === null || _c === void 0 ? void 0 : _c.name.toLowerCase()}') return false;
77
- return ${(_e = translateExpression(entry, id, (_d = documentChoice.params.filter(x => isWhereParam(x))[0]) === null || _d === void 0 ? void 0 : _d.value)) !== null && _e !== void 0 ? _e : true}
78
- });
79
-
80
- if (allChoices.length === 0) return [{
81
- id: null,
82
- name: 'No choices available'
83
- }];
84
-
85
- return allChoices.map(choice => {
86
- let context = {
87
- id: choice.uuid,
88
- name: choice.name,
89
- image: choice.img,
90
- summary: truncate(choice.system.description, 50),
91
- description: choice.system.description
92
- };
93
-
94
- if (choice.parent) {
95
- context.source = "Self";
96
- context.color = props.primaryColor;
97
- context.icon = 'fa-solid fa-user';
98
- }
99
- else if (choice.compendium) {
100
- context.source = \`\${choice.compendium.metadata.packageName} - \${choice.compendium.title}\`;
101
- context.color = props.secondaryColor;
102
- context.icon = 'fa-solid fa-suitcase';
103
- }
104
- else {
105
- context.source = "World";
106
- context.color = props.secondaryColor;
107
- context.icon = 'fa-solid fa-globe';
108
- }
109
-
110
- return context;
111
- });
112
- });
113
-
114
- const truncate = (text, maxLength) => {
115
- if (text.length > maxLength) {
116
- return text.substring(0, maxLength) + '...';
117
- }
118
- return text;
119
- }
120
-
121
- const getLabel = (label, icon) => {
122
- const localized = game.i18n.localize(label);
123
- if (icon) {
124
- return \`<i class="\${icon}"></i> \${localized}\`;
125
- }
126
- return localized;
127
- }
128
- </script>
129
- <template>
130
- <v-autocomplete clearable dense
131
- v-model="value"
132
- @update:modelValue="onChange"
133
- :items="choices"
134
- item-title="name"
135
- item-value="id"
136
- density="compact"
137
- variant="outlined"
138
- :disabled="disabled"
139
- class="double-wide"
140
- >
141
- <template #label>
142
- <span v-html="getLabel('${document.name}.${documentChoice.name}', ${iconParam ? `'${iconParam.value}'` : undefined})" />
143
- </template>
144
- <template v-slot:prepend-inner v-if="value">
145
- <v-avatar rounded="0" :image="selectedImage" size="30"</v-avatar>
146
- </template>
147
- <template v-slot:item="{ props, item }">
148
- <v-list-item
149
- v-bind="props"
150
- :data-tooltip="item.raw.description"
151
- >
152
- <template v-slot:title>
153
- <div class="flexrow">
154
- <p style="flex: 1">{{ item.raw.name }}</p>
155
- <v-spacer />
156
- <v-chip size="small" label :color="item.raw.color" style="align-self: center; white-space: nowrap; flex: 0; line-height: 26px; display: inline-table;"><v-icon :icon="item.raw.icon" start></v-icon> {{ item.raw.source }}</v-chip>
157
- </div>
158
- </template>
159
- <template v-if="item.raw.image" v-slot:prepend>
160
- <v-avatar rounded="0" :image="item.raw.image">
161
- </v-avatar>
162
- </template>
163
- <template v-slot:subtitle>
164
- <div v-html="item.raw.summary"></div>
165
- </template>
166
- </v-list-item>
167
- </template>
168
- </v-autocomplete>
169
- </template>
61
+ `
62
+ let gameItems = game.items.filter(item => item.type === '${(_b = documentChoice.document.ref) === null || _b === void 0 ? void 0 : _b.name.toLowerCase()}');
63
+ allChoices = allChoices.concat(gameItems);
64
+
65
+ let itemPacks = game.packs.filter(pack => pack.documentName === 'Item');
66
+ for (let pack of itemPacks) {
67
+ const packItems = pack.index.contents;
68
+ packItems.forEach(item => {
69
+ item.compendium = pack;
70
+ });
71
+ allChoices = allChoices.concat(packItems);
72
+ }
73
+ ` : ''}
74
+
75
+ allChoices = allChoices.filter(item => {
76
+ if (item.type !== '${(_c = documentChoice.document.ref) === null || _c === void 0 ? void 0 : _c.name.toLowerCase()}') return false;
77
+ return ${(_e = translateExpression(entry, id, (_d = documentChoice.params.filter(x => isWhereParam(x))[0]) === null || _d === void 0 ? void 0 : _d.value)) !== null && _e !== void 0 ? _e : true}
78
+ });
79
+
80
+ if (allChoices.length === 0) return [{
81
+ id: null,
82
+ name: 'No choices available'
83
+ }];
84
+
85
+ return allChoices.map(choice => {
86
+ let context = {
87
+ id: choice.uuid,
88
+ name: choice.name,
89
+ image: choice.img,
90
+ summary: truncate(choice.system.description, 50),
91
+ description: choice.system.description
92
+ };
93
+
94
+ if (choice.parent) {
95
+ context.source = "Self";
96
+ context.color = props.primaryColor;
97
+ context.icon = 'fa-solid fa-user';
98
+ }
99
+ else if (choice.compendium) {
100
+ context.source = \`\${choice.compendium.metadata.packageName} - \${choice.compendium.title}\`;
101
+ context.color = props.secondaryColor;
102
+ context.icon = 'fa-solid fa-suitcase';
103
+ }
104
+ else {
105
+ context.source = "World";
106
+ context.color = props.secondaryColor;
107
+ context.icon = 'fa-solid fa-globe';
108
+ }
109
+
110
+ return context;
111
+ });
112
+ });
113
+
114
+ const truncate = (text, maxLength) => {
115
+ if (text.length > maxLength) {
116
+ return text.substring(0, maxLength) + '...';
117
+ }
118
+ return text;
119
+ }
120
+
121
+ const getLabel = (label, icon) => {
122
+ const localized = game.i18n.localize(label);
123
+ if (icon) {
124
+ return \`<i class="\${icon}"></i> \${localized}\`;
125
+ }
126
+ return localized;
127
+ }
128
+ </script>
129
+ <template>
130
+ <v-autocomplete clearable dense
131
+ v-model="value"
132
+ @update:modelValue="onChange"
133
+ :items="choices"
134
+ item-title="name"
135
+ item-value="id"
136
+ density="compact"
137
+ variant="outlined"
138
+ :disabled="disabled"
139
+ class="double-wide"
140
+ >
141
+ <template #label>
142
+ <span v-html="getLabel('${document.name}.${documentChoice.name}', ${iconParam ? `'${iconParam.value}'` : undefined})" />
143
+ </template>
144
+ <template v-slot:prepend-inner v-if="value">
145
+ <v-avatar rounded="0" :image="selectedImage" size="30"</v-avatar>
146
+ </template>
147
+ <template v-slot:item="{ props, item }">
148
+ <v-list-item
149
+ v-bind="props"
150
+ :data-tooltip="item.raw.description"
151
+ >
152
+ <template v-slot:title>
153
+ <div class="flexrow">
154
+ <p style="flex: 1">{{ item.raw.name }}</p>
155
+ <v-spacer />
156
+ <v-chip size="small" label :color="item.raw.color" style="align-self: center; white-space: nowrap; flex: 0; line-height: 26px; display: inline-table;"><v-icon :icon="item.raw.icon" start></v-icon> {{ item.raw.source }}</v-chip>
157
+ </div>
158
+ </template>
159
+ <template v-if="item.raw.image" v-slot:prepend>
160
+ <v-avatar rounded="0" :image="item.raw.image">
161
+ </v-avatar>
162
+ </template>
163
+ <template v-slot:subtitle>
164
+ <div v-html="item.raw.summary"></div>
165
+ </template>
166
+ </v-list-item>
167
+ </template>
168
+ </v-autocomplete>
169
+ </template>
170
170
  `;
171
171
  fs.writeFileSync(generatedFilePath, toString(fileNode));
172
172
  }