@wireweave/language-data 1.5.3-beta.0 → 1.5.3
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/README.md +52 -143
- package/dist/codemirror/index.cjs +238 -34
- package/dist/codemirror/index.cjs.map +1 -1
- package/dist/codemirror/index.d.cts +13 -23
- package/dist/codemirror/index.d.ts +13 -23
- package/dist/codemirror/index.js +238 -34
- package/dist/codemirror/index.js.map +1 -1
- package/dist/index.cjs +231 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +231 -30
- package/dist/index.js.map +1 -1
- package/dist/monaco/index.cjs +276 -49
- package/dist/monaco/index.cjs.map +1 -1
- package/dist/monaco/index.d.cts +13 -19
- package/dist/monaco/index.d.ts +13 -19
- package/dist/monaco/index.js +276 -49
- package/dist/monaco/index.js.map +1 -1
- package/package.json +88 -23
package/dist/index.cjs
CHANGED
|
@@ -98,7 +98,12 @@ var ATTRIBUTES = [
|
|
|
98
98
|
{ name: "pb", type: "number", description: "Bottom padding", example: "pb=4" },
|
|
99
99
|
{ name: "pl", type: "number", description: "Left padding", example: "pl=4" },
|
|
100
100
|
{ name: "m", type: "number", description: "Margin (all sides)", example: "m=4" },
|
|
101
|
-
{
|
|
101
|
+
{
|
|
102
|
+
name: "mx",
|
|
103
|
+
type: "string",
|
|
104
|
+
description: 'Horizontal margin (number or "auto")',
|
|
105
|
+
example: "mx=auto"
|
|
106
|
+
},
|
|
102
107
|
{ name: "my", type: "number", description: "Vertical margin", example: "my=4" },
|
|
103
108
|
{ name: "mt", type: "number", description: "Top margin", example: "mt=4" },
|
|
104
109
|
{ name: "mr", type: "number", description: "Right margin", example: "mr=4" },
|
|
@@ -108,10 +113,30 @@ var ATTRIBUTES = [
|
|
|
108
113
|
// ============================================
|
|
109
114
|
// Size Attributes
|
|
110
115
|
// ============================================
|
|
111
|
-
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
{
|
|
117
|
+
name: "w",
|
|
118
|
+
type: "string",
|
|
119
|
+
description: 'Width (number, "full", "auto", "screen", "fit")',
|
|
120
|
+
example: "w=full"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "h",
|
|
124
|
+
type: "string",
|
|
125
|
+
description: 'Height (number, "full", "auto", "screen")',
|
|
126
|
+
example: "h=full"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "width",
|
|
130
|
+
type: "number",
|
|
131
|
+
description: "Width in pixels (page only)",
|
|
132
|
+
example: "width=400"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "height",
|
|
136
|
+
type: "number",
|
|
137
|
+
description: "Height in pixels (page only)",
|
|
138
|
+
example: "height=300"
|
|
139
|
+
},
|
|
115
140
|
{ name: "minW", type: "number", description: "Minimum width", example: "minW=200" },
|
|
116
141
|
{ name: "maxW", type: "number", description: "Maximum width", example: "maxW=600" },
|
|
117
142
|
{ name: "minH", type: "number", description: "Minimum height", example: "minH=100" },
|
|
@@ -120,9 +145,27 @@ var ATTRIBUTES = [
|
|
|
120
145
|
// Flex/Grid Layout Attributes
|
|
121
146
|
// ============================================
|
|
122
147
|
{ name: "flex", type: "boolean", description: "Enable flexbox", example: "flex" },
|
|
123
|
-
{
|
|
124
|
-
|
|
125
|
-
|
|
148
|
+
{
|
|
149
|
+
name: "direction",
|
|
150
|
+
type: "enum",
|
|
151
|
+
values: ["row", "column", "row-reverse", "column-reverse"],
|
|
152
|
+
description: "Flex direction",
|
|
153
|
+
example: "direction=column"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "justify",
|
|
157
|
+
type: "enum",
|
|
158
|
+
values: ["start", "center", "end", "between", "around", "evenly"],
|
|
159
|
+
description: "Main axis alignment",
|
|
160
|
+
example: "justify=center"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "align",
|
|
164
|
+
type: "enum",
|
|
165
|
+
values: ["start", "center", "end", "stretch", "baseline"],
|
|
166
|
+
description: "Cross axis alignment",
|
|
167
|
+
example: "align=center"
|
|
168
|
+
},
|
|
126
169
|
{ name: "wrap", type: "boolean", description: "Enable flex wrap", example: "wrap" },
|
|
127
170
|
{ name: "span", type: "number", description: "Grid column span (1-12)", example: "span=6" },
|
|
128
171
|
{ name: "sm", type: "number", description: "Responsive span at 576px+", example: "sm=6" },
|
|
@@ -135,19 +178,60 @@ var ATTRIBUTES = [
|
|
|
135
178
|
// ============================================
|
|
136
179
|
{ name: "x", type: "number", description: "Horizontal position", example: "x=100" },
|
|
137
180
|
{ name: "y", type: "number", description: "Vertical position", example: "y=50" },
|
|
138
|
-
{
|
|
181
|
+
{
|
|
182
|
+
name: "position",
|
|
183
|
+
type: "enum",
|
|
184
|
+
values: [
|
|
185
|
+
"left",
|
|
186
|
+
"right",
|
|
187
|
+
"top",
|
|
188
|
+
"bottom",
|
|
189
|
+
"top-left",
|
|
190
|
+
"top-center",
|
|
191
|
+
"top-right",
|
|
192
|
+
"bottom-left",
|
|
193
|
+
"bottom-center",
|
|
194
|
+
"bottom-right"
|
|
195
|
+
],
|
|
196
|
+
description: "Position preset",
|
|
197
|
+
example: "position=left"
|
|
198
|
+
},
|
|
139
199
|
// ============================================
|
|
140
200
|
// Visual Attributes
|
|
141
201
|
// ============================================
|
|
142
202
|
{ name: "border", type: "boolean", description: "Show border", example: "border" },
|
|
143
203
|
{ name: "rounded", type: "boolean", description: "Apply border radius", example: "rounded" },
|
|
144
|
-
{
|
|
145
|
-
|
|
204
|
+
{
|
|
205
|
+
name: "shadow",
|
|
206
|
+
type: "enum",
|
|
207
|
+
values: ["none", "sm", "md", "lg", "xl"],
|
|
208
|
+
description: "Box shadow",
|
|
209
|
+
example: "shadow=md"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "bg",
|
|
213
|
+
type: "enum",
|
|
214
|
+
values: ["muted", "primary", "secondary"],
|
|
215
|
+
description: "Background variant",
|
|
216
|
+
example: "bg=muted"
|
|
217
|
+
},
|
|
146
218
|
// ============================================
|
|
147
219
|
// Text Attributes
|
|
148
220
|
// ============================================
|
|
149
|
-
{
|
|
150
|
-
|
|
221
|
+
{
|
|
222
|
+
name: "size",
|
|
223
|
+
type: "enum",
|
|
224
|
+
values: ["xs", "sm", "base", "md", "lg", "xl", "2xl", "3xl"],
|
|
225
|
+
description: "Size preset",
|
|
226
|
+
example: "size=lg"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "weight",
|
|
230
|
+
type: "enum",
|
|
231
|
+
values: ["normal", "medium", "semibold", "bold"],
|
|
232
|
+
description: "Font weight",
|
|
233
|
+
example: "weight=bold"
|
|
234
|
+
},
|
|
151
235
|
{ name: "level", type: "number", description: "Heading level (1-6)", example: "level=2" },
|
|
152
236
|
{ name: "muted", type: "boolean", description: "Muted/dimmed style", example: "muted" },
|
|
153
237
|
{ name: "bold", type: "boolean", description: "Bold text", example: "bold" },
|
|
@@ -162,12 +246,29 @@ var ATTRIBUTES = [
|
|
|
162
246
|
// ============================================
|
|
163
247
|
// Status Variant Attributes
|
|
164
248
|
// ============================================
|
|
165
|
-
{
|
|
249
|
+
{
|
|
250
|
+
name: "variant",
|
|
251
|
+
type: "enum",
|
|
252
|
+
values: ["default", "primary", "secondary", "success", "warning", "danger", "info"],
|
|
253
|
+
description: "Status variant",
|
|
254
|
+
example: "variant=success"
|
|
255
|
+
},
|
|
166
256
|
// ============================================
|
|
167
257
|
// Form Attributes
|
|
168
258
|
// ============================================
|
|
169
|
-
{
|
|
170
|
-
|
|
259
|
+
{
|
|
260
|
+
name: "inputType",
|
|
261
|
+
type: "enum",
|
|
262
|
+
values: ["text", "email", "password", "number", "tel", "url", "search", "date"],
|
|
263
|
+
description: "Input field type",
|
|
264
|
+
example: "inputType=email"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "placeholder",
|
|
268
|
+
type: "string",
|
|
269
|
+
description: "Placeholder text",
|
|
270
|
+
example: 'placeholder="Enter text"'
|
|
271
|
+
},
|
|
171
272
|
{ name: "value", type: "string", description: "Default value", example: 'value="default"' },
|
|
172
273
|
{ name: "label", type: "string", description: "Field label", example: 'label="Name"' },
|
|
173
274
|
{ name: "name", type: "string", description: "Form field name", example: 'name="field"' },
|
|
@@ -201,7 +302,12 @@ var ATTRIBUTES = [
|
|
|
201
302
|
// Feedback Attributes
|
|
202
303
|
// ============================================
|
|
203
304
|
{ name: "dismissible", type: "boolean", description: "Can be dismissed", example: "dismissible" },
|
|
204
|
-
{
|
|
305
|
+
{
|
|
306
|
+
name: "indeterminate",
|
|
307
|
+
type: "boolean",
|
|
308
|
+
description: "Indeterminate state",
|
|
309
|
+
example: "indeterminate"
|
|
310
|
+
},
|
|
205
311
|
{ name: "pill", type: "boolean", description: "Pill/rounded style", example: "pill" },
|
|
206
312
|
// ============================================
|
|
207
313
|
// Data Attributes
|
|
@@ -214,20 +320,73 @@ var ATTRIBUTES = [
|
|
|
214
320
|
// ============================================
|
|
215
321
|
// Page/Viewport Attributes
|
|
216
322
|
// ============================================
|
|
217
|
-
{
|
|
323
|
+
{
|
|
324
|
+
name: "viewport",
|
|
325
|
+
type: "string",
|
|
326
|
+
description: 'Viewport size (e.g., "1440x900")',
|
|
327
|
+
example: 'viewport="1440x900"'
|
|
328
|
+
},
|
|
218
329
|
{ name: "device", type: "string", description: "Device preset", example: 'device="iphone14"' },
|
|
330
|
+
{
|
|
331
|
+
name: "at",
|
|
332
|
+
type: "function",
|
|
333
|
+
description: "Place page on the multi-page canvas at (x, y) \u2014 pages without at() auto-flow horizontally",
|
|
334
|
+
example: "at(0, 0)"
|
|
335
|
+
},
|
|
219
336
|
// ============================================
|
|
220
337
|
// Interactive Attributes
|
|
221
338
|
// ============================================
|
|
222
|
-
{
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
339
|
+
{
|
|
340
|
+
name: "navigate",
|
|
341
|
+
type: "string",
|
|
342
|
+
description: "Navigation target URL or page",
|
|
343
|
+
example: 'navigate="/dashboard"'
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: "opens",
|
|
347
|
+
type: "string",
|
|
348
|
+
description: "Opens a modal, drawer, or popup",
|
|
349
|
+
example: 'opens="settings-modal"'
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: "toggles",
|
|
353
|
+
type: "string",
|
|
354
|
+
description: "Toggles visibility of an element",
|
|
355
|
+
example: 'toggles="menu"'
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "action",
|
|
359
|
+
type: "string",
|
|
360
|
+
description: "Action identifier for event handling",
|
|
361
|
+
example: 'action="submit-form"'
|
|
362
|
+
},
|
|
226
363
|
// ============================================
|
|
227
364
|
// Annotation Attributes
|
|
228
365
|
// ============================================
|
|
229
|
-
{
|
|
230
|
-
|
|
366
|
+
{
|
|
367
|
+
name: "anchor",
|
|
368
|
+
type: "enum",
|
|
369
|
+
values: [
|
|
370
|
+
"top-left",
|
|
371
|
+
"top-center",
|
|
372
|
+
"top-right",
|
|
373
|
+
"center-left",
|
|
374
|
+
"center",
|
|
375
|
+
"center-right",
|
|
376
|
+
"bottom-left",
|
|
377
|
+
"bottom-center",
|
|
378
|
+
"bottom-right"
|
|
379
|
+
],
|
|
380
|
+
description: "Anchor position for marker in relative container",
|
|
381
|
+
example: "anchor=top-right"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
name: "color",
|
|
385
|
+
type: "enum",
|
|
386
|
+
values: ["blue", "red", "green", "yellow", "purple", "orange"],
|
|
387
|
+
description: "Marker color",
|
|
388
|
+
example: "color=blue"
|
|
389
|
+
}
|
|
231
390
|
];
|
|
232
391
|
var ATTRIBUTE_MAP = new Map(
|
|
233
392
|
ATTRIBUTES.map((attr) => [attr.name, attr])
|
|
@@ -245,10 +404,19 @@ var ALL_COMPONENTS = [
|
|
|
245
404
|
name: "page",
|
|
246
405
|
nodeType: "Page",
|
|
247
406
|
category: "layout",
|
|
248
|
-
attributes: [
|
|
407
|
+
attributes: [
|
|
408
|
+
...COMMON_ATTRIBUTES,
|
|
409
|
+
"title",
|
|
410
|
+
"width",
|
|
411
|
+
"height",
|
|
412
|
+
"viewport",
|
|
413
|
+
"device",
|
|
414
|
+
"centered",
|
|
415
|
+
"at"
|
|
416
|
+
],
|
|
249
417
|
hasChildren: true,
|
|
250
|
-
description: "Root container for a wireframe page",
|
|
251
|
-
example: 'page "
|
|
418
|
+
description: "Root container for a wireframe page. Multiple pages in one .wf file lay out side-by-side on a canvas; use at(x, y) for explicit placement, or omit for auto-flow.",
|
|
419
|
+
example: 'page "Login" at(0, 0) viewport="1280x800" { ... }',
|
|
252
420
|
validChildren: ["header", "main", "footer", "sidebar", "section", "nav", "row", "col", "card"],
|
|
253
421
|
validParents: []
|
|
254
422
|
},
|
|
@@ -416,7 +584,19 @@ var ALL_COMPONENTS = [
|
|
|
416
584
|
name: "input",
|
|
417
585
|
nodeType: "Input",
|
|
418
586
|
category: "input",
|
|
419
|
-
attributes: [
|
|
587
|
+
attributes: [
|
|
588
|
+
...COMMON_ATTRIBUTES,
|
|
589
|
+
"label",
|
|
590
|
+
"inputType",
|
|
591
|
+
"placeholder",
|
|
592
|
+
"value",
|
|
593
|
+
"disabled",
|
|
594
|
+
"required",
|
|
595
|
+
"readonly",
|
|
596
|
+
"icon",
|
|
597
|
+
"size",
|
|
598
|
+
"rounded"
|
|
599
|
+
],
|
|
420
600
|
hasChildren: false,
|
|
421
601
|
description: "Text input field",
|
|
422
602
|
example: 'input "Email" inputType=email placeholder="user@example.com" required'
|
|
@@ -425,7 +605,15 @@ var ALL_COMPONENTS = [
|
|
|
425
605
|
name: "textarea",
|
|
426
606
|
nodeType: "Textarea",
|
|
427
607
|
category: "input",
|
|
428
|
-
attributes: [
|
|
608
|
+
attributes: [
|
|
609
|
+
...COMMON_ATTRIBUTES,
|
|
610
|
+
"label",
|
|
611
|
+
"placeholder",
|
|
612
|
+
"value",
|
|
613
|
+
"rows",
|
|
614
|
+
"disabled",
|
|
615
|
+
"required"
|
|
616
|
+
],
|
|
429
617
|
hasChildren: false,
|
|
430
618
|
description: "Multi-line text input",
|
|
431
619
|
example: 'textarea "Description" rows=4 placeholder="Enter description..."'
|
|
@@ -479,7 +667,18 @@ var ALL_COMPONENTS = [
|
|
|
479
667
|
name: "button",
|
|
480
668
|
nodeType: "Button",
|
|
481
669
|
category: "input",
|
|
482
|
-
attributes: [
|
|
670
|
+
attributes: [
|
|
671
|
+
...COMMON_ATTRIBUTES,
|
|
672
|
+
"primary",
|
|
673
|
+
"secondary",
|
|
674
|
+
"outline",
|
|
675
|
+
"ghost",
|
|
676
|
+
"danger",
|
|
677
|
+
"size",
|
|
678
|
+
"icon",
|
|
679
|
+
"disabled",
|
|
680
|
+
"loading"
|
|
681
|
+
],
|
|
483
682
|
hasChildren: false,
|
|
484
683
|
description: "Clickable button",
|
|
485
684
|
example: 'button "Submit" primary icon=send'
|
|
@@ -859,6 +1058,7 @@ function getAttributeTypeLabel(attr) {
|
|
|
859
1058
|
const preview = attr.values.slice(0, 3).join(" | ");
|
|
860
1059
|
return attr.values.length > 3 ? `${preview}...` : preview;
|
|
861
1060
|
}
|
|
1061
|
+
if (attr.type === "function") return `function (${attr.example})`;
|
|
862
1062
|
return attr.type;
|
|
863
1063
|
}
|
|
864
1064
|
function formatAttributeValues(attr) {
|
|
@@ -868,6 +1068,7 @@ function formatAttributeValues(attr) {
|
|
|
868
1068
|
if (attr.type === "enum" && attr.values) {
|
|
869
1069
|
return `Values: ${attr.values.join(" | ")}`;
|
|
870
1070
|
}
|
|
1071
|
+
if (attr.type === "function") return `Functional shorthand. Example: ${attr.example}`;
|
|
871
1072
|
return `Type: ${attr.type}`;
|
|
872
1073
|
}
|
|
873
1074
|
function isComponent(word) {
|