@wire-dsl/language-support 0.2.3 → 0.3.0
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/INTEGRATION-GUIDE.md +50 -194
- package/README.md +39 -33
- package/dist/completions.d.ts.map +1 -1
- package/dist/completions.js +8 -1
- package/dist/completions.js.map +1 -1
- package/dist/components.d.ts +0 -6
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +80 -35
- package/dist/components.js.map +1 -1
- package/dist/context-detection.js +2 -2
- package/dist/context-detection.js.map +1 -1
- package/dist/document-parser.d.ts +12 -0
- package/dist/document-parser.d.ts.map +1 -1
- package/dist/document-parser.js +49 -0
- package/dist/document-parser.js.map +1 -1
- package/dist/documentation.js +1 -1
- package/dist/documentation.js.map +1 -1
- package/dist/icon-names.d.ts +8 -0
- package/dist/icon-names.d.ts.map +1 -0
- package/dist/icon-names.js +295 -0
- package/dist/icon-names.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist-cjs/completions.js +394 -0
- package/dist-cjs/completions.js.map +1 -0
- package/dist-cjs/components.js +495 -0
- package/dist-cjs/components.js.map +1 -0
- package/dist-cjs/context-detection.js +153 -0
- package/dist-cjs/context-detection.js.map +1 -0
- package/dist-cjs/document-parser.js +323 -0
- package/dist-cjs/document-parser.js.map +1 -0
- package/dist-cjs/documentation.js +133 -0
- package/dist-cjs/documentation.js.map +1 -0
- package/dist-cjs/icon-names.js +298 -0
- package/dist-cjs/icon-names.js.map +1 -0
- package/dist-cjs/index.js +114 -0
- package/dist-cjs/index.js.map +1 -0
- package/dist-cjs/package.json +1 -0
- package/package.json +14 -3
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ICON_NAME_OPTIONS = exports.ICON_NAMES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Canonical icon names supported by Wire DSL renderers.
|
|
6
|
+
* Synced from packages/engine/src/renderer/icons/iconLibrary.ts
|
|
7
|
+
*/
|
|
8
|
+
exports.ICON_NAMES = [
|
|
9
|
+
'activity',
|
|
10
|
+
'airplay',
|
|
11
|
+
'alert-circle',
|
|
12
|
+
'alert-octagon',
|
|
13
|
+
'alert-triangle',
|
|
14
|
+
'align-center',
|
|
15
|
+
'align-justify',
|
|
16
|
+
'align-left',
|
|
17
|
+
'align-right',
|
|
18
|
+
'anchor',
|
|
19
|
+
'aperture',
|
|
20
|
+
'archive',
|
|
21
|
+
'arrow-down-circle',
|
|
22
|
+
'arrow-down-left',
|
|
23
|
+
'arrow-down-right',
|
|
24
|
+
'arrow-down',
|
|
25
|
+
'arrow-left-circle',
|
|
26
|
+
'arrow-left',
|
|
27
|
+
'arrow-right-circle',
|
|
28
|
+
'arrow-right',
|
|
29
|
+
'arrow-up-circle',
|
|
30
|
+
'arrow-up-left',
|
|
31
|
+
'arrow-up-right',
|
|
32
|
+
'arrow-up',
|
|
33
|
+
'at-sign',
|
|
34
|
+
'award',
|
|
35
|
+
'bar-chart-2',
|
|
36
|
+
'bar-chart',
|
|
37
|
+
'battery-charging',
|
|
38
|
+
'battery',
|
|
39
|
+
'bell-off',
|
|
40
|
+
'bell',
|
|
41
|
+
'bluetooth',
|
|
42
|
+
'bold',
|
|
43
|
+
'book-open',
|
|
44
|
+
'book',
|
|
45
|
+
'bookmark',
|
|
46
|
+
'box',
|
|
47
|
+
'briefcase',
|
|
48
|
+
'calendar',
|
|
49
|
+
'camera-off',
|
|
50
|
+
'camera',
|
|
51
|
+
'cast',
|
|
52
|
+
'check-circle',
|
|
53
|
+
'check-square',
|
|
54
|
+
'check',
|
|
55
|
+
'chevron-down',
|
|
56
|
+
'chevron-left',
|
|
57
|
+
'chevron-right',
|
|
58
|
+
'chevron-up',
|
|
59
|
+
'chevrons-down',
|
|
60
|
+
'chevrons-left',
|
|
61
|
+
'chevrons-right',
|
|
62
|
+
'chevrons-up',
|
|
63
|
+
'chrome',
|
|
64
|
+
'circle',
|
|
65
|
+
'clipboard',
|
|
66
|
+
'clock',
|
|
67
|
+
'cloud-drizzle',
|
|
68
|
+
'cloud-lightning',
|
|
69
|
+
'cloud-off',
|
|
70
|
+
'cloud-rain',
|
|
71
|
+
'cloud-snow',
|
|
72
|
+
'cloud',
|
|
73
|
+
'code',
|
|
74
|
+
'codepen',
|
|
75
|
+
'codesandbox',
|
|
76
|
+
'coffee',
|
|
77
|
+
'columns',
|
|
78
|
+
'command',
|
|
79
|
+
'compass',
|
|
80
|
+
'copy',
|
|
81
|
+
'corner-down-left',
|
|
82
|
+
'corner-down-right',
|
|
83
|
+
'corner-left-down',
|
|
84
|
+
'corner-left-up',
|
|
85
|
+
'corner-right-down',
|
|
86
|
+
'corner-right-up',
|
|
87
|
+
'corner-up-left',
|
|
88
|
+
'corner-up-right',
|
|
89
|
+
'cpu',
|
|
90
|
+
'credit-card',
|
|
91
|
+
'crop',
|
|
92
|
+
'crosshair',
|
|
93
|
+
'database',
|
|
94
|
+
'delete',
|
|
95
|
+
'disc',
|
|
96
|
+
'divide-circle',
|
|
97
|
+
'divide-square',
|
|
98
|
+
'divide',
|
|
99
|
+
'dollar-sign',
|
|
100
|
+
'download-cloud',
|
|
101
|
+
'download',
|
|
102
|
+
'dribbble',
|
|
103
|
+
'droplet',
|
|
104
|
+
'edit-2',
|
|
105
|
+
'edit-3',
|
|
106
|
+
'edit',
|
|
107
|
+
'external-link',
|
|
108
|
+
'eye-off',
|
|
109
|
+
'eye',
|
|
110
|
+
'facebook',
|
|
111
|
+
'fast-forward',
|
|
112
|
+
'feather',
|
|
113
|
+
'figma',
|
|
114
|
+
'file-minus',
|
|
115
|
+
'file-plus',
|
|
116
|
+
'file-text',
|
|
117
|
+
'file',
|
|
118
|
+
'film',
|
|
119
|
+
'filter',
|
|
120
|
+
'flag',
|
|
121
|
+
'folder-minus',
|
|
122
|
+
'folder-plus',
|
|
123
|
+
'folder',
|
|
124
|
+
'framer',
|
|
125
|
+
'frown',
|
|
126
|
+
'gift',
|
|
127
|
+
'git-branch',
|
|
128
|
+
'git-commit',
|
|
129
|
+
'git-merge',
|
|
130
|
+
'git-pull-request',
|
|
131
|
+
'github',
|
|
132
|
+
'gitlab',
|
|
133
|
+
'globe',
|
|
134
|
+
'grid',
|
|
135
|
+
'hard-drive',
|
|
136
|
+
'hash',
|
|
137
|
+
'headphones',
|
|
138
|
+
'heart',
|
|
139
|
+
'help-circle',
|
|
140
|
+
'hexagon',
|
|
141
|
+
'home',
|
|
142
|
+
'image',
|
|
143
|
+
'inbox',
|
|
144
|
+
'info',
|
|
145
|
+
'instagram',
|
|
146
|
+
'italic',
|
|
147
|
+
'key',
|
|
148
|
+
'layers',
|
|
149
|
+
'layout',
|
|
150
|
+
'life-buoy',
|
|
151
|
+
'link-2',
|
|
152
|
+
'link',
|
|
153
|
+
'linkedin',
|
|
154
|
+
'list',
|
|
155
|
+
'loader',
|
|
156
|
+
'lock',
|
|
157
|
+
'log-in',
|
|
158
|
+
'log-out',
|
|
159
|
+
'mail',
|
|
160
|
+
'map-pin',
|
|
161
|
+
'map',
|
|
162
|
+
'maximize-2',
|
|
163
|
+
'maximize',
|
|
164
|
+
'meh',
|
|
165
|
+
'menu',
|
|
166
|
+
'message-circle',
|
|
167
|
+
'message-square',
|
|
168
|
+
'mic-off',
|
|
169
|
+
'mic',
|
|
170
|
+
'minimize-2',
|
|
171
|
+
'minimize',
|
|
172
|
+
'minus-circle',
|
|
173
|
+
'minus-square',
|
|
174
|
+
'minus',
|
|
175
|
+
'monitor',
|
|
176
|
+
'moon',
|
|
177
|
+
'more-horizontal',
|
|
178
|
+
'more-vertical',
|
|
179
|
+
'mouse-pointer',
|
|
180
|
+
'move',
|
|
181
|
+
'music',
|
|
182
|
+
'navigation-2',
|
|
183
|
+
'navigation',
|
|
184
|
+
'octagon',
|
|
185
|
+
'package',
|
|
186
|
+
'paperclip',
|
|
187
|
+
'pause-circle',
|
|
188
|
+
'pause',
|
|
189
|
+
'pen-tool',
|
|
190
|
+
'percent',
|
|
191
|
+
'phone-call',
|
|
192
|
+
'phone-forwarded',
|
|
193
|
+
'phone-incoming',
|
|
194
|
+
'phone-missed',
|
|
195
|
+
'phone-off',
|
|
196
|
+
'phone-outgoing',
|
|
197
|
+
'phone',
|
|
198
|
+
'pie-chart',
|
|
199
|
+
'play-circle',
|
|
200
|
+
'play',
|
|
201
|
+
'plus-circle',
|
|
202
|
+
'plus-square',
|
|
203
|
+
'plus',
|
|
204
|
+
'pocket',
|
|
205
|
+
'power',
|
|
206
|
+
'printer',
|
|
207
|
+
'radio',
|
|
208
|
+
'refresh-ccw',
|
|
209
|
+
'refresh-cw',
|
|
210
|
+
'repeat',
|
|
211
|
+
'rewind',
|
|
212
|
+
'rotate-ccw',
|
|
213
|
+
'rotate-cw',
|
|
214
|
+
'rss',
|
|
215
|
+
'save',
|
|
216
|
+
'scissors',
|
|
217
|
+
'search',
|
|
218
|
+
'send',
|
|
219
|
+
'server',
|
|
220
|
+
'settings',
|
|
221
|
+
'share-2',
|
|
222
|
+
'share',
|
|
223
|
+
'shield-off',
|
|
224
|
+
'shield',
|
|
225
|
+
'shopping-bag',
|
|
226
|
+
'shopping-cart',
|
|
227
|
+
'shuffle',
|
|
228
|
+
'sidebar',
|
|
229
|
+
'skip-back',
|
|
230
|
+
'skip-forward',
|
|
231
|
+
'slack',
|
|
232
|
+
'slash',
|
|
233
|
+
'sliders',
|
|
234
|
+
'smartphone',
|
|
235
|
+
'smile',
|
|
236
|
+
'speaker',
|
|
237
|
+
'square',
|
|
238
|
+
'star',
|
|
239
|
+
'stop-circle',
|
|
240
|
+
'sun',
|
|
241
|
+
'sunrise',
|
|
242
|
+
'sunset',
|
|
243
|
+
'table',
|
|
244
|
+
'tablet',
|
|
245
|
+
'tag',
|
|
246
|
+
'target',
|
|
247
|
+
'terminal',
|
|
248
|
+
'thermometer',
|
|
249
|
+
'thumbs-down',
|
|
250
|
+
'thumbs-up',
|
|
251
|
+
'toggle-left',
|
|
252
|
+
'toggle-right',
|
|
253
|
+
'tool',
|
|
254
|
+
'trash-2',
|
|
255
|
+
'trash',
|
|
256
|
+
'trello',
|
|
257
|
+
'trending-down',
|
|
258
|
+
'trending-up',
|
|
259
|
+
'triangle',
|
|
260
|
+
'truck',
|
|
261
|
+
'tv',
|
|
262
|
+
'twitch',
|
|
263
|
+
'twitter',
|
|
264
|
+
'type',
|
|
265
|
+
'umbrella',
|
|
266
|
+
'underline',
|
|
267
|
+
'unlock',
|
|
268
|
+
'upload-cloud',
|
|
269
|
+
'upload',
|
|
270
|
+
'user-check',
|
|
271
|
+
'user-minus',
|
|
272
|
+
'user-plus',
|
|
273
|
+
'user-x',
|
|
274
|
+
'user',
|
|
275
|
+
'users',
|
|
276
|
+
'video-off',
|
|
277
|
+
'video',
|
|
278
|
+
'voicemail',
|
|
279
|
+
'volume-1',
|
|
280
|
+
'volume-2',
|
|
281
|
+
'volume-x',
|
|
282
|
+
'volume',
|
|
283
|
+
'watch',
|
|
284
|
+
'wifi-off',
|
|
285
|
+
'wifi',
|
|
286
|
+
'wind',
|
|
287
|
+
'x-circle',
|
|
288
|
+
'x-octagon',
|
|
289
|
+
'x-square',
|
|
290
|
+
'x',
|
|
291
|
+
'youtube',
|
|
292
|
+
'zap-off',
|
|
293
|
+
'zap',
|
|
294
|
+
'zoom-in',
|
|
295
|
+
'zoom-out',
|
|
296
|
+
];
|
|
297
|
+
exports.ICON_NAME_OPTIONS = [...exports.ICON_NAMES];
|
|
298
|
+
//# sourceMappingURL=icon-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-names.js","sourceRoot":"","sources":["../src/icon-names.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,UAAU,GAAG;IACxB,UAAU;IACV,SAAS;IACT,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,YAAY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c;IACd,OAAO;IACP,OAAO;IACP,SAAS;IACT,YAAY;IACZ,OAAO;IACP,SAAS;IACT,QAAQ;IACR,MAAM;IACN,aAAa;IACb,KAAK;IACL,SAAS;IACT,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,UAAU;IACV,aAAa;IACb,aAAa;IACb,WAAW;IACX,aAAa;IACb,cAAc;IACd,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,eAAe;IACf,aAAa;IACb,UAAU;IACV,OAAO;IACP,IAAI;IACJ,QAAQ;IACR,SAAS;IACT,MAAM;IACN,UAAU;IACV,WAAW;IACX,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,UAAU;IACV,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,UAAU;IACV,GAAG;IACH,SAAS;IACT,SAAS;IACT,KAAK;IACL,SAAS;IACT,UAAU;CACF,CAAC;AAIE,QAAA,iBAAiB,GAAa,CAAC,GAAG,kBAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wire DSL Language Support
|
|
4
|
+
* Shared language definitions, syntax, and code intelligence for Monaco, VS Code, and other editors
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ALL_KEYWORDS = exports.getComponentProperties = exports.getAvailableComponents = exports.detectPropertyValueContext = exports.detectComponentKeyword = exports.getScopeBasedCompletions = exports.getPropertyValueSuggestions = exports.getComponentPropertiesForCompletion = exports.isPropertyContext = exports.PROPERTY_COMPLETIONS = exports.COMPONENT_COMPLETIONS = exports.CONTAINER_COMPLETIONS = exports.KEYWORD_COMPLETIONS = exports.getAlreadyDeclaredProperties = exports.getAvailableProperties = exports.detectComponentContext = exports.determineScope = exports.findComponentReferences = exports.getPositionOfDefinition = exports.extractScreenDefinitions = exports.extractComponentReferences = exports.isComponentReference = exports.getTokenAtPosition = exports.extractLayoutDefinitions = exports.extractComponentDefinitions = exports.getKeywordDocumentation = exports.getPropertyDocumentation = exports.getLayoutDocumentation = exports.getComponentDocumentation = exports.ICON_NAME_OPTIONS = exports.ICON_NAMES = exports.KEYWORDS = exports.PROPERTY_VALUES = exports.LAYOUTS = exports.COMPONENTS = void 0;
|
|
8
|
+
exports.getCompletions = getCompletions;
|
|
9
|
+
// Import for internal use
|
|
10
|
+
const components_js_1 = require("./components.js");
|
|
11
|
+
// Re-export new core modules
|
|
12
|
+
var components_js_2 = require("./components.js");
|
|
13
|
+
Object.defineProperty(exports, "COMPONENTS", { enumerable: true, get: function () { return components_js_2.COMPONENTS; } });
|
|
14
|
+
Object.defineProperty(exports, "LAYOUTS", { enumerable: true, get: function () { return components_js_2.LAYOUTS; } });
|
|
15
|
+
Object.defineProperty(exports, "PROPERTY_VALUES", { enumerable: true, get: function () { return components_js_2.PROPERTY_VALUES; } });
|
|
16
|
+
Object.defineProperty(exports, "KEYWORDS", { enumerable: true, get: function () { return components_js_2.KEYWORDS; } });
|
|
17
|
+
var icon_names_js_1 = require("./icon-names.js");
|
|
18
|
+
Object.defineProperty(exports, "ICON_NAMES", { enumerable: true, get: function () { return icon_names_js_1.ICON_NAMES; } });
|
|
19
|
+
Object.defineProperty(exports, "ICON_NAME_OPTIONS", { enumerable: true, get: function () { return icon_names_js_1.ICON_NAME_OPTIONS; } });
|
|
20
|
+
var documentation_js_1 = require("./documentation.js");
|
|
21
|
+
Object.defineProperty(exports, "getComponentDocumentation", { enumerable: true, get: function () { return documentation_js_1.getComponentDocumentation; } });
|
|
22
|
+
Object.defineProperty(exports, "getLayoutDocumentation", { enumerable: true, get: function () { return documentation_js_1.getLayoutDocumentation; } });
|
|
23
|
+
Object.defineProperty(exports, "getPropertyDocumentation", { enumerable: true, get: function () { return documentation_js_1.getPropertyDocumentation; } });
|
|
24
|
+
Object.defineProperty(exports, "getKeywordDocumentation", { enumerable: true, get: function () { return documentation_js_1.getKeywordDocumentation; } });
|
|
25
|
+
var document_parser_js_1 = require("./document-parser.js");
|
|
26
|
+
Object.defineProperty(exports, "extractComponentDefinitions", { enumerable: true, get: function () { return document_parser_js_1.extractComponentDefinitions; } });
|
|
27
|
+
Object.defineProperty(exports, "extractLayoutDefinitions", { enumerable: true, get: function () { return document_parser_js_1.extractLayoutDefinitions; } });
|
|
28
|
+
Object.defineProperty(exports, "getTokenAtPosition", { enumerable: true, get: function () { return document_parser_js_1.getTokenAtPosition; } });
|
|
29
|
+
Object.defineProperty(exports, "isComponentReference", { enumerable: true, get: function () { return document_parser_js_1.isComponentReference; } });
|
|
30
|
+
Object.defineProperty(exports, "extractComponentReferences", { enumerable: true, get: function () { return document_parser_js_1.extractComponentReferences; } });
|
|
31
|
+
Object.defineProperty(exports, "extractScreenDefinitions", { enumerable: true, get: function () { return document_parser_js_1.extractScreenDefinitions; } });
|
|
32
|
+
Object.defineProperty(exports, "getPositionOfDefinition", { enumerable: true, get: function () { return document_parser_js_1.getPositionOfDefinition; } });
|
|
33
|
+
Object.defineProperty(exports, "findComponentReferences", { enumerable: true, get: function () { return document_parser_js_1.findComponentReferences; } });
|
|
34
|
+
var context_detection_js_1 = require("./context-detection.js");
|
|
35
|
+
Object.defineProperty(exports, "determineScope", { enumerable: true, get: function () { return context_detection_js_1.determineScope; } });
|
|
36
|
+
Object.defineProperty(exports, "detectComponentContext", { enumerable: true, get: function () { return context_detection_js_1.detectComponentContext; } });
|
|
37
|
+
Object.defineProperty(exports, "getAvailableProperties", { enumerable: true, get: function () { return context_detection_js_1.getComponentPropertiesForCompletion; } });
|
|
38
|
+
Object.defineProperty(exports, "getAlreadyDeclaredProperties", { enumerable: true, get: function () { return context_detection_js_1.getAlreadyDeclaredProperties; } });
|
|
39
|
+
var completions_js_1 = require("./completions.js");
|
|
40
|
+
Object.defineProperty(exports, "KEYWORD_COMPLETIONS", { enumerable: true, get: function () { return completions_js_1.KEYWORD_COMPLETIONS; } });
|
|
41
|
+
Object.defineProperty(exports, "CONTAINER_COMPLETIONS", { enumerable: true, get: function () { return completions_js_1.CONTAINER_COMPLETIONS; } });
|
|
42
|
+
Object.defineProperty(exports, "COMPONENT_COMPLETIONS", { enumerable: true, get: function () { return completions_js_1.COMPONENT_COMPLETIONS; } });
|
|
43
|
+
Object.defineProperty(exports, "PROPERTY_COMPLETIONS", { enumerable: true, get: function () { return completions_js_1.PROPERTY_COMPLETIONS; } });
|
|
44
|
+
Object.defineProperty(exports, "isPropertyContext", { enumerable: true, get: function () { return completions_js_1.isPropertyContext; } });
|
|
45
|
+
Object.defineProperty(exports, "getComponentPropertiesForCompletion", { enumerable: true, get: function () { return completions_js_1.getComponentPropertiesForCompletion; } });
|
|
46
|
+
Object.defineProperty(exports, "getPropertyValueSuggestions", { enumerable: true, get: function () { return completions_js_1.getPropertyValueSuggestions; } });
|
|
47
|
+
Object.defineProperty(exports, "getScopeBasedCompletions", { enumerable: true, get: function () { return completions_js_1.getScopeBasedCompletions; } });
|
|
48
|
+
Object.defineProperty(exports, "detectComponentKeyword", { enumerable: true, get: function () { return completions_js_1.detectComponentKeyword; } });
|
|
49
|
+
Object.defineProperty(exports, "detectPropertyValueContext", { enumerable: true, get: function () { return completions_js_1.detectPropertyValueContext; } });
|
|
50
|
+
Object.defineProperty(exports, "getAvailableComponents", { enumerable: true, get: function () { return completions_js_1.getAvailableComponents; } });
|
|
51
|
+
Object.defineProperty(exports, "getComponentProperties", { enumerable: true, get: function () { return completions_js_1.getComponentProperties; } });
|
|
52
|
+
// Build ALL_KEYWORDS using ACTUAL Wire DSL keywords
|
|
53
|
+
exports.ALL_KEYWORDS = [
|
|
54
|
+
// Top-level keywords
|
|
55
|
+
...components_js_1.KEYWORDS.topLevel.map(name => ({
|
|
56
|
+
name,
|
|
57
|
+
type: 'keyword',
|
|
58
|
+
description: `Wire DSL keyword: ${name}`,
|
|
59
|
+
})),
|
|
60
|
+
// Screen keyword
|
|
61
|
+
...components_js_1.KEYWORDS.screen.map(name => ({
|
|
62
|
+
name,
|
|
63
|
+
type: 'keyword',
|
|
64
|
+
description: `Wire DSL keyword: ${name}`,
|
|
65
|
+
})),
|
|
66
|
+
// Layout keyword
|
|
67
|
+
...components_js_1.KEYWORDS.layout.map(name => ({
|
|
68
|
+
name,
|
|
69
|
+
type: 'keyword',
|
|
70
|
+
description: `Wire DSL keyword: ${name}`,
|
|
71
|
+
})),
|
|
72
|
+
// Component keyword
|
|
73
|
+
...components_js_1.KEYWORDS.component.map(name => ({
|
|
74
|
+
name,
|
|
75
|
+
type: 'keyword',
|
|
76
|
+
description: `Wire DSL keyword: ${name}`,
|
|
77
|
+
})),
|
|
78
|
+
// Cell keyword
|
|
79
|
+
...components_js_1.KEYWORDS.cell.map(name => ({
|
|
80
|
+
name,
|
|
81
|
+
type: 'keyword',
|
|
82
|
+
description: `Wire DSL keyword: ${name}`,
|
|
83
|
+
})),
|
|
84
|
+
// Special keywords
|
|
85
|
+
...components_js_1.KEYWORDS.special.map(name => ({
|
|
86
|
+
name,
|
|
87
|
+
type: 'keyword',
|
|
88
|
+
description: `Wire DSL keyword: ${name}`,
|
|
89
|
+
})),
|
|
90
|
+
// Components from metadata
|
|
91
|
+
...Object.entries(components_js_1.COMPONENTS).map(([name, meta]) => ({
|
|
92
|
+
name,
|
|
93
|
+
type: 'component',
|
|
94
|
+
description: meta.description || `Component: ${name}`,
|
|
95
|
+
})),
|
|
96
|
+
];
|
|
97
|
+
/**
|
|
98
|
+
* Get completions for a given prefix
|
|
99
|
+
* @param prefix Filter by prefix (e.g., 'but' → ['button', ...])
|
|
100
|
+
* @returns Array of completion suggestions
|
|
101
|
+
*/
|
|
102
|
+
function getCompletions(prefix = '') {
|
|
103
|
+
const lowerPrefix = prefix.toLowerCase();
|
|
104
|
+
return exports.ALL_KEYWORDS
|
|
105
|
+
.filter(kw => kw.name.toLowerCase().startsWith(lowerPrefix))
|
|
106
|
+
.map(kw => ({
|
|
107
|
+
label: kw.name,
|
|
108
|
+
kind: kw.type === 'component' ? 'Class' : 'Keyword',
|
|
109
|
+
detail: kw.description,
|
|
110
|
+
documentation: kw.description,
|
|
111
|
+
sortText: kw.name,
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgIH,wCAWC;AAzID,0BAA0B;AAC1B,mDAAuD;AAEvD,6BAA6B;AAC7B,iDASyB;AARvB,2GAAA,UAAU,OAAA;AACV,wGAAA,OAAO,OAAA;AACP,gHAAA,eAAe,OAAA;AACf,yGAAA,QAAQ,OAAA;AAMV,iDAA+E;AAAtE,2GAAA,UAAU,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAEtC,uDAK4B;AAJ1B,6HAAA,yBAAyB,OAAA;AACzB,0HAAA,sBAAsB,OAAA;AACtB,4HAAA,wBAAwB,OAAA;AACxB,2HAAA,uBAAuB,OAAA;AAGzB,2DAW8B;AAV5B,iIAAA,2BAA2B,OAAA;AAC3B,8HAAA,wBAAwB,OAAA;AACxB,wHAAA,kBAAkB,OAAA;AAClB,0HAAA,oBAAoB,OAAA;AACpB,gIAAA,0BAA0B,OAAA;AAC1B,8HAAA,wBAAwB,OAAA;AACxB,6HAAA,uBAAuB,OAAA;AACvB,6HAAA,uBAAuB,OAAA;AAKzB,+DAOgC;AAN9B,sHAAA,cAAc,OAAA;AACd,8HAAA,sBAAsB,OAAA;AACtB,8HAAA,mCAAmC,OAA0B;AAC7D,oIAAA,4BAA4B,OAAA;AAK9B,mDAa0B;AAZxB,qHAAA,mBAAmB,OAAA;AACnB,uHAAA,qBAAqB,OAAA;AACrB,uHAAA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
|
4
4
|
"description": "Wire DSL language definitions for Monaco, VS Code, and other editors. Keywords, components, properties, autocompletion, grammar, and document parsing.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
6
|
+
"main": "./dist-cjs/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
7
8
|
"types": "./dist/index.d.ts",
|
|
8
9
|
"engines": {
|
|
9
10
|
"node": ">=18.0.0"
|
|
@@ -11,35 +12,43 @@
|
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
13
14
|
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist-cjs/index.js",
|
|
14
16
|
"types": "./dist/index.d.ts"
|
|
15
17
|
},
|
|
16
18
|
"./completions": {
|
|
17
19
|
"import": "./dist/completions.js",
|
|
20
|
+
"require": "./dist-cjs/completions.js",
|
|
18
21
|
"types": "./dist/completions.d.ts"
|
|
19
22
|
},
|
|
20
23
|
"./grammar": {
|
|
21
24
|
"import": "./dist/grammar.js",
|
|
25
|
+
"require": "./dist-cjs/grammar.js",
|
|
22
26
|
"types": "./dist/grammar.d.ts"
|
|
23
27
|
},
|
|
24
28
|
"./components": {
|
|
25
29
|
"import": "./dist/components.js",
|
|
30
|
+
"require": "./dist-cjs/components.js",
|
|
26
31
|
"types": "./dist/components.d.ts"
|
|
27
32
|
},
|
|
28
33
|
"./documentation": {
|
|
29
34
|
"import": "./dist/documentation.js",
|
|
35
|
+
"require": "./dist-cjs/documentation.js",
|
|
30
36
|
"types": "./dist/documentation.d.ts"
|
|
31
37
|
},
|
|
32
38
|
"./document-parser": {
|
|
33
39
|
"import": "./dist/document-parser.js",
|
|
40
|
+
"require": "./dist-cjs/document-parser.js",
|
|
34
41
|
"types": "./dist/document-parser.d.ts"
|
|
35
42
|
},
|
|
36
43
|
"./context-detection": {
|
|
37
44
|
"import": "./dist/context-detection.js",
|
|
45
|
+
"require": "./dist-cjs/context-detection.js",
|
|
38
46
|
"types": "./dist/context-detection.d.ts"
|
|
39
47
|
}
|
|
40
48
|
},
|
|
41
49
|
"files": [
|
|
42
50
|
"dist",
|
|
51
|
+
"dist-cjs",
|
|
43
52
|
"wire.tmLanguage.json",
|
|
44
53
|
"README.md",
|
|
45
54
|
"LICENSE",
|
|
@@ -83,7 +92,9 @@
|
|
|
83
92
|
"author": "Wire-DSL Contributors",
|
|
84
93
|
"license": "MIT",
|
|
85
94
|
"scripts": {
|
|
86
|
-
"build": "
|
|
95
|
+
"build": "pnpm run build:esm && pnpm run build:cjs",
|
|
96
|
+
"build:esm": "tsc -p tsconfig.json",
|
|
97
|
+
"build:cjs": "tsc -p tsconfig.cjs.json && node -e \"const fs=require('node:fs');fs.mkdirSync('dist-cjs',{recursive:true});fs.writeFileSync('dist-cjs/package.json','{\\\"type\\\":\\\"commonjs\\\"}\\n');\"",
|
|
87
98
|
"type-check": "tsc --noEmit",
|
|
88
99
|
"dev": "tsc --watch"
|
|
89
100
|
}
|