@iconify/tools 4.0.5 → 4.0.7
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/export/json-package.cjs +1 -1
- package/lib/export/json-package.mjs +1 -1
- package/lib/import/figma/query.cjs +12 -9
- package/lib/import/figma/query.mjs +12 -9
- package/lib/svg/index.cjs +1 -1
- package/lib/svg/index.mjs +1 -1
- package/license.txt +0 -0
- package/package.json +558 -558
|
@@ -98,7 +98,7 @@ async function exportJSONPackage(iconSet, options) {
|
|
|
98
98
|
await misc_writeJson.writeJSONFile(`${dir}/${jsonFilename}`, data);
|
|
99
99
|
cjsImports.push(`const ${attr} = require('${relativeFile}');`);
|
|
100
100
|
mjsImports.push(
|
|
101
|
-
`import ${attr} from '${relativeFile}'
|
|
101
|
+
`import ${attr} from '${relativeFile}' with { type: 'json' };`
|
|
102
102
|
);
|
|
103
103
|
packageJSONIconSet[attr] = attr + ".json";
|
|
104
104
|
packageJSONExports[relativeFile] = relativeFile;
|
|
@@ -96,7 +96,7 @@ async function exportJSONPackage(iconSet, options) {
|
|
|
96
96
|
await writeJSONFile(`${dir}/${jsonFilename}`, data);
|
|
97
97
|
cjsImports.push(`const ${attr} = require('${relativeFile}');`);
|
|
98
98
|
mjsImports.push(
|
|
99
|
-
`import ${attr} from '${relativeFile}'
|
|
99
|
+
`import ${attr} from '${relativeFile}' with { type: 'json' };`
|
|
100
100
|
);
|
|
101
101
|
packageJSONIconSet[attr] = attr + ".json";
|
|
102
102
|
packageJSONExports[relativeFile] = relativeFile;
|
|
@@ -125,15 +125,18 @@ async function figmaImagesQuery(options, nodes, cache) {
|
|
|
125
125
|
if (options.version) {
|
|
126
126
|
params.set("version", options.version);
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
params.set(
|
|
129
|
+
"svg_include_id",
|
|
130
|
+
svgOptions.includeID ? "true" : "false"
|
|
131
|
+
);
|
|
132
|
+
params.set(
|
|
133
|
+
"svg_simplify_stroke",
|
|
134
|
+
svgOptions.simplifyStroke ? "true" : "false"
|
|
135
|
+
);
|
|
136
|
+
params.set(
|
|
137
|
+
"use_absolute_bounds",
|
|
138
|
+
svgOptions.useAbsoluteBounds ? "true" : "false"
|
|
139
|
+
);
|
|
137
140
|
download_api_index.sendAPIQuery(
|
|
138
141
|
{
|
|
139
142
|
uri,
|
|
@@ -123,15 +123,18 @@ async function figmaImagesQuery(options, nodes, cache) {
|
|
|
123
123
|
if (options.version) {
|
|
124
124
|
params.set("version", options.version);
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
params.set(
|
|
127
|
+
"svg_include_id",
|
|
128
|
+
svgOptions.includeID ? "true" : "false"
|
|
129
|
+
);
|
|
130
|
+
params.set(
|
|
131
|
+
"svg_simplify_stroke",
|
|
132
|
+
svgOptions.simplifyStroke ? "true" : "false"
|
|
133
|
+
);
|
|
134
|
+
params.set(
|
|
135
|
+
"use_absolute_bounds",
|
|
136
|
+
svgOptions.useAbsoluteBounds ? "true" : "false"
|
|
137
|
+
);
|
|
135
138
|
sendAPIQuery(
|
|
136
139
|
{
|
|
137
140
|
uri,
|
package/lib/svg/index.cjs
CHANGED
|
@@ -136,7 +136,7 @@ class SVG {
|
|
|
136
136
|
remove('xml:space="preserve"', "", "");
|
|
137
137
|
content = content.replace(/<g>\s*<\/g>/g, "");
|
|
138
138
|
this.$svg = cheerio__namespace.load(content.trim(), {
|
|
139
|
-
// @ts-expect-error Legacy attribute, kept because Cheerio types are a
|
|
139
|
+
// @ts-expect-error Legacy attribute, kept because Cheerio types are a unstable
|
|
140
140
|
lowerCaseAttributeNames: false,
|
|
141
141
|
xmlMode: true
|
|
142
142
|
});
|
package/lib/svg/index.mjs
CHANGED
|
@@ -120,7 +120,7 @@ class SVG {
|
|
|
120
120
|
remove('xml:space="preserve"', "", "");
|
|
121
121
|
content = content.replace(/<g>\s*<\/g>/g, "");
|
|
122
122
|
this.$svg = cheerio.load(content.trim(), {
|
|
123
|
-
// @ts-expect-error Legacy attribute, kept because Cheerio types are a
|
|
123
|
+
// @ts-expect-error Legacy attribute, kept because Cheerio types are a unstable
|
|
124
124
|
lowerCaseAttributeNames: false,
|
|
125
125
|
xmlMode: true
|
|
126
126
|
});
|
package/license.txt
CHANGED
|
File without changes
|