@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.js
CHANGED
|
@@ -47,7 +47,12 @@ var ATTRIBUTES = [
|
|
|
47
47
|
{ name: "pb", type: "number", description: "Bottom padding", example: "pb=4" },
|
|
48
48
|
{ name: "pl", type: "number", description: "Left padding", example: "pl=4" },
|
|
49
49
|
{ name: "m", type: "number", description: "Margin (all sides)", example: "m=4" },
|
|
50
|
-
{
|
|
50
|
+
{
|
|
51
|
+
name: "mx",
|
|
52
|
+
type: "string",
|
|
53
|
+
description: 'Horizontal margin (number or "auto")',
|
|
54
|
+
example: "mx=auto"
|
|
55
|
+
},
|
|
51
56
|
{ name: "my", type: "number", description: "Vertical margin", example: "my=4" },
|
|
52
57
|
{ name: "mt", type: "number", description: "Top margin", example: "mt=4" },
|
|
53
58
|
{ name: "mr", type: "number", description: "Right margin", example: "mr=4" },
|
|
@@ -57,10 +62,30 @@ var ATTRIBUTES = [
|
|
|
57
62
|
// ============================================
|
|
58
63
|
// Size Attributes
|
|
59
64
|
// ============================================
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
{
|
|
66
|
+
name: "w",
|
|
67
|
+
type: "string",
|
|
68
|
+
description: 'Width (number, "full", "auto", "screen", "fit")',
|
|
69
|
+
example: "w=full"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "h",
|
|
73
|
+
type: "string",
|
|
74
|
+
description: 'Height (number, "full", "auto", "screen")',
|
|
75
|
+
example: "h=full"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "width",
|
|
79
|
+
type: "number",
|
|
80
|
+
description: "Width in pixels (page only)",
|
|
81
|
+
example: "width=400"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "height",
|
|
85
|
+
type: "number",
|
|
86
|
+
description: "Height in pixels (page only)",
|
|
87
|
+
example: "height=300"
|
|
88
|
+
},
|
|
64
89
|
{ name: "minW", type: "number", description: "Minimum width", example: "minW=200" },
|
|
65
90
|
{ name: "maxW", type: "number", description: "Maximum width", example: "maxW=600" },
|
|
66
91
|
{ name: "minH", type: "number", description: "Minimum height", example: "minH=100" },
|
|
@@ -69,9 +94,27 @@ var ATTRIBUTES = [
|
|
|
69
94
|
// Flex/Grid Layout Attributes
|
|
70
95
|
// ============================================
|
|
71
96
|
{ name: "flex", type: "boolean", description: "Enable flexbox", example: "flex" },
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
97
|
+
{
|
|
98
|
+
name: "direction",
|
|
99
|
+
type: "enum",
|
|
100
|
+
values: ["row", "column", "row-reverse", "column-reverse"],
|
|
101
|
+
description: "Flex direction",
|
|
102
|
+
example: "direction=column"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "justify",
|
|
106
|
+
type: "enum",
|
|
107
|
+
values: ["start", "center", "end", "between", "around", "evenly"],
|
|
108
|
+
description: "Main axis alignment",
|
|
109
|
+
example: "justify=center"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "align",
|
|
113
|
+
type: "enum",
|
|
114
|
+
values: ["start", "center", "end", "stretch", "baseline"],
|
|
115
|
+
description: "Cross axis alignment",
|
|
116
|
+
example: "align=center"
|
|
117
|
+
},
|
|
75
118
|
{ name: "wrap", type: "boolean", description: "Enable flex wrap", example: "wrap" },
|
|
76
119
|
{ name: "span", type: "number", description: "Grid column span (1-12)", example: "span=6" },
|
|
77
120
|
{ name: "sm", type: "number", description: "Responsive span at 576px+", example: "sm=6" },
|
|
@@ -84,19 +127,60 @@ var ATTRIBUTES = [
|
|
|
84
127
|
// ============================================
|
|
85
128
|
{ name: "x", type: "number", description: "Horizontal position", example: "x=100" },
|
|
86
129
|
{ name: "y", type: "number", description: "Vertical position", example: "y=50" },
|
|
87
|
-
{
|
|
130
|
+
{
|
|
131
|
+
name: "position",
|
|
132
|
+
type: "enum",
|
|
133
|
+
values: [
|
|
134
|
+
"left",
|
|
135
|
+
"right",
|
|
136
|
+
"top",
|
|
137
|
+
"bottom",
|
|
138
|
+
"top-left",
|
|
139
|
+
"top-center",
|
|
140
|
+
"top-right",
|
|
141
|
+
"bottom-left",
|
|
142
|
+
"bottom-center",
|
|
143
|
+
"bottom-right"
|
|
144
|
+
],
|
|
145
|
+
description: "Position preset",
|
|
146
|
+
example: "position=left"
|
|
147
|
+
},
|
|
88
148
|
// ============================================
|
|
89
149
|
// Visual Attributes
|
|
90
150
|
// ============================================
|
|
91
151
|
{ name: "border", type: "boolean", description: "Show border", example: "border" },
|
|
92
152
|
{ name: "rounded", type: "boolean", description: "Apply border radius", example: "rounded" },
|
|
93
|
-
{
|
|
94
|
-
|
|
153
|
+
{
|
|
154
|
+
name: "shadow",
|
|
155
|
+
type: "enum",
|
|
156
|
+
values: ["none", "sm", "md", "lg", "xl"],
|
|
157
|
+
description: "Box shadow",
|
|
158
|
+
example: "shadow=md"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "bg",
|
|
162
|
+
type: "enum",
|
|
163
|
+
values: ["muted", "primary", "secondary"],
|
|
164
|
+
description: "Background variant",
|
|
165
|
+
example: "bg=muted"
|
|
166
|
+
},
|
|
95
167
|
// ============================================
|
|
96
168
|
// Text Attributes
|
|
97
169
|
// ============================================
|
|
98
|
-
{
|
|
99
|
-
|
|
170
|
+
{
|
|
171
|
+
name: "size",
|
|
172
|
+
type: "enum",
|
|
173
|
+
values: ["xs", "sm", "base", "md", "lg", "xl", "2xl", "3xl"],
|
|
174
|
+
description: "Size preset",
|
|
175
|
+
example: "size=lg"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "weight",
|
|
179
|
+
type: "enum",
|
|
180
|
+
values: ["normal", "medium", "semibold", "bold"],
|
|
181
|
+
description: "Font weight",
|
|
182
|
+
example: "weight=bold"
|
|
183
|
+
},
|
|
100
184
|
{ name: "level", type: "number", description: "Heading level (1-6)", example: "level=2" },
|
|
101
185
|
{ name: "muted", type: "boolean", description: "Muted/dimmed style", example: "muted" },
|
|
102
186
|
{ name: "bold", type: "boolean", description: "Bold text", example: "bold" },
|
|
@@ -111,12 +195,29 @@ var ATTRIBUTES = [
|
|
|
111
195
|
// ============================================
|
|
112
196
|
// Status Variant Attributes
|
|
113
197
|
// ============================================
|
|
114
|
-
{
|
|
198
|
+
{
|
|
199
|
+
name: "variant",
|
|
200
|
+
type: "enum",
|
|
201
|
+
values: ["default", "primary", "secondary", "success", "warning", "danger", "info"],
|
|
202
|
+
description: "Status variant",
|
|
203
|
+
example: "variant=success"
|
|
204
|
+
},
|
|
115
205
|
// ============================================
|
|
116
206
|
// Form Attributes
|
|
117
207
|
// ============================================
|
|
118
|
-
{
|
|
119
|
-
|
|
208
|
+
{
|
|
209
|
+
name: "inputType",
|
|
210
|
+
type: "enum",
|
|
211
|
+
values: ["text", "email", "password", "number", "tel", "url", "search", "date"],
|
|
212
|
+
description: "Input field type",
|
|
213
|
+
example: "inputType=email"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "placeholder",
|
|
217
|
+
type: "string",
|
|
218
|
+
description: "Placeholder text",
|
|
219
|
+
example: 'placeholder="Enter text"'
|
|
220
|
+
},
|
|
120
221
|
{ name: "value", type: "string", description: "Default value", example: 'value="default"' },
|
|
121
222
|
{ name: "label", type: "string", description: "Field label", example: 'label="Name"' },
|
|
122
223
|
{ name: "name", type: "string", description: "Form field name", example: 'name="field"' },
|
|
@@ -150,7 +251,12 @@ var ATTRIBUTES = [
|
|
|
150
251
|
// Feedback Attributes
|
|
151
252
|
// ============================================
|
|
152
253
|
{ name: "dismissible", type: "boolean", description: "Can be dismissed", example: "dismissible" },
|
|
153
|
-
{
|
|
254
|
+
{
|
|
255
|
+
name: "indeterminate",
|
|
256
|
+
type: "boolean",
|
|
257
|
+
description: "Indeterminate state",
|
|
258
|
+
example: "indeterminate"
|
|
259
|
+
},
|
|
154
260
|
{ name: "pill", type: "boolean", description: "Pill/rounded style", example: "pill" },
|
|
155
261
|
// ============================================
|
|
156
262
|
// Data Attributes
|
|
@@ -163,20 +269,73 @@ var ATTRIBUTES = [
|
|
|
163
269
|
// ============================================
|
|
164
270
|
// Page/Viewport Attributes
|
|
165
271
|
// ============================================
|
|
166
|
-
{
|
|
272
|
+
{
|
|
273
|
+
name: "viewport",
|
|
274
|
+
type: "string",
|
|
275
|
+
description: 'Viewport size (e.g., "1440x900")',
|
|
276
|
+
example: 'viewport="1440x900"'
|
|
277
|
+
},
|
|
167
278
|
{ name: "device", type: "string", description: "Device preset", example: 'device="iphone14"' },
|
|
279
|
+
{
|
|
280
|
+
name: "at",
|
|
281
|
+
type: "function",
|
|
282
|
+
description: "Place page on the multi-page canvas at (x, y) \u2014 pages without at() auto-flow horizontally",
|
|
283
|
+
example: "at(0, 0)"
|
|
284
|
+
},
|
|
168
285
|
// ============================================
|
|
169
286
|
// Interactive Attributes
|
|
170
287
|
// ============================================
|
|
171
|
-
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
288
|
+
{
|
|
289
|
+
name: "navigate",
|
|
290
|
+
type: "string",
|
|
291
|
+
description: "Navigation target URL or page",
|
|
292
|
+
example: 'navigate="/dashboard"'
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: "opens",
|
|
296
|
+
type: "string",
|
|
297
|
+
description: "Opens a modal, drawer, or popup",
|
|
298
|
+
example: 'opens="settings-modal"'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "toggles",
|
|
302
|
+
type: "string",
|
|
303
|
+
description: "Toggles visibility of an element",
|
|
304
|
+
example: 'toggles="menu"'
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "action",
|
|
308
|
+
type: "string",
|
|
309
|
+
description: "Action identifier for event handling",
|
|
310
|
+
example: 'action="submit-form"'
|
|
311
|
+
},
|
|
175
312
|
// ============================================
|
|
176
313
|
// Annotation Attributes
|
|
177
314
|
// ============================================
|
|
178
|
-
{
|
|
179
|
-
|
|
315
|
+
{
|
|
316
|
+
name: "anchor",
|
|
317
|
+
type: "enum",
|
|
318
|
+
values: [
|
|
319
|
+
"top-left",
|
|
320
|
+
"top-center",
|
|
321
|
+
"top-right",
|
|
322
|
+
"center-left",
|
|
323
|
+
"center",
|
|
324
|
+
"center-right",
|
|
325
|
+
"bottom-left",
|
|
326
|
+
"bottom-center",
|
|
327
|
+
"bottom-right"
|
|
328
|
+
],
|
|
329
|
+
description: "Anchor position for marker in relative container",
|
|
330
|
+
example: "anchor=top-right"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: "color",
|
|
334
|
+
type: "enum",
|
|
335
|
+
values: ["blue", "red", "green", "yellow", "purple", "orange"],
|
|
336
|
+
description: "Marker color",
|
|
337
|
+
example: "color=blue"
|
|
338
|
+
}
|
|
180
339
|
];
|
|
181
340
|
var ATTRIBUTE_MAP = new Map(
|
|
182
341
|
ATTRIBUTES.map((attr) => [attr.name, attr])
|
|
@@ -194,10 +353,19 @@ var ALL_COMPONENTS = [
|
|
|
194
353
|
name: "page",
|
|
195
354
|
nodeType: "Page",
|
|
196
355
|
category: "layout",
|
|
197
|
-
attributes: [
|
|
356
|
+
attributes: [
|
|
357
|
+
...COMMON_ATTRIBUTES,
|
|
358
|
+
"title",
|
|
359
|
+
"width",
|
|
360
|
+
"height",
|
|
361
|
+
"viewport",
|
|
362
|
+
"device",
|
|
363
|
+
"centered",
|
|
364
|
+
"at"
|
|
365
|
+
],
|
|
198
366
|
hasChildren: true,
|
|
199
|
-
description: "Root container for a wireframe page",
|
|
200
|
-
example: 'page "
|
|
367
|
+
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.",
|
|
368
|
+
example: 'page "Login" at(0, 0) viewport="1280x800" { ... }',
|
|
201
369
|
validChildren: ["header", "main", "footer", "sidebar", "section", "nav", "row", "col", "card"],
|
|
202
370
|
validParents: []
|
|
203
371
|
},
|
|
@@ -365,7 +533,19 @@ var ALL_COMPONENTS = [
|
|
|
365
533
|
name: "input",
|
|
366
534
|
nodeType: "Input",
|
|
367
535
|
category: "input",
|
|
368
|
-
attributes: [
|
|
536
|
+
attributes: [
|
|
537
|
+
...COMMON_ATTRIBUTES,
|
|
538
|
+
"label",
|
|
539
|
+
"inputType",
|
|
540
|
+
"placeholder",
|
|
541
|
+
"value",
|
|
542
|
+
"disabled",
|
|
543
|
+
"required",
|
|
544
|
+
"readonly",
|
|
545
|
+
"icon",
|
|
546
|
+
"size",
|
|
547
|
+
"rounded"
|
|
548
|
+
],
|
|
369
549
|
hasChildren: false,
|
|
370
550
|
description: "Text input field",
|
|
371
551
|
example: 'input "Email" inputType=email placeholder="user@example.com" required'
|
|
@@ -374,7 +554,15 @@ var ALL_COMPONENTS = [
|
|
|
374
554
|
name: "textarea",
|
|
375
555
|
nodeType: "Textarea",
|
|
376
556
|
category: "input",
|
|
377
|
-
attributes: [
|
|
557
|
+
attributes: [
|
|
558
|
+
...COMMON_ATTRIBUTES,
|
|
559
|
+
"label",
|
|
560
|
+
"placeholder",
|
|
561
|
+
"value",
|
|
562
|
+
"rows",
|
|
563
|
+
"disabled",
|
|
564
|
+
"required"
|
|
565
|
+
],
|
|
378
566
|
hasChildren: false,
|
|
379
567
|
description: "Multi-line text input",
|
|
380
568
|
example: 'textarea "Description" rows=4 placeholder="Enter description..."'
|
|
@@ -428,7 +616,18 @@ var ALL_COMPONENTS = [
|
|
|
428
616
|
name: "button",
|
|
429
617
|
nodeType: "Button",
|
|
430
618
|
category: "input",
|
|
431
|
-
attributes: [
|
|
619
|
+
attributes: [
|
|
620
|
+
...COMMON_ATTRIBUTES,
|
|
621
|
+
"primary",
|
|
622
|
+
"secondary",
|
|
623
|
+
"outline",
|
|
624
|
+
"ghost",
|
|
625
|
+
"danger",
|
|
626
|
+
"size",
|
|
627
|
+
"icon",
|
|
628
|
+
"disabled",
|
|
629
|
+
"loading"
|
|
630
|
+
],
|
|
432
631
|
hasChildren: false,
|
|
433
632
|
description: "Clickable button",
|
|
434
633
|
example: 'button "Submit" primary icon=send'
|
|
@@ -808,6 +1007,7 @@ function getAttributeTypeLabel(attr) {
|
|
|
808
1007
|
const preview = attr.values.slice(0, 3).join(" | ");
|
|
809
1008
|
return attr.values.length > 3 ? `${preview}...` : preview;
|
|
810
1009
|
}
|
|
1010
|
+
if (attr.type === "function") return `function (${attr.example})`;
|
|
811
1011
|
return attr.type;
|
|
812
1012
|
}
|
|
813
1013
|
function formatAttributeValues(attr) {
|
|
@@ -817,6 +1017,7 @@ function formatAttributeValues(attr) {
|
|
|
817
1017
|
if (attr.type === "enum" && attr.values) {
|
|
818
1018
|
return `Values: ${attr.values.join(" | ")}`;
|
|
819
1019
|
}
|
|
1020
|
+
if (attr.type === "function") return `Functional shorthand. Example: ${attr.example}`;
|
|
820
1021
|
return `Type: ${attr.type}`;
|
|
821
1022
|
}
|
|
822
1023
|
function isComponent(word) {
|