@plumeria/unplugin 18.2.3 → 18.2.4
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/core.js +4 -3
- package/dist/core.mjs +4 -3
- package/package.json +2 -2
package/dist/core.js
CHANGED
|
@@ -273,7 +273,9 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
273
273
|
const markStylePropApplied = (name, at) => {
|
|
274
274
|
const owner = components.find((c) => at.span.start >= c.node.span.start &&
|
|
275
275
|
at.span.start <= c.node.span.end);
|
|
276
|
-
|
|
276
|
+
if (owner) {
|
|
277
|
+
appliedStyleProps.add(`${owner.name}:${name}`);
|
|
278
|
+
}
|
|
277
279
|
};
|
|
278
280
|
const extractedSheets = [];
|
|
279
281
|
const addSheet = (sheet) => {
|
|
@@ -2089,8 +2091,7 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
2089
2091
|
for (const { name, node } of components) {
|
|
2090
2092
|
const props = scannedTables.componentPropsTable?.[`${resourcePath}-${name}`];
|
|
2091
2093
|
for (const propName of Object.keys(props ?? {})) {
|
|
2092
|
-
if (appliedStyleProps.has(`${name}:${propName}`)
|
|
2093
|
-
appliedStyleProps.has(`*:${propName}`)) {
|
|
2094
|
+
if (appliedStyleProps.has(`${name}:${propName}`)) {
|
|
2094
2095
|
continue;
|
|
2095
2096
|
}
|
|
2096
2097
|
throwCompilationError(`Plumeria: "${propName}" is a style received through a prop but is never applied ` +
|
package/dist/core.mjs
CHANGED
|
@@ -237,7 +237,9 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
237
237
|
const markStylePropApplied = (name, at) => {
|
|
238
238
|
const owner = components.find((c) => at.span.start >= c.node.span.start &&
|
|
239
239
|
at.span.start <= c.node.span.end);
|
|
240
|
-
|
|
240
|
+
if (owner) {
|
|
241
|
+
appliedStyleProps.add(`${owner.name}:${name}`);
|
|
242
|
+
}
|
|
241
243
|
};
|
|
242
244
|
const extractedSheets = [];
|
|
243
245
|
const addSheet = (sheet) => {
|
|
@@ -2053,8 +2055,7 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
|
|
|
2053
2055
|
for (const { name, node } of components) {
|
|
2054
2056
|
const props = scannedTables.componentPropsTable?.[`${resourcePath}-${name}`];
|
|
2055
2057
|
for (const propName of Object.keys(props ?? {})) {
|
|
2056
|
-
if (appliedStyleProps.has(`${name}:${propName}`)
|
|
2057
|
-
appliedStyleProps.has(`*:${propName}`)) {
|
|
2058
|
+
if (appliedStyleProps.has(`${name}:${propName}`)) {
|
|
2058
2059
|
continue;
|
|
2059
2060
|
}
|
|
2060
2061
|
throwCompilationError(`Plumeria: "${propName}" is a style received through a prop but is never applied ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/unplugin",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.4",
|
|
4
4
|
"description": "Universal Plumeria plugin for various build tools",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@rollup/pluginutils": "^5.4.0",
|
|
91
91
|
"unplugin": "^3.0.0",
|
|
92
|
-
"@plumeria/utils": "^18.2.
|
|
92
|
+
"@plumeria/utils": "^18.2.4"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@swc/core": "1.15.47",
|