@jesscss/plugin-less-compat 2.0.0-alpha.1 → 2.0.0-alpha.10

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 (112) hide show
  1. package/README.md +50 -115
  2. package/lib/index.cjs +342 -0
  3. package/lib/index.d.ts +2 -2
  4. package/lib/index.js +332 -9
  5. package/lib/less-api-bridge.d.ts +85 -0
  6. package/lib/plugin.d.ts +21 -82
  7. package/package.json +14 -19
  8. package/lib/index.js.map +0 -1
  9. package/lib/less-compat-structures.d.ts +0 -108
  10. package/lib/less-compat-structures.js +0 -519
  11. package/lib/less-compat-structures.js.map +0 -1
  12. package/lib/nodes/at-rule.d.ts +0 -6
  13. package/lib/nodes/at-rule.js +0 -72
  14. package/lib/nodes/at-rule.js.map +0 -1
  15. package/lib/nodes/attribute-selector.d.ts +0 -6
  16. package/lib/nodes/attribute-selector.js +0 -54
  17. package/lib/nodes/attribute-selector.js.map +0 -1
  18. package/lib/nodes/call.d.ts +0 -6
  19. package/lib/nodes/call.js +0 -83
  20. package/lib/nodes/call.js.map +0 -1
  21. package/lib/nodes/color.d.ts +0 -6
  22. package/lib/nodes/color.js +0 -57
  23. package/lib/nodes/color.js.map +0 -1
  24. package/lib/nodes/combinator.d.ts +0 -6
  25. package/lib/nodes/combinator.js +0 -34
  26. package/lib/nodes/combinator.js.map +0 -1
  27. package/lib/nodes/comment.d.ts +0 -6
  28. package/lib/nodes/comment.js +0 -41
  29. package/lib/nodes/comment.js.map +0 -1
  30. package/lib/nodes/condition.d.ts +0 -6
  31. package/lib/nodes/condition.js +0 -60
  32. package/lib/nodes/condition.js.map +0 -1
  33. package/lib/nodes/declaration.d.ts +0 -6
  34. package/lib/nodes/declaration.js +0 -81
  35. package/lib/nodes/declaration.js.map +0 -1
  36. package/lib/nodes/dimension.d.ts +0 -6
  37. package/lib/nodes/dimension.js +0 -47
  38. package/lib/nodes/dimension.js.map +0 -1
  39. package/lib/nodes/expression.d.ts +0 -6
  40. package/lib/nodes/expression.js +0 -44
  41. package/lib/nodes/expression.js.map +0 -1
  42. package/lib/nodes/extend.d.ts +0 -6
  43. package/lib/nodes/extend.js +0 -57
  44. package/lib/nodes/extend.js.map +0 -1
  45. package/lib/nodes/import.d.ts +0 -6
  46. package/lib/nodes/import.js +0 -63
  47. package/lib/nodes/import.js.map +0 -1
  48. package/lib/nodes/index.d.ts +0 -45
  49. package/lib/nodes/index.js +0 -308
  50. package/lib/nodes/index.js.map +0 -1
  51. package/lib/nodes/keyword.d.ts +0 -6
  52. package/lib/nodes/keyword.js +0 -36
  53. package/lib/nodes/keyword.js.map +0 -1
  54. package/lib/nodes/list.d.ts +0 -6
  55. package/lib/nodes/list.js +0 -150
  56. package/lib/nodes/list.js.map +0 -1
  57. package/lib/nodes/mixin.d.ts +0 -6
  58. package/lib/nodes/mixin.js +0 -62
  59. package/lib/nodes/mixin.js.map +0 -1
  60. package/lib/nodes/negative.d.ts +0 -6
  61. package/lib/nodes/negative.js +0 -42
  62. package/lib/nodes/negative.js.map +0 -1
  63. package/lib/nodes/operation.d.ts +0 -6
  64. package/lib/nodes/operation.js +0 -63
  65. package/lib/nodes/operation.js.map +0 -1
  66. package/lib/nodes/paren.d.ts +0 -6
  67. package/lib/nodes/paren.js +0 -42
  68. package/lib/nodes/paren.js.map +0 -1
  69. package/lib/nodes/quoted.d.ts +0 -6
  70. package/lib/nodes/quoted.js +0 -57
  71. package/lib/nodes/quoted.js.map +0 -1
  72. package/lib/nodes/reference.d.ts +0 -9
  73. package/lib/nodes/reference.js +0 -80
  74. package/lib/nodes/reference.js.map +0 -1
  75. package/lib/nodes/ruleset.d.ts +0 -6
  76. package/lib/nodes/ruleset.js +0 -108
  77. package/lib/nodes/ruleset.js.map +0 -1
  78. package/lib/nodes/selector.d.ts +0 -8
  79. package/lib/nodes/selector.js +0 -226
  80. package/lib/nodes/selector.js.map +0 -1
  81. package/lib/nodes/sequence.d.ts +0 -9
  82. package/lib/nodes/sequence.js +0 -75
  83. package/lib/nodes/sequence.js.map +0 -1
  84. package/lib/nodes/url.d.ts +0 -6
  85. package/lib/nodes/url.js +0 -42
  86. package/lib/nodes/url.js.map +0 -1
  87. package/lib/nodes/var-declaration.d.ts +0 -6
  88. package/lib/nodes/var-declaration.js +0 -60
  89. package/lib/nodes/var-declaration.js.map +0 -1
  90. package/lib/plugin-utils.d.ts +0 -20
  91. package/lib/plugin-utils.js +0 -100
  92. package/lib/plugin-utils.js.map +0 -1
  93. package/lib/plugin.js +0 -1027
  94. package/lib/plugin.js.map +0 -1
  95. package/lib/transform/from-less.d.ts +0 -30
  96. package/lib/transform/from-less.js +0 -170
  97. package/lib/transform/from-less.js.map +0 -1
  98. package/lib/transform/index.d.ts +0 -7
  99. package/lib/transform/index.js +0 -8
  100. package/lib/transform/index.js.map +0 -1
  101. package/lib/transform/proxy.d.ts +0 -32
  102. package/lib/transform/proxy.js +0 -138
  103. package/lib/transform/proxy.js.map +0 -1
  104. package/lib/transform/to-less.d.ts +0 -17
  105. package/lib/transform/to-less.js +0 -128
  106. package/lib/transform/to-less.js.map +0 -1
  107. package/lib/transform/type-map.d.ts +0 -27
  108. package/lib/transform/type-map.js +0 -105
  109. package/lib/transform/type-map.js.map +0 -1
  110. package/lib/types.d.ts +0 -33
  111. package/lib/types.js +0 -5
  112. package/lib/types.js.map +0 -1
