winui-svelte 0.0.1 → 0.0.2

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 (170) hide show
  1. package/README.md +5 -1
  2. package/dist/bindings/.dynwinrt-js-types +1333 -51
  3. package/dist/bindings/.dynwinrt-managed +1 -1
  4. package/dist/bindings/index.d.ts +95 -1
  5. package/dist/bindings/index.js +146 -2
  6. package/dist/bindings/index.mjs +4437 -4293
  7. package/dist/bindings/index.proxy.js +73 -1
  8. package/dist/components/generated/controls/AnimatedVisualPlayer.svelte.d.ts +2 -0
  9. package/dist/components/generated/controls/AnimatedVisualPlayer.svelte.d.ts.map +1 -1
  10. package/dist/components/generated/controls/AnimatedVisualPlayer.svelte.js.map +1 -1
  11. package/dist/components/generated/controls/Block.svelte.d.ts +6 -0
  12. package/dist/components/generated/controls/Block.svelte.d.ts.map +1 -1
  13. package/dist/components/generated/controls/Block.svelte.js.map +1 -1
  14. package/dist/components/generated/controls/Border.svelte.d.ts +6 -0
  15. package/dist/components/generated/controls/Border.svelte.d.ts.map +1 -1
  16. package/dist/components/generated/controls/Border.svelte.js.map +1 -1
  17. package/dist/components/generated/controls/ContentPresenter.svelte.d.ts +19 -1
  18. package/dist/components/generated/controls/ContentPresenter.svelte.d.ts.map +1 -1
  19. package/dist/components/generated/controls/ContentPresenter.svelte.js.map +1 -1
  20. package/dist/components/generated/controls/Control.svelte.d.ts +12 -0
  21. package/dist/components/generated/controls/Control.svelte.d.ts.map +1 -1
  22. package/dist/components/generated/controls/Control.svelte.js.map +1 -1
  23. package/dist/components/generated/controls/EllipseGeometry.svelte.d.ts +4 -0
  24. package/dist/components/generated/controls/EllipseGeometry.svelte.d.ts.map +1 -1
  25. package/dist/components/generated/controls/EllipseGeometry.svelte.js.map +1 -1
  26. package/dist/components/generated/controls/FrameworkElement.svelte.d.ts +10 -0
  27. package/dist/components/generated/controls/FrameworkElement.svelte.d.ts.map +1 -1
  28. package/dist/components/generated/controls/FrameworkElement.svelte.js.map +1 -1
  29. package/dist/components/generated/controls/Glyphs.svelte.d.ts +2 -0
  30. package/dist/components/generated/controls/Glyphs.svelte.d.ts.map +1 -1
  31. package/dist/components/generated/controls/Glyphs.svelte.js.map +1 -1
  32. package/dist/components/generated/controls/Grid.svelte.d.ts +6 -0
  33. package/dist/components/generated/controls/Grid.svelte.d.ts.map +1 -1
  34. package/dist/components/generated/controls/Grid.svelte.js.map +1 -1
  35. package/dist/components/generated/controls/Hyperlink.svelte.d.ts +2 -0
  36. package/dist/components/generated/controls/Hyperlink.svelte.d.ts.map +1 -1
  37. package/dist/components/generated/controls/Hyperlink.svelte.js.map +1 -1
  38. package/dist/components/generated/controls/Image.svelte.d.ts +2 -0
  39. package/dist/components/generated/controls/Image.svelte.d.ts.map +1 -1
  40. package/dist/components/generated/controls/Image.svelte.js.map +1 -1
  41. package/dist/components/generated/controls/ItemsPresenter.svelte.d.ts +2 -0
  42. package/dist/components/generated/controls/ItemsPresenter.svelte.d.ts.map +1 -1
  43. package/dist/components/generated/controls/ItemsPresenter.svelte.js.map +1 -1
  44. package/dist/components/generated/controls/LinedFlowLayout.svelte.d.ts +2 -0
  45. package/dist/components/generated/controls/LinedFlowLayout.svelte.d.ts.map +1 -1
  46. package/dist/components/generated/controls/LinedFlowLayout.svelte.js.map +1 -1
  47. package/dist/components/generated/controls/MediaPlayerElement.svelte.d.ts +2 -0
  48. package/dist/components/generated/controls/MediaPlayerElement.svelte.d.ts.map +1 -1
  49. package/dist/components/generated/controls/MediaPlayerElement.svelte.js.map +1 -1
  50. package/dist/components/generated/controls/MediaPlayerPresenter.svelte.d.ts +2 -0
  51. package/dist/components/generated/controls/MediaPlayerPresenter.svelte.d.ts.map +1 -1
  52. package/dist/components/generated/controls/MediaPlayerPresenter.svelte.js.map +1 -1
  53. package/dist/components/generated/controls/RadialGradientBrush.svelte.d.ts +4 -0
  54. package/dist/components/generated/controls/RadialGradientBrush.svelte.d.ts.map +1 -1
  55. package/dist/components/generated/controls/RadialGradientBrush.svelte.js.map +1 -1
  56. package/dist/components/generated/controls/Rectangle.svelte.d.ts +4 -0
  57. package/dist/components/generated/controls/Rectangle.svelte.d.ts.map +1 -1
  58. package/dist/components/generated/controls/Rectangle.svelte.js.map +1 -1
  59. package/dist/components/generated/controls/RelativePanel.svelte.d.ts +6 -0
  60. package/dist/components/generated/controls/RelativePanel.svelte.d.ts.map +1 -1
  61. package/dist/components/generated/controls/RelativePanel.svelte.js.map +1 -1
  62. package/dist/components/generated/controls/RichEditBox.svelte.d.ts +1 -1
  63. package/dist/components/generated/controls/RichTextBlock.svelte.d.ts +14 -2
  64. package/dist/components/generated/controls/RichTextBlock.svelte.d.ts.map +1 -1
  65. package/dist/components/generated/controls/RichTextBlock.svelte.js.map +1 -1
  66. package/dist/components/generated/controls/RichTextBlockOverflow.svelte.d.ts +4 -0
  67. package/dist/components/generated/controls/RichTextBlockOverflow.svelte.d.ts.map +1 -1
  68. package/dist/components/generated/controls/RichTextBlockOverflow.svelte.js.map +1 -1
  69. package/dist/components/generated/controls/ScrollView.svelte.d.ts +4 -0
  70. package/dist/components/generated/controls/ScrollView.svelte.d.ts.map +1 -1
  71. package/dist/components/generated/controls/ScrollView.svelte.js.map +1 -1
  72. package/dist/components/generated/controls/ScrollViewer.svelte.d.ts +4 -0
  73. package/dist/components/generated/controls/ScrollViewer.svelte.d.ts.map +1 -1
  74. package/dist/components/generated/controls/ScrollViewer.svelte.js.map +1 -1
  75. package/dist/components/generated/controls/Shape.svelte.d.ts +10 -0
  76. package/dist/components/generated/controls/Shape.svelte.d.ts.map +1 -1
  77. package/dist/components/generated/controls/Shape.svelte.js.map +1 -1
  78. package/dist/components/generated/controls/StackPanel.svelte.d.ts +6 -0
  79. package/dist/components/generated/controls/StackPanel.svelte.d.ts.map +1 -1
  80. package/dist/components/generated/controls/StackPanel.svelte.js.map +1 -1
  81. package/dist/components/generated/controls/TextBlock.svelte.d.ts +14 -2
  82. package/dist/components/generated/controls/TextBlock.svelte.d.ts.map +1 -1
  83. package/dist/components/generated/controls/TextBlock.svelte.js.map +1 -1
  84. package/dist/components/generated/controls/TextBox.svelte.d.ts +1 -1
  85. package/dist/components/generated/controls/TextElement.svelte.d.ts +3 -1
  86. package/dist/components/generated/controls/TextElement.svelte.d.ts.map +1 -1
  87. package/dist/components/generated/controls/TextElement.svelte.js.map +1 -1
  88. package/dist/components/generated/controls/TickBar.svelte.d.ts +2 -0
  89. package/dist/components/generated/controls/TickBar.svelte.d.ts.map +1 -1
  90. package/dist/components/generated/controls/TickBar.svelte.js.map +1 -1
  91. package/dist/components/generated/controls/TileBrush.svelte.d.ts +2 -0
  92. package/dist/components/generated/controls/TileBrush.svelte.d.ts.map +1 -1
  93. package/dist/components/generated/controls/TileBrush.svelte.js.map +1 -1
  94. package/dist/components/generated/controls/UIElement.svelte.d.ts +7 -1
  95. package/dist/components/generated/controls/UIElement.svelte.d.ts.map +1 -1
  96. package/dist/components/generated/controls/UIElement.svelte.js.map +1 -1
  97. package/dist/components/generated/controls/Viewbox.svelte.d.ts +2 -0
  98. package/dist/components/generated/controls/Viewbox.svelte.d.ts.map +1 -1
  99. package/dist/components/generated/controls/Viewbox.svelte.js.map +1 -1
  100. package/dist/css/control.d.ts +2 -0
  101. package/dist/css/control.d.ts.map +1 -0
  102. package/dist/css/control.js +5 -0
  103. package/dist/css/control.js.map +1 -0
  104. package/dist/css/shape.d.ts +2 -0
  105. package/dist/css/shape.d.ts.map +1 -0
  106. package/dist/css/shape.js +5 -0
  107. package/dist/css/shape.js.map +1 -0
  108. package/dist/css/translate/lazy-groups.d.ts.map +1 -1
  109. package/dist/css/translate/lazy-groups.js +14 -0
  110. package/dist/css/translate/lazy-groups.js.map +1 -1
  111. package/dist/css/translate/shape-properties.d.ts +24 -0
  112. package/dist/css/translate/shape-properties.d.ts.map +1 -0
  113. package/dist/css/translate/shape-properties.js +207 -0
  114. package/dist/css/translate/shape-properties.js.map +1 -0
  115. package/dist/css/translate/text-control-properties.d.ts +21 -0
  116. package/dist/css/translate/text-control-properties.d.ts.map +1 -0
  117. package/dist/css/translate/text-control-properties.js +120 -0
  118. package/dist/css/translate/text-control-properties.js.map +1 -0
  119. package/dist/css/translate/unsupported-properties.d.ts.map +1 -1
  120. package/dist/css/translate/unsupported-properties.js +2 -0
  121. package/dist/css/translate/unsupported-properties.js.map +1 -1
  122. package/dist/css/validate/vscode-css-data.json +370 -0
  123. package/dist/css/validate/vscode-data.d.ts +2 -1
  124. package/dist/css/validate/vscode-data.d.ts.map +1 -1
  125. package/dist/css/validate/vscode-data.js +31 -1
  126. package/dist/css/validate/vscode-data.js.map +1 -1
  127. package/package.json +9 -1
  128. package/src/components/generated/controls/AnimatedVisualPlayer.svelte.ts +2 -0
  129. package/src/components/generated/controls/Block.svelte.ts +6 -0
  130. package/src/components/generated/controls/Border.svelte.ts +6 -0
  131. package/src/components/generated/controls/ContentPresenter.svelte.ts +19 -1
  132. package/src/components/generated/controls/Control.svelte.ts +12 -0
  133. package/src/components/generated/controls/EllipseGeometry.svelte.ts +4 -0
  134. package/src/components/generated/controls/FrameworkElement.svelte.ts +10 -0
  135. package/src/components/generated/controls/Glyphs.svelte.ts +2 -0
  136. package/src/components/generated/controls/Grid.svelte.ts +6 -0
  137. package/src/components/generated/controls/Hyperlink.svelte.ts +2 -0
  138. package/src/components/generated/controls/Image.svelte.ts +2 -0
  139. package/src/components/generated/controls/ItemsPresenter.svelte.ts +2 -0
  140. package/src/components/generated/controls/LinedFlowLayout.svelte.ts +2 -0
  141. package/src/components/generated/controls/MediaPlayerElement.svelte.ts +2 -0
  142. package/src/components/generated/controls/MediaPlayerPresenter.svelte.ts +2 -0
  143. package/src/components/generated/controls/RadialGradientBrush.svelte.ts +4 -0
  144. package/src/components/generated/controls/Rectangle.svelte.ts +4 -0
  145. package/src/components/generated/controls/RelativePanel.svelte.ts +6 -0
  146. package/src/components/generated/controls/RichEditBox.svelte.ts +1 -1
  147. package/src/components/generated/controls/RichTextBlock.svelte.ts +14 -2
  148. package/src/components/generated/controls/RichTextBlockOverflow.svelte.ts +4 -0
  149. package/src/components/generated/controls/ScrollView.svelte.ts +4 -0
  150. package/src/components/generated/controls/ScrollViewer.svelte.ts +4 -0
  151. package/src/components/generated/controls/Shape.svelte.ts +10 -0
  152. package/src/components/generated/controls/StackPanel.svelte.ts +6 -0
  153. package/src/components/generated/controls/TextBlock.svelte.ts +14 -2
  154. package/src/components/generated/controls/TextBox.svelte.ts +1 -1
  155. package/src/components/generated/controls/TextElement.svelte.ts +3 -1
  156. package/src/components/generated/controls/TickBar.svelte.ts +2 -0
  157. package/src/components/generated/controls/TileBrush.svelte.ts +2 -0
  158. package/src/components/generated/controls/UIElement.svelte.ts +7 -1
  159. package/src/components/generated/controls/Viewbox.svelte.ts +2 -0
  160. package/src/css/API.md +32 -0
  161. package/src/css/control.ts +5 -0
  162. package/src/css/shape.ts +5 -0
  163. package/src/css/translate/lazy-groups.ts +14 -0
  164. package/src/css/translate/shape-properties.ts +250 -0
  165. package/src/css/translate/text-control-properties.ts +135 -0
  166. package/src/css/translate/unsupported-properties.ts +2 -0
  167. package/src/css/validate/vscode-data.ts +38 -1
  168. package/web-types.json +460 -90
  169. package/dist/bindings/microsoft/ui/xaml/controls/SwapChainBackgroundPanel.d.ts +0 -731
  170. package/dist/bindings/microsoft/ui/xaml/controls/SwapChainBackgroundPanel.js +0 -2806
