@jesscss/core 2.0.0-alpha.4 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +20159 -0
- package/lib/index.d.cts +5993 -0
- package/lib/index.d.cts.map +1 -0
- package/lib/index.d.ts +5992 -21
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +19926 -22
- package/lib/index.js.map +1 -1
- package/package.json +15 -14
- package/src/__tests__/define-function-record.test.ts +58 -0
- package/src/__tests__/define-function-simple.test.ts +55 -0
- package/src/__tests__/define-function-split-sequence.test.ts +547 -0
- package/src/__tests__/define-function-type-parity.test.ts +9 -0
- package/src/__tests__/define-function.test.ts +763 -0
- package/src/__tests__/num-operations.test.ts +91 -0
- package/src/__tests__/safe-parse.test.ts +374 -0
- package/src/context.ts +896 -0
- package/src/conversions.ts +282 -0
- package/src/debug-log.ts +29 -0
- package/src/define-function.ts +1006 -0
- package/src/deprecation.ts +67 -0
- package/src/globals.d.ts +26 -0
- package/src/index.ts +31 -0
- package/src/jess-error.ts +773 -0
- package/src/logger/deprecation-processing.ts +109 -0
- package/src/logger.ts +31 -0
- package/src/plugin.ts +292 -0
- package/src/tree/LOOKUP_CHAINS.md +35 -0
- package/src/tree/README.md +18 -0
- package/src/tree/__tests__/__snapshots__/extend-eval-integration.test.ts.snap +1455 -0
- package/src/tree/__tests__/ampersand.test.ts +382 -0
- package/src/tree/__tests__/at-rule.test.ts +2047 -0
- package/src/tree/__tests__/basic-render.test.ts +212 -0
- package/src/tree/__tests__/block.test.ts +40 -0
- package/src/tree/__tests__/call.test.ts +346 -0
- package/src/tree/__tests__/color.test.ts +537 -0
- package/src/tree/__tests__/condition.test.ts +186 -0
- package/src/tree/__tests__/control.test.ts +564 -0
- package/src/tree/__tests__/declaration.test.ts +253 -0
- package/src/tree/__tests__/dependency-graph.test.ts +177 -0
- package/src/tree/__tests__/detached-rulesets.test.ts +213 -0
- package/src/tree/__tests__/dimension.test.ts +236 -0
- package/src/tree/__tests__/expression.test.ts +73 -0
- package/src/tree/__tests__/ext-node.test.ts +31 -0
- package/src/tree/__tests__/extend-eval-integration.test.ts +1033 -0
- package/src/tree/__tests__/extend-import-style.test.ts +929 -0
- package/src/tree/__tests__/extend-less-fixtures.test.ts +851 -0
- package/src/tree/__tests__/extend-list.test.ts +31 -0
- package/src/tree/__tests__/extend-roots.test.ts +1045 -0
- package/src/tree/__tests__/extend-rules.test.ts +740 -0
- package/src/tree/__tests__/func.test.ts +171 -0
- package/src/tree/__tests__/import-js.test.ts +33 -0
- package/src/tree/__tests__/import-style-test-helpers.ts +56 -0
- package/src/tree/__tests__/import-style.test.ts +1967 -0
- package/src/tree/__tests__/interpolated-reference.test.ts +44 -0
- package/src/tree/__tests__/interpolated.test.ts +41 -0
- package/src/tree/__tests__/list.test.ts +177 -0
- package/src/tree/__tests__/log.test.ts +83 -0
- package/src/tree/__tests__/mixin-recursion.test.ts +639 -0
- package/src/tree/__tests__/mixin.test.ts +2171 -0
- package/src/tree/__tests__/negative.test.ts +45 -0
- package/src/tree/__tests__/nesting-collapse.test.ts +519 -0
- package/src/tree/__tests__/node-flags-perf.test.ts +195 -0
- package/src/tree/__tests__/node-flags.test.ts +410 -0
- package/src/tree/__tests__/node-graph.test.ts +598 -0
- package/src/tree/__tests__/node-mutation.test.ts +182 -0
- package/src/tree/__tests__/operation.test.ts +18 -0
- package/src/tree/__tests__/paren.test.ts +90 -0
- package/src/tree/__tests__/preserve-mode-output.test.ts +50 -0
- package/src/tree/__tests__/quoted.test.ts +72 -0
- package/src/tree/__tests__/range.test.ts +59 -0
- package/src/tree/__tests__/reference.test.ts +743 -0
- package/src/tree/__tests__/rest.test.ts +29 -0
- package/src/tree/__tests__/rules-raw.test.ts +14 -0
- package/src/tree/__tests__/rules.test.ts +1271 -0
- package/src/tree/__tests__/ruleset.test.ts +597 -0
- package/src/tree/__tests__/selector-attr.test.ts +50 -0
- package/src/tree/__tests__/selector-basic.test.ts +44 -0
- package/src/tree/__tests__/selector-capture.test.ts +22 -0
- package/src/tree/__tests__/selector-complex.test.ts +120 -0
- package/src/tree/__tests__/selector-compound.test.ts +74 -0
- package/src/tree/__tests__/selector-interpolated.test.ts +50 -0
- package/src/tree/__tests__/selector-list.test.ts +59 -0
- package/src/tree/__tests__/selector-pseudo.test.ts +23 -0
- package/src/tree/__tests__/selector.test.ts +182 -0
- package/src/tree/__tests__/sequence.test.ts +226 -0
- package/src/tree/__tests__/serialize-types.test.ts +529 -0
- package/src/tree/__tests__/spaced.test.ts +8 -0
- package/src/tree/__tests__/url.test.ts +72 -0
- package/src/tree/__tests__/var-declaration.test.ts +90 -0
- package/src/tree/ampersand.ts +538 -0
- package/src/tree/any.ts +169 -0
- package/src/tree/at-rule.ts +760 -0
- package/src/tree/block.ts +72 -0
- package/src/tree/bool.ts +46 -0
- package/src/tree/call.ts +593 -0
- package/src/tree/collection.ts +52 -0
- package/src/tree/color.ts +629 -0
- package/src/tree/combinator.ts +30 -0
- package/src/tree/comment.ts +36 -0
- package/src/tree/condition.ts +194 -0
- package/src/tree/control.ts +452 -0
- package/src/tree/declaration-custom.ts +56 -0
- package/src/tree/declaration-var.ts +87 -0
- package/src/tree/declaration.ts +742 -0
- package/src/tree/default-guard.ts +35 -0
- package/src/tree/dimension.ts +392 -0
- package/src/tree/expression.ts +97 -0
- package/src/tree/extend-list.ts +51 -0
- package/src/tree/extend.ts +391 -0
- package/src/tree/function.ts +254 -0
- package/src/tree/import-js.ts +130 -0
- package/src/tree/import-style.ts +875 -0
- package/{lib/tree/index.js → src/tree/index.ts} +49 -22
- package/src/tree/interpolated.ts +346 -0
- package/src/tree/js-array.ts +21 -0
- package/src/tree/js-expr.ts +50 -0
- package/src/tree/js-function.ts +31 -0
- package/src/tree/js-object.ts +22 -0
- package/src/tree/list.ts +415 -0
- package/src/tree/log.ts +89 -0
- package/src/tree/mixin.ts +331 -0
- package/src/tree/negative.ts +58 -0
- package/src/tree/nil.ts +57 -0
- package/src/tree/node-base.ts +1716 -0
- package/src/tree/node-type.ts +122 -0
- package/src/tree/node.ts +118 -0
- package/src/tree/number.ts +54 -0
- package/src/tree/operation.ts +187 -0
- package/src/tree/paren.ts +132 -0
- package/src/tree/query-condition.ts +47 -0
- package/src/tree/quoted.ts +119 -0
- package/src/tree/range.ts +101 -0
- package/src/tree/reference.ts +1099 -0
- package/src/tree/rest.ts +55 -0
- package/src/tree/rules-raw.ts +52 -0
- package/src/tree/rules.ts +2896 -0
- package/src/tree/ruleset.ts +1217 -0
- package/src/tree/selector-attr.ts +172 -0
- package/src/tree/selector-basic.ts +75 -0
- package/src/tree/selector-capture.ts +85 -0
- package/src/tree/selector-complex.ts +189 -0
- package/src/tree/selector-compound.ts +205 -0
- package/src/tree/selector-interpolated.ts +95 -0
- package/src/tree/selector-list.ts +245 -0
- package/src/tree/selector-pseudo.ts +173 -0
- package/src/tree/selector-simple.ts +10 -0
- package/src/tree/selector.ts +152 -0
- package/src/tree/sequence.ts +463 -0
- package/src/tree/tree.ts +130 -0
- package/src/tree/url.ts +95 -0
- package/src/tree/util/EXTEND_ARCHITECTURE_ANALYSIS.md +215 -0
- package/src/tree/util/EXTEND_AUDIT.md +233 -0
- package/src/tree/util/EXTEND_BASELINE.md +64 -0
- package/src/tree/util/EXTEND_CALL_GRAPH_ANALYSIS.md +244 -0
- package/src/tree/util/EXTEND_DOCS.md +24 -0
- package/src/tree/util/EXTEND_FINAL_SUMMARY.md +95 -0
- package/src/tree/util/EXTEND_FUNCTION_AUDIT.md +1433 -0
- package/src/tree/util/EXTEND_OPTIMIZATION_PLAN.md +114 -0
- package/src/tree/util/EXTEND_REFACTORING_SUMMARY.md +152 -0
- package/src/tree/util/EXTEND_RULES.md +74 -0
- package/src/tree/util/EXTEND_UNUSED_FUNCTIONS.md +127 -0
- package/src/tree/util/EXTEND_UNUSED_FUNCTIONS_ANALYSIS.md +227 -0
- package/src/tree/util/NODE_COPY_REDUCTION_PLAN.md +12 -0
- package/src/tree/util/__tests__/EXTEND_TEST_INDEX.md +59 -0
- package/src/tree/util/__tests__/OPTIMIZATION-ANALYSIS.md +130 -0
- package/src/tree/util/__tests__/WALK_AND_CONSUME_DESIGN.md +138 -0
- package/src/tree/util/__tests__/_archive/2026-02-09__OPTIMIZATION-ANALYSIS.md +9 -0
- package/src/tree/util/__tests__/_archive/README.md +4 -0
- package/src/tree/util/__tests__/bitset.test.ts +142 -0
- package/src/tree/util/__tests__/debug-log.ts +50 -0
- package/src/tree/util/__tests__/extend-comment-handling.test.ts +187 -0
- package/src/tree/util/__tests__/extend-core-unit.test.ts +941 -0
- package/src/tree/util/__tests__/extend-pipeline-bench.test.ts +154 -0
- package/src/tree/util/__tests__/extend-pipeline-bench.ts +190 -0
- package/src/tree/util/__tests__/fast-reject.test.ts +377 -0
- package/src/tree/util/__tests__/is-node.test.ts +63 -0
- package/src/tree/util/__tests__/list-like.test.ts +63 -0
- package/src/tree/util/__tests__/outputwriter.test.ts +523 -0
- package/src/tree/util/__tests__/print.test.ts +183 -0
- package/src/tree/util/__tests__/process-extends.test.ts +226 -0
- package/src/tree/util/__tests__/process-leading-is.test.ts +205 -0
- package/src/tree/util/__tests__/recursion-helper.test.ts +184 -0
- package/src/tree/util/__tests__/selector-match-unit.test.ts +1427 -0
- package/src/tree/util/__tests__/sourcemap.test.ts +117 -0
- package/src/tree/util/ampersand-template.ts +9 -0
- package/src/tree/util/bitset.ts +194 -0
- package/src/tree/util/calculate.ts +11 -0
- package/src/tree/util/cast.ts +89 -0
- package/src/tree/util/cloning.ts +8 -0
- package/src/tree/util/collections.ts +299 -0
- package/src/tree/util/compare.ts +90 -0
- package/src/tree/util/cursor.ts +171 -0
- package/src/tree/util/extend-core.ts +2139 -0
- package/src/tree/util/extend-roots.ts +1108 -0
- package/src/tree/util/field-helpers.ts +354 -0
- package/src/tree/util/is-node.ts +43 -0
- package/src/tree/util/list-like.ts +93 -0
- package/src/tree/util/mixin-instance-primitives.ts +2020 -0
- package/src/tree/util/print.ts +303 -0
- package/src/tree/util/process-leading-is.ts +421 -0
- package/src/tree/util/recursion-helper.ts +54 -0
- package/src/tree/util/regex.ts +2 -0
- package/src/tree/util/registry-utils.ts +1953 -0
- package/src/tree/util/ruleset-trace.ts +17 -0
- package/src/tree/util/scoped-body-eval.ts +320 -0
- package/src/tree/util/selector-match-core.ts +2005 -0
- package/src/tree/util/selector-utils.ts +757 -0
- package/src/tree/util/serialize-helper.ts +535 -0
- package/src/tree/util/serialize-types.ts +318 -0
- package/src/tree/util/should-operate.ts +78 -0
- package/src/tree/util/sourcemap.ts +37 -0
- package/src/types/config.ts +247 -0
- package/src/types/index.ts +12 -0
- package/{lib/types/modes.d.ts → src/types/modes.ts} +2 -1
- package/src/types.d.ts +9 -0
- package/src/types.ts +68 -0
- package/src/use-webpack-resolver.ts +56 -0
- package/src/visitor/__tests__/visitor.test.ts +136 -0
- package/src/visitor/index.ts +263 -0
- package/{lib/visitor/less-visitor.js → src/visitor/less-visitor.ts} +3 -2
- package/lib/context.d.ts +0 -352
- package/lib/context.d.ts.map +0 -1
- package/lib/context.js +0 -636
- package/lib/context.js.map +0 -1
- package/lib/conversions.d.ts +0 -73
- package/lib/conversions.d.ts.map +0 -1
- package/lib/conversions.js +0 -253
- package/lib/conversions.js.map +0 -1
- package/lib/debug-log.d.ts +0 -2
- package/lib/debug-log.d.ts.map +0 -1
- package/lib/debug-log.js +0 -27
- package/lib/debug-log.js.map +0 -1
- package/lib/define-function.d.ts +0 -587
- package/lib/define-function.d.ts.map +0 -1
- package/lib/define-function.js +0 -726
- package/lib/define-function.js.map +0 -1
- package/lib/deprecation.d.ts +0 -34
- package/lib/deprecation.d.ts.map +0 -1
- package/lib/deprecation.js +0 -57
- package/lib/deprecation.js.map +0 -1
- package/lib/jess-error.d.ts +0 -343
- package/lib/jess-error.d.ts.map +0 -1
- package/lib/jess-error.js +0 -508
- package/lib/jess-error.js.map +0 -1
- package/lib/logger/deprecation-processing.d.ts +0 -41
- package/lib/logger/deprecation-processing.d.ts.map +0 -1
- package/lib/logger/deprecation-processing.js +0 -81
- package/lib/logger/deprecation-processing.js.map +0 -1
- package/lib/logger.d.ts +0 -10
- package/lib/logger.d.ts.map +0 -1
- package/lib/logger.js +0 -20
- package/lib/logger.js.map +0 -1
- package/lib/plugin.d.ts +0 -94
- package/lib/plugin.d.ts.map +0 -1
- package/lib/plugin.js +0 -174
- package/lib/plugin.js.map +0 -1
- package/lib/tree/ampersand.d.ts +0 -94
- package/lib/tree/ampersand.d.ts.map +0 -1
- package/lib/tree/ampersand.js +0 -269
- package/lib/tree/ampersand.js.map +0 -1
- package/lib/tree/any.d.ts +0 -58
- package/lib/tree/any.d.ts.map +0 -1
- package/lib/tree/any.js +0 -104
- package/lib/tree/any.js.map +0 -1
- package/lib/tree/at-rule.d.ts +0 -53
- package/lib/tree/at-rule.d.ts.map +0 -1
- package/lib/tree/at-rule.js +0 -503
- package/lib/tree/at-rule.js.map +0 -1
- package/lib/tree/block.d.ts +0 -22
- package/lib/tree/block.d.ts.map +0 -1
- package/lib/tree/block.js +0 -24
- package/lib/tree/block.js.map +0 -1
- package/lib/tree/bool.d.ts +0 -18
- package/lib/tree/bool.d.ts.map +0 -1
- package/lib/tree/bool.js +0 -28
- package/lib/tree/bool.js.map +0 -1
- package/lib/tree/call.d.ts +0 -66
- package/lib/tree/call.d.ts.map +0 -1
- package/lib/tree/call.js +0 -306
- package/lib/tree/call.js.map +0 -1
- package/lib/tree/collection.d.ts +0 -30
- package/lib/tree/collection.d.ts.map +0 -1
- package/lib/tree/collection.js +0 -37
- package/lib/tree/collection.js.map +0 -1
- package/lib/tree/color.d.ts +0 -101
- package/lib/tree/color.d.ts.map +0 -1
- package/lib/tree/color.js +0 -513
- package/lib/tree/color.js.map +0 -1
- package/lib/tree/combinator.d.ts +0 -13
- package/lib/tree/combinator.d.ts.map +0 -1
- package/lib/tree/combinator.js +0 -12
- package/lib/tree/combinator.js.map +0 -1
- package/lib/tree/comment.d.ts +0 -20
- package/lib/tree/comment.d.ts.map +0 -1
- package/lib/tree/comment.js +0 -19
- package/lib/tree/comment.js.map +0 -1
- package/lib/tree/condition.d.ts +0 -31
- package/lib/tree/condition.d.ts.map +0 -1
- package/lib/tree/condition.js +0 -103
- package/lib/tree/condition.js.map +0 -1
- package/lib/tree/control.d.ts +0 -104
- package/lib/tree/control.d.ts.map +0 -1
- package/lib/tree/control.js +0 -430
- package/lib/tree/control.js.map +0 -1
- package/lib/tree/declaration-custom.d.ts +0 -18
- package/lib/tree/declaration-custom.d.ts.map +0 -1
- package/lib/tree/declaration-custom.js +0 -24
- package/lib/tree/declaration-custom.js.map +0 -1
- package/lib/tree/declaration-var.d.ts +0 -35
- package/lib/tree/declaration-var.d.ts.map +0 -1
- package/lib/tree/declaration-var.js +0 -63
- package/lib/tree/declaration-var.js.map +0 -1
- package/lib/tree/declaration.d.ts +0 -78
- package/lib/tree/declaration.d.ts.map +0 -1
- package/lib/tree/declaration.js +0 -286
- package/lib/tree/declaration.js.map +0 -1
- package/lib/tree/default-guard.d.ts +0 -15
- package/lib/tree/default-guard.d.ts.map +0 -1
- package/lib/tree/default-guard.js +0 -19
- package/lib/tree/default-guard.js.map +0 -1
- package/lib/tree/dimension.d.ts +0 -34
- package/lib/tree/dimension.d.ts.map +0 -1
- package/lib/tree/dimension.js +0 -294
- package/lib/tree/dimension.js.map +0 -1
- package/lib/tree/expression.d.ts +0 -25
- package/lib/tree/expression.d.ts.map +0 -1
- package/lib/tree/expression.js +0 -32
- package/lib/tree/expression.js.map +0 -1
- package/lib/tree/extend-list.d.ts +0 -23
- package/lib/tree/extend-list.d.ts.map +0 -1
- package/lib/tree/extend-list.js +0 -23
- package/lib/tree/extend-list.js.map +0 -1
- package/lib/tree/extend.d.ts +0 -47
- package/lib/tree/extend.d.ts.map +0 -1
- package/lib/tree/extend.js +0 -296
- package/lib/tree/extend.js.map +0 -1
- package/lib/tree/function.d.ts +0 -48
- package/lib/tree/function.d.ts.map +0 -1
- package/lib/tree/function.js +0 -74
- package/lib/tree/function.js.map +0 -1
- package/lib/tree/import-js.d.ts +0 -35
- package/lib/tree/import-js.d.ts.map +0 -1
- package/lib/tree/import-js.js +0 -45
- package/lib/tree/import-js.js.map +0 -1
- package/lib/tree/import-style.d.ts +0 -156
- package/lib/tree/import-style.d.ts.map +0 -1
- package/lib/tree/import-style.js +0 -566
- package/lib/tree/import-style.js.map +0 -1
- package/lib/tree/index.d.ts +0 -71
- package/lib/tree/index.d.ts.map +0 -1
- package/lib/tree/index.js.map +0 -1
- package/lib/tree/interpolated-reference.d.ts +0 -24
- package/lib/tree/interpolated-reference.d.ts.map +0 -1
- package/lib/tree/interpolated-reference.js +0 -37
- package/lib/tree/interpolated-reference.js.map +0 -1
- package/lib/tree/interpolated.d.ts +0 -62
- package/lib/tree/interpolated.d.ts.map +0 -1
- package/lib/tree/interpolated.js +0 -204
- package/lib/tree/interpolated.js.map +0 -1
- package/lib/tree/js-array.d.ts +0 -10
- package/lib/tree/js-array.d.ts.map +0 -1
- package/lib/tree/js-array.js +0 -10
- package/lib/tree/js-array.js.map +0 -1
- package/lib/tree/js-expr.d.ts +0 -23
- package/lib/tree/js-expr.d.ts.map +0 -1
- package/lib/tree/js-expr.js +0 -28
- package/lib/tree/js-expr.js.map +0 -1
- package/lib/tree/js-function.d.ts +0 -20
- package/lib/tree/js-function.d.ts.map +0 -1
- package/lib/tree/js-function.js +0 -16
- package/lib/tree/js-function.js.map +0 -1
- package/lib/tree/js-object.d.ts +0 -10
- package/lib/tree/js-object.d.ts.map +0 -1
- package/lib/tree/js-object.js +0 -10
- package/lib/tree/js-object.js.map +0 -1
- package/lib/tree/list.d.ts +0 -38
- package/lib/tree/list.d.ts.map +0 -1
- package/lib/tree/list.js +0 -83
- package/lib/tree/list.js.map +0 -1
- package/lib/tree/log.d.ts +0 -29
- package/lib/tree/log.d.ts.map +0 -1
- package/lib/tree/log.js +0 -56
- package/lib/tree/log.js.map +0 -1
- package/lib/tree/mixin.d.ts +0 -87
- package/lib/tree/mixin.d.ts.map +0 -1
- package/lib/tree/mixin.js +0 -112
- package/lib/tree/mixin.js.map +0 -1
- package/lib/tree/negative.d.ts +0 -17
- package/lib/tree/negative.d.ts.map +0 -1
- package/lib/tree/negative.js +0 -22
- package/lib/tree/negative.js.map +0 -1
- package/lib/tree/nil.d.ts +0 -30
- package/lib/tree/nil.d.ts.map +0 -1
- package/lib/tree/nil.js +0 -35
- package/lib/tree/nil.js.map +0 -1
- package/lib/tree/node-base.d.ts +0 -361
- package/lib/tree/node-base.d.ts.map +0 -1
- package/lib/tree/node-base.js +0 -930
- package/lib/tree/node-base.js.map +0 -1
- package/lib/tree/node.d.ts +0 -10
- package/lib/tree/node.d.ts.map +0 -1
- package/lib/tree/node.js +0 -45
- package/lib/tree/node.js.map +0 -1
- package/lib/tree/number.d.ts +0 -21
- package/lib/tree/number.d.ts.map +0 -1
- package/lib/tree/number.js +0 -27
- package/lib/tree/number.js.map +0 -1
- package/lib/tree/operation.d.ts +0 -26
- package/lib/tree/operation.d.ts.map +0 -1
- package/lib/tree/operation.js +0 -103
- package/lib/tree/operation.js.map +0 -1
- package/lib/tree/paren.d.ts +0 -19
- package/lib/tree/paren.d.ts.map +0 -1
- package/lib/tree/paren.js +0 -92
- package/lib/tree/paren.js.map +0 -1
- package/lib/tree/query-condition.d.ts +0 -17
- package/lib/tree/query-condition.d.ts.map +0 -1
- package/lib/tree/query-condition.js +0 -39
- package/lib/tree/query-condition.js.map +0 -1
- package/lib/tree/quoted.d.ts +0 -28
- package/lib/tree/quoted.d.ts.map +0 -1
- package/lib/tree/quoted.js +0 -75
- package/lib/tree/quoted.js.map +0 -1
- package/lib/tree/range.d.ts +0 -33
- package/lib/tree/range.d.ts.map +0 -1
- package/lib/tree/range.js +0 -47
- package/lib/tree/range.js.map +0 -1
- package/lib/tree/reference.d.ts +0 -76
- package/lib/tree/reference.d.ts.map +0 -1
- package/lib/tree/reference.js +0 -521
- package/lib/tree/reference.js.map +0 -1
- package/lib/tree/rest.d.ts +0 -15
- package/lib/tree/rest.d.ts.map +0 -1
- package/lib/tree/rest.js +0 -32
- package/lib/tree/rest.js.map +0 -1
- package/lib/tree/rules-raw.d.ts +0 -17
- package/lib/tree/rules-raw.d.ts.map +0 -1
- package/lib/tree/rules-raw.js +0 -37
- package/lib/tree/rules-raw.js.map +0 -1
- package/lib/tree/rules.d.ts +0 -262
- package/lib/tree/rules.d.ts.map +0 -1
- package/lib/tree/rules.js +0 -2359
- package/lib/tree/rules.js.map +0 -1
- package/lib/tree/ruleset.d.ts +0 -92
- package/lib/tree/ruleset.d.ts.map +0 -1
- package/lib/tree/ruleset.js +0 -528
- package/lib/tree/ruleset.js.map +0 -1
- package/lib/tree/selector-attr.d.ts +0 -31
- package/lib/tree/selector-attr.d.ts.map +0 -1
- package/lib/tree/selector-attr.js +0 -99
- package/lib/tree/selector-attr.js.map +0 -1
- package/lib/tree/selector-basic.d.ts +0 -24
- package/lib/tree/selector-basic.d.ts.map +0 -1
- package/lib/tree/selector-basic.js +0 -38
- package/lib/tree/selector-basic.js.map +0 -1
- package/lib/tree/selector-capture.d.ts +0 -23
- package/lib/tree/selector-capture.d.ts.map +0 -1
- package/lib/tree/selector-capture.js +0 -34
- package/lib/tree/selector-capture.js.map +0 -1
- package/lib/tree/selector-complex.d.ts +0 -40
- package/lib/tree/selector-complex.d.ts.map +0 -1
- package/lib/tree/selector-complex.js +0 -143
- package/lib/tree/selector-complex.js.map +0 -1
- package/lib/tree/selector-compound.d.ts +0 -16
- package/lib/tree/selector-compound.d.ts.map +0 -1
- package/lib/tree/selector-compound.js +0 -114
- package/lib/tree/selector-compound.js.map +0 -1
- package/lib/tree/selector-interpolated.d.ts +0 -23
- package/lib/tree/selector-interpolated.d.ts.map +0 -1
- package/lib/tree/selector-interpolated.js +0 -27
- package/lib/tree/selector-interpolated.js.map +0 -1
- package/lib/tree/selector-list.d.ts +0 -17
- package/lib/tree/selector-list.d.ts.map +0 -1
- package/lib/tree/selector-list.js +0 -174
- package/lib/tree/selector-list.js.map +0 -1
- package/lib/tree/selector-pseudo.d.ts +0 -42
- package/lib/tree/selector-pseudo.d.ts.map +0 -1
- package/lib/tree/selector-pseudo.js +0 -204
- package/lib/tree/selector-pseudo.js.map +0 -1
- package/lib/tree/selector-simple.d.ts +0 -5
- package/lib/tree/selector-simple.d.ts.map +0 -1
- package/lib/tree/selector-simple.js +0 -6
- package/lib/tree/selector-simple.js.map +0 -1
- package/lib/tree/selector.d.ts +0 -43
- package/lib/tree/selector.d.ts.map +0 -1
- package/lib/tree/selector.js +0 -56
- package/lib/tree/selector.js.map +0 -1
- package/lib/tree/sequence.d.ts +0 -43
- package/lib/tree/sequence.d.ts.map +0 -1
- package/lib/tree/sequence.js +0 -151
- package/lib/tree/sequence.js.map +0 -1
- package/lib/tree/tree.d.ts +0 -87
- package/lib/tree/tree.d.ts.map +0 -1
- package/lib/tree/tree.js +0 -2
- package/lib/tree/tree.js.map +0 -1
- package/lib/tree/url.d.ts +0 -18
- package/lib/tree/url.d.ts.map +0 -1
- package/lib/tree/url.js +0 -35
- package/lib/tree/url.js.map +0 -1
- package/lib/tree/util/__tests__/debug-log.d.ts +0 -1
- package/lib/tree/util/__tests__/debug-log.d.ts.map +0 -1
- package/lib/tree/util/__tests__/debug-log.js +0 -36
- package/lib/tree/util/__tests__/debug-log.js.map +0 -1
- package/lib/tree/util/calculate.d.ts +0 -3
- package/lib/tree/util/calculate.d.ts.map +0 -1
- package/lib/tree/util/calculate.js +0 -10
- package/lib/tree/util/calculate.js.map +0 -1
- package/lib/tree/util/cast.d.ts +0 -10
- package/lib/tree/util/cast.d.ts.map +0 -1
- package/lib/tree/util/cast.js +0 -87
- package/lib/tree/util/cast.js.map +0 -1
- package/lib/tree/util/cloning.d.ts +0 -4
- package/lib/tree/util/cloning.d.ts.map +0 -1
- package/lib/tree/util/cloning.js +0 -8
- package/lib/tree/util/cloning.js.map +0 -1
- package/lib/tree/util/collections.d.ts +0 -57
- package/lib/tree/util/collections.d.ts.map +0 -1
- package/lib/tree/util/collections.js +0 -136
- package/lib/tree/util/collections.js.map +0 -1
- package/lib/tree/util/compare.d.ts +0 -11
- package/lib/tree/util/compare.d.ts.map +0 -1
- package/lib/tree/util/compare.js +0 -89
- package/lib/tree/util/compare.js.map +0 -1
- package/lib/tree/util/extend-helpers.d.ts +0 -2
- package/lib/tree/util/extend-helpers.d.ts.map +0 -1
- package/lib/tree/util/extend-helpers.js +0 -2
- package/lib/tree/util/extend-helpers.js.map +0 -1
- package/lib/tree/util/extend-roots.d.ts +0 -37
- package/lib/tree/util/extend-roots.d.ts.map +0 -1
- package/lib/tree/util/extend-roots.js +0 -700
- package/lib/tree/util/extend-roots.js.map +0 -1
- package/lib/tree/util/extend-roots.old.d.ts +0 -132
- package/lib/tree/util/extend-roots.old.d.ts.map +0 -1
- package/lib/tree/util/extend-roots.old.js +0 -2272
- package/lib/tree/util/extend-roots.old.js.map +0 -1
- package/lib/tree/util/extend-trace-debug.d.ts +0 -13
- package/lib/tree/util/extend-trace-debug.d.ts.map +0 -1
- package/lib/tree/util/extend-trace-debug.js +0 -34
- package/lib/tree/util/extend-trace-debug.js.map +0 -1
- package/lib/tree/util/extend-walk.d.ts +0 -53
- package/lib/tree/util/extend-walk.d.ts.map +0 -1
- package/lib/tree/util/extend-walk.js +0 -881
- package/lib/tree/util/extend-walk.js.map +0 -1
- package/lib/tree/util/extend.d.ts +0 -218
- package/lib/tree/util/extend.d.ts.map +0 -1
- package/lib/tree/util/extend.js +0 -3182
- package/lib/tree/util/extend.js.map +0 -1
- package/lib/tree/util/find-extendable-locations.d.ts +0 -2
- package/lib/tree/util/find-extendable-locations.d.ts.map +0 -1
- package/lib/tree/util/find-extendable-locations.js +0 -2
- package/lib/tree/util/find-extendable-locations.js.map +0 -1
- package/lib/tree/util/format.d.ts +0 -20
- package/lib/tree/util/format.d.ts.map +0 -1
- package/lib/tree/util/format.js +0 -67
- package/lib/tree/util/format.js.map +0 -1
- package/lib/tree/util/is-node.d.ts +0 -13
- package/lib/tree/util/is-node.d.ts.map +0 -1
- package/lib/tree/util/is-node.js +0 -43
- package/lib/tree/util/is-node.js.map +0 -1
- package/lib/tree/util/print.d.ts +0 -80
- package/lib/tree/util/print.d.ts.map +0 -1
- package/lib/tree/util/print.js +0 -205
- package/lib/tree/util/print.js.map +0 -1
- package/lib/tree/util/process-leading-is.d.ts +0 -25
- package/lib/tree/util/process-leading-is.d.ts.map +0 -1
- package/lib/tree/util/process-leading-is.js +0 -364
- package/lib/tree/util/process-leading-is.js.map +0 -1
- package/lib/tree/util/recursion-helper.d.ts +0 -15
- package/lib/tree/util/recursion-helper.d.ts.map +0 -1
- package/lib/tree/util/recursion-helper.js +0 -43
- package/lib/tree/util/recursion-helper.js.map +0 -1
- package/lib/tree/util/regex.d.ts +0 -4
- package/lib/tree/util/regex.d.ts.map +0 -1
- package/lib/tree/util/regex.js +0 -4
- package/lib/tree/util/regex.js.map +0 -1
- package/lib/tree/util/registry-utils.d.ts +0 -192
- package/lib/tree/util/registry-utils.d.ts.map +0 -1
- package/lib/tree/util/registry-utils.js +0 -1214
- package/lib/tree/util/registry-utils.js.map +0 -1
- package/lib/tree/util/ruleset-trace.d.ts +0 -4
- package/lib/tree/util/ruleset-trace.d.ts.map +0 -1
- package/lib/tree/util/ruleset-trace.js +0 -14
- package/lib/tree/util/ruleset-trace.js.map +0 -1
- package/lib/tree/util/selector-compare.d.ts +0 -2
- package/lib/tree/util/selector-compare.d.ts.map +0 -1
- package/lib/tree/util/selector-compare.js +0 -2
- package/lib/tree/util/selector-compare.js.map +0 -1
- package/lib/tree/util/selector-match-core.d.ts +0 -184
- package/lib/tree/util/selector-match-core.d.ts.map +0 -1
- package/lib/tree/util/selector-match-core.js +0 -1603
- package/lib/tree/util/selector-match-core.js.map +0 -1
- package/lib/tree/util/selector-utils.d.ts +0 -30
- package/lib/tree/util/selector-utils.d.ts.map +0 -1
- package/lib/tree/util/selector-utils.js +0 -100
- package/lib/tree/util/selector-utils.js.map +0 -1
- package/lib/tree/util/serialize-helper.d.ts +0 -13
- package/lib/tree/util/serialize-helper.d.ts.map +0 -1
- package/lib/tree/util/serialize-helper.js +0 -387
- package/lib/tree/util/serialize-helper.js.map +0 -1
- package/lib/tree/util/serialize-types.d.ts +0 -9
- package/lib/tree/util/serialize-types.d.ts.map +0 -1
- package/lib/tree/util/serialize-types.js +0 -216
- package/lib/tree/util/serialize-types.js.map +0 -1
- package/lib/tree/util/should-operate.d.ts +0 -23
- package/lib/tree/util/should-operate.d.ts.map +0 -1
- package/lib/tree/util/should-operate.js +0 -46
- package/lib/tree/util/should-operate.js.map +0 -1
- package/lib/tree/util/sourcemap.d.ts +0 -7
- package/lib/tree/util/sourcemap.d.ts.map +0 -1
- package/lib/tree/util/sourcemap.js +0 -25
- package/lib/tree/util/sourcemap.js.map +0 -1
- package/lib/types/config.d.ts +0 -205
- package/lib/types/config.d.ts.map +0 -1
- package/lib/types/config.js +0 -2
- package/lib/types/config.js.map +0 -1
- package/lib/types/index.d.ts +0 -15
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js +0 -3
- package/lib/types/index.js.map +0 -1
- package/lib/types/modes.d.ts.map +0 -1
- package/lib/types/modes.js +0 -2
- package/lib/types/modes.js.map +0 -1
- package/lib/types.d.ts +0 -61
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
- package/lib/use-webpack-resolver.d.ts +0 -9
- package/lib/use-webpack-resolver.d.ts.map +0 -1
- package/lib/use-webpack-resolver.js +0 -41
- package/lib/use-webpack-resolver.js.map +0 -1
- package/lib/visitor/index.d.ts +0 -136
- package/lib/visitor/index.d.ts.map +0 -1
- package/lib/visitor/index.js +0 -135
- package/lib/visitor/index.js.map +0 -1
- package/lib/visitor/less-visitor.d.ts +0 -7
- package/lib/visitor/less-visitor.d.ts.map +0 -1
- package/lib/visitor/less-visitor.js.map +0 -1
package/lib/context.js
DELETED
|
@@ -1,636 +0,0 @@
|
|
|
1
|
-
import { ExtendRootRegistry } from './tree/util/extend-roots.js';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { isNode } from './tree/util/is-node.js';
|
|
4
|
-
import { shouldOperateWithMathFrames } from './tree/util/should-operate.js';
|
|
5
|
-
import { JessError } from './jess-error.js';
|
|
6
|
-
import { CallMap } from './tree/util/recursion-helper.js';
|
|
7
|
-
import { createRequire } from 'node:module';
|
|
8
|
-
const idChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
|
|
9
|
-
/**
|
|
10
|
-
* @todo - Redo:
|
|
11
|
-
* 1. Create a hash of the file path; that way hashes
|
|
12
|
-
* are unique per file, but also repeatable / predictable.
|
|
13
|
-
* 2. Append file (module) hash after class name
|
|
14
|
-
*/
|
|
15
|
-
export const generateId = (length = 8) => {
|
|
16
|
-
let str = '';
|
|
17
|
-
let idCharsLength = idChars.length;
|
|
18
|
-
for (let i = 0; i < length; i++) {
|
|
19
|
-
str += idChars[Math.floor(Math.random() * idCharsLength)];
|
|
20
|
-
}
|
|
21
|
-
return str;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Tree context is attached to each node
|
|
25
|
-
* during the parsing phase / AST creation.
|
|
26
|
-
*
|
|
27
|
-
* Each file (and hence, tree) will get a new tree
|
|
28
|
-
* context. For the most part, it is passed around
|
|
29
|
-
* as an object reference.
|
|
30
|
-
*
|
|
31
|
-
* Additionally, it sets options that may be
|
|
32
|
-
* unique to the tree, such as the math mode.
|
|
33
|
-
*/
|
|
34
|
-
export class TreeContext {
|
|
35
|
-
opts;
|
|
36
|
-
// changed to `rulesVisiblity` set during parsing
|
|
37
|
-
leakyRules;
|
|
38
|
-
bubbleRootAtRules;
|
|
39
|
-
mathMode;
|
|
40
|
-
unitMode;
|
|
41
|
-
equalityMode;
|
|
42
|
-
/** @todo - Change how extend works based on this value */
|
|
43
|
-
isModule;
|
|
44
|
-
file;
|
|
45
|
-
/**
|
|
46
|
-
* The plugin that created this tree. It will have first dibs
|
|
47
|
-
* to resolve any imports.
|
|
48
|
-
*/
|
|
49
|
-
plugin;
|
|
50
|
-
constructor(opts = {}) {
|
|
51
|
-
/**
|
|
52
|
-
* Known options are attached to the instance.
|
|
53
|
-
* Unknown options are assigned to `opts`
|
|
54
|
-
*/
|
|
55
|
-
let { mathMode, unitMode, equalityMode, isModule, file, plugin, leakyRules, bubbleRootAtRules, ...rest } = opts;
|
|
56
|
-
this.mathMode = mathMode;
|
|
57
|
-
this.unitMode = unitMode;
|
|
58
|
-
this.equalityMode = equalityMode;
|
|
59
|
-
this.isModule = isModule;
|
|
60
|
-
this.file = file;
|
|
61
|
-
this.plugin = plugin;
|
|
62
|
-
this.leakyRules = leakyRules;
|
|
63
|
-
this.bubbleRootAtRules = bubbleRootAtRules;
|
|
64
|
-
// this.scope = scope ?? new Scope(parentScope)
|
|
65
|
-
this.opts = rest;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* .a.b.c
|
|
70
|
-
* simple = 0b1
|
|
71
|
-
* compound = 0b10
|
|
72
|
-
* complex = 0b100
|
|
73
|
-
* a = 0b1000
|
|
74
|
-
* b = 0b10000
|
|
75
|
-
* c = 0b100000
|
|
76
|
-
*
|
|
77
|
-
* .a.b.c.c = 0b111010
|
|
78
|
-
*/
|
|
79
|
-
/**
|
|
80
|
-
* This is the context object used for evaluation.
|
|
81
|
-
*
|
|
82
|
-
* @note
|
|
83
|
-
* Most of context represents "state" while evaluating.
|
|
84
|
-
* There should only ever be one Context singleton per parse & evaluation.
|
|
85
|
-
*/
|
|
86
|
-
export class Context {
|
|
87
|
-
plugins;
|
|
88
|
-
opts;
|
|
89
|
-
treeContext;
|
|
90
|
-
/**
|
|
91
|
-
* Collected errors during safeParse/safeRender.
|
|
92
|
-
* Only populated when using safe methods.
|
|
93
|
-
*/
|
|
94
|
-
errors = [];
|
|
95
|
-
/**
|
|
96
|
-
* Collected warnings during safeParse/safeRender.
|
|
97
|
-
* Only populated when using safe methods.
|
|
98
|
-
*/
|
|
99
|
-
warnings = [];
|
|
100
|
-
/**
|
|
101
|
-
* A feature ported from Less - we suppress any `@charset`
|
|
102
|
-
* after the first one.
|
|
103
|
-
*/
|
|
104
|
-
currentCharset;
|
|
105
|
-
/** Track whether charset has been emitted during toString to avoid duplicates */
|
|
106
|
-
charsetEmitted;
|
|
107
|
-
/** @import rules must be at the top of CSS output */
|
|
108
|
-
topImports;
|
|
109
|
-
/**
|
|
110
|
-
* This is set when entering rulesets so that child nodes
|
|
111
|
-
* can use this to lookup values. When evaluating inside a mixin/function,
|
|
112
|
-
* this also enables call-time variable resolution ($~variable).
|
|
113
|
-
*/
|
|
114
|
-
rulesContext;
|
|
115
|
-
/** Entire context root (ultimate root) */
|
|
116
|
-
root;
|
|
117
|
-
/** Set so that we can do ruleset selector lookup for extend */
|
|
118
|
-
treeRoot;
|
|
119
|
-
allRoots = [];
|
|
120
|
-
/** The call that is currently being evaluated */
|
|
121
|
-
caller;
|
|
122
|
-
/** Extend roots registry for managing extend scoping */
|
|
123
|
-
extendRoots;
|
|
124
|
-
/**
|
|
125
|
-
* Depth-first document order of each Ruleset (assigned once per root before eval).
|
|
126
|
-
* Used so processExtends can apply extends in true source order.
|
|
127
|
-
*/
|
|
128
|
-
documentOrderByRuleset;
|
|
129
|
-
/**
|
|
130
|
-
* Registered extends with their extend root context
|
|
131
|
-
* Format: [target, selectorWithExtend, partial, extendRoot, extendNode, documentOrder?]
|
|
132
|
-
*/
|
|
133
|
-
extends = [];
|
|
134
|
-
/**
|
|
135
|
-
* When doing any kind of lookup, the current node and resolved
|
|
136
|
-
* nodes in the search chain are added to prevent recursion errors.
|
|
137
|
-
*
|
|
138
|
-
* We use a set here because we look it up for filtering.
|
|
139
|
-
* Also used to track mixins currently being evaluated to prevent infinite recursion.
|
|
140
|
-
*/
|
|
141
|
-
_searchScope;
|
|
142
|
-
get searchScope() {
|
|
143
|
-
return (this._searchScope ??= new Set());
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* The file (eval) context should have the same ID at compile-time
|
|
147
|
-
* as run-time, so this ID will be set in `toModule()` output
|
|
148
|
-
*
|
|
149
|
-
* @todo - Make the id a hash of the (project-relative) path + contents
|
|
150
|
-
*/
|
|
151
|
-
id = generateId();
|
|
152
|
-
ruleCounter = 0;
|
|
153
|
-
/** Rules depth, used to figure out source order */
|
|
154
|
-
depth = -1;
|
|
155
|
-
_classMap;
|
|
156
|
-
get classMap() {
|
|
157
|
-
return (this._classMap ??= new Map());
|
|
158
|
-
}
|
|
159
|
-
/** Frames for nested rulesets, used for selector evaluation */
|
|
160
|
-
rulesetFrames = [];
|
|
161
|
-
/** Unified frames array for flat rendering when collapseNesting is true */
|
|
162
|
-
frames = [];
|
|
163
|
-
/**
|
|
164
|
-
* We push a boolean to this array when entering a calc() call
|
|
165
|
-
* and pop it when leaving. This helps us determine if operations
|
|
166
|
-
* should be performed or not.
|
|
167
|
-
*
|
|
168
|
-
* @todo - can't this just be a number?
|
|
169
|
-
*/
|
|
170
|
-
calcFrames = 0;
|
|
171
|
-
_callMap;
|
|
172
|
-
get callMap() {
|
|
173
|
-
return (this._callMap ??= new CallMap());
|
|
174
|
-
}
|
|
175
|
-
_callStack;
|
|
176
|
-
get callStack() {
|
|
177
|
-
return (this._callStack ??= []);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Stack to track reference call chain for clearing matched keys at outermost level
|
|
181
|
-
*/
|
|
182
|
-
_referenceStack = 0;
|
|
183
|
-
get referenceStack() {
|
|
184
|
-
return this._referenceStack;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Import-evaluation scope stack.
|
|
188
|
-
*
|
|
189
|
-
* This intentionally models lexical import scope instead of global counters:
|
|
190
|
-
* - each import branch pushes its semantics on entry
|
|
191
|
-
* - each branch pops in `finally`
|
|
192
|
-
* - readers ask semantic questions (`inReferenceImportScope`) instead of
|
|
193
|
-
* inspecting mutable depth values.
|
|
194
|
-
*
|
|
195
|
-
* Why this exists:
|
|
196
|
-
* some behaviors depend on "how we got here" (call-path scope), not only
|
|
197
|
-
* on the current node's own options. Example: suppressing top-level @import
|
|
198
|
-
* hoists while traversing a reference-only branch.
|
|
199
|
-
*/
|
|
200
|
-
_importScopeStack = [];
|
|
201
|
-
get importScope() {
|
|
202
|
-
return this._importScopeStack;
|
|
203
|
-
}
|
|
204
|
-
get inReferenceImportScope() {
|
|
205
|
-
return this._importScopeStack.some(scope => scope.reference);
|
|
206
|
-
}
|
|
207
|
-
get inMultipleImportScope() {
|
|
208
|
-
return this._importScopeStack.some(scope => scope.multiple);
|
|
209
|
-
}
|
|
210
|
-
pushImportScope(scope) {
|
|
211
|
-
this._importScopeStack.push({
|
|
212
|
-
reference: scope.reference === true,
|
|
213
|
-
multiple: scope.multiple === true
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
popImportScope() {
|
|
217
|
-
if (this._importScopeStack.length > 0) {
|
|
218
|
-
this._importScopeStack.pop();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
pushReference() {
|
|
222
|
-
this._referenceStack++;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Stack to track when a value comes from an important declaration
|
|
226
|
-
* Used to propagate !important flag to containing declarations
|
|
227
|
-
*/
|
|
228
|
-
_importantSourceStack = 0;
|
|
229
|
-
get hasImportantSource() {
|
|
230
|
-
return this._importantSourceStack > 0;
|
|
231
|
-
}
|
|
232
|
-
pushImportantSource() {
|
|
233
|
-
this._importantSourceStack++;
|
|
234
|
-
}
|
|
235
|
-
popImportantSource() {
|
|
236
|
-
if (this._importantSourceStack > 0) {
|
|
237
|
-
this._importantSourceStack--;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
popReference() {
|
|
241
|
-
this._referenceStack--;
|
|
242
|
-
}
|
|
243
|
-
rulesEvalStack = [];
|
|
244
|
-
/**
|
|
245
|
-
* We push a boolean to this array when entering parens call
|
|
246
|
-
* and pop it when leaving. This helps us determine if operations
|
|
247
|
-
* should be performed or not.
|
|
248
|
-
*
|
|
249
|
-
* Sometimes we "reset" the "in parentheses" state by pushing false,
|
|
250
|
-
* such as within a function call.
|
|
251
|
-
*/
|
|
252
|
-
parenFrames = [];
|
|
253
|
-
/**
|
|
254
|
-
* Keys of @let variables --
|
|
255
|
-
* We need this b/c we need to generate code
|
|
256
|
-
* for over-riding in the exported function.
|
|
257
|
-
*
|
|
258
|
-
* @todo - remove?
|
|
259
|
-
*/
|
|
260
|
-
_exports;
|
|
261
|
-
get exports() {
|
|
262
|
-
return (this._exports ??= new Set());
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* currently generating a runtime module or not
|
|
266
|
-
* @todo - remove in favor of ToModuleVisitor?
|
|
267
|
-
*/
|
|
268
|
-
// isRuntime: boolean
|
|
269
|
-
/**
|
|
270
|
-
* In a custom declaration's value. All nodes should
|
|
271
|
-
* be preserved as-is and not evaluated, except for
|
|
272
|
-
* $() expressions.
|
|
273
|
-
*/
|
|
274
|
-
inCustom;
|
|
275
|
-
/** A flag set when evaluating conditions */
|
|
276
|
-
isDefault;
|
|
277
|
-
/** A flag to clone nodes before mutating */
|
|
278
|
-
preserveOriginalNodes;
|
|
279
|
-
_leakyRules;
|
|
280
|
-
get leakyRules() {
|
|
281
|
-
return this._leakyRules ?? this.treeContext?.leakyRules ?? false;
|
|
282
|
-
}
|
|
283
|
-
_bubbleRootAtRules;
|
|
284
|
-
get bubbleRootAtRules() {
|
|
285
|
-
return this._bubbleRootAtRules ?? this.treeContext?.bubbleRootAtRules ?? false;
|
|
286
|
-
}
|
|
287
|
-
constructor(opts = {}, plugins) {
|
|
288
|
-
this.opts = opts;
|
|
289
|
-
this.plugins = plugins ?? [];
|
|
290
|
-
this.extendRoots = new ExtendRootRegistry();
|
|
291
|
-
if (opts.leakyRules !== undefined) {
|
|
292
|
-
this._leakyRules = opts.leakyRules;
|
|
293
|
-
}
|
|
294
|
-
if (opts.bubbleRootAtRules !== undefined) {
|
|
295
|
-
this._bubbleRootAtRules = opts.bubbleRootAtRules;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
/** Full resolved path -> tree */
|
|
299
|
-
sourceTrees = new Map();
|
|
300
|
-
evaldTrees = new Map();
|
|
301
|
-
/**
|
|
302
|
-
* @param importPath - The bare import path e.g. `@import "foo";` in a .less file.
|
|
303
|
-
*/
|
|
304
|
-
async _getPath(importPath) {
|
|
305
|
-
const currentTree = this.treeContext;
|
|
306
|
-
const currentDirectory = currentTree?.file?.path ?? process.cwd();
|
|
307
|
-
const { searchPaths = [] } = this.opts;
|
|
308
|
-
const plugins = this.plugins;
|
|
309
|
-
let finalPath;
|
|
310
|
-
let currentPlugin = this.treeContext?.plugin;
|
|
311
|
-
/** First, expand imports */
|
|
312
|
-
let paths = currentPlugin?.expandImport?.(importPath, currentDirectory) ?? [importPath];
|
|
313
|
-
if (paths.length === 0) {
|
|
314
|
-
throw new Error(`No paths found for import "${importPath}"`);
|
|
315
|
-
}
|
|
316
|
-
/** Give current context plugin first dibs to resolve */
|
|
317
|
-
if (currentPlugin?.resolve) {
|
|
318
|
-
const result = await currentPlugin.resolve(paths, currentDirectory, searchPaths);
|
|
319
|
-
if (result) {
|
|
320
|
-
paths = result;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
/** Try to resolve using resolver plugins */
|
|
324
|
-
for (const plugin of plugins) {
|
|
325
|
-
if (plugin === currentPlugin) {
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
if (!plugin.resolve) {
|
|
329
|
-
continue;
|
|
330
|
-
}
|
|
331
|
-
const result = await plugin.resolve(paths, currentDirectory, searchPaths);
|
|
332
|
-
if (result) {
|
|
333
|
-
paths = result;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
/** Now, try to locate the first matching file using locator plugins */
|
|
337
|
-
for (const plugin of plugins) {
|
|
338
|
-
if (!plugin.locate) {
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
const result = await plugin.locate(paths, currentDirectory);
|
|
342
|
-
if (result) {
|
|
343
|
-
finalPath = result;
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (!finalPath) {
|
|
348
|
-
// Fallback for bare module specifiers (e.g. "@scope/pkg/path").
|
|
349
|
-
const looksBareSpecifier = (p) => !path.isAbsolute(p)
|
|
350
|
-
&& !p.startsWith('./')
|
|
351
|
-
&& !p.startsWith('../')
|
|
352
|
-
&& !p.startsWith('/')
|
|
353
|
-
&& !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(p);
|
|
354
|
-
const tryResolveModule = (request, basedir) => {
|
|
355
|
-
try {
|
|
356
|
-
const req = createRequire(path.join(basedir, '__jess_resolve__.js'));
|
|
357
|
-
return req.resolve(request);
|
|
358
|
-
}
|
|
359
|
-
catch {
|
|
360
|
-
return undefined;
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
const moduleBaseDirs = [currentDirectory, ...searchPaths, process.cwd()];
|
|
364
|
-
for (const candidate of paths) {
|
|
365
|
-
if (!looksBareSpecifier(candidate)) {
|
|
366
|
-
continue;
|
|
367
|
-
}
|
|
368
|
-
for (const baseDir of moduleBaseDirs) {
|
|
369
|
-
const base = path.isAbsolute(baseDir) ? baseDir : path.resolve(currentDirectory, baseDir);
|
|
370
|
-
const resolved = tryResolveModule(candidate, base) ?? tryResolveModule(`${candidate}.less`, base);
|
|
371
|
-
if (resolved) {
|
|
372
|
-
finalPath = resolved;
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
if (finalPath) {
|
|
377
|
-
break;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
if (!finalPath) {
|
|
382
|
-
/** @todo - Add messaging around tried paths */
|
|
383
|
-
throw new Error(`File not found: ${importPath} (from: ${currentDirectory})`);
|
|
384
|
-
}
|
|
385
|
-
const normalizedFinalPath = finalPath.split(/[?#]/)[0];
|
|
386
|
-
const ext = path.extname(normalizedFinalPath);
|
|
387
|
-
const friendlyPath = path.relative(process.cwd(), normalizedFinalPath);
|
|
388
|
-
if (!ext) {
|
|
389
|
-
throw new Error(`File "${friendlyPath}" not supported`);
|
|
390
|
-
}
|
|
391
|
-
return {
|
|
392
|
-
triedPaths: paths,
|
|
393
|
-
resolvedPath: normalizedFinalPath,
|
|
394
|
-
friendlyPath
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Find the appropriate plugin for parsing based on type or extension
|
|
399
|
-
*/
|
|
400
|
-
findParserPlugin(type, extension) {
|
|
401
|
-
const plugins = this.plugins;
|
|
402
|
-
if (type) {
|
|
403
|
-
const plugin = plugins.find(plugin => plugin.name === type);
|
|
404
|
-
if (!plugin) {
|
|
405
|
-
throw new Error(`Plugin "${type}" not found`);
|
|
406
|
-
}
|
|
407
|
-
if (!plugin.parse) {
|
|
408
|
-
throw new Error(`Plugin "${type}" does not support parsing`);
|
|
409
|
-
}
|
|
410
|
-
return plugin;
|
|
411
|
-
}
|
|
412
|
-
if (extension) {
|
|
413
|
-
const plugin = plugins.find(plugin => plugin.supportedExtensions?.includes(extension) && (plugin.parse || plugin.safeParse));
|
|
414
|
-
if (!plugin) {
|
|
415
|
-
throw new Error(`No plugin found for extension "${extension}"`);
|
|
416
|
-
}
|
|
417
|
-
return plugin;
|
|
418
|
-
}
|
|
419
|
-
throw new Error('No plugin type or extension specified');
|
|
420
|
-
}
|
|
421
|
-
async getTree(importPath, importOptions = {}) {
|
|
422
|
-
const { resolvedPath, triedPaths, friendlyPath } = await this._getPath(importPath);
|
|
423
|
-
const { type } = importOptions;
|
|
424
|
-
/**
|
|
425
|
-
* We already have resolved this file and parsed it.
|
|
426
|
-
*/
|
|
427
|
-
if (this.sourceTrees.has(resolvedPath)) {
|
|
428
|
-
return {
|
|
429
|
-
node: this.sourceTrees.get(resolvedPath),
|
|
430
|
-
triedPaths,
|
|
431
|
-
resolvedPath
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
const plugins = this.plugins;
|
|
435
|
-
const sourceGetter = plugins.find(plugin => plugin.getSource);
|
|
436
|
-
if (!sourceGetter) {
|
|
437
|
-
/** If we can't actually load files, bail. */
|
|
438
|
-
throw new Error('No source getter found');
|
|
439
|
-
}
|
|
440
|
-
const ext = path.extname(resolvedPath);
|
|
441
|
-
const plugin = this.findParserPlugin(type, ext);
|
|
442
|
-
let source;
|
|
443
|
-
try {
|
|
444
|
-
source = await sourceGetter.getSource(resolvedPath);
|
|
445
|
-
}
|
|
446
|
-
catch (error) {
|
|
447
|
-
throw error;
|
|
448
|
-
}
|
|
449
|
-
const parseResult = plugin.safeParse(resolvedPath, source);
|
|
450
|
-
// Collect normalized errors and warnings from plugin
|
|
451
|
-
this.errors.push(...parseResult.errors);
|
|
452
|
-
this.warnings.push(...parseResult.warnings);
|
|
453
|
-
// Check if we have errors and should break
|
|
454
|
-
if (parseResult.errors.length > 0 && this.opts.breakOnError !== false) {
|
|
455
|
-
// Throw the first error as a JessError
|
|
456
|
-
const firstError = parseResult.errors[0];
|
|
457
|
-
throw new JessError({
|
|
458
|
-
code: firstError.code,
|
|
459
|
-
phase: firstError.phase,
|
|
460
|
-
severity: 'error',
|
|
461
|
-
ctx: firstError.file ? { file: firstError.file } : undefined,
|
|
462
|
-
filePath: firstError.filePath,
|
|
463
|
-
source: firstError.file?.source,
|
|
464
|
-
line: firstError.line,
|
|
465
|
-
column: firstError.column,
|
|
466
|
-
reason: firstError.reason,
|
|
467
|
-
fix: firstError.fix,
|
|
468
|
-
note: firstError.note,
|
|
469
|
-
errors: firstError.errors,
|
|
470
|
-
lexerErrors: firstError.lexerErrors
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
if (parseResult.tree) {
|
|
474
|
-
// Set context.root so preEval visitors can check if this is the root
|
|
475
|
-
// parseResult.tree should be a Rules node (the root of the parsed tree)
|
|
476
|
-
if (!this.root && isNode(parseResult.tree, 'Rules')) {
|
|
477
|
-
this.root = parseResult.tree;
|
|
478
|
-
}
|
|
479
|
-
this.sourceTrees.set(resolvedPath, parseResult.tree);
|
|
480
|
-
return {
|
|
481
|
-
node: parseResult.tree,
|
|
482
|
-
triedPaths,
|
|
483
|
-
resolvedPath
|
|
484
|
-
};
|
|
485
|
-
}
|
|
486
|
-
// No tree and no errors means unsupported file
|
|
487
|
-
const notSupportedError = new Error(`File "${friendlyPath}" not supported`);
|
|
488
|
-
if (this.opts.breakOnError !== false) {
|
|
489
|
-
throw notSupportedError;
|
|
490
|
-
}
|
|
491
|
-
// Add error for unsupported file
|
|
492
|
-
this.errors.push({
|
|
493
|
-
code: 'parse/unsupported-file',
|
|
494
|
-
phase: 'parse',
|
|
495
|
-
message: notSupportedError.message,
|
|
496
|
-
reason: `The file "${friendlyPath}" is not supported by any available plugin.`,
|
|
497
|
-
fix: 'Ensure the file has a supported extension or specify a plugin type.',
|
|
498
|
-
filePath: resolvedPath,
|
|
499
|
-
line: 1,
|
|
500
|
-
column: 1
|
|
501
|
-
});
|
|
502
|
-
return {
|
|
503
|
-
node: null,
|
|
504
|
-
triedPaths,
|
|
505
|
-
resolvedPath
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Public path resolution for import nodes that need source-path lookups
|
|
510
|
-
* without triggering parse/eval.
|
|
511
|
-
*/
|
|
512
|
-
async resolveImportPath(importPath) {
|
|
513
|
-
return this._getPath(importPath);
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Parse a string content directly using the appropriate plugin
|
|
517
|
-
*/
|
|
518
|
-
async parseString(content, options = {}) {
|
|
519
|
-
const { filePath, type, extension } = options;
|
|
520
|
-
const virtualPath = filePath || `virtual.${extension || 'jess'}`;
|
|
521
|
-
const ext = extension || path.extname(virtualPath);
|
|
522
|
-
const plugin = this.findParserPlugin(type, ext);
|
|
523
|
-
const tree = await plugin.parse(virtualPath, content);
|
|
524
|
-
if (!tree) {
|
|
525
|
-
throw new Error('Failed to parse content');
|
|
526
|
-
}
|
|
527
|
-
return {
|
|
528
|
-
node: tree,
|
|
529
|
-
resolvedPath: virtualPath
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
*
|
|
534
|
-
* @param importPath
|
|
535
|
-
* @param importOptions
|
|
536
|
-
*/
|
|
537
|
-
async getModule(importPath, importOptions = {}) {
|
|
538
|
-
const isFnsImport = importPath === '@jesscss/fns'
|
|
539
|
-
|| importPath.startsWith('@jesscss/fns/')
|
|
540
|
-
|| importPath === '#less'
|
|
541
|
-
|| importPath.startsWith('#less/')
|
|
542
|
-
|| importPath === '#sass'
|
|
543
|
-
|| importPath.startsWith('#sass/');
|
|
544
|
-
const { enableJavaScript } = this.opts;
|
|
545
|
-
if (enableJavaScript === false && !isFnsImport) {
|
|
546
|
-
throw new Error('JavaScript evaluation is disabled');
|
|
547
|
-
}
|
|
548
|
-
const { resolvedPath, triedPaths, friendlyPath } = await this._getPath(importPath);
|
|
549
|
-
const { type } = importOptions;
|
|
550
|
-
const plugins = this.plugins;
|
|
551
|
-
const ext = path.extname(resolvedPath);
|
|
552
|
-
let plugin;
|
|
553
|
-
if (type) {
|
|
554
|
-
plugin = plugins.find(plugin => plugin.name === type);
|
|
555
|
-
if (!plugin) {
|
|
556
|
-
throw new Error(`Plugin "${type}" not found`);
|
|
557
|
-
}
|
|
558
|
-
if (!plugin.import) {
|
|
559
|
-
throw new Error(`Plugin "${type}" can't import modules`);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
if (!plugin) {
|
|
563
|
-
plugin = plugins.find(plugin => plugin.supportedExtensions?.includes(ext) && plugin.import);
|
|
564
|
-
if (!plugin) {
|
|
565
|
-
if (['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'].includes(ext)) {
|
|
566
|
-
throw new Error('Feature not supported. Install @jesscss/plugin-js to enable script execution features.');
|
|
567
|
-
}
|
|
568
|
-
throw new Error(`File "${friendlyPath}" not supported`);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
const module = await plugin.import(resolvedPath);
|
|
572
|
-
if (!module) {
|
|
573
|
-
throw new Error(`File "${friendlyPath}" not supported`);
|
|
574
|
-
}
|
|
575
|
-
return {
|
|
576
|
-
module,
|
|
577
|
-
triedPaths,
|
|
578
|
-
resolvedPath
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
// async getRules(
|
|
582
|
-
// filePath: string,
|
|
583
|
-
// nodeOptions: StyleImportOptions,
|
|
584
|
-
// userOptions: Record<string, any> = {},
|
|
585
|
-
// withValues?: StyleImportValue['with']
|
|
586
|
-
// ) {
|
|
587
|
-
// let rules = await this.getTree(filePath, userOptions);
|
|
588
|
-
// if (withValues && isNode(withValues.node, 'Rules')) {
|
|
589
|
-
// if (rules.options.readonly) {
|
|
590
|
-
// throw new Error('Cannot set an import\'s "with" values more than once.');
|
|
591
|
-
// }
|
|
592
|
-
// /** @todo - Throw errors for undefined vars */
|
|
593
|
-
// let withRules = withValues.node.clone(true) as Rules;
|
|
594
|
-
// withRules.value.unshift(rules);
|
|
595
|
-
// rules = withRules;
|
|
596
|
-
// if (withValues.type === 'set') {
|
|
597
|
-
// this.sourceTrees.set(filePath, rules);
|
|
598
|
-
// }
|
|
599
|
-
// }
|
|
600
|
-
// return rules;
|
|
601
|
-
// }
|
|
602
|
-
/**
|
|
603
|
-
* Hash a CSS class name or not depending on the `module` setting
|
|
604
|
-
*
|
|
605
|
-
* @todo - do module files have different contexts, therefore different
|
|
606
|
-
* hash maps?
|
|
607
|
-
*/
|
|
608
|
-
hashClass(name) {
|
|
609
|
-
/** Remove dot for mapping */
|
|
610
|
-
name = name.slice(1);
|
|
611
|
-
let lookup = this.classMap.get(name);
|
|
612
|
-
if (lookup) {
|
|
613
|
-
return `.${lookup}`;
|
|
614
|
-
}
|
|
615
|
-
let mapVal;
|
|
616
|
-
if (this.opts.module) {
|
|
617
|
-
mapVal = `${name}_${this.id}`;
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
mapVal = name;
|
|
621
|
-
}
|
|
622
|
-
this.classMap.set(name, mapVal);
|
|
623
|
-
return `.${mapVal}`;
|
|
624
|
-
}
|
|
625
|
-
shouldOperate(op, left, right) {
|
|
626
|
-
const mathMode = this.treeContext?.mathMode
|
|
627
|
-
?? this.opts?.mathMode
|
|
628
|
-
?? 'parens-division';
|
|
629
|
-
return shouldOperateWithMathFrames({
|
|
630
|
-
mathMode,
|
|
631
|
-
parenFrames: this.parenFrames,
|
|
632
|
-
calcFrames: this.calcFrames
|
|
633
|
-
}, op, left, right);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
//# sourceMappingURL=context.js.map
|
package/lib/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAIjE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAkF,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5H,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyF5C,MAAM,OAAO,GAAG,sDAAsD,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE;IACvC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,E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