@@ -1,108 +0,0 @@
1
- /**
2
- * Minimal Less.js-compatible structures for plugin compatibility
3
- * These are standalone implementations that don't require the actual Less.js library
4
- */
5
- export declare class LessVisitor {
6
- visitor?: any | undefined;
7
- private processingNodes;
8
- constructor(visitor?: any | undefined);
9
- /**
10
- * Visit a node - handles both modern and legacy Less.js node types
11
- * Supports Less.js v2 "Directive" nodes (mapped to AtRule)
12
- *
13
- * In Less.js v2, at-rules were called "Directive" instead of "AtRule".
14
- * For compatibility, we route AtRule nodes to visitDirective() if that method exists,
15
- * allowing v2 plugins to work with modern AtRule nodes.
16
- */
17
- visit(node: any, visitArgs?: any): any;
18
- /**
19
- * Visit array of nodes
20
- */
21
- visitArray(nodes: any[], visitArgs?: any): any[];
22
- /**
23
- * Visit Directive node (Less.js v2 compatibility)
24
- * Maps to AtRule for modern Less.js compatibility
25
- */
26
- visitDirective(node: any, visitArgs?: any): any;
27
- /**
28
- * Visit Rule node (Less.js v2 compatibility)
29
- * Maps to Declaration for modern Less.js compatibility
30
- */
31
- visitRule(node: any, visitArgs?: any): any;
32
- }
33
- /**
34
- * Less.js PluginManager (minimal implementation)
35
- * Plugins use this to register visitors, pre/post processors, etc.
36
- */
37
- export declare class LessPluginManager {
38
- less: any;
39
- newFactory?: boolean | undefined;
40
- visitors: any[];
41
- preProcessors: any[];
42
- postProcessors: any[];
43
- constructor(less: any, newFactory?: boolean | undefined);
44
- /**
45
- * Add a visitor to the manager
46
- */
47
- addVisitor(visitor: any): void;
48
- /**
49
- * Remove a visitor
50
- */
51
- removeVisitor(visitor: any): void;
52
- /**
53
- * Add a pre-processor (runs before parsing)
54
- */
55
- addPreProcessor(preProcessor: any): void;
56
- /**
57
- * Add a post-processor (runs after compilation)
58
- */
59
- addPostProcessor(postProcessor: any): void;
60
- /**
61
- * Get all visitors
62
- */
63
- getVisitors(): any[];
64
- /**
65
- * Get all pre-processors
66
- */
67
- getPreProcessors(): any[];
68
- /**
69
- * Get all post-processors
70
- */
71
- getPostProcessors(): any[];
72
- /**
73
- * Register a plugin (Less.js-compatible API)
74
- * Some plugins use this method instead of install()
75
- */
76
- registerPlugin(plugin: any, _options?: any): void;
77
- }
78
- /**
79
- * Less.js tree constructors (minimal implementations)
80
- * Plugins may access these via functionRegistry.Call, etc.
81
- */
82
- export declare const LessTreeConstructors: Record<string, any>;
83
- /**
84
- * Create a Less.js-compatible mock object
85
- * This provides the minimal structure that plugins expect
86
- */
87
- export declare function createLessMock(functionRegistry: any): {
88
- visitors: {
89
- Visitor: typeof LessVisitor;
90
- };
91
- functions: {
92
- functionRegistry: any;
93
- };
94
- tree: Record<string, any>;
95
- PluginLoader: {
96
- new (): {};
97
- };
98
- dimension(value: number, unit?: string): any;
99
- value(values: any[]): any[];
100
- declaration(name: string, value: any): any;
101
- ruleset(selector: any, rules: any[]): any;
102
- detachedruleset(rulesetLike: any): any;
103
- atrule(name: string, value: any): {
104
- type: string;
105
- name: string;
106
- value: any;
107
- };
108
- };
@@ -1,519 +0,0 @@
1
- /**
2
- * Minimal Less.js-compatible structures for plugin compatibility
3
- * These are standalone implementations that don't require the actual Less.js library
4
- */
5
- /**
6
- * Less.js Visitor base class (minimal implementation)
7
- * Plugins expect this structure to exist
8
- */
9
- import { isLessProxy } from './transform/proxy.js';
10
- export class LessVisitor {
11
- visitor;
12
- // Track nodes being processed to prevent infinite recursion
13
- processingNodes = new WeakSet();
14
- constructor(visitor) {
15
- this.visitor = visitor;
16
- // Some plugins pass a visitor instance
17
- }
18
- /**
19
- * Visit a node - handles both modern and legacy Less.js node types
20
- * Supports Less.js v2 "Directive" nodes (mapped to AtRule)
21
- *
22
- * In Less.js v2, at-rules were called "Directive" instead of "AtRule".
23
- * For compatibility, we route AtRule nodes to visitDirective() if that method exists,
24
- * allowing v2 plugins to work with modern AtRule nodes.
25
- */
26
- visit(node, visitArgs) {
27
- if (!node) {
28
- return node;
29
- }
30
- if (!this.visitor) {
31
- return node;
32
- }
33
- // Prevent infinite recursion - if we're already processing this node, skip
34
- if (this.processingNodes.has(node)) {
35
- return node;
36
- }
37
- // Mark as processing
38
- this.processingNodes.add(node);
39
- // Initialize visitArgs if not provided (Less.js pattern)
40
- const args = visitArgs || { visitDeeper: true };
41
- if (args.visitDeeper === undefined) {
42
- args.visitDeeper = true;
43
- }
44
- const nodeType = node.type;
45
- if (!nodeType || typeof nodeType !== 'string') {
46
- // Fallback to generic visit if no type
47
- if (typeof this.visitor.visit === 'function') {
48
- const result = this.visitor.visit(node, args);
49
- // Traverse children if visitDeeper is true
50
- if (args.visitDeeper && node && node.accept) {
51
- node.accept(this);
52
- }
53
- return result;
54
- }
55
- return node;
56
- }
57
- // Less.js Visitor pattern: look for visit${NodeType} method
58
- // e.g., visitRuleset, visitDeclaration, visitMedia, etc.
59
- const visitMethodName = `visit${nodeType}`;
60
- let result = node;
61
- let visitMethod;
62
- if (typeof this.visitor[visitMethodName] === 'function') {
63
- visitMethod = this.visitor[visitMethodName];
64
- }
65
- else if (nodeType === 'Directive' || nodeType === 'AtRule') {
66
- // Handle Less.js v2 legacy: Directive -> AtRule
67
- // Also handle AtRule -> visitDirective for v2 plugin compatibility
68
- // Check visitDirective first (v2 plugins), then visitAtRule (modern plugins)
69
- if (typeof this.visitor.visitDirective === 'function') {
70
- visitMethod = this.visitor.visitDirective;
71
- }
72
- else if (typeof this.visitor.visitAtRule === 'function') {
73
- visitMethod = this.visitor.visitAtRule;
74
- }
75
- }
76
- else if (nodeType === 'Rule') {
77
- // Handle Less.js v2 legacy: Rule -> Declaration
78
- if (typeof this.visitor.visitRule === 'function') {
79
- visitMethod = this.visitor.visitRule;
80
- }
81
- else if (typeof this.visitor.visitDeclaration === 'function') {
82
- visitMethod = this.visitor.visitDeclaration;
83
- }
84
- }
85
- else if (nodeType === 'Reference') {
86
- // Reference -> Variable mapping
87
- if (typeof this.visitor.visitVariable === 'function') {
88
- visitMethod = this.visitor.visitVariable;
89
- }
90
- else if (typeof this.visitor.visitReference === 'function') {
91
- visitMethod = this.visitor.visitReference;
92
- }
93
- }
94
- // Call the visit method if found
95
- if (visitMethod) {
96
- result = visitMethod.call(this.visitor, node, args);
97
- // If visitor is replacing and returned a new node, use it
98
- if (this.visitor.isReplacing && result !== undefined) {
99
- node = result;
100
- }
101
- }
102
- else if (typeof this.visitor.visit === 'function') {
103
- // Fallback to generic visit method
104
- result = this.visitor.visit(node, args);
105
- if (this.visitor.isReplacing && result !== undefined) {
106
- node = result;
107
- }
108
- }
109
- // Less.js pattern: after calling visit method, traverse children if visitDeeper is true
110
- // This matches Less.js Visitor.visit() behavior
111
- // CRITICAL: Only call accept() on Less proxies, NOT on Jess nodes
112
- // Jess nodes' accept() calls visitor.visit() which would cause infinite recursion
113
- // Less proxies' accept() methods only traverse children, they don't call visitor.visit()
114
- if (args.visitDeeper && node && node.accept) {
115
- const isProxy = isLessProxy(node);
116
- // Only call accept() if this is a Less proxy
117
- // Less proxies have accept() that traverses children without calling visit()
118
- if (isProxy) {
119
- node.accept(this);
120
- }
121
- // If it's not a Less proxy (it's a Jess node), we should NOT call accept()
122
- // because Jess's accept() calls visitor.visit() which would recurse
123
- // Instead, the plugin visitor's visit() method handles Jess node traversal
124
- }
125
- // Note: We keep the node in processingNodes for the entire visitor lifetime
126
- // to prevent re-processing. The WeakSet will be garbage collected when done.
127
- return result;
128
- }
129
- /**
130
- * Visit array of nodes
131
- */
132
- visitArray(nodes, visitArgs) {
133
- if (!nodes) {
134
- return nodes;
135
- }
136
- return nodes.map(node => this.visit(node, visitArgs));
137
- }
138
- /**
139
- * Visit Directive node (Less.js v2 compatibility)
140
- * Maps to AtRule for modern Less.js compatibility
141
- */
142
- visitDirective(node, visitArgs) {
143
- // Convert Directive to AtRule-compatible format
144
- // Less.js v2 used "Directive", modern versions use "AtRule"
145
- if (node && node.type === 'Directive') {
146
- // Try visitDirective first (v2 plugins)
147
- if (this.visitor && typeof this.visitor.visitDirective === 'function') {
148
- return this.visitor.visitDirective(node, visitArgs);
149
- }
150
- // Fallback to visitAtRule (modern plugins)
151
- if (this.visitor && typeof this.visitor.visitAtRule === 'function') {
152
- return this.visitor.visitAtRule(node, visitArgs);
153
- }
154
- }
155
- // Default to regular visit
156
- return this.visit(node, visitArgs);
157
- }
158
- /**
159
- * Visit Rule node (Less.js v2 compatibility)
160
- * Maps to Declaration for modern Less.js compatibility
161
- */
162
- visitRule(node, visitArgs) {
163
- // Convert Rule to Declaration-compatible format
164
- // Less.js v2 used "Rule", modern versions use "Declaration"
165
- if (node && (node.type === 'Rule' || node.type === 'Declaration')) {
166
- // Try visitRule first (v2 plugins)
167
- if (this.visitor && typeof this.visitor.visitRule === 'function') {
168
- return this.visitor.visitRule(node, visitArgs);
169
- }
170
- // Fallback to visitDeclaration (modern plugins)
171
- if (this.visitor && typeof this.visitor.visitDeclaration === 'function') {
172
- return this.visitor.visitDeclaration(node, visitArgs);
173
- }
174
- }
175
- // Default to regular visit
176
- return this.visit(node, visitArgs);
177
- }
178
- }
179
- /**
180
- * Less.js PluginManager (minimal implementation)
181
- * Plugins use this to register visitors, pre/post processors, etc.
182
- */
183
- export class LessPluginManager {
184
- less;
185
- newFactory;
186
- visitors = [];
187
- preProcessors = [];
188
- postProcessors = [];
189
- constructor(less, newFactory) {
190
- this.less = less;
191
- this.newFactory = newFactory;
192
- // Plugins expect this constructor signature
193
- }
194
- /**
195
- * Add a visitor to the manager
196
- */
197
- addVisitor(visitor) {
198
- this.visitors.push(visitor);
199
- }
200
- /**
201
- * Remove a visitor
202
- */
203
- removeVisitor(visitor) {
204
- const index = this.visitors.indexOf(visitor);
205
- if (index > -1) {
206
- this.visitors.splice(index, 1);
207
- }
208
- }
209
- /**
210
- * Add a pre-processor (runs before parsing)
211
- */
212
- addPreProcessor(preProcessor) {
213
- this.preProcessors.push(preProcessor);
214
- }
215
- /**
216
- * Add a post-processor (runs after compilation)
217
- */
218
- addPostProcessor(postProcessor) {
219
- this.postProcessors.push(postProcessor);
220
- }
221
- /**
222
- * Get all visitors
223
- */
224
- getVisitors() {
225
- return this.visitors;
226
- }
227
- /**
228
- * Get all pre-processors
229
- */
230
- getPreProcessors() {
231
- return this.preProcessors;
232
- }
233
- /**
234
- * Get all post-processors
235
- */
236
- getPostProcessors() {
237
- return this.postProcessors;
238
- }
239
- /**
240
- * Register a plugin (Less.js-compatible API)
241
- * Some plugins use this method instead of install()
242
- */
243
- registerPlugin(plugin, _options) {
244
- if (!plugin) {
245
- return;
246
- }
247
- // If plugin has install method, call it first
248
- // The install method may add the visitor itself via addVisitor()
249
- if (typeof plugin.install === 'function') {
250
- plugin.install(this.less, this, this.less.functions.functionRegistry);
251
- }
252
- // If plugin is a visitor and not already added, add it
253
- // Check if it's already in the visitors array to avoid duplicates
254
- const isVisitor = typeof plugin.visit === 'function' || typeof plugin.visitRuleset === 'function';
255
- if (isVisitor && !this.visitors.includes(plugin)) {
256
- this.addVisitor(plugin);
257
- }
258
- }
259
- }
260
- /**
261
- * Less.js tree constructors (minimal implementations)
262
- * Plugins may access these via functionRegistry.Call, etc.
263
- */
264
- export const LessTreeConstructors = {
265
- /**
266
- * Anonymous node constructor
267
- */
268
- Anonymous: function (value, index, fileInfo) {
269
- return {
270
- type: 'Anonymous',
271
- value,
272
- index: index || 0,
273
- fileInfo: fileInfo || {},
274
- accept: function (visitor) {
275
- return visitor.visit(this);
276
- },
277
- toCSS: function () {
278
- return String(value);
279
- }
280
- };
281
- },
282
- /**
283
- * Quoted node constructor
284
- */
285
- Quoted: function (quote, value, escaped, index, fileInfo) {
286
- return {
287
- type: 'Quoted',
288
- quote,
289
- value,
290
- escaped: !!escaped,
291
- index: index || 0,
292
- fileInfo: fileInfo || {},
293
- accept: function (visitor) {
294
- return visitor.visit(this);
295
- },
296
- toCSS: function () {
297
- return `${quote}${String(value)}${quote}`;
298
- }
299
- };
300
- },
301
- /**
302
- * DetachedRuleset node constructor
303
- * Used by some Less.js plugins (e.g. test-data/plugin-tree-nodes.js)
304
- */
305
- DetachedRuleset: function (ruleset) {
306
- return {
307
- type: 'DetachedRuleset',
308
- ruleset,
309
- accept: function (visitor) {
310
- return visitor.visit(this);
311
- }
312
- };
313
- },
314
- /**
315
- * Call node constructor
316
- */
317
- Call: function (name, args, index, fileInfo) {
318
- return {
319
- type: 'Call',
320
- name,
321
- args: args || [],
322
- index: index || 0,
323
- fileInfo: fileInfo || {},
324
- value: null,
325
- accept: function (visitor) {
326
- return visitor.visit(this);
327
- }
328
- };
329
- },
330
- /**
331
- * Variable node constructor
332
- */
333
- Variable: function (name, index, fileInfo) {
334
- return {
335
- type: 'Variable',
336
- name,
337
- index: index || 0,
338
- fileInfo: fileInfo || {},
339
- value: null,
340
- accept: function (visitor) {
341
- return visitor.visit(this);
342
- }
343
- };
344
- },
345
- /**
346
- * VariableCall node constructor
347
- */
348
- VariableCall: function (name, index, fileInfo) {
349
- return {
350
- type: 'VariableCall',
351
- name,
352
- index: index || 0,
353
- fileInfo: fileInfo || {},
354
- value: null,
355
- accept: function (visitor) {
356
- return visitor.visit(this);
357
- }
358
- };
359
- },
360
- /**
361
- * Ruleset node constructor
362
- */
363
- Ruleset: function (selectors, rules, strictImports, visibilityInfo, fileInfo) {
364
- return {
365
- type: 'Ruleset',
366
- selectors: selectors || [],
367
- rules: rules || [],
368
- strictImports,
369
- visibilityInfo,
370
- fileInfo: fileInfo || {},
371
- accept: function (visitor) {
372
- return visitor.visit(this);
373
- }
374
- };
375
- },
376
- /**
377
- * Declaration node constructor
378
- */
379
- Declaration: function (name, value, index, fileInfo, variable, important) {
380
- return {
381
- type: 'Declaration',
382
- name,
383
- value,
384
- index: index || 0,
385
- fileInfo: fileInfo || {},
386
- variable: variable || false,
387
- important: important || '',
388
- accept: function (visitor) {
389
- return visitor.visit(this);
390
- }
391
- };
392
- },
393
- /**
394
- * Dimension node constructor
395
- */
396
- Dimension: function (value, unit) {
397
- return {
398
- type: 'Dimension',
399
- value,
400
- unit: unit || '',
401
- accept: function (visitor) {
402
- return visitor.visit(this);
403
- }
404
- };
405
- },
406
- /**
407
- * Color node constructor
408
- */
409
- Color: function (rgb, alpha) {
410
- return {
411
- type: 'Color',
412
- rgb: rgb || [0, 0, 0],
413
- alpha: alpha !== undefined ? alpha : 1,
414
- accept: function (visitor) {
415
- return visitor.visit(this);
416
- }
417
- };
418
- },
419
- /**
420
- * Directive node constructor (Less.js v2 compatibility)
421
- * In Less.js v2, at-rules were called "Directive" instead of "AtRule"
422
- * This creates an AtRule-compatible node for backward compatibility
423
- */
424
- Directive: function (name, value, rules, index, fileInfo) {
425
- return {
426
- type: 'Directive', // Keep type as 'Directive' for v2 compatibility
427
- name: name || '',
428
- value: value || null,
429
- rules: rules || [],
430
- index: index || 0,
431
- fileInfo: fileInfo || {},
432
- // Less.js v2 Directive had these methods
433
- isCharset: function () {
434
- return this.name === '@charset' || this.name === 'charset';
435
- },
436
- isRulesetLike: function () {
437
- return this.rules && this.rules.length > 0;
438
- },
439
- accept: function (visitor) {
440
- // Map visitDirective to visitAtRule for compatibility
441
- if (visitor.visitDirective) {
442
- return visitor.visitDirective(this);
443
- }
444
- // Fallback to visitAtRule or generic visit
445
- if (visitor.visitAtRule) {
446
- return visitor.visitAtRule(this);
447
- }
448
- return visitor.visit(this);
449
- }
450
- };
451
- },
452
- /**
453
- * Rule node constructor (Less.js v2 compatibility)
454
- * In Less.js v2, declarations were called "Rule" instead of "Declaration"
455
- * This creates a Declaration-compatible node for backward compatibility
456
- */
457
- Rule: function (name, value, important, merge, index, fileInfo, inline, variable) {
458
- return {
459
- type: 'Rule', // Keep type as 'Rule' for v2 compatibility
460
- name: name || '',
461
- value: value || null,
462
- important: important || '',
463
- merge: merge || false,
464
- index: index || 0,
465
- fileInfo: fileInfo || {},
466
- inline: inline || false,
467
- variable: variable !== undefined ? variable : (name && name.charAt && name.charAt(0) === '@'),
468
- accept: function (visitor) {
469
- // Map visitRule to visitDeclaration for compatibility
470
- if (visitor.visitRule) {
471
- return visitor.visitRule(this);
472
- }
473
- // Fallback to visitDeclaration or generic visit
474
- if (visitor.visitDeclaration) {
475
- return visitor.visitDeclaration(this);
476
- }
477
- return visitor.visit(this);
478
- }
479
- };
480
- }
481
- };
482
- /**
483
- * Create a Less.js-compatible mock object
484
- * This provides the minimal structure that plugins expect
485
- */
486
- export function createLessMock(functionRegistry) {
487
- return {
488
- visitors: {
489
- Visitor: LessVisitor
490
- },
491
- functions: {
492
- functionRegistry
493
- },
494
- tree: LessTreeConstructors,
495
- PluginLoader: class {
496
- },
497
- // Minimal Less.js function API used by Less.js test plugins
498
- // These return "Less-like" nodes; Jess-side wrappers convert them as needed.
499
- dimension(value, unit) {
500
- return LessTreeConstructors.Dimension(value, unit);
501
- },
502
- value(values) {
503
- return values;
504
- },
505
- declaration(name, value) {
506
- return LessTreeConstructors.Declaration(name, value);
507
- },
508
- ruleset(selector, rules) {
509
- return LessTreeConstructors.Ruleset([selector], rules);
510
- },
511
- detachedruleset(rulesetLike) {
512
- return LessTreeConstructors.DetachedRuleset(rulesetLike);
513
- },
514
- atrule(name, value) {
515
- return { type: 'AtRule', name, value };
516
- }
517
- };
518
- }
519
- //# sourceMappingURL=less-compat-structures.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"less-compat-structures.js","sourceRoot":"","sources":["../src/less-compat-structures.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,OAAO,WAAW;IAIH;IAHnB,4DAA4D;IACpD,eAAe,GAAG,IAAI,OAAO,EAAO,CAAC;IAE7C,YAAmB,OAAa;QAAb,YAAO,GAAP,OAAO,CAAM;QAC9B,uCAAuC;IACzC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,IAAS,EAAE,SAAe;QAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,2EAA2E;QAC3E,IAAI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE/B,yDAAyD;QACzD,MAAM,IAAI,GAAG,SAAS,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAChD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,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,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,CAAC,QAAa,EAAE,KAAY;YACjC,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC;QACD,eAAe,CAAC,WAAgB;YAC9B,OAAO,oBAAoB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAC3D,CAAC;QACD,MAAM,CAAC,IAAY,EAAE,KAAU;YAC7B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- import { AtRule } from '@jesscss/core';
2
- import type { LessNode } from '../types.js';
3
- /**
4
- * Transform a Jess AtRule to a Less-compatible AtRule
5
- */
6
- export declare function transformAtRuleToLess(jessAtRule: AtRule, cache?: WeakMap<any, any>): LessNode;