@@ -116,6 +116,376 @@
116
116
  }
117
117
  ]
118
118
  },
119
+ {
120
+ "name": "word-break",
121
+ "description": "WinUI: sets TextWrapping; only these keywords are accepted.",
122
+ "values": [
123
+ {
124
+ "name": "normal",
125
+ "description": "TextWrapping: WrapWholeWords"
126
+ },
127
+ {
128
+ "name": "keep-all",
129
+ "description": "TextWrapping: WrapWholeWords"
130
+ },
131
+ {
132
+ "name": "break-all",
133
+ "description": "TextWrapping: Wrap"
134
+ },
135
+ {
136
+ "name": "break-word",
137
+ "description": "TextWrapping: Wrap"
138
+ }
139
+ ]
140
+ },
141
+ {
142
+ "name": "object-fit",
143
+ "description": "WinUI: sets Stretch; only these keywords are accepted.",
144
+ "values": [
145
+ {
146
+ "name": "fill",
147
+ "description": "Stretch: Fill"
148
+ },
149
+ {
150
+ "name": "contain",
151
+ "description": "Stretch: Uniform"
152
+ },
153
+ {
154
+ "name": "cover",
155
+ "description": "Stretch: UniformToFill"
156
+ },
157
+ {
158
+ "name": "none",
159
+ "description": "Stretch: None"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "name": "user-select",
165
+ "description": "WinUI: sets IsTextSelectionEnabled; only these keywords are accepted.",
166
+ "values": [
167
+ {
168
+ "name": "auto",
169
+ "description": "IsTextSelectionEnabled: True"
170
+ },
171
+ {
172
+ "name": "text",
173
+ "description": "IsTextSelectionEnabled: True"
174
+ },
175
+ {
176
+ "name": "all",
177
+ "description": "IsTextSelectionEnabled: True"
178
+ },
179
+ {
180
+ "name": "contain",
181
+ "description": "IsTextSelectionEnabled: True"
182
+ },
183
+ {
184
+ "name": "none",
185
+ "description": "IsTextSelectionEnabled: False"
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "name": "font-style",
191
+ "description": "WinUI: sets FontStyle; only these keywords are accepted.",
192
+ "values": [
193
+ {
194
+ "name": "normal",
195
+ "description": "FontStyle: Normal"
196
+ },
197
+ {
198
+ "name": "italic",
199
+ "description": "FontStyle: Italic"
200
+ },
201
+ {
202
+ "name": "oblique",
203
+ "description": "FontStyle: Oblique"
204
+ }
205
+ ]
206
+ },
207
+ {
208
+ "name": "text-align",
209
+ "description": "WinUI: sets TextAlignment; only these keywords are accepted.",
210
+ "values": [
211
+ {
212
+ "name": "left",
213
+ "description": "TextAlignment: Left"
214
+ },
215
+ {
216
+ "name": "start",
217
+ "description": "TextAlignment: Left"
218
+ },
219
+ {
220
+ "name": "center",
221
+ "description": "TextAlignment: Center"
222
+ },
223
+ {
224
+ "name": "right",
225
+ "description": "TextAlignment: Right"
226
+ },
227
+ {
228
+ "name": "end",
229
+ "description": "TextAlignment: Right"
230
+ },
231
+ {
232
+ "name": "justify",
233
+ "description": "TextAlignment: Justify"
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "name": "text-wrap",
239
+ "description": "WinUI: sets TextWrapping; only these keywords are accepted.",
240
+ "values": [
241
+ {
242
+ "name": "wrap",
243
+ "description": "TextWrapping: Wrap"
244
+ },
245
+ {
246
+ "name": "nowrap",
247
+ "description": "TextWrapping: NoWrap"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "name": "white-space",
253
+ "description": "WinUI: sets TextWrapping; only these keywords are accepted.",
254
+ "values": [
255
+ {
256
+ "name": "normal",
257
+ "description": "TextWrapping: Wrap"
258
+ },
259
+ {
260
+ "name": "nowrap",
261
+ "description": "TextWrapping: NoWrap"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "name": "text-overflow",
267
+ "description": "WinUI: sets TextTrimming; only these keywords are accepted.",
268
+ "values": [
269
+ {
270
+ "name": "ellipsis",
271
+ "description": "TextTrimming: CharacterEllipsis"
272
+ },
273
+ {
274
+ "name": "clip",
275
+ "description": "TextTrimming: Clip"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "name": "text-decoration",
281
+ "description": "WinUI: sets TextDecorations; only these keywords are accepted.",
282
+ "values": [
283
+ {
284
+ "name": "none",
285
+ "description": "TextDecorations: None"
286
+ },
287
+ {
288
+ "name": "underline",
289
+ "description": "TextDecorations: Underline"
290
+ },
291
+ {
292
+ "name": "line-through",
293
+ "description": "TextDecorations: Strikethrough"
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "name": "text-decoration-line",
299
+ "description": "WinUI: sets TextDecorations; only these keywords are accepted.",
300
+ "values": [
301
+ {
302
+ "name": "none",
303
+ "description": "TextDecorations: None"
304
+ },
305
+ {
306
+ "name": "underline",
307
+ "description": "TextDecorations: Underline"
308
+ },
309
+ {
310
+ "name": "line-through",
311
+ "description": "TextDecorations: Strikethrough"
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "name": "flex-direction",
317
+ "description": "WinUI: sets Orientation; only these keywords are accepted.",
318
+ "values": [
319
+ {
320
+ "name": "row",
321
+ "description": "Orientation: Horizontal"
322
+ },
323
+ {
324
+ "name": "column",
325
+ "description": "Orientation: Vertical"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "name": "visibility",
331
+ "description": "WinUI: sets Visibility; only these keywords are accepted.",
332
+ "values": [
333
+ {
334
+ "name": "visible",
335
+ "description": "Visibility: Visible"
336
+ },
337
+ {
338
+ "name": "hidden",
339
+ "description": "Visibility: Collapsed"
340
+ },
341
+ {
342
+ "name": "collapse",
343
+ "description": "Visibility: Collapsed"
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "name": "pointer-events",
349
+ "description": "WinUI: sets IsHitTestVisible; only these keywords are accepted.",
350
+ "values": [
351
+ {
352
+ "name": "none",
353
+ "description": "IsHitTestVisible: False"
354
+ },
355
+ {
356
+ "name": "auto",
357
+ "description": "IsHitTestVisible: True"
358
+ },
359
+ {
360
+ "name": "all",
361
+ "description": "IsHitTestVisible: True"
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "name": "color-scheme",
367
+ "description": "WinUI: sets RequestedTheme; only these keywords are accepted.",
368
+ "values": [
369
+ {
370
+ "name": "normal",
371
+ "description": "RequestedTheme: Default"
372
+ },
373
+ {
374
+ "name": "light",
375
+ "description": "RequestedTheme: Light"
376
+ },
377
+ {
378
+ "name": "dark",
379
+ "description": "RequestedTheme: Dark"
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "name": "display",
385
+ "description": "WinUI: sets Visibility; only these keywords are accepted.",
386
+ "values": [
387
+ {
388
+ "name": "none",
389
+ "description": "Visibility: Collapsed"
390
+ },
391
+ {
392
+ "name": "block",
393
+ "description": "Visibility: Visible"
394
+ },
395
+ {
396
+ "name": "inline",
397
+ "description": "Visibility: Visible"
398
+ },
399
+ {
400
+ "name": "inline-block",
401
+ "description": "Visibility: Visible"
402
+ },
403
+ {
404
+ "name": "flex",
405
+ "description": "Visibility: Visible"
406
+ },
407
+ {
408
+ "name": "inline-flex",
409
+ "description": "Visibility: Visible"
410
+ },
411
+ {
412
+ "name": "grid",
413
+ "description": "Visibility: Visible"
414
+ },
415
+ {
416
+ "name": "inline-grid",
417
+ "description": "Visibility: Visible"
418
+ },
419
+ {
420
+ "name": "contents",
421
+ "description": "Visibility: Visible"
422
+ }
423
+ ]
424
+ },
425
+ {
426
+ "name": "font-stretch",
427
+ "description": "WinUI: sets FontStretch; only these keywords are accepted.",
428
+ "values": [
429
+ {
430
+ "name": "ultra-condensed",
431
+ "description": "FontStretch: UltraCondensed"
432
+ },
433
+ {
434
+ "name": "extra-condensed",
435
+ "description": "FontStretch: ExtraCondensed"
436
+ },
437
+ {
438
+ "name": "condensed",
439
+ "description": "FontStretch: Condensed"
440
+ },
441
+ {
442
+ "name": "semi-condensed",
443
+ "description": "FontStretch: SemiCondensed"
444
+ },
445
+ {
446
+ "name": "normal",
447
+ "description": "FontStretch: Normal"
448
+ },
449
+ {
450
+ "name": "semi-expanded",
451
+ "description": "FontStretch: SemiExpanded"
452
+ },
453
+ {
454
+ "name": "expanded",
455
+ "description": "FontStretch: Expanded"
456
+ },
457
+ {
458
+ "name": "extra-expanded",
459
+ "description": "FontStretch: ExtraExpanded"
460
+ },
461
+ {
462
+ "name": "ultra-expanded",
463
+ "description": "FontStretch: UltraExpanded"
464
+ }
465
+ ]
466
+ },
467
+ {
468
+ "name": "direction",
469
+ "description": "WinUI: sets FlowDirection; only these keywords are accepted.",
470
+ "values": [
471
+ {
472
+ "name": "ltr",
473
+ "description": "FlowDirection: LeftToRight"
474
+ },
475
+ {
476
+ "name": "rtl",
477
+ "description": "FlowDirection: RightToLeft"
478
+ }
479
+ ]
480
+ },
481
+ {
482
+ "name": "align-items",
483
+ "description": "WinUI: on a stack panel or grid the build lowers it into the children (each child's align-self or justify-self, or spacer tracks), so it applies to a container written in the component, outside an @media."
484
+ },
485
+ {
486
+ "name": "justify-content",
487
+ "description": "WinUI: on a stack panel or grid the build lowers it into the children (each child's align-self or justify-self, or spacer tracks), so it applies to a container written in the component, outside an @media."
488
+ },
119
489
  {
120
490
  "name": "grid-template-columns",
121
491
  "description": "WinUI: a track is auto, a length or an fr size, and they mix freely; repeat(N, ...) is expanded when building. No WinUI equivalent: repeat(auto-fill|auto-fit, ...), subgrid, masonry, named lines and % tracks (the editor's diagnostics say what to write instead)."
@@ -2,7 +2,8 @@
2
2
  * The VS Code custom data (`css.customData`) for WinUI's CSS dialect, built
3
3
  * from the same tables the translation and the validator read: the `-winui-*`
4
4
  * properties an editor's own CSS checker does not know, and what WinUI allows
5
- * for the properties it limits (grid tracks, units). Written to
5
+ * for the properties it limits (grid tracks, units, the keywords of a property
6
+ * that takes a fixed set). Written to
6
7
  * `vscode-css-data.json` by `scripts/css/export-vscode-css-data.ts`.
7
8
  */
8
9
  export declare function vscodeCssData(): {
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-data.d.ts","sourceRoot":"","sources":["../../../src/css/validate/vscode-data.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,aAAa;;;;;;;;;;;;EA0B5B"}
1
+ {"version":3,"file":"vscode-data.d.ts","sourceRoot":"","sources":["../../../src/css/validate/vscode-data.ts"],"names":[],"mappings":"AAoCA;;;;;;;GAOG;AACH,wBAAgB,aAAa;;;;;;;;;;;;EAuC5B"}
@@ -1,17 +1,34 @@
1
1
  import { FONT_FAMILY_NAMES } from "../../components/font-family-name.js";
2
2
  import { LENGTH_UNITS, LengthUnitKind } from "../parse/units.js";
3
+ import { DISCRETE_MEMBERS, discretePropertyOf, discreteValueOf, discreteWordsOf } from "../translate/discrete-properties.js";
3
4
  import { GRID_TRACK_PROPERTIES } from "../translate/grid-track-verdicts.js";
5
+ import { CONTROL_KEYWORDS } from "../translate/text-control-properties.js";
4
6
  import { WINUI_ONLY_PROPERTIES } from "../translate/winui-only-properties.js";
5
7
  const CUSTOM_DATA_VERSION = 1.1;
6
8
  function unitsOf(kind) {
7
9
  return [...LENGTH_UNITS].filter(([, unit]) => unit.kind === kind).map(([name]) => name);
8
10
  }
9
11
  const TRACK_DESCRIPTION = "WinUI: a track is auto, a length or an fr size, and they mix freely; repeat(N, ...) is expanded when building. No WinUI equivalent: repeat(auto-fill|auto-fit, ...), subgrid, masonry, named lines and % tracks (the editor's diagnostics say what to write instead).";
12
+ const LAYOUT_ALIGNMENT_DESCRIPTION = "WinUI: on a stack panel or grid the build lowers it into the children (each child's align-self or justify-self, or spacer tracks), so it applies to a container written in the component, outside an @media.";
13
+ function discreteProperty(member) {
14
+ return {
15
+ name: member,
16
+ description: `WinUI: sets ${discretePropertyOf(member)}; only these keywords are accepted.`,
17
+ values: discreteWordsOf(member).map(word => ({
18
+ name: word,
19
+ description: `${discretePropertyOf(member)}: ${discreteValueOf({
20
+ member,
21
+ word
22
+ })}`
23
+ }))
24
+ };
25
+ }
10
26
  /**
11
27
  * The VS Code custom data (`css.customData`) for WinUI's CSS dialect, built
12
28
  * from the same tables the translation and the validator read: the `-winui-*`
13
29
  * properties an editor's own CSS checker does not know, and what WinUI allows
14
- * for the properties it limits (grid tracks, units). Written to
30
+ * for the properties it limits (grid tracks, units, the keywords of a property
31
+ * that takes a fixed set). Written to
15
32
  * `vscode-css-data.json` by `scripts/css/export-vscode-css-data.ts`.
16
33
  */
17
34
  export function vscodeCssData() {
@@ -34,6 +51,19 @@ export function vscodeCssData() {
34
51
  name: `"${name}"`
35
52
  }))
36
53
  },
54
+ ...DISCRETE_MEMBERS.map(discreteProperty),
55
+ ...[...CONTROL_KEYWORDS].map(([member, spec]) => ({
56
+ name: member,
57
+ description: `WinUI: sets ${spec.property}; only these keywords are accepted.`,
58
+ values: [...spec.choices].map(([word, value]) => ({
59
+ name: word,
60
+ description: `${spec.property}: ${value}`
61
+ }))
62
+ })),
63
+ ...["align-items", "justify-content"].map(name => ({
64
+ name,
65
+ description: LAYOUT_ALIGNMENT_DESCRIPTION
66
+ })),
37
67
  ...[...GRID_TRACK_PROPERTIES].map(name => ({
38
68
  name,
39
69
  description: TRACK_DESCRIPTION
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-data.js","sourceRoot":"","sources":["../../../src/css/validate/vscode-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,SAAS,OAAO,CAAC,IAAoB;IACnC,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,iBAAiB,GAAG,uQAAuQ,CAAC;AAElS;;;;;;GAMG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,KAAK,GAAG;QACZ,uBAAuB,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QACnE,2DAA2D,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;KAC7G,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACZ,OAAO;QACL,OAAO,EAAE,mBAAmB;QAC5B,UAAU,EAAE;YACV,GAAG,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBACxC,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,WAAW,EAAE,QAAQ,CAAC,MAAM,KAAK,UAAU,CA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,IAAI,CAAC,EAAE,CAAC,CAAC;oBACrC,IAAI,EAAE,IAAI,IAAI,GAAG;iBAClB,CAAC,CAAC;aACJ;YACD,GAAG,gBAAgB,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACzC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;gBAChD,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,eAAe,IAAI,CAAC,QAAQ,qCAAqC;gBAC9E,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;oBAChD,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;iBAC1C,CAAC,CAAC;aACJ,CAAC,CAAC;YACH,GAAG,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACjD,IAAI;gBACJ,WAAW,EAAE,4BAA4B;aAC1C,CAAC,CAAC;YACH,GAAG,CAAC,GAAG,qBAAqB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACzC,IAAI;gBACJ,WAAW,EAAE,iBAAiB;aAC/B,CAAC,CAAC;SACJ;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "winui-svelte",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "web-types": "./web-types.json",
5
5
  "description": "WinUI 3 controls as Svelte components: native Windows apps in Svelte, for Tauri, Electron or Node",
6
6
  "keywords": [
@@ -175,6 +175,14 @@
175
175
  "types": "./dist/css/filter.d.ts",
176
176
  "default": "./dist/css/filter.js"
177
177
  },
178
+ "./css/control": {
179
+ "types": "./dist/css/control.d.ts",
180
+ "default": "./dist/css/control.js"
181
+ },
182
+ "./css/shape": {
183
+ "types": "./dist/css/shape.d.ts",
184
+ "default": "./dist/css/shape.js"
185
+ },
178
186
  "./css/cursor": {
179
187
  "types": "./dist/css/cursor.d.ts",
180
188
  "default": "./dist/css/cursor.js"
@@ -49,6 +49,8 @@ export interface AnimatedVisualPlayerProps extends FrameworkElementProps {
49
49
  /**
50
50
  * Gets or sets a value that describes how an animated visual should be stretched to fill the destination rectangle.
51
51
  *
52
+ * Also settable in CSS as `object-fit`
53
+ *
52
54
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.animatedvisualplayer.stretch
53
55
  */
54
56
  stretch?: EnumInput<typeof Stretch>;
@@ -23,18 +23,24 @@ export interface BlockProps extends TextElementProps {
23
23
  /**
24
24
  * Gets or sets the height of each line of content. The pixel height of each line as modified by LineStackingStrategy. A value of 0 indicates that the line height is determined automatically from the current font characteristics. The default is 0.
25
25
  *
26
+ * Also settable in CSS as `line-height`
27
+ *
26
28
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.documents.block.lineheight
27
29
  */
28
30
  lineHeight?: number;
29
31
  /**
30
32
  * Gets or sets a value that indicates how a line box is determined for each line of text in the Block.
31
33
  *
34
+ * Also settable in CSS as `line-height`
35
+ *
32
36
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.documents.block.linestackingstrategy
33
37
  */
34
38
  lineStackingStrategy?: EnumInput<typeof LineStackingStrategy>;
35
39
  /**
36
40
  * Gets or sets the amount of space around a Block element.
37
41
  *
42
+ * Also settable in CSS as `margin`
43
+ *
38
44
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.documents.block.margin
39
45
  */
40
46
  margin?: ThicknessInput;
@@ -68,6 +68,8 @@ export interface BorderProps extends FrameworkElementProps {
68
68
  /**
69
69
  * Gets or sets the thickness of the border. The thickness of the border, in pixels. The default is 0 on all four sides.
70
70
  *
71
+ * Also settable in CSS as `border-width`
72
+ *
71
73
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.border.borderthickness
72
74
  */
73
75
  borderThickness?: ThicknessInput;
@@ -80,12 +82,16 @@ export interface BorderProps extends FrameworkElementProps {
80
82
  /**
81
83
  * Gets or sets the radius for the corners of the border. The degree to which the corners are rounded, expressed as values of the CornerRadius structure.
82
84
  *
85
+ * Also settable in CSS as `border-radius`
86
+ *
83
87
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.border.cornerradius
84
88
  */
85
89
  cornerRadius?: CornerRadiusInput;
86
90
  /**
87
91
  * Gets or sets the distance between the border and its child object. The dimensions of the space between the border and its child as a Thickness value. Thickness is a structure that stores dimension values using pixel measures.
88
92
  *
93
+ * Also settable in CSS as `padding`
94
+ *
89
95
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.border.padding
90
96
  */
91
97
  padding?: ThicknessInput;
@@ -90,6 +90,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
90
90
  /**
91
91
  * Gets or sets the border thickness of the content presenter. The border thickness of the content presenter, as a Thickness value.
92
92
  *
93
+ * Also settable in CSS as `border-width`
94
+ *
93
95
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.borderthickness
94
96
  */
95
97
  borderThickness?: ThicknessInput;
@@ -124,6 +126,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
124
126
  /**
125
127
  * Gets or sets the radius for the corners of the content presenter's border. The degree to which the corners are rounded, expressed as values of the CornerRadius structure.
126
128
  *
129
+ * Also settable in CSS as `border-radius`
130
+ *
127
131
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.cornerradius
128
132
  */
129
133
  cornerRadius?: CornerRadiusInput;
@@ -148,6 +152,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
148
152
  /**
149
153
  * Gets or sets the font stretch for the text content presented by the ContentPresenter. The requested font stretch, as a FontStretch constant. The default is Normal.
150
154
  *
155
+ * Also settable in CSS as `font-stretch`
156
+ *
151
157
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.fontstretch
152
158
  */
153
159
  fontStretch?: EnumInput<typeof FontStretch>;
@@ -182,6 +188,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
182
188
  /**
183
189
  * Gets or sets the horizontal alignment of the content. One of the HorizontalAlignment values.
184
190
  *
191
+ * Also settable in CSS as `justify-content`
192
+ *
185
193
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.horizontalcontentalignment
186
194
  */
187
195
  horizontalContentAlignment?: EnumInput<typeof HorizontalAlignment>;
@@ -194,18 +202,24 @@ export interface ContentPresenterProps extends FrameworkElementProps {
194
202
  /**
195
203
  * Gets or sets the height of each line of text content presented by the ContentPresenter. The height in pixels of each line of text content. A value of 0 indicates that the line height is determined automatically from the current font characteristics. The default is 0.
196
204
  *
205
+ * Also settable in CSS as `line-height`
206
+ *
197
207
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.lineheight
198
208
  */
199
209
  lineHeight?: number;
200
210
  /**
201
211
  * Gets or sets a value that indicates how a line box is determined for each line of text.
202
212
  *
213
+ * Also settable in CSS as `line-height`
214
+ *
203
215
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.linestackingstrategy
204
216
  */
205
217
  lineStackingStrategy?: EnumInput<typeof LineStackingStrategy>;
206
218
  /**
207
219
  * Gets or sets the maximum lines of text shown. The maximum lines of text shown. The default is 0, which is a special value that represents "Auto" behavior. The value cannot be negative.
208
220
  *
221
+ * Also settable in CSS as `line-clamp`
222
+ *
209
223
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.maxlines
210
224
  */
211
225
  maxLines?: number;
@@ -218,6 +232,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
218
232
  /**
219
233
  * Gets or sets the distance between the border and its child object. The dimensions of the space between the border and its child as a Thickness value. Thickness is a structure that stores dimension values using pixel measures.
220
234
  *
235
+ * Also settable in CSS as `padding`
236
+ *
221
237
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.padding
222
238
  */
223
239
  padding?: ThicknessInput;
@@ -230,7 +246,7 @@ export interface ContentPresenterProps extends FrameworkElementProps {
230
246
  /**
231
247
  * Gets or sets how the element wraps text. A value that indicates how the element wraps text. The default is NoWrap.
232
248
  *
233
- * Also settable in CSS as `white-space`
249
+ * Also settable in CSS as `text-wrap`
234
250
  *
235
251
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.textwrapping
236
252
  */
@@ -238,6 +254,8 @@ export interface ContentPresenterProps extends FrameworkElementProps {
238
254
  /**
239
255
  * Gets or sets the vertical alignment of the content. One of the VerticalAlignment values.
240
256
  *
257
+ * Also settable in CSS as `align-items`
258
+ *
241
259
  * @see https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentpresenter.verticalcontentalignment
242
260
  */
243
261
  verticalContentAlignment?: EnumInput<typeof VerticalAlignment>;