@jesscss/scss-parser 2.0.0-alpha.8 → 2.0.0-alpha.9

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/interp.d.ts DELETED
@@ -1,26 +0,0 @@
1
- /**
2
- * SCSS `#{…}` interpolation helpers for the functional grammar builders.
3
- * Mirrors productions/helpers.ts (Chevrotain) without the nested parser bootstrap.
4
- */
5
- import { Any, Interpolated, Node, type LocationInfo } from '@jesscss/core';
6
- export type InterpRole = 'ident' | 'property' | 'any' | 'name';
7
- /** Wired from grammar.ts after `parseScssFn` is defined (breaks circular import). */
8
- export declare function setParseScssFnForInterp(fn: (input: string, rule?: string) => import('./grammar.js').ScssFnParseResult): void;
9
- export declare function findScssInterpolationSpans(value: string): Array<{
10
- start: number;
11
- end: number;
12
- content: string;
13
- }>;
14
- /** Parse a `#{…}` inner expression via the functional value grammar. */
15
- export declare function parseScssInterpExpr(expr: string, loc: LocationInfo): Node;
16
- /**
17
- * Validate a `selector.parse("…")` argument through the functional selector
18
- * grammar. Returns `true` when the text is a well-formed selector list. Used to
19
- * gate lifting a `selector.*` call into a `SelectorCapture`; the capture keeps the
20
- * lean string payload (`SelectorCapture` supports a bare-string `SelectorLike`).
21
- */
22
- export declare function isValidScssSelectorList(selectorText: string): boolean;
23
- /** Turn a parsed expression into an interpolation replacement (name/ident slots). */
24
- export declare function toInterpReplacement(expr: Node, loc: LocationInfo): Node;
25
- /** Build an `Interpolated` node from a string containing `#{…}` runs. */
26
- export declare function buildScssInterpolatedFromString(value: string, loc: LocationInfo, role: InterpRole): Any | Interpolated;
package/lib/jess.cjs DELETED
@@ -1,6 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_functional_parser = require("./functional-parser.cjs");
3
- exports.Parser = require_functional_parser.ScssParser;
4
- exports.ScssGrammar = require_functional_parser.ScssGrammar;
5
- exports.ScssParser = require_functional_parser.ScssParser;
6
- exports.parseScssFn = require_functional_parser.parseScssFn;
package/lib/jess.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { ScssGrammar } from './builders.js';
2
- export { ScssParser, ScssParser as Parser, parseScssFn, type ScssFnParseResult, type ScssFnParseOptions, type ScssParserConfig, type ScssRules, type SyntacticContentAssistSuggestion } from './functional-parser.js';
package/lib/jess.js DELETED
@@ -1,2 +0,0 @@
1
- import { n as parseScssFn, r as ScssGrammar, t as ScssParser } from "./functional-parser.js";
2
- export { ScssParser as Parser, ScssParser, ScssGrammar, parseScssFn };
@@ -1,4 +0,0 @@
1
- import { Ampersand, type Rules, type Selector, type TreeContext } from '@jesscss/core';
2
- export declare function createNullParentAmpersand(context?: TreeContext, selector?: Selector): Ampersand;
3
- export declare function prefixAtRootSelector(selector: Selector, context?: TreeContext): Selector;
4
- export declare function lowerPlainAtRootRules(rules: Rules, context?: TreeContext): void;
@@ -1,36 +0,0 @@
1
- /**
2
- * Shared helpers for SCSS module-system at-rules in the functional parser.
3
- */
4
- import { Quoted, type Node, type LocationInfo, type ExtendSelectorKind } from '@jesscss/core';
5
- export declare function isScriptUsePath(path: string): boolean;
6
- export declare function defaultNamespaceFromPath(path: string): string | undefined;
7
- export declare function quotedLike(original: Quoted, nextValue: string, loc?: LocationInfo): Quoted;
8
- /**
9
- * Detect the CSS `@import` ordering violations Sass parse-rejects (`error/wrong_order/*`).
10
- * The full media-query-list / `supports()` grammar is out of scope for the
11
- * scanned prelude, so this catches the clearly-invalid, low-false-positive
12
- * shapes on the raw prelude text (everything after `@import`, minus the path):
13
- *
14
- * 1. A bare media feature `(x: y)` (NOT a `fn(...)` call — hence the
15
- * no-ident-before-`(` guard) followed by anything other than `and` / `or` /
16
- * `,` / `;` / end. Catches `"a" (b: c) supports(d: e)`, `"a" (b: c) d`,
17
- * `"a" (b: c) d(e)`.
18
- * 2. A comma directly followed by a function call `ident(` — a new import item
19
- * can never be `supports(...)` or an unknown function. Catches
20
- * `"a" b, supports(c: d)`, `"a" b, c(d)`, and `"a", url(b)`.
21
- *
22
- * Not caught (documented as remaining): a string after a comma in media context
23
- * (`"a" b, "c"` — indistinguishable from a valid plain-import continuation without
24
- * modelling media-vs-plain state) and `supports()` value-syntax errors
25
- * (`supports(--a:)`).
26
- */
27
- export declare function checkImportPreludeOrder(preludeText: string, recordError: (message: string) => void): void;
28
- export declare function isPlainCssImportPath(rawPath: string): boolean;
29
- export declare function isPlainCssImportPrelude(prelude: Node, extraText: string | undefined): boolean;
30
- export declare function findDisallowedExtendSelector(selector: Node, allowed: readonly ExtendSelectorKind[]): {
31
- kind: ExtendSelectorKind;
32
- selector: Node;
33
- } | undefined;
34
- export declare function validateExtendTarget(target: Node, allowed: readonly ExtendSelectorKind[] | undefined, recordError: (message: string) => void): void;
35
- export declare function checkForwardPreludeErrors(preludeExtra: string | undefined, recordError: (message: string) => void): void;
36
- export declare function isPlaceholderExtendTarget(target: Node | string): boolean;
@@ -1,11 +0,0 @@
1
- /**
2
- * SCSS value desugaring helpers for the functional grammar builders.
3
- * Ports productions/helpers.ts without the Chevrotain parser bootstrap.
4
- */
5
- import { Call, Reference, type LocationInfo, type Node } from '@jesscss/core';
6
- export declare function unwrapSingleSequence(n: Node): Node;
7
- export declare function toDeclKey(node: Node): string;
8
- export declare function isValidIdentifierKey(key: string): boolean;
9
- export declare function makeNamespacedReference(parts: string[], finalType: 'variable' | 'function' | 'mixin' | 'mixin-ruleset', loc: LocationInfo): Reference;
10
- export declare function desugarNamespacedCall(call: Call, loc: LocationInfo): Call;
11
- export declare function desugarMapLookup(call: Call, loc: LocationInfo): Node;