@pithyjs/vite-plugin 0.1.0-beta.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.
Files changed (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +237 -0
  3. package/dist/aotCodegen/generateBindings.d.ts +184 -0
  4. package/dist/aotCodegen/generateBindings.d.ts.map +1 -0
  5. package/dist/aotCodegen/generateBindings.js +326 -0
  6. package/dist/aotCodegen/generateBindings.js.map +1 -0
  7. package/dist/aotCodegen/generateDomFactory.d.ts +59 -0
  8. package/dist/aotCodegen/generateDomFactory.d.ts.map +1 -0
  9. package/dist/aotCodegen/generateDomFactory.js +302 -0
  10. package/dist/aotCodegen/generateDomFactory.js.map +1 -0
  11. package/dist/aotCodegen/index.d.ts +18 -0
  12. package/dist/aotCodegen/index.d.ts.map +1 -0
  13. package/dist/aotCodegen/index.js +17 -0
  14. package/dist/aotCodegen/index.js.map +1 -0
  15. package/dist/aotCodegen/serializeNode.d.ts +74 -0
  16. package/dist/aotCodegen/serializeNode.d.ts.map +1 -0
  17. package/dist/aotCodegen/serializeNode.js +169 -0
  18. package/dist/aotCodegen/serializeNode.js.map +1 -0
  19. package/dist/aotCodegen/structuralCodegen.d.ts +38 -0
  20. package/dist/aotCodegen/structuralCodegen.d.ts.map +1 -0
  21. package/dist/aotCodegen/structuralCodegen.js +56 -0
  22. package/dist/aotCodegen/structuralCodegen.js.map +1 -0
  23. package/dist/aotCodegen/utils.d.ts +38 -0
  24. package/dist/aotCodegen/utils.d.ts.map +1 -0
  25. package/dist/aotCodegen/utils.js +48 -0
  26. package/dist/aotCodegen/utils.js.map +1 -0
  27. package/dist/babelPlugin/babelPlugin.d.ts +44 -0
  28. package/dist/babelPlugin/babelPlugin.d.ts.map +1 -0
  29. package/dist/babelPlugin/babelPlugin.js +392 -0
  30. package/dist/babelPlugin/babelPlugin.js.map +1 -0
  31. package/dist/babelPlugin/extractOriginalTagNames.d.ts +20 -0
  32. package/dist/babelPlugin/extractOriginalTagNames.d.ts.map +1 -0
  33. package/dist/babelPlugin/extractOriginalTagNames.js +44 -0
  34. package/dist/babelPlugin/extractOriginalTagNames.js.map +1 -0
  35. package/dist/babelPlugin/extractUsedIdentifiers.d.ts +26 -0
  36. package/dist/babelPlugin/extractUsedIdentifiers.d.ts.map +1 -0
  37. package/dist/babelPlugin/extractUsedIdentifiers.js +206 -0
  38. package/dist/babelPlugin/extractUsedIdentifiers.js.map +1 -0
  39. package/dist/buildPlugin/plugin.d.ts +79 -0
  40. package/dist/buildPlugin/plugin.d.ts.map +1 -0
  41. package/dist/buildPlugin/plugin.js +142 -0
  42. package/dist/buildPlugin/plugin.js.map +1 -0
  43. package/dist/designSystemPlugin/collector.d.ts +63 -0
  44. package/dist/designSystemPlugin/collector.d.ts.map +1 -0
  45. package/dist/designSystemPlugin/collector.js +175 -0
  46. package/dist/designSystemPlugin/collector.js.map +1 -0
  47. package/dist/designSystemPlugin/cssTokens.d.ts +34 -0
  48. package/dist/designSystemPlugin/cssTokens.d.ts.map +1 -0
  49. package/dist/designSystemPlugin/cssTokens.js +56 -0
  50. package/dist/designSystemPlugin/cssTokens.js.map +1 -0
  51. package/dist/designSystemPlugin/enumerate.d.ts +24 -0
  52. package/dist/designSystemPlugin/enumerate.d.ts.map +1 -0
  53. package/dist/designSystemPlugin/enumerate.js +430 -0
  54. package/dist/designSystemPlugin/enumerate.js.map +1 -0
  55. package/dist/designSystemPlugin/extractor.d.ts +95 -0
  56. package/dist/designSystemPlugin/extractor.d.ts.map +1 -0
  57. package/dist/designSystemPlugin/extractor.js +150 -0
  58. package/dist/designSystemPlugin/extractor.js.map +1 -0
  59. package/dist/designSystemPlugin/generator.d.ts +33 -0
  60. package/dist/designSystemPlugin/generator.d.ts.map +1 -0
  61. package/dist/designSystemPlugin/generator.js +256 -0
  62. package/dist/designSystemPlugin/generator.js.map +1 -0
  63. package/dist/designSystemPlugin/index.d.ts +18 -0
  64. package/dist/designSystemPlugin/index.d.ts.map +1 -0
  65. package/dist/designSystemPlugin/index.js +19 -0
  66. package/dist/designSystemPlugin/index.js.map +1 -0
  67. package/dist/designSystemPlugin/patterns/a11y.d.ts +19 -0
  68. package/dist/designSystemPlugin/patterns/a11y.d.ts.map +1 -0
  69. package/dist/designSystemPlugin/patterns/a11y.js +230 -0
  70. package/dist/designSystemPlugin/patterns/a11y.js.map +1 -0
  71. package/dist/designSystemPlugin/patterns/borders.d.ts +18 -0
  72. package/dist/designSystemPlugin/patterns/borders.d.ts.map +1 -0
  73. package/dist/designSystemPlugin/patterns/borders.js +474 -0
  74. package/dist/designSystemPlugin/patterns/borders.js.map +1 -0
  75. package/dist/designSystemPlugin/patterns/colors.d.ts +18 -0
  76. package/dist/designSystemPlugin/patterns/colors.d.ts.map +1 -0
  77. package/dist/designSystemPlugin/patterns/colors.js +134 -0
  78. package/dist/designSystemPlugin/patterns/colors.js.map +1 -0
  79. package/dist/designSystemPlugin/patterns/iconography.d.ts +18 -0
  80. package/dist/designSystemPlugin/patterns/iconography.d.ts.map +1 -0
  81. package/dist/designSystemPlugin/patterns/iconography.js +61 -0
  82. package/dist/designSystemPlugin/patterns/iconography.js.map +1 -0
  83. package/dist/designSystemPlugin/patterns/index.d.ts +22 -0
  84. package/dist/designSystemPlugin/patterns/index.d.ts.map +1 -0
  85. package/dist/designSystemPlugin/patterns/index.js +44 -0
  86. package/dist/designSystemPlugin/patterns/index.js.map +1 -0
  87. package/dist/designSystemPlugin/patterns/layout.d.ts +34 -0
  88. package/dist/designSystemPlugin/patterns/layout.d.ts.map +1 -0
  89. package/dist/designSystemPlugin/patterns/layout.js +917 -0
  90. package/dist/designSystemPlugin/patterns/layout.js.map +1 -0
  91. package/dist/designSystemPlugin/patterns/motion.d.ts +19 -0
  92. package/dist/designSystemPlugin/patterns/motion.d.ts.map +1 -0
  93. package/dist/designSystemPlugin/patterns/motion.js +162 -0
  94. package/dist/designSystemPlugin/patterns/motion.js.map +1 -0
  95. package/dist/designSystemPlugin/patterns/radius.d.ts +18 -0
  96. package/dist/designSystemPlugin/patterns/radius.d.ts.map +1 -0
  97. package/dist/designSystemPlugin/patterns/radius.js +107 -0
  98. package/dist/designSystemPlugin/patterns/radius.js.map +1 -0
  99. package/dist/designSystemPlugin/patterns/shadows.d.ts +19 -0
  100. package/dist/designSystemPlugin/patterns/shadows.d.ts.map +1 -0
  101. package/dist/designSystemPlugin/patterns/shadows.js +161 -0
  102. package/dist/designSystemPlugin/patterns/shadows.js.map +1 -0
  103. package/dist/designSystemPlugin/patterns/smartContainer.d.ts +18 -0
  104. package/dist/designSystemPlugin/patterns/smartContainer.d.ts.map +1 -0
  105. package/dist/designSystemPlugin/patterns/smartContainer.js +96 -0
  106. package/dist/designSystemPlugin/patterns/smartContainer.js.map +1 -0
  107. package/dist/designSystemPlugin/patterns/spacing.d.ts +18 -0
  108. package/dist/designSystemPlugin/patterns/spacing.d.ts.map +1 -0
  109. package/dist/designSystemPlugin/patterns/spacing.js +333 -0
  110. package/dist/designSystemPlugin/patterns/spacing.js.map +1 -0
  111. package/dist/designSystemPlugin/patterns/typography.d.ts +18 -0
  112. package/dist/designSystemPlugin/patterns/typography.d.ts.map +1 -0
  113. package/dist/designSystemPlugin/patterns/typography.js +416 -0
  114. package/dist/designSystemPlugin/patterns/typography.js.map +1 -0
  115. package/dist/designSystemPlugin/plugin.d.ts +39 -0
  116. package/dist/designSystemPlugin/plugin.d.ts.map +1 -0
  117. package/dist/designSystemPlugin/plugin.js +351 -0
  118. package/dist/designSystemPlugin/plugin.js.map +1 -0
  119. package/dist/designSystemPlugin/types.d.ts +156 -0
  120. package/dist/designSystemPlugin/types.d.ts.map +1 -0
  121. package/dist/designSystemPlugin/types.js +49 -0
  122. package/dist/designSystemPlugin/types.js.map +1 -0
  123. package/dist/htmlTransform/htmlTransform.d.ts +47 -0
  124. package/dist/htmlTransform/htmlTransform.d.ts.map +1 -0
  125. package/dist/htmlTransform/htmlTransform.js +86 -0
  126. package/dist/htmlTransform/htmlTransform.js.map +1 -0
  127. package/dist/iconsPlugin/index.d.ts +18 -0
  128. package/dist/iconsPlugin/index.d.ts.map +1 -0
  129. package/dist/iconsPlugin/index.js +17 -0
  130. package/dist/iconsPlugin/index.js.map +1 -0
  131. package/dist/iconsPlugin/optimize.d.ts +54 -0
  132. package/dist/iconsPlugin/optimize.d.ts.map +1 -0
  133. package/dist/iconsPlugin/optimize.js +253 -0
  134. package/dist/iconsPlugin/optimize.js.map +1 -0
  135. package/dist/iconsPlugin/plugin.d.ts +49 -0
  136. package/dist/iconsPlugin/plugin.d.ts.map +1 -0
  137. package/dist/iconsPlugin/plugin.js +242 -0
  138. package/dist/iconsPlugin/plugin.js.map +1 -0
  139. package/dist/iconsPlugin/types.d.ts +49 -0
  140. package/dist/iconsPlugin/types.d.ts.map +1 -0
  141. package/dist/iconsPlugin/types.js +30 -0
  142. package/dist/iconsPlugin/types.js.map +1 -0
  143. package/dist/index.d.ts +31 -0
  144. package/dist/index.d.ts.map +1 -0
  145. package/dist/index.js +37 -0
  146. package/dist/index.js.map +1 -0
  147. package/dist/pithyPlugin/plugin.d.ts +38 -0
  148. package/dist/pithyPlugin/plugin.d.ts.map +1 -0
  149. package/dist/pithyPlugin/plugin.js +119 -0
  150. package/dist/pithyPlugin/plugin.js.map +1 -0
  151. package/dist/routerPlugin/manifest.d.ts +33 -0
  152. package/dist/routerPlugin/manifest.d.ts.map +1 -0
  153. package/dist/routerPlugin/manifest.js +223 -0
  154. package/dist/routerPlugin/manifest.js.map +1 -0
  155. package/dist/routerPlugin/plugin.d.ts +51 -0
  156. package/dist/routerPlugin/plugin.d.ts.map +1 -0
  157. package/dist/routerPlugin/plugin.js +164 -0
  158. package/dist/routerPlugin/plugin.js.map +1 -0
  159. package/dist/routerPlugin/scanner.d.ts +69 -0
  160. package/dist/routerPlugin/scanner.d.ts.map +1 -0
  161. package/dist/routerPlugin/scanner.js +290 -0
  162. package/dist/routerPlugin/scanner.js.map +1 -0
  163. package/dist/ssrPlugin/plugin.d.ts +76 -0
  164. package/dist/ssrPlugin/plugin.d.ts.map +1 -0
  165. package/dist/ssrPlugin/plugin.js +439 -0
  166. package/dist/ssrPlugin/plugin.js.map +1 -0
  167. package/package.json +57 -0
@@ -0,0 +1,917 @@
1
+ /** @codex
2
+ {
3
+ "id": "pithy.vite-plugin-design-system.patterns.layout",
4
+ "title": "Layout Utility Patterns",
5
+ "category": "plugin",
6
+ "description": "Layout utility pattern generator for display, flex, and grid properties.",
7
+ "since": "0.0.1",
8
+ "stability": "experimental",
9
+ "testing": {
10
+ "unit": { "required": true, "covered": true, "file": "patterns.test.ts" },
11
+ "integration": { "required": false, "covered": false },
12
+ "e2e": { "required": false, "covered": false }
13
+ }
14
+ }
15
+ */
16
+ import { CONTAINER_BREAKPOINTS } from '../../../../design-system/src/layout';
17
+ // ── Value Maps (matching SCSS config maps) ────────────────────────────
18
+ export const DISPLAY_VALUES = {
19
+ block: 'block',
20
+ inline: 'inline',
21
+ 'inline-block': 'inline-block',
22
+ flex: 'flex',
23
+ 'inline-flex': 'inline-flex',
24
+ grid: 'grid',
25
+ 'inline-grid': 'inline-grid',
26
+ hidden: 'none',
27
+ contents: 'contents',
28
+ };
29
+ export const FLEX_DIRECTION_VALUES = {
30
+ row: 'row',
31
+ 'row-reverse': 'row-reverse',
32
+ col: 'column',
33
+ 'col-reverse': 'column-reverse',
34
+ };
35
+ export const FLEX_WRAP_VALUES = {
36
+ wrap: 'wrap',
37
+ nowrap: 'nowrap',
38
+ 'wrap-reverse': 'wrap-reverse',
39
+ };
40
+ export const JUSTIFY_VALUES = {
41
+ start: 'flex-start',
42
+ end: 'flex-end',
43
+ center: 'center',
44
+ between: 'space-between',
45
+ around: 'space-around',
46
+ evenly: 'space-evenly',
47
+ };
48
+ export const ALIGN_ITEMS_VALUES = {
49
+ start: 'flex-start',
50
+ end: 'flex-end',
51
+ center: 'center',
52
+ baseline: 'baseline',
53
+ stretch: 'stretch',
54
+ };
55
+ export const ALIGN_CONTENT_VALUES = {
56
+ start: 'flex-start',
57
+ end: 'flex-end',
58
+ center: 'center',
59
+ between: 'space-between',
60
+ around: 'space-around',
61
+ evenly: 'space-evenly',
62
+ stretch: 'stretch',
63
+ };
64
+ export const ALIGN_SELF_VALUES = {
65
+ auto: 'auto',
66
+ start: 'flex-start',
67
+ end: 'flex-end',
68
+ center: 'center',
69
+ baseline: 'baseline',
70
+ stretch: 'stretch',
71
+ };
72
+ export const FLEX_SHORTHAND_VALUES = {
73
+ '1': '1 1 0%',
74
+ auto: '1 1 auto',
75
+ initial: '0 1 auto',
76
+ none: 'none',
77
+ };
78
+ export const GRID_FLOW_VALUES = {
79
+ row: 'row',
80
+ col: 'column',
81
+ dense: 'dense',
82
+ 'row-dense': 'row dense',
83
+ 'col-dense': 'column dense',
84
+ };
85
+ export const PLACE_CONTENT_VALUES = {
86
+ start: 'start',
87
+ end: 'end',
88
+ center: 'center',
89
+ between: 'space-between',
90
+ around: 'space-around',
91
+ evenly: 'space-evenly',
92
+ stretch: 'stretch',
93
+ };
94
+ export const PLACE_ITEMS_VALUES = {
95
+ start: 'start',
96
+ end: 'end',
97
+ center: 'center',
98
+ baseline: 'baseline',
99
+ stretch: 'stretch',
100
+ };
101
+ export const PLACE_SELF_VALUES = {
102
+ auto: 'auto',
103
+ start: 'start',
104
+ end: 'end',
105
+ center: 'center',
106
+ stretch: 'stretch',
107
+ };
108
+ export const Z_LAYERS = {
109
+ base: 0,
110
+ raised: 10,
111
+ sticky: 20,
112
+ dropdown: 100,
113
+ popover: 150,
114
+ tooltip: 200,
115
+ toast: 300,
116
+ overlay: 400,
117
+ modal: 500,
118
+ critical: 600,
119
+ };
120
+ export const Z_OFFSETS = {
121
+ below: -1,
122
+ above: 1,
123
+ };
124
+ export const BLUR_LEVELS = {
125
+ none: '0px',
126
+ xs: '2px',
127
+ sm: '4px',
128
+ md: '8px',
129
+ lg: '16px',
130
+ xl: '24px',
131
+ };
132
+ export const CURSOR_VALUES = {
133
+ auto: 'auto',
134
+ default: 'default',
135
+ pointer: 'pointer',
136
+ wait: 'wait',
137
+ text: 'text',
138
+ move: 'move',
139
+ help: 'help',
140
+ 'not-allowed': 'not-allowed',
141
+ none: 'none',
142
+ grab: 'grab',
143
+ grabbing: 'grabbing',
144
+ };
145
+ // ── Pattern helpers ───────────────────────────────────────────────────
146
+ function keysPattern(map) {
147
+ return Object.keys(map).join('|');
148
+ }
149
+ // ── Patterns ──────────────────────────────────────────────────────────
150
+ export const layoutPatterns = [
151
+ // ── Display ─────────────────────────────────────────────
152
+ {
153
+ name: 'display',
154
+ category: 'layout',
155
+ pattern: new RegExp(`^u-(${keysPattern(DISPLAY_VALUES)})$`),
156
+ generate: (className, match) => {
157
+ const name = match[1];
158
+ return `.${className} {
159
+ display: ${DISPLAY_VALUES[name]} !important;
160
+ }`;
161
+ },
162
+ },
163
+ // ── Flex Direction ──────────────────────────────────────
164
+ {
165
+ name: 'flex-direction',
166
+ category: 'layout',
167
+ pattern: new RegExp(`^u-flex-(${keysPattern(FLEX_DIRECTION_VALUES)})$`),
168
+ generate: (className, match) => {
169
+ const dir = match[1];
170
+ return `.${className} {
171
+ flex-direction: ${FLEX_DIRECTION_VALUES[dir]} !important;
172
+ }`;
173
+ },
174
+ },
175
+ // ── Flex Wrap ───────────────────────────────────────────
176
+ {
177
+ name: 'flex-wrap',
178
+ category: 'layout',
179
+ pattern: new RegExp(`^u-flex-(${keysPattern(FLEX_WRAP_VALUES)})$`),
180
+ generate: (className, match) => {
181
+ const wrap = match[1];
182
+ return `.${className} {
183
+ flex-wrap: ${FLEX_WRAP_VALUES[wrap]} !important;
184
+ }`;
185
+ },
186
+ },
187
+ // ── Justify Content ─────────────────────────────────────
188
+ {
189
+ name: 'justify-content',
190
+ category: 'layout',
191
+ pattern: new RegExp(`^u-justify-(${keysPattern(JUSTIFY_VALUES)})$`),
192
+ generate: (className, match) => {
193
+ const value = match[1];
194
+ return `.${className} {
195
+ justify-content: ${JUSTIFY_VALUES[value]} !important;
196
+ }`;
197
+ },
198
+ },
199
+ // ── Align Items ─────────────────────────────────────────
200
+ {
201
+ name: 'align-items',
202
+ category: 'layout',
203
+ pattern: new RegExp(`^u-items-(${keysPattern(ALIGN_ITEMS_VALUES)})$`),
204
+ generate: (className, match) => {
205
+ const value = match[1];
206
+ return `.${className} {
207
+ align-items: ${ALIGN_ITEMS_VALUES[value]} !important;
208
+ }`;
209
+ },
210
+ },
211
+ // ── Align Content ───────────────────────────────────────
212
+ {
213
+ name: 'align-content',
214
+ category: 'layout',
215
+ pattern: new RegExp(`^u-content-(${keysPattern(ALIGN_CONTENT_VALUES)})$`),
216
+ generate: (className, match) => {
217
+ const value = match[1];
218
+ return `.${className} {
219
+ align-content: ${ALIGN_CONTENT_VALUES[value]} !important;
220
+ }`;
221
+ },
222
+ },
223
+ // ── Align Self ──────────────────────────────────────────
224
+ {
225
+ name: 'align-self',
226
+ category: 'layout',
227
+ pattern: new RegExp(`^u-self-(${keysPattern(ALIGN_SELF_VALUES)})$`),
228
+ generate: (className, match) => {
229
+ const value = match[1];
230
+ return `.${className} {
231
+ align-self: ${ALIGN_SELF_VALUES[value]} !important;
232
+ }`;
233
+ },
234
+ },
235
+ // ── Flex Grow / Shrink ──────────────────────────────────
236
+ {
237
+ name: 'flex-grow',
238
+ category: 'layout',
239
+ pattern: /^u-grow$/,
240
+ generate: className => `.${className} {
241
+ flex-grow: 1 !important;
242
+ }`,
243
+ },
244
+ {
245
+ name: 'flex-grow-0',
246
+ category: 'layout',
247
+ pattern: /^u-grow-0$/,
248
+ generate: className => `.${className} {
249
+ flex-grow: 0 !important;
250
+ }`,
251
+ },
252
+ {
253
+ name: 'flex-shrink',
254
+ category: 'layout',
255
+ pattern: /^u-shrink$/,
256
+ generate: className => `.${className} {
257
+ flex-shrink: 1 !important;
258
+ }`,
259
+ },
260
+ {
261
+ name: 'flex-shrink-0',
262
+ category: 'layout',
263
+ pattern: /^u-shrink-0$/,
264
+ generate: className => `.${className} {
265
+ flex-shrink: 0 !important;
266
+ }`,
267
+ },
268
+ // ── Flex Basis ──────────────────────────────────────────
269
+ {
270
+ name: 'flex-basis',
271
+ category: 'layout',
272
+ pattern: /^u-basis-(auto|0|full)$/,
273
+ generate: (className, match) => {
274
+ const value = match[1] === 'full' ? '100%' : match[1];
275
+ return `.${className} {
276
+ flex-basis: ${value} !important;
277
+ }`;
278
+ },
279
+ },
280
+ // ── Flex Shorthand ──────────────────────────────────────
281
+ {
282
+ name: 'flex-shorthand',
283
+ category: 'layout',
284
+ pattern: new RegExp(`^u-flex-(${keysPattern(FLEX_SHORTHAND_VALUES)})$`),
285
+ generate: (className, match) => {
286
+ const name = match[1];
287
+ return `.${className} {
288
+ flex: ${FLEX_SHORTHAND_VALUES[name]} !important;
289
+ }`;
290
+ },
291
+ },
292
+ // ── Grid Template Columns (1-12, none) ──────────────────
293
+ {
294
+ name: 'grid-cols',
295
+ category: 'layout',
296
+ pattern: /^u-grid-cols-(\d+)$/,
297
+ generate: (className, match) => {
298
+ const n = parseInt(match[1], 10);
299
+ if (n < 1 || n > 12)
300
+ return null;
301
+ return `.${className} {
302
+ grid-template-columns: repeat(${n}, minmax(0, 1fr)) !important;
303
+ }`;
304
+ },
305
+ },
306
+ {
307
+ name: 'grid-cols-none',
308
+ category: 'layout',
309
+ pattern: /^u-grid-cols-none$/,
310
+ generate: className => `.${className} {
311
+ grid-template-columns: none !important;
312
+ }`,
313
+ },
314
+ // ── Container Type ───────────────────────────────────────
315
+ {
316
+ name: 'container-inline',
317
+ category: 'layout',
318
+ pattern: /^u-container-inline$/,
319
+ generate: className => `.${className} {
320
+ container-type: inline-size !important;
321
+ }`,
322
+ },
323
+ // ── Auto-fit / Auto-fill ─────────────────────────────────
324
+ {
325
+ name: 'grid-auto-fit',
326
+ category: 'layout',
327
+ pattern: /^u-grid-auto-fit$/,
328
+ generate: className => `.${className} {
329
+ grid-template-columns: repeat(auto-fit, minmax(var(--grid-auto-min, 200px), 1fr)) !important;
330
+ }`,
331
+ },
332
+ {
333
+ name: 'grid-auto-fill',
334
+ category: 'layout',
335
+ pattern: /^u-grid-auto-fill$/,
336
+ generate: className => `.${className} {
337
+ grid-template-columns: repeat(auto-fill, minmax(var(--grid-auto-min, 200px), 1fr)) !important;
338
+ }`,
339
+ },
340
+ // ── Responsive Container-Query Column Patterns ───────────
341
+ ...Object.entries(CONTAINER_BREAKPOINTS).map(([bp, width]) => ({
342
+ name: `grid-cols-${bp}`,
343
+ category: 'layout',
344
+ pattern: new RegExp(`^u-grid-cols-${bp}-(\\d+)$`),
345
+ generate: (className, match) => {
346
+ const n = parseInt(match[1], 10);
347
+ if (n < 1 || n > 12)
348
+ return null;
349
+ return `@container (min-width: ${width}) {
350
+ .${className} {
351
+ grid-template-columns: repeat(${n}, minmax(0, 1fr)) !important;
352
+ }
353
+ }`;
354
+ },
355
+ })),
356
+ // ── Column Span (1-12, full, auto) ──────────────────────
357
+ {
358
+ name: 'col-span',
359
+ category: 'layout',
360
+ pattern: /^u-col-span-(\d+)$/,
361
+ generate: (className, match) => {
362
+ const n = parseInt(match[1], 10);
363
+ if (n < 1 || n > 12)
364
+ return null;
365
+ return `.${className} {
366
+ grid-column: span ${n} / span ${n} !important;
367
+ }`;
368
+ },
369
+ },
370
+ {
371
+ name: 'col-span-full',
372
+ category: 'layout',
373
+ pattern: /^u-col-span-full$/,
374
+ generate: className => `.${className} {
375
+ grid-column: 1 / -1 !important;
376
+ }`,
377
+ },
378
+ {
379
+ name: 'col-auto',
380
+ category: 'layout',
381
+ pattern: /^u-col-auto$/,
382
+ generate: className => `.${className} {
383
+ grid-column: auto !important;
384
+ }`,
385
+ },
386
+ // ── Column Start / End (1-13, auto) ─────────────────────
387
+ {
388
+ name: 'col-start',
389
+ category: 'layout',
390
+ pattern: /^u-col-start-(\d+)$/,
391
+ generate: (className, match) => {
392
+ const n = parseInt(match[1], 10);
393
+ if (n < 1 || n > 13)
394
+ return null;
395
+ return `.${className} {
396
+ grid-column-start: ${n} !important;
397
+ }`;
398
+ },
399
+ },
400
+ {
401
+ name: 'col-end',
402
+ category: 'layout',
403
+ pattern: /^u-col-end-(\d+)$/,
404
+ generate: (className, match) => {
405
+ const n = parseInt(match[1], 10);
406
+ if (n < 1 || n > 13)
407
+ return null;
408
+ return `.${className} {
409
+ grid-column-end: ${n} !important;
410
+ }`;
411
+ },
412
+ },
413
+ {
414
+ name: 'col-start-auto',
415
+ category: 'layout',
416
+ pattern: /^u-col-start-auto$/,
417
+ generate: className => `.${className} {
418
+ grid-column-start: auto !important;
419
+ }`,
420
+ },
421
+ {
422
+ name: 'col-end-auto',
423
+ category: 'layout',
424
+ pattern: /^u-col-end-auto$/,
425
+ generate: className => `.${className} {
426
+ grid-column-end: auto !important;
427
+ }`,
428
+ },
429
+ // ── Grid Template Rows (1-6, none) ──────────────────────
430
+ {
431
+ name: 'grid-rows',
432
+ category: 'layout',
433
+ pattern: /^u-grid-rows-(\d+)$/,
434
+ generate: (className, match) => {
435
+ const n = parseInt(match[1], 10);
436
+ if (n < 1 || n > 6)
437
+ return null;
438
+ return `.${className} {
439
+ grid-template-rows: repeat(${n}, minmax(0, 1fr)) !important;
440
+ }`;
441
+ },
442
+ },
443
+ {
444
+ name: 'grid-rows-none',
445
+ category: 'layout',
446
+ pattern: /^u-grid-rows-none$/,
447
+ generate: className => `.${className} {
448
+ grid-template-rows: none !important;
449
+ }`,
450
+ },
451
+ // ── Row Span (1-6, full, auto) ──────────────────────────
452
+ {
453
+ name: 'row-span',
454
+ category: 'layout',
455
+ pattern: /^u-row-span-(\d+)$/,
456
+ generate: (className, match) => {
457
+ const n = parseInt(match[1], 10);
458
+ if (n < 1 || n > 6)
459
+ return null;
460
+ return `.${className} {
461
+ grid-row: span ${n} / span ${n} !important;
462
+ }`;
463
+ },
464
+ },
465
+ {
466
+ name: 'row-span-full',
467
+ category: 'layout',
468
+ pattern: /^u-row-span-full$/,
469
+ generate: className => `.${className} {
470
+ grid-row: 1 / -1 !important;
471
+ }`,
472
+ },
473
+ {
474
+ name: 'row-auto',
475
+ category: 'layout',
476
+ pattern: /^u-row-auto$/,
477
+ generate: className => `.${className} {
478
+ grid-row: auto !important;
479
+ }`,
480
+ },
481
+ // ── Row Start / End (1-7, auto) ─────────────────────────
482
+ {
483
+ name: 'row-start',
484
+ category: 'layout',
485
+ pattern: /^u-row-start-(\d+)$/,
486
+ generate: (className, match) => {
487
+ const n = parseInt(match[1], 10);
488
+ if (n < 1 || n > 7)
489
+ return null;
490
+ return `.${className} {
491
+ grid-row-start: ${n} !important;
492
+ }`;
493
+ },
494
+ },
495
+ {
496
+ name: 'row-end',
497
+ category: 'layout',
498
+ pattern: /^u-row-end-(\d+)$/,
499
+ generate: (className, match) => {
500
+ const n = parseInt(match[1], 10);
501
+ if (n < 1 || n > 7)
502
+ return null;
503
+ return `.${className} {
504
+ grid-row-end: ${n} !important;
505
+ }`;
506
+ },
507
+ },
508
+ {
509
+ name: 'row-start-auto',
510
+ category: 'layout',
511
+ pattern: /^u-row-start-auto$/,
512
+ generate: className => `.${className} {
513
+ grid-row-start: auto !important;
514
+ }`,
515
+ },
516
+ {
517
+ name: 'row-end-auto',
518
+ category: 'layout',
519
+ pattern: /^u-row-end-auto$/,
520
+ generate: className => `.${className} {
521
+ grid-row-end: auto !important;
522
+ }`,
523
+ },
524
+ // ── Grid Auto Flow ──────────────────────────────────────
525
+ {
526
+ name: 'grid-flow',
527
+ category: 'layout',
528
+ pattern: new RegExp(`^u-grid-flow-(${keysPattern(GRID_FLOW_VALUES)})$`),
529
+ generate: (className, match) => {
530
+ const value = match[1];
531
+ return `.${className} {
532
+ grid-auto-flow: ${GRID_FLOW_VALUES[value]} !important;
533
+ }`;
534
+ },
535
+ },
536
+ // ── Place Content ───────────────────────────────────────
537
+ {
538
+ name: 'place-content',
539
+ category: 'layout',
540
+ pattern: new RegExp(`^u-place-content-(${keysPattern(PLACE_CONTENT_VALUES)})$`),
541
+ generate: (className, match) => {
542
+ const value = match[1];
543
+ return `.${className} {
544
+ place-content: ${PLACE_CONTENT_VALUES[value]} !important;
545
+ }`;
546
+ },
547
+ },
548
+ // ── Place Items ─────────────────────────────────────────
549
+ {
550
+ name: 'place-items',
551
+ category: 'layout',
552
+ pattern: new RegExp(`^u-place-items-(${keysPattern(PLACE_ITEMS_VALUES)})$`),
553
+ generate: (className, match) => {
554
+ const value = match[1];
555
+ return `.${className} {
556
+ place-items: ${PLACE_ITEMS_VALUES[value]} !important;
557
+ }`;
558
+ },
559
+ },
560
+ // ── Place Self ──────────────────────────────────────────
561
+ {
562
+ name: 'place-self',
563
+ category: 'layout',
564
+ pattern: new RegExp(`^u-place-self-(${keysPattern(PLACE_SELF_VALUES)})$`),
565
+ generate: (className, match) => {
566
+ const value = match[1];
567
+ return `.${className} {
568
+ place-self: ${PLACE_SELF_VALUES[value]} !important;
569
+ }`;
570
+ },
571
+ },
572
+ // ── Order ───────────────────────────────────────────────
573
+ {
574
+ name: 'order-first',
575
+ category: 'layout',
576
+ pattern: /^u-order-first$/,
577
+ generate: className => `.${className} {
578
+ order: -9999 !important;
579
+ }`,
580
+ },
581
+ {
582
+ name: 'order-last',
583
+ category: 'layout',
584
+ pattern: /^u-order-last$/,
585
+ generate: className => `.${className} {
586
+ order: 9999 !important;
587
+ }`,
588
+ },
589
+ {
590
+ name: 'order-none',
591
+ category: 'layout',
592
+ pattern: /^u-order-none$/,
593
+ generate: className => `.${className} {
594
+ order: 0 !important;
595
+ }`,
596
+ },
597
+ {
598
+ name: 'order-n',
599
+ category: 'layout',
600
+ pattern: /^u-order-(\d+)$/,
601
+ generate: (className, match) => {
602
+ const n = parseInt(match[1], 10);
603
+ if (n < 1 || n > 12)
604
+ return null;
605
+ return `.${className} {
606
+ order: ${n} !important;
607
+ }`;
608
+ },
609
+ },
610
+ // ── Width ───────────────────────────────────────────────
611
+ {
612
+ name: 'w-full',
613
+ category: 'layout',
614
+ pattern: /^u-w-full$/,
615
+ generate: className => `.${className} {
616
+ width: 100% !important;
617
+ }`,
618
+ },
619
+ {
620
+ name: 'w-auto',
621
+ category: 'layout',
622
+ pattern: /^u-w-auto$/,
623
+ generate: className => `.${className} {
624
+ width: auto !important;
625
+ }`,
626
+ },
627
+ {
628
+ name: 'w-screen',
629
+ category: 'layout',
630
+ pattern: /^u-w-screen$/,
631
+ generate: className => `.${className} {
632
+ width: 100vw !important;
633
+ }`,
634
+ },
635
+ {
636
+ name: 'w-min',
637
+ category: 'layout',
638
+ pattern: /^u-w-min$/,
639
+ generate: className => `.${className} {
640
+ width: min-content !important;
641
+ }`,
642
+ },
643
+ {
644
+ name: 'w-max',
645
+ category: 'layout',
646
+ pattern: /^u-w-max$/,
647
+ generate: className => `.${className} {
648
+ width: max-content !important;
649
+ }`,
650
+ },
651
+ {
652
+ name: 'w-fit',
653
+ category: 'layout',
654
+ pattern: /^u-w-fit$/,
655
+ generate: className => `.${className} {
656
+ width: fit-content !important;
657
+ }`,
658
+ },
659
+ // ── Height ──────────────────────────────────────────────
660
+ {
661
+ name: 'h-full',
662
+ category: 'layout',
663
+ pattern: /^u-h-full$/,
664
+ generate: className => `.${className} {
665
+ height: 100% !important;
666
+ }`,
667
+ },
668
+ {
669
+ name: 'h-auto',
670
+ category: 'layout',
671
+ pattern: /^u-h-auto$/,
672
+ generate: className => `.${className} {
673
+ height: auto !important;
674
+ }`,
675
+ },
676
+ {
677
+ name: 'h-screen',
678
+ category: 'layout',
679
+ pattern: /^u-h-screen$/,
680
+ generate: className => `.${className} {
681
+ height: 100vh !important;
682
+ }`,
683
+ },
684
+ {
685
+ name: 'h-min',
686
+ category: 'layout',
687
+ pattern: /^u-h-min$/,
688
+ generate: className => `.${className} {
689
+ height: min-content !important;
690
+ }`,
691
+ },
692
+ {
693
+ name: 'h-max',
694
+ category: 'layout',
695
+ pattern: /^u-h-max$/,
696
+ generate: className => `.${className} {
697
+ height: max-content !important;
698
+ }`,
699
+ },
700
+ {
701
+ name: 'h-fit',
702
+ category: 'layout',
703
+ pattern: /^u-h-fit$/,
704
+ generate: className => `.${className} {
705
+ height: fit-content !important;
706
+ }`,
707
+ },
708
+ // ── Visibility ──────────────────────────────────────────
709
+ {
710
+ name: 'visible',
711
+ category: 'layout',
712
+ pattern: /^u-visible$/,
713
+ generate: className => `.${className} {
714
+ visibility: visible !important;
715
+ }`,
716
+ },
717
+ {
718
+ name: 'invisible',
719
+ category: 'layout',
720
+ pattern: /^u-invisible$/,
721
+ generate: className => `.${className} {
722
+ visibility: hidden !important;
723
+ }`,
724
+ },
725
+ // ── Screen Reader ───────────────────────────────────────
726
+ {
727
+ name: 'sr-only',
728
+ category: 'layout',
729
+ pattern: /^u-sr-only$/,
730
+ generate: className => `.${className} {
731
+ position: absolute !important;
732
+ width: 1px !important;
733
+ height: 1px !important;
734
+ padding: 0 !important;
735
+ margin: -1px !important;
736
+ overflow: hidden !important;
737
+ clip: rect(0, 0, 0, 0) !important;
738
+ white-space: nowrap !important;
739
+ border: 0 !important;
740
+ }`,
741
+ },
742
+ {
743
+ name: 'not-sr-only',
744
+ category: 'layout',
745
+ pattern: /^u-not-sr-only$/,
746
+ generate: className => `.${className} {
747
+ position: static !important;
748
+ width: auto !important;
749
+ height: auto !important;
750
+ padding: 0 !important;
751
+ margin: 0 !important;
752
+ overflow: visible !important;
753
+ clip: auto !important;
754
+ white-space: normal !important;
755
+ }`,
756
+ },
757
+ // ── Layout Patterns ─────────────────────────────────────
758
+ {
759
+ name: 'center',
760
+ category: 'layout',
761
+ pattern: /^u-center$/,
762
+ generate: className => `.${className} {
763
+ display: flex !important;
764
+ align-items: center !important;
765
+ justify-content: center !important;
766
+ }`,
767
+ },
768
+ {
769
+ name: 'vstack',
770
+ category: 'layout',
771
+ pattern: /^u-vstack$/,
772
+ generate: className => `.${className} {
773
+ display: flex !important;
774
+ flex-direction: column !important;
775
+ }`,
776
+ },
777
+ {
778
+ name: 'hstack',
779
+ category: 'layout',
780
+ pattern: /^u-hstack$/,
781
+ generate: className => `.${className} {
782
+ display: flex !important;
783
+ flex-direction: row !important;
784
+ }`,
785
+ },
786
+ {
787
+ name: 'list-reset',
788
+ category: 'layout',
789
+ pattern: /^u-list-reset$/,
790
+ generate: className => `.${className} {
791
+ list-style: none !important;
792
+ margin-block: 0 !important;
793
+ margin-inline: 0 !important;
794
+ padding-block: 0 !important;
795
+ padding-inline: 0 !important;
796
+ }`,
797
+ },
798
+ // ── Cursor ──────────────────────────────────────────────
799
+ {
800
+ name: 'cursor',
801
+ category: 'layout',
802
+ pattern: new RegExp(`^u-cursor-(${keysPattern(CURSOR_VALUES)})$`),
803
+ generate: (className, match) => {
804
+ const value = match[1];
805
+ return `.${className} {
806
+ cursor: ${CURSOR_VALUES[value]} !important;
807
+ }`;
808
+ },
809
+ },
810
+ // ── Pointer Events ──────────────────────────────────────
811
+ {
812
+ name: 'pointer-events',
813
+ category: 'layout',
814
+ pattern: /^u-pointer-events-(none|auto)$/,
815
+ generate: (className, match) => {
816
+ const value = match[1];
817
+ return `.${className} {
818
+ pointer-events: ${value} !important;
819
+ }`;
820
+ },
821
+ },
822
+ // ── User Select ─────────────────────────────────────────
823
+ {
824
+ name: 'user-select',
825
+ category: 'layout',
826
+ pattern: /^u-select-(none|text|all|auto)$/,
827
+ generate: (className, match) => {
828
+ const value = match[1];
829
+ return `.${className} {
830
+ user-select: ${value} !important;
831
+ }`;
832
+ },
833
+ },
834
+ // ── Z-Index Layers ───────────────────────────────────────
835
+ {
836
+ name: 'z-layer',
837
+ category: 'layout',
838
+ pattern: new RegExp(`^u-z-(${keysPattern(Z_LAYERS)})$`),
839
+ generate: (className, match) => {
840
+ const layer = match[1];
841
+ return `.${className} {
842
+ z-index: var(--z-${layer}) !important;
843
+ }`;
844
+ },
845
+ },
846
+ {
847
+ name: 'z-offset',
848
+ category: 'layout',
849
+ pattern: new RegExp(`^u-z-(${keysPattern(Z_OFFSETS)})$`),
850
+ generate: (className, match) => {
851
+ const offset = match[1];
852
+ return `.${className} {
853
+ z-index: var(--z-${offset}) !important;
854
+ }`;
855
+ },
856
+ },
857
+ {
858
+ name: 'isolate',
859
+ category: 'layout',
860
+ pattern: /^u-isolate$/,
861
+ generate: className => `.${className} {
862
+ isolation: isolate !important;
863
+ }`,
864
+ },
865
+ // ── Blur ─────────────────────────────────────────────────
866
+ {
867
+ name: 'blur',
868
+ category: 'layout',
869
+ pattern: new RegExp(`^u-blur-(${keysPattern(BLUR_LEVELS)})$`),
870
+ generate: (className, match) => {
871
+ const level = match[1];
872
+ return `.${className} {
873
+ backdrop-filter: blur(var(--blur-${level})) !important;
874
+ -webkit-backdrop-filter: blur(var(--blur-${level})) !important;
875
+ }`;
876
+ },
877
+ },
878
+ {
879
+ name: 'blur-backdrop',
880
+ category: 'layout',
881
+ pattern: /^u-blur-backdrop$/,
882
+ generate: className => `.${className} {
883
+ backdrop-filter: blur(var(--blur-backdrop)) !important;
884
+ -webkit-backdrop-filter: blur(var(--blur-backdrop)) !important;
885
+ }`,
886
+ },
887
+ {
888
+ name: 'blur-glass',
889
+ category: 'layout',
890
+ pattern: /^u-blur-glass$/,
891
+ generate: className => `.${className} {
892
+ backdrop-filter: blur(var(--blur-glass)) !important;
893
+ -webkit-backdrop-filter: blur(var(--blur-glass)) !important;
894
+ }`,
895
+ },
896
+ {
897
+ name: 'content-blur',
898
+ category: 'layout',
899
+ pattern: /^u-content-blur$/,
900
+ generate: className => `.${className} {
901
+ filter: blur(var(--blur-content)) !important;
902
+ }`,
903
+ },
904
+ // ── Overflow ──────────────────────────────────────────────
905
+ {
906
+ name: 'overflow',
907
+ category: 'layout',
908
+ pattern: /^u-overflow-(hidden|visible|auto|scroll|clip)$/,
909
+ generate: (className, match) => {
910
+ const value = match[1];
911
+ return `.${className} {
912
+ overflow: ${value} !important;
913
+ }`;
914
+ },
915
+ },
916
+ ];
917
+ //# sourceMappingURL=layout.js.map