@se-studio/contentful-rest-api 1.0.129 → 1.0.130
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.
|
@@ -21,6 +21,20 @@ export interface SvgIssue {
|
|
|
21
21
|
* @returns Array of issues found (empty = no known problems)
|
|
22
22
|
*/
|
|
23
23
|
export declare function detectSvgIssues(svgContent: string, iconId: string): SvgIssue[];
|
|
24
|
+
/**
|
|
25
|
+
* Converts CSS class-based fill/stroke rules (e.g. Illustrator's .st0) to
|
|
26
|
+
* inline presentation attributes on the matching elements, then removes the
|
|
27
|
+
* <style> block (and any now-empty <defs>).
|
|
28
|
+
*
|
|
29
|
+
* Only handles simple single-class selectors (.st0 { fill: #xxx }). Complex
|
|
30
|
+
* selectors (child combinators, pseudo-classes, compound classes, etc.) are
|
|
31
|
+
* left untouched — the caller should have already detected CSS_COMPLEX_SELECTORS
|
|
32
|
+
* and decided not to call this function in that case.
|
|
33
|
+
*
|
|
34
|
+
* @param svgContent - Raw SVG markup
|
|
35
|
+
* @returns SVG markup with class-based fills/strokes converted to attributes
|
|
36
|
+
*/
|
|
37
|
+
export declare function inlineSvgClassStyles(svgContent: string): string;
|
|
24
38
|
/**
|
|
25
39
|
* Fetches SVG content from a URL.
|
|
26
40
|
* Uses the parent request's cache tags (page-level) for revalidation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svgProcessor.d.ts","sourceRoot":"","sources":["../../src/converters/svgProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,YAAY,GACpB,iBAAiB,GACjB,uBAAuB,GACvB,cAAc,GACd,UAAU,GACV,iBAAiB,GACjB,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"svgProcessor.d.ts","sourceRoot":"","sources":["../../src/converters/svgProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,YAAY,GACpB,iBAAiB,GACjB,uBAAuB,GACvB,cAAc,GACd,UAAU,GACV,iBAAiB,GACjB,YAAY,GACZ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CA+F9E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAuD/D;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAwC9E"}
|
|
@@ -33,8 +33,11 @@ export function detectSvgIssues(svgContent, iconId) {
|
|
|
33
33
|
}
|
|
34
34
|
// Complex selectors that can't be mechanically inlined
|
|
35
35
|
// Matches: child/sibling operators (> ~ +), attribute selectors ([...]),
|
|
36
|
-
// pseudo-classes (:), compound class selectors (.a.b),
|
|
37
|
-
|
|
36
|
+
// pseudo-classes (:[a-z], e.g. :hover), compound class selectors (.a.b),
|
|
37
|
+
// element+class (path.x).
|
|
38
|
+
// Note: `:` is only matched when followed by a letter to avoid false-positives
|
|
39
|
+
// from CSS property values such as `fill:#8b6ffe`.
|
|
40
|
+
if (/[>~+[\]]|:[a-zA-Z]|[a-z]\.[\w-]|\.[\w-]+\.[\w-]/i.test(styleContent)) {
|
|
38
41
|
issues.push({
|
|
39
42
|
severity: 'warn',
|
|
40
43
|
code: 'CSS_COMPLEX_SELECTORS',
|
|
@@ -91,6 +94,73 @@ export function detectSvgIssues(svgContent, iconId) {
|
|
|
91
94
|
}
|
|
92
95
|
return issues;
|
|
93
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Converts CSS class-based fill/stroke rules (e.g. Illustrator's .st0) to
|
|
99
|
+
* inline presentation attributes on the matching elements, then removes the
|
|
100
|
+
* <style> block (and any now-empty <defs>).
|
|
101
|
+
*
|
|
102
|
+
* Only handles simple single-class selectors (.st0 { fill: #xxx }). Complex
|
|
103
|
+
* selectors (child combinators, pseudo-classes, compound classes, etc.) are
|
|
104
|
+
* left untouched — the caller should have already detected CSS_COMPLEX_SELECTORS
|
|
105
|
+
* and decided not to call this function in that case.
|
|
106
|
+
*
|
|
107
|
+
* @param svgContent - Raw SVG markup
|
|
108
|
+
* @returns SVG markup with class-based fills/strokes converted to attributes
|
|
109
|
+
*/
|
|
110
|
+
export function inlineSvgClassStyles(svgContent) {
|
|
111
|
+
const styleBlockMatch = svgContent.match(/<style[^>]*>([\s\S]*?)<\/style>/i);
|
|
112
|
+
if (!styleBlockMatch)
|
|
113
|
+
return svgContent;
|
|
114
|
+
const styleContent = styleBlockMatch[1] ?? '';
|
|
115
|
+
// Build a map of className → { fill?, stroke? } from simple .cls { ... } rules.
|
|
116
|
+
// We skip any rule whose selector contains combinators or pseudo-classes because
|
|
117
|
+
// those can't be mechanically inlined element-by-element.
|
|
118
|
+
const classStyles = {};
|
|
119
|
+
const ruleRegex = /\.([\w-]+)\s*\{([^}]+)\}/g;
|
|
120
|
+
for (const ruleMatch of styleContent.matchAll(ruleRegex)) {
|
|
121
|
+
const className = ruleMatch[1];
|
|
122
|
+
const body = ruleMatch[2];
|
|
123
|
+
if (!className || !body)
|
|
124
|
+
continue;
|
|
125
|
+
const props = {};
|
|
126
|
+
const propRegex = /\b(fill|stroke)\s*:\s*([^;}\s]+)/gi;
|
|
127
|
+
for (const propMatch of body.matchAll(propRegex)) {
|
|
128
|
+
const prop = propMatch[1];
|
|
129
|
+
const value = propMatch[2];
|
|
130
|
+
if (prop && value)
|
|
131
|
+
props[prop.toLowerCase()] = value;
|
|
132
|
+
}
|
|
133
|
+
if (Object.keys(props).length > 0)
|
|
134
|
+
classStyles[className] = props;
|
|
135
|
+
}
|
|
136
|
+
if (Object.keys(classStyles).length === 0)
|
|
137
|
+
return svgContent;
|
|
138
|
+
// Apply the collected styles as presentation attributes on matching elements.
|
|
139
|
+
// Matches any opening tag that carries a class="..." attribute.
|
|
140
|
+
svgContent = svgContent.replace(/(<[a-zA-Z][a-zA-Z0-9]*\b[^>]*?\bclass\s*=\s*["']([^"']*)["'][^>]*?>)/g, (fullTag, _unused, classAttr) => {
|
|
141
|
+
const classes = classAttr.trim().split(/\s+/);
|
|
142
|
+
let extra = '';
|
|
143
|
+
for (const cls of classes) {
|
|
144
|
+
const styles = classStyles[cls];
|
|
145
|
+
if (!styles)
|
|
146
|
+
continue;
|
|
147
|
+
for (const [prop, value] of Object.entries(styles)) {
|
|
148
|
+
// Don't overwrite an existing presentation attribute.
|
|
149
|
+
if (!new RegExp(`\\b${prop}\\s*=`, 'i').test(fullTag)) {
|
|
150
|
+
extra += ` ${prop}="${value}"`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (!extra)
|
|
155
|
+
return fullTag;
|
|
156
|
+
// Insert before the closing > or />.
|
|
157
|
+
return fullTag.replace(/(\s*\/?>)$/, `${extra}$1`);
|
|
158
|
+
});
|
|
159
|
+
// Remove the <style> block and any <defs> that are now empty.
|
|
160
|
+
svgContent = svgContent.replace(/<style[^>]*>[\s\S]*?<\/style>/gi, '');
|
|
161
|
+
svgContent = svgContent.replace(/<defs[^>]*>\s*<\/defs>/gi, '');
|
|
162
|
+
return svgContent;
|
|
163
|
+
}
|
|
94
164
|
/**
|
|
95
165
|
* Fetches SVG content from a URL.
|
|
96
166
|
* Uses the parent request's cache tags (page-level) for revalidation.
|
|
@@ -117,10 +187,23 @@ export async function fetchSvgContent(url) {
|
|
|
117
187
|
* @returns Processed SVG symbol element as a string
|
|
118
188
|
*/
|
|
119
189
|
export function processSvgForSprite(svgContent, iconId) {
|
|
120
|
-
//
|
|
190
|
+
// Detect known problematic patterns before processing
|
|
121
191
|
const issues = detectSvgIssues(svgContent, iconId);
|
|
122
|
-
|
|
123
|
-
|
|
192
|
+
const hasFillStroke = issues.some((i) => i.code === 'CSS_FILL_STROKE');
|
|
193
|
+
const hasComplexSelectors = issues.some((i) => i.code === 'CSS_COMPLEX_SELECTORS');
|
|
194
|
+
if (hasFillStroke && !hasComplexSelectors) {
|
|
195
|
+
// Safe to auto-fix: inline the class-based fills/strokes as presentation attributes.
|
|
196
|
+
svgContent = inlineSvgClassStyles(svgContent);
|
|
197
|
+
// Re-detect on the fixed content so we only warn about issues that remain.
|
|
198
|
+
const remaining = detectSvgIssues(svgContent, iconId).filter((i) => i.code !== 'CSS_FILL_STROKE');
|
|
199
|
+
for (const issue of remaining) {
|
|
200
|
+
console.warn(`[SVG sprite] ${issue.message}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
for (const issue of issues) {
|
|
205
|
+
console.warn(`[SVG sprite] ${issue.message}`);
|
|
206
|
+
}
|
|
124
207
|
}
|
|
125
208
|
// Parse the SVG to extract viewBox and content
|
|
126
209
|
// Handle optional spaces around equals sign
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svgProcessor.js","sourceRoot":"","sources":["../../src/converters/svgProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,MAAc;IAChE,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,qCAAqC;IAC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,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,+CAA+C;IAC/C,4CAA4C;IAC5C,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IAE7D,uEAAuE;IACvE,sDAAsD;IACtD,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC1E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,YAAY,GAAG,iBAAiB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEhD,4BAA4B;IAC5B,MAAM,QAAQ,GAAG,QAAQ,MAAM,EAAE,CAAC;IAClC,OAAO,eAAe,QAAQ,cAAc,OAAO,KAAK,YAAY,WAAW,CAAC;AAClF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/contentful-rest-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.130",
|
|
4
4
|
"description": "Type-safe Contentful REST API client with caching and rate limiting for Next.js applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"url": "https://github.com/Something-Else-Studio/se-core-product/issues"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@contentful/rich-text-types": "^17.2.
|
|
51
|
-
"contentful": "^11.12.
|
|
50
|
+
"@contentful/rich-text-types": "^17.2.7",
|
|
51
|
+
"contentful": "^11.12.1",
|
|
52
52
|
"server-only": "0.0.1",
|
|
53
53
|
"@se-studio/core-data-types": "1.0.125"
|
|
54
54
|
},
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"next": ">=15.5.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@biomejs/biome": "^2.4.
|
|
60
|
-
"@types/node": "^22.19.
|
|
61
|
-
"next": "^15.5.
|
|
59
|
+
"@biomejs/biome": "^2.4.12",
|
|
60
|
+
"@types/node": "^22.19.17",
|
|
61
|
+
"next": "^15.5.15",
|
|
62
62
|
"typescript": "^6.0.2",
|
|
63
|
-
"vitest": "^4.1.
|
|
63
|
+
"vitest": "^4.1.4"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "tsc --project tsconfig.build.json",
|