@bamboocss/parser 1.35.5 → 1.36.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.
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.mjs +11 -0
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -885,6 +885,16 @@ var ParserResult = class {
|
|
|
885
885
|
*/
|
|
886
886
|
unresolved = [];
|
|
887
887
|
/**
|
|
888
|
+
* Inline recipe bindings this module imported, whether or not it ever calls one.
|
|
889
|
+
*
|
|
890
|
+
* `origin` on a `cva-call` only exists for a call. A module that merely *reads* an imported
|
|
891
|
+
* recipe — `export const alias = badge`, `badge.raw(...)` — produces no call, so nothing
|
|
892
|
+
* downstream could tell that the binding was a recipe at all. The declaring module used to
|
|
893
|
+
* answer for those reads through a project-wide symbol search; now that each module answers
|
|
894
|
+
* only about its own text, the consumer needs to know which of its imports are recipes.
|
|
895
|
+
*/
|
|
896
|
+
importedRecipes = /* @__PURE__ */ new Map();
|
|
897
|
+
/**
|
|
888
898
|
* Calls to a name the pattern or recipe entrypoint no longer exports.
|
|
889
899
|
*
|
|
890
900
|
* Separate from `unresolved`, which grades a call the build *did* see and could only
|
|
@@ -1095,6 +1105,7 @@ function createParser(context) {
|
|
|
1095
1105
|
const parserResult = new ParserResult(context, encoder);
|
|
1096
1106
|
const importedRecipes = resolveModule ? importedRecipeBindings(sourceFile, imports, resolveModule) : /* @__PURE__ */ new Map();
|
|
1097
1107
|
if (file.isEmpty() && !jsx.isEnabled && importedRecipes.size === 0) return parserResult;
|
|
1108
|
+
parserResult.importedRecipes = importedRecipes;
|
|
1098
1109
|
for (const binding of importedRecipes.keys()) file.addLocalRecipe(binding);
|
|
1099
1110
|
if (file.importsRecipeFactory()) for (const statement of sourceFile.compilerNode.statements) {
|
|
1100
1111
|
if (!ts_morph.ts.isVariableStatement(statement)) continue;
|
package/dist/index.d.cts
CHANGED
|
@@ -266,6 +266,19 @@ declare class ParserResult implements ParserResultInterface {
|
|
|
266
266
|
* absent from the element — silently. Only the surprising half is collected; see `setCss`.
|
|
267
267
|
*/
|
|
268
268
|
unresolved: UnresolvedStyle[];
|
|
269
|
+
/**
|
|
270
|
+
* Inline recipe bindings this module imported, whether or not it ever calls one.
|
|
271
|
+
*
|
|
272
|
+
* `origin` on a `cva-call` only exists for a call. A module that merely *reads* an imported
|
|
273
|
+
* recipe — `export const alias = badge`, `badge.raw(...)` — produces no call, so nothing
|
|
274
|
+
* downstream could tell that the binding was a recipe at all. The declaring module used to
|
|
275
|
+
* answer for those reads through a project-wide symbol search; now that each module answers
|
|
276
|
+
* only about its own text, the consumer needs to know which of its imports are recipes.
|
|
277
|
+
*/
|
|
278
|
+
importedRecipes: Map<string, {
|
|
279
|
+
filePath: string;
|
|
280
|
+
name: string;
|
|
281
|
+
}>;
|
|
269
282
|
/**
|
|
270
283
|
* Calls to a name the pattern or recipe entrypoint no longer exports.
|
|
271
284
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -266,6 +266,19 @@ declare class ParserResult implements ParserResultInterface {
|
|
|
266
266
|
* absent from the element — silently. Only the surprising half is collected; see `setCss`.
|
|
267
267
|
*/
|
|
268
268
|
unresolved: UnresolvedStyle[];
|
|
269
|
+
/**
|
|
270
|
+
* Inline recipe bindings this module imported, whether or not it ever calls one.
|
|
271
|
+
*
|
|
272
|
+
* `origin` on a `cva-call` only exists for a call. A module that merely *reads* an imported
|
|
273
|
+
* recipe — `export const alias = badge`, `badge.raw(...)` — produces no call, so nothing
|
|
274
|
+
* downstream could tell that the binding was a recipe at all. The declaring module used to
|
|
275
|
+
* answer for those reads through a project-wide symbol search; now that each module answers
|
|
276
|
+
* only about its own text, the consumer needs to know which of its imports are recipes.
|
|
277
|
+
*/
|
|
278
|
+
importedRecipes: Map<string, {
|
|
279
|
+
filePath: string;
|
|
280
|
+
name: string;
|
|
281
|
+
}>;
|
|
269
282
|
/**
|
|
270
283
|
* Calls to a name the pattern or recipe entrypoint no longer exports.
|
|
271
284
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -884,6 +884,16 @@ var ParserResult = class {
|
|
|
884
884
|
*/
|
|
885
885
|
unresolved = [];
|
|
886
886
|
/**
|
|
887
|
+
* Inline recipe bindings this module imported, whether or not it ever calls one.
|
|
888
|
+
*
|
|
889
|
+
* `origin` on a `cva-call` only exists for a call. A module that merely *reads* an imported
|
|
890
|
+
* recipe — `export const alias = badge`, `badge.raw(...)` — produces no call, so nothing
|
|
891
|
+
* downstream could tell that the binding was a recipe at all. The declaring module used to
|
|
892
|
+
* answer for those reads through a project-wide symbol search; now that each module answers
|
|
893
|
+
* only about its own text, the consumer needs to know which of its imports are recipes.
|
|
894
|
+
*/
|
|
895
|
+
importedRecipes = /* @__PURE__ */ new Map();
|
|
896
|
+
/**
|
|
887
897
|
* Calls to a name the pattern or recipe entrypoint no longer exports.
|
|
888
898
|
*
|
|
889
899
|
* Separate from `unresolved`, which grades a call the build *did* see and could only
|
|
@@ -1094,6 +1104,7 @@ function createParser(context) {
|
|
|
1094
1104
|
const parserResult = new ParserResult(context, encoder);
|
|
1095
1105
|
const importedRecipes = resolveModule ? importedRecipeBindings(sourceFile, imports, resolveModule) : /* @__PURE__ */ new Map();
|
|
1096
1106
|
if (file.isEmpty() && !jsx.isEnabled && importedRecipes.size === 0) return parserResult;
|
|
1107
|
+
parserResult.importedRecipes = importedRecipes;
|
|
1097
1108
|
for (const binding of importedRecipes.keys()) file.addLocalRecipe(binding);
|
|
1098
1109
|
if (file.importsRecipeFactory()) for (const statement of sourceFile.compilerNode.statements) {
|
|
1099
1110
|
if (!ts.isVariableStatement(statement)) continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/parser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"description": "The static parser for bamboo css",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ts-morph": "28.0.0",
|
|
36
36
|
"ts-pattern": "5.9.0",
|
|
37
|
-
"@bamboocss/config": "^1.
|
|
38
|
-
"@bamboocss/core": "^1.
|
|
39
|
-
"@bamboocss/extractor": "1.
|
|
40
|
-
"@bamboocss/logger": "1.
|
|
41
|
-
"@bamboocss/shared": "1.
|
|
42
|
-
"@bamboocss/types": "1.
|
|
37
|
+
"@bamboocss/config": "^1.36.0",
|
|
38
|
+
"@bamboocss/core": "^1.36.0",
|
|
39
|
+
"@bamboocss/extractor": "1.36.0",
|
|
40
|
+
"@bamboocss/logger": "1.36.0",
|
|
41
|
+
"@bamboocss/shared": "1.36.0",
|
|
42
|
+
"@bamboocss/types": "1.36.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@bamboocss/generator": "1.
|
|
46
|
-
"@bamboocss/plugin-svelte": "1.
|
|
47
|
-
"@bamboocss/plugin-vue": "1.
|
|
45
|
+
"@bamboocss/generator": "1.36.0",
|
|
46
|
+
"@bamboocss/plugin-svelte": "1.36.0",
|
|
47
|
+
"@bamboocss/plugin-vue": "1.36.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown src/index.ts --format=esm,cjs --dts",
|