@qds.dev/tools 0.11.1 → 0.11.2
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-types/tools → lib}/rolldown/as-child.d.ts +3 -12
- package/lib/rolldown/icons.d.ts +21 -0
- package/lib/rolldown/icons.qwik.mjs +0 -5
- package/{lib-types/tools → lib}/rolldown/index.d.ts +1 -0
- package/lib/rolldown/index.qwik.mjs +2 -1
- package/lib/rolldown/inject-component-types.d.ts +2 -0
- package/lib/rolldown/inject-component-types.qwik.mjs +138 -0
- package/lib/rolldown/inline-css.d.ts +2 -0
- package/lib/rolldown/qwik-rolldown.d.ts +6 -0
- package/lib/utils/index.qwik.mjs +1 -1
- package/{lib-types/tools → lib}/utils/transform-dts.d.ts +4 -3
- package/lib/utils/transform-dts.qwik.mjs +18 -23
- package/package.json +12 -14
- package/lib-types/components/src/icons-runtime.d.ts +0 -223
- package/lib-types/tools/rolldown/icons.d.ts +0 -45
- package/lib-types/tools/rolldown/inline-css.d.ts +0 -26
- package/lib-types/tools/rolldown/qwik-rolldown.d.ts +0 -9
- /package/{lib-types/tools → lib}/linter/qds-internal.d.ts +0 -0
- /package/{lib-types/tools → lib}/linter/qds-internal.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/linter/rule-tester.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/generate-metadata.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/generate-metadata.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/index.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/prop-extraction.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/prop-extraction.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/scenario-injection.d.ts +0 -0
- /package/{lib-types/tools → lib}/playground/scenario-injection.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/rolldown/as-child.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/rolldown/icons.unit.d.ts +0 -0
- /package/{lib-types/tools/rolldown/inline-asset.unit.d.ts → lib/rolldown/inject-component-types.unit.d.ts} +0 -0
- /package/{lib-types/tools → lib}/rolldown/inline-asset.d.ts +0 -0
- /package/{lib-types/tools/src/generate/icon-types.unit.d.ts → lib/rolldown/inline-asset.unit.d.ts} +0 -0
- /package/{lib-types/tools → lib}/src/generate/icon-types.d.ts +0 -0
- /package/{lib-types/tools → lib}/src/index.d.ts +0 -0
- /package/{lib-types/tools → lib}/src/vite.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/ast/core.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/ast/imports.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/ast/jsx-helpers.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/ast/qwik.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/fs-mock.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/fs.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/ast/expressions.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/ast/expressions.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/ast/jsx.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/ast/jsx.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/collections/loader.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/import-resolver.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/naming.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/naming.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/transform/mdx.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/transform/shared.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/transform/tsx.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/icons/types/mdx-ast.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/index.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/package-json.d.ts +0 -0
- /package/{lib-types/tools → lib}/utils/transform-dts.unit.d.ts +0 -0
- /package/{lib-types/tools → lib}/vite/index.d.ts +0 -0
- /package/{lib-types/tools → lib}/vite/minify-content.d.ts +0 -0
- /package/{lib-types/tools → lib}/vite/minify-content.unit.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Plugin } from "rolldown";
|
|
1
2
|
export type AsChildTypes = {
|
|
2
3
|
asChild?: true;
|
|
3
4
|
};
|
|
@@ -9,16 +10,6 @@ export type AsChildPluginOptions = {
|
|
|
9
10
|
* @param options - Plugin configuration options
|
|
10
11
|
* @returns Rolldown-compatible plugin object
|
|
11
12
|
*/
|
|
12
|
-
export declare const asChild: (options?: AsChildPluginOptions) => {
|
|
13
|
-
|
|
14
|
-
enforce: "pre";
|
|
15
|
-
transform: {
|
|
16
|
-
filter: {
|
|
17
|
-
id: import("magic-regexp").MagicRegExp<"/\\.(?:tsx|jsx)$/", never, [], never>;
|
|
18
|
-
};
|
|
19
|
-
handler(code: string, id: string): {
|
|
20
|
-
code: string;
|
|
21
|
-
map: import("magic-string").SourceMap;
|
|
22
|
-
} | null;
|
|
23
|
-
};
|
|
13
|
+
export declare const asChild: (options?: AsChildPluginOptions) => Plugin & {
|
|
14
|
+
enforce?: "pre" | "post";
|
|
24
15
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Plugin } from "rolldown";
|
|
2
|
+
export type PacksMap = Record<string, {
|
|
3
|
+
iconifyPrefix: string;
|
|
4
|
+
sanitizeIcon?: (pascal: string) => string;
|
|
5
|
+
}>;
|
|
6
|
+
export type IconsPluginOptions = {
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The sources to scan for imports. By default this includes QDS, you can also add your own when creating library wrappers.
|
|
10
|
+
*/
|
|
11
|
+
importSources?: string[];
|
|
12
|
+
packs?: PacksMap;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Rolldown plugin that transforms icon JSX elements to direct <svg /> calls
|
|
16
|
+
* @param options - Plugin configuration options
|
|
17
|
+
* @returns Rolldown-compatible plugin object
|
|
18
|
+
*/
|
|
19
|
+
export declare const icons: (options?: IconsPluginOptions) => Plugin & {
|
|
20
|
+
enforce?: "pre" | "post";
|
|
21
|
+
};
|
|
@@ -43,11 +43,6 @@ import { parseSync } from "oxc-parser";
|
|
|
43
43
|
return {
|
|
44
44
|
name: "vite-plugin-qds-icons",
|
|
45
45
|
enforce: "pre",
|
|
46
|
-
configResolved() {
|
|
47
|
-
debug("Icons plugin initialized with lazy loading");
|
|
48
|
-
collectionLoader.discoverCollections();
|
|
49
|
-
debug(`Plugin ready - ${collectionLoader.getAvailableCollections().size} collections available on-demand`);
|
|
50
|
-
},
|
|
51
46
|
transform: {
|
|
52
47
|
filter: { id: isTSXJSXOrMDX },
|
|
53
48
|
handler(code, id) {
|
|
@@ -4,5 +4,6 @@ export type { IconsPluginOptions, PacksMap } from "./icons";
|
|
|
4
4
|
export { icons } from "./icons";
|
|
5
5
|
export type { InlineAssetPluginOptions } from "./inline-asset";
|
|
6
6
|
export { inlineAsset } from "./inline-asset";
|
|
7
|
+
export { injectComponentTypes } from "./inject-component-types";
|
|
7
8
|
export { inlineCssPlugin } from "./inline-css";
|
|
8
9
|
export { qwikRolldown } from "./qwik-rolldown";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { asChild } from "./as-child.qwik.mjs";
|
|
2
2
|
import { icons } from "./icons.qwik.mjs";
|
|
3
3
|
import { inlineAsset } from "./inline-asset.qwik.mjs";
|
|
4
|
+
import { injectComponentTypes } from "./inject-component-types.qwik.mjs";
|
|
4
5
|
import { inlineCssPlugin } from "./inline-css.qwik.mjs";
|
|
5
6
|
import { qwikRolldown } from "./qwik-rolldown.qwik.mjs";
|
|
6
7
|
|
|
7
|
-
export { asChild, icons, inlineAsset, inlineCssPlugin, qwikRolldown };
|
|
8
|
+
export { asChild, icons, injectComponentTypes, inlineAsset, inlineCssPlugin, qwikRolldown };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { getNodeText } from "../utils/ast/core.qwik.mjs";
|
|
2
|
+
import { detectsRenderComponentUsage } from "../utils/ast/qwik.qwik.mjs";
|
|
3
|
+
import { anyOf, createRegExp } from "magic-regexp";
|
|
4
|
+
import MagicString from "magic-string";
|
|
5
|
+
import { parseSync } from "oxc-parser";
|
|
6
|
+
import { walk } from "oxc-walker";
|
|
7
|
+
import { dirname, join, relative } from "node:path";
|
|
8
|
+
|
|
9
|
+
//#region rolldown/inject-component-types.ts
|
|
10
|
+
const tsFilePattern = createRegExp(anyOf(".tsx", ".ts"));
|
|
11
|
+
const KNOWN_GENERIC_CALLS = {
|
|
12
|
+
createContextId: "ContextId",
|
|
13
|
+
createSignal: "Signal"
|
|
14
|
+
};
|
|
15
|
+
function injectComponentTypes() {
|
|
16
|
+
const asChildTypesModule = join(join(process.cwd(), "src"), "types");
|
|
17
|
+
return {
|
|
18
|
+
name: "rolldown-plugin-inject-component-types",
|
|
19
|
+
transform: {
|
|
20
|
+
order: "pre",
|
|
21
|
+
filter: { id: tsFilePattern },
|
|
22
|
+
handler(code, id) {
|
|
23
|
+
const parsed = parseSync(id, code);
|
|
24
|
+
if (parsed.errors.length > 0) return null;
|
|
25
|
+
const s = new MagicString(code);
|
|
26
|
+
const usesRender = detectsRenderComponentUsage(code);
|
|
27
|
+
let needsComponentImport = false;
|
|
28
|
+
let needsAsChildImport = false;
|
|
29
|
+
const additionalQwikImports = /* @__PURE__ */ new Set();
|
|
30
|
+
walk(parsed.program, { enter(node) {
|
|
31
|
+
if (node.type !== "ExportNamedDeclaration") return;
|
|
32
|
+
if (!("declaration" in node) || !node.declaration) return;
|
|
33
|
+
const declaration = node.declaration;
|
|
34
|
+
if (declaration.type !== "VariableDeclaration") return;
|
|
35
|
+
if (!("declarations" in declaration)) return;
|
|
36
|
+
for (const declarator of declaration.declarations) {
|
|
37
|
+
if (declarator.type !== "VariableDeclarator") continue;
|
|
38
|
+
if (!declarator.id || declarator.id.type !== "Identifier") continue;
|
|
39
|
+
if ("typeAnnotation" in declarator.id && declarator.id.typeAnnotation) continue;
|
|
40
|
+
if (!declarator.init || declarator.init.type !== "CallExpression") continue;
|
|
41
|
+
if (!("callee" in declarator.init)) continue;
|
|
42
|
+
const callee = declarator.init.callee;
|
|
43
|
+
if (!callee || callee.type !== "Identifier") continue;
|
|
44
|
+
const calleeName = getNodeText(callee, code);
|
|
45
|
+
if (calleeName === "component$") {
|
|
46
|
+
const propsType = extractComponentPropsType(declarator.init, code);
|
|
47
|
+
let annotation;
|
|
48
|
+
if (!propsType) annotation = ": Component";
|
|
49
|
+
else if (usesRender) {
|
|
50
|
+
annotation = `: Component<${propsType} & AsChildTypes>`;
|
|
51
|
+
needsAsChildImport = true;
|
|
52
|
+
} else annotation = `: Component<${propsType}>`;
|
|
53
|
+
s.appendLeft(declarator.id.end, annotation);
|
|
54
|
+
needsComponentImport = true;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const returnTypeName = KNOWN_GENERIC_CALLS[calleeName];
|
|
58
|
+
if (returnTypeName) {
|
|
59
|
+
const typeArg = extractCallTypeArgument(declarator.init, code);
|
|
60
|
+
if (typeArg) {
|
|
61
|
+
s.appendLeft(declarator.id.end, `: ${returnTypeName}<${typeArg}>`);
|
|
62
|
+
additionalQwikImports.add(returnTypeName);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} });
|
|
67
|
+
if (!s.hasChanged()) return null;
|
|
68
|
+
if (needsComponentImport) additionalQwikImports.add("Component");
|
|
69
|
+
if (additionalQwikImports.size > 0) addQwikImports(parsed, code, s, additionalQwikImports);
|
|
70
|
+
if (needsAsChildImport) {
|
|
71
|
+
let relPath = relative(dirname(id), asChildTypesModule);
|
|
72
|
+
if (!relPath.startsWith(".")) relPath = "./" + relPath;
|
|
73
|
+
s.prepend(`import type { AsChildTypes } from "${relPath}";\n`);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
code: s.toString(),
|
|
77
|
+
map: s.generateMap({ hires: true })
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function extractCallTypeArgument(callExpr, code) {
|
|
84
|
+
if (!("typeArguments" in callExpr) || !callExpr.typeArguments) return null;
|
|
85
|
+
const ta = callExpr.typeArguments;
|
|
86
|
+
if (!ta.params?.length) return null;
|
|
87
|
+
return getNodeText(ta.params[0], code);
|
|
88
|
+
}
|
|
89
|
+
function extractComponentPropsType(callExpr, code) {
|
|
90
|
+
const typeArg = extractCallTypeArgument(callExpr, code);
|
|
91
|
+
if (typeArg) return typeArg;
|
|
92
|
+
if (!("arguments" in callExpr)) return null;
|
|
93
|
+
const args = callExpr.arguments;
|
|
94
|
+
if (args.length === 0) return null;
|
|
95
|
+
const callback = args[0];
|
|
96
|
+
if (callback.type !== "ArrowFunctionExpression" && callback.type !== "FunctionExpression") return null;
|
|
97
|
+
if ("typeParameters" in callback && callback.typeParameters) return null;
|
|
98
|
+
const params = callback.params;
|
|
99
|
+
if (!params || params.length === 0) return null;
|
|
100
|
+
const firstParam = params[0];
|
|
101
|
+
if (firstParam.type === "Identifier" && "typeAnnotation" in firstParam && firstParam.typeAnnotation) {
|
|
102
|
+
const ta = firstParam.typeAnnotation;
|
|
103
|
+
if (ta.typeAnnotation) return getNodeText(ta.typeAnnotation, code);
|
|
104
|
+
}
|
|
105
|
+
if (firstParam.type === "ObjectPattern" && "typeAnnotation" in firstParam) {
|
|
106
|
+
const annotation = firstParam.typeAnnotation;
|
|
107
|
+
if (annotation?.typeAnnotation) return getNodeText(annotation.typeAnnotation, code);
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
function addQwikImports(parsed, code, s, needed) {
|
|
112
|
+
for (const node of parsed.program.body) {
|
|
113
|
+
if (node.type !== "ImportDeclaration") continue;
|
|
114
|
+
if (!("source" in node)) continue;
|
|
115
|
+
if (code.slice(node.source.start + 1, node.source.end - 1) !== "@qwik.dev/core") continue;
|
|
116
|
+
if (!node.specifiers) continue;
|
|
117
|
+
for (const spec of node.specifiers) {
|
|
118
|
+
if (spec.type !== "ImportSpecifier") continue;
|
|
119
|
+
if (!("imported" in spec)) continue;
|
|
120
|
+
const imported = spec.imported;
|
|
121
|
+
if (imported?.name) needed.delete(imported.name);
|
|
122
|
+
}
|
|
123
|
+
if (needed.size === 0) return;
|
|
124
|
+
const lastSpec = node.specifiers[node.specifiers.length - 1];
|
|
125
|
+
if (lastSpec) {
|
|
126
|
+
const isTypeImport = "importKind" in node && node.importKind === "type";
|
|
127
|
+
const additions = Array.from(needed).map((n) => isTypeImport ? n : `type ${n}`).join(",\n ");
|
|
128
|
+
s.appendLeft(lastSpec.end, `,\n ${additions}`);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (needed.size === 0) return;
|
|
133
|
+
const names = Array.from(needed).join(", ");
|
|
134
|
+
s.prepend(`import type { ${names} } from "@qwik.dev/core";\n`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
export { injectComponentTypes };
|
package/lib/utils/index.qwik.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { buildSVGElement, generateIconImport } from "./icons/transform/shared.qw
|
|
|
7
7
|
import { extractMDXAttributes, transformMDXFile } from "./icons/transform/mdx.qwik.mjs";
|
|
8
8
|
import { findIconElements, isIconElement, transformIconElement, transformTSXFile } from "./icons/transform/tsx.qwik.mjs";
|
|
9
9
|
import { getNodeText, isCallExpressionWithName, isIdentifierWithName } from "./ast/core.qwik.mjs";
|
|
10
|
-
import { findImportBySource, getImportSource, hasImportSpecifier, injectTypeImport } from "./ast/imports.qwik.mjs";
|
|
11
10
|
import { getJSXElementName, isJSXElementWithName } from "./ast/jsx-helpers.qwik.mjs";
|
|
11
|
+
import { findImportBySource, getImportSource, hasImportSpecifier, injectTypeImport } from "./ast/imports.qwik.mjs";
|
|
12
12
|
import { readPackageJson } from "./package-json.qwik.mjs";
|
|
13
13
|
import { injectAsChildTypesImport, injectAsChildTypesIntoComponent, transformTypeFile } from "./transform-dts.qwik.mjs";
|
|
14
14
|
|
|
@@ -4,12 +4,13 @@ import MagicString from "magic-string";
|
|
|
4
4
|
import { parseSync } from "oxc-parser";
|
|
5
5
|
declare function injectAsChildTypesIntoComponent(node: Node, content: string, s: MagicString): boolean;
|
|
6
6
|
/**
|
|
7
|
-
* Injects AsChildTypes import
|
|
7
|
+
* Injects AsChildTypes import using a relative path to the local as-child-types file
|
|
8
8
|
*/
|
|
9
9
|
declare function injectAsChildTypesImport(options: {
|
|
10
10
|
ast: ReturnType<typeof parseSync>;
|
|
11
11
|
magicString: MagicString;
|
|
12
|
-
|
|
12
|
+
dtsPath: string;
|
|
13
|
+
declDir: string;
|
|
13
14
|
}): void;
|
|
14
|
-
declare function transformTypeFile(dtsPath: string, sourcePath: string): Promise<boolean>;
|
|
15
|
+
declare function transformTypeFile(dtsPath: string, sourcePath: string, declDir: string): Promise<boolean>;
|
|
15
16
|
export { injectAsChildTypesImport, injectAsChildTypesIntoComponent, transformTypeFile };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { findImportBySource, hasImportSpecifier, injectTypeImport } from "./ast/imports.qwik.mjs";
|
|
2
1
|
import { detectsRenderComponentUsage } from "./ast/qwik.qwik.mjs";
|
|
2
|
+
import { injectTypeImport } from "./ast/imports.qwik.mjs";
|
|
3
3
|
import { walkFiles } from "./fs.qwik.mjs";
|
|
4
4
|
import MagicString from "magic-string";
|
|
5
5
|
import { parseSync } from "oxc-parser";
|
|
6
6
|
import { walk } from "oxc-walker";
|
|
7
|
-
import { join, relative } from "node:path";
|
|
7
|
+
import { dirname, join, relative } from "node:path";
|
|
8
8
|
import { readFile, stat, writeFile } from "node:fs/promises";
|
|
9
9
|
|
|
10
10
|
//#region utils/transform-dts.ts
|
|
@@ -36,27 +36,21 @@ function injectAsChildTypesIntoComponent(node, content, s) {
|
|
|
36
36
|
return hasChanges;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Injects AsChildTypes import
|
|
39
|
+
* Injects AsChildTypes import using a relative path to the local as-child-types file
|
|
40
40
|
*/ function injectAsChildTypesImport(options) {
|
|
41
|
+
const asChildTypesTarget = join(options.declDir, "types");
|
|
42
|
+
let relImport = relative(dirname(options.dtsPath), asChildTypesTarget);
|
|
43
|
+
if (!relImport.startsWith(".")) relImport = "./" + relImport;
|
|
41
44
|
injectTypeImport({
|
|
42
45
|
ast: options.ast,
|
|
43
46
|
magicString: options.magicString,
|
|
44
|
-
importSource:
|
|
45
|
-
specifierName: "AsChildTypes"
|
|
46
|
-
existingImportNode: options.toolsImportNode
|
|
47
|
+
importSource: relImport,
|
|
48
|
+
specifierName: "AsChildTypes"
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
|
-
async function transformTypeFile(dtsPath, sourcePath) {
|
|
51
|
+
async function transformTypeFile(dtsPath, sourcePath, declDir) {
|
|
50
52
|
const content = await readFile(dtsPath, "utf-8");
|
|
51
|
-
|
|
52
|
-
if (hasAsChildTypesUsage) try {
|
|
53
|
-
const toolsImportNode = findImportBySource(parseSync(dtsPath, content), content, "@qds.dev/tools");
|
|
54
|
-
if (toolsImportNode) {
|
|
55
|
-
if (hasImportSpecifier(toolsImportNode, "AsChildTypes")) return false;
|
|
56
|
-
}
|
|
57
|
-
} catch {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
53
|
+
if (content.includes("AsChildTypes")) return false;
|
|
60
54
|
try {
|
|
61
55
|
if (!detectsRenderComponentUsage(await readFile(sourcePath, "utf-8"))) return false;
|
|
62
56
|
} catch {
|
|
@@ -69,11 +63,12 @@ async function transformTypeFile(dtsPath, sourcePath) {
|
|
|
69
63
|
walk(ast.program, { enter(node) {
|
|
70
64
|
if (injectAsChildTypesIntoComponent(node, content, s)) hasChanges = true;
|
|
71
65
|
} });
|
|
72
|
-
if (!hasChanges
|
|
66
|
+
if (!hasChanges) return false;
|
|
73
67
|
injectAsChildTypesImport({
|
|
74
68
|
ast,
|
|
75
69
|
magicString: s,
|
|
76
|
-
|
|
70
|
+
dtsPath,
|
|
71
|
+
declDir
|
|
77
72
|
});
|
|
78
73
|
await writeFile(dtsPath, s.toString(), "utf-8");
|
|
79
74
|
return true;
|
|
@@ -84,8 +79,8 @@ async function transformTypeFile(dtsPath, sourcePath) {
|
|
|
84
79
|
}
|
|
85
80
|
async function main() {
|
|
86
81
|
const sourceDir = process.argv[2] || "./src";
|
|
87
|
-
const declDir = process.argv[3] || "./lib
|
|
88
|
-
console.log(
|
|
82
|
+
const declDir = process.argv[3] || "./lib/src";
|
|
83
|
+
console.log(`Scanning ${sourceDir} for source files...`);
|
|
89
84
|
let processedCount = 0;
|
|
90
85
|
let changedCount = 0;
|
|
91
86
|
for await (const sourcePath of walkFiles(sourceDir, ".tsx")) {
|
|
@@ -96,12 +91,12 @@ async function main() {
|
|
|
96
91
|
continue;
|
|
97
92
|
}
|
|
98
93
|
processedCount++;
|
|
99
|
-
if (await transformTypeFile(dtsPath, sourcePath)) {
|
|
94
|
+
if (await transformTypeFile(dtsPath, sourcePath, declDir)) {
|
|
100
95
|
changedCount++;
|
|
101
|
-
console.log(
|
|
96
|
+
console.log(`Transformed ${dtsPath}`);
|
|
102
97
|
}
|
|
103
98
|
}
|
|
104
|
-
console.log(`\
|
|
99
|
+
console.log(`\nProcessed ${processedCount} files, transformed ${changedCount} files`);
|
|
105
100
|
}
|
|
106
101
|
if (import.meta.url === `file://${process.argv[1]}`) main().catch((error) => {
|
|
107
102
|
console.error("Error:", error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qds.dev/tools",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Tools and utilities for Qwik Design System",
|
|
6
6
|
"repository": {
|
|
@@ -8,40 +8,38 @@
|
|
|
8
8
|
"url": "https://github.com/kunai-consulting/qwik-design-system"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"lib"
|
|
12
|
-
"lib-types"
|
|
11
|
+
"lib"
|
|
13
12
|
],
|
|
14
13
|
"type": "module",
|
|
15
14
|
"sideEffects": false,
|
|
16
|
-
"main": "./lib/
|
|
17
|
-
"types": "./lib
|
|
15
|
+
"main": "./lib/index.qwik.mjs",
|
|
16
|
+
"types": "./lib/src/index.d.ts",
|
|
18
17
|
"exports": {
|
|
19
18
|
".": {
|
|
20
|
-
"types": "./lib
|
|
21
|
-
"import": "./lib/
|
|
19
|
+
"types": "./lib/src/index.d.ts",
|
|
20
|
+
"import": "./lib/index.qwik.mjs"
|
|
22
21
|
},
|
|
23
22
|
"./package.json": "./package.json",
|
|
24
23
|
"./vite": {
|
|
25
|
-
"types": "./lib
|
|
24
|
+
"types": "./lib/vite/index.d.ts",
|
|
26
25
|
"import": "./lib/vite/index.qwik.mjs"
|
|
27
26
|
},
|
|
28
27
|
"./utils": {
|
|
29
|
-
"types": "./lib
|
|
28
|
+
"types": "./lib/utils/index.d.ts",
|
|
30
29
|
"import": "./lib/utils/index.qwik.mjs"
|
|
31
30
|
},
|
|
32
31
|
"./rolldown": {
|
|
33
|
-
"types": "./lib
|
|
32
|
+
"types": "./lib/rolldown/index.d.ts",
|
|
34
33
|
"import": "./lib/rolldown/index.qwik.mjs"
|
|
35
34
|
},
|
|
36
35
|
"./playground": {
|
|
37
|
-
"types": "./lib
|
|
36
|
+
"types": "./lib/playground/index.d.ts",
|
|
38
37
|
"import": "./lib/playground/index.qwik.mjs"
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
40
|
"scripts": {
|
|
42
|
-
"
|
|
43
|
-
"build
|
|
44
|
-
"build.types": "tsc --emitDeclarationOnly --outDir ./lib-types",
|
|
41
|
+
"dev": "rolldown -c rolldown.config.ts -w",
|
|
42
|
+
"build": "rolldown -c rolldown.config.ts && tsc --emitDeclarationOnly --noEmit false && pnpm generate.icon.types",
|
|
45
43
|
"generate.icon.types": "node src/generate/icon-types.ts"
|
|
46
44
|
},
|
|
47
45
|
"dependencies": {
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import type * as GeneratedTypes from "../virtual-qds-icons";
|
|
2
|
-
export declare const academicons: typeof GeneratedTypes.academicons;
|
|
3
|
-
export declare const akaricons: typeof GeneratedTypes.akaricons;
|
|
4
|
-
export declare const antdesign: typeof GeneratedTypes.antdesign;
|
|
5
|
-
export declare const arcticons: typeof GeneratedTypes.arcticons;
|
|
6
|
-
export declare const basil: typeof GeneratedTypes.basil;
|
|
7
|
-
export declare const bi: typeof GeneratedTypes.bi;
|
|
8
|
-
export declare const bitcoinicons: typeof GeneratedTypes.bitcoinicons;
|
|
9
|
-
export declare const bpmn: typeof GeneratedTypes.bpmn;
|
|
10
|
-
export declare const brandico: typeof GeneratedTypes.brandico;
|
|
11
|
-
export declare const bubbles: typeof GeneratedTypes.bubbles;
|
|
12
|
-
export declare const bx: typeof GeneratedTypes.bx;
|
|
13
|
-
export declare const bxl: typeof GeneratedTypes.bxl;
|
|
14
|
-
export declare const bxs: typeof GeneratedTypes.bxs;
|
|
15
|
-
export declare const bytesize: typeof GeneratedTypes.bytesize;
|
|
16
|
-
export declare const carbon: typeof GeneratedTypes.carbon;
|
|
17
|
-
export declare const catppuccin: typeof GeneratedTypes.catppuccin;
|
|
18
|
-
export declare const cbi: typeof GeneratedTypes.cbi;
|
|
19
|
-
export declare const charm: typeof GeneratedTypes.charm;
|
|
20
|
-
export declare const ci: typeof GeneratedTypes.ci;
|
|
21
|
-
export declare const cib: typeof GeneratedTypes.cib;
|
|
22
|
-
export declare const cif: typeof GeneratedTypes.cif;
|
|
23
|
-
export declare const cil: typeof GeneratedTypes.cil;
|
|
24
|
-
export declare const circleflags: typeof GeneratedTypes.circleflags;
|
|
25
|
-
export declare const circum: typeof GeneratedTypes.circum;
|
|
26
|
-
export declare const clarity: typeof GeneratedTypes.clarity;
|
|
27
|
-
export declare const codex: typeof GeneratedTypes.codex;
|
|
28
|
-
export declare const codicon: typeof GeneratedTypes.codicon;
|
|
29
|
-
export declare const covid: typeof GeneratedTypes.covid;
|
|
30
|
-
export declare const cryptocurrency: typeof GeneratedTypes.cryptocurrency;
|
|
31
|
-
export declare const cryptocurrencycolor: typeof GeneratedTypes.cryptocurrencycolor;
|
|
32
|
-
export declare const cuida: typeof GeneratedTypes.cuida;
|
|
33
|
-
export declare const dashicons: typeof GeneratedTypes.dashicons;
|
|
34
|
-
export declare const devicon: typeof GeneratedTypes.devicon;
|
|
35
|
-
export declare const deviconline: typeof GeneratedTypes.deviconline;
|
|
36
|
-
export declare const deviconoriginal: typeof GeneratedTypes.deviconoriginal;
|
|
37
|
-
export declare const deviconplain: typeof GeneratedTypes.deviconplain;
|
|
38
|
-
export declare const dinkieicons: typeof GeneratedTypes.dinkieicons;
|
|
39
|
-
export declare const duoicons: typeof GeneratedTypes.duoicons;
|
|
40
|
-
export declare const ei: typeof GeneratedTypes.ei;
|
|
41
|
-
export declare const el: typeof GeneratedTypes.el;
|
|
42
|
-
export declare const emojione: typeof GeneratedTypes.emojione;
|
|
43
|
-
export declare const emojionemonotone: typeof GeneratedTypes.emojionemonotone;
|
|
44
|
-
export declare const emojionev1: typeof GeneratedTypes.emojionev1;
|
|
45
|
-
export declare const entypo: typeof GeneratedTypes.entypo;
|
|
46
|
-
export declare const entyposocial: typeof GeneratedTypes.entyposocial;
|
|
47
|
-
export declare const eosicons: typeof GeneratedTypes.eosicons;
|
|
48
|
-
export declare const ep: typeof GeneratedTypes.ep;
|
|
49
|
-
export declare const et: typeof GeneratedTypes.et;
|
|
50
|
-
export declare const eva: typeof GeneratedTypes.eva;
|
|
51
|
-
export declare const f7: typeof GeneratedTypes.f7;
|
|
52
|
-
export declare const fa: typeof GeneratedTypes.fa;
|
|
53
|
-
export declare const fa6brands: typeof GeneratedTypes.fa6brands;
|
|
54
|
-
export declare const fa6regular: typeof GeneratedTypes.fa6regular;
|
|
55
|
-
export declare const fa6solid: typeof GeneratedTypes.fa6solid;
|
|
56
|
-
export declare const fa7brands: typeof GeneratedTypes.fa7brands;
|
|
57
|
-
export declare const fa7regular: typeof GeneratedTypes.fa7regular;
|
|
58
|
-
export declare const fa7solid: typeof GeneratedTypes.fa7solid;
|
|
59
|
-
export declare const fabrands: typeof GeneratedTypes.fabrands;
|
|
60
|
-
export declare const fad: typeof GeneratedTypes.fad;
|
|
61
|
-
export declare const famicons: typeof GeneratedTypes.famicons;
|
|
62
|
-
export declare const faregular: typeof GeneratedTypes.faregular;
|
|
63
|
-
export declare const fasolid: typeof GeneratedTypes.fasolid;
|
|
64
|
-
export declare const fe: typeof GeneratedTypes.fe;
|
|
65
|
-
export declare const feather: typeof GeneratedTypes.feather;
|
|
66
|
-
export declare const fileicons: typeof GeneratedTypes.fileicons;
|
|
67
|
-
export declare const flag: typeof GeneratedTypes.flag;
|
|
68
|
-
export declare const flagpack: typeof GeneratedTypes.flagpack;
|
|
69
|
-
export declare const flatcoloricons: typeof GeneratedTypes.flatcoloricons;
|
|
70
|
-
export declare const flatui: typeof GeneratedTypes.flatui;
|
|
71
|
-
export declare const flowbite: typeof GeneratedTypes.flowbite;
|
|
72
|
-
export declare const fluent: typeof GeneratedTypes.fluent;
|
|
73
|
-
export declare const fluentcolor: typeof GeneratedTypes.fluentcolor;
|
|
74
|
-
export declare const fluentemoji: typeof GeneratedTypes.fluentemoji;
|
|
75
|
-
export declare const fluentemojiflat: typeof GeneratedTypes.fluentemojiflat;
|
|
76
|
-
export declare const fluentemojihighcontrast: typeof GeneratedTypes.fluentemojihighcontrast;
|
|
77
|
-
export declare const fluentmdl2: typeof GeneratedTypes.fluentmdl2;
|
|
78
|
-
export declare const fontelico: typeof GeneratedTypes.fontelico;
|
|
79
|
-
export declare const fontisto: typeof GeneratedTypes.fontisto;
|
|
80
|
-
export declare const formkit: typeof GeneratedTypes.formkit;
|
|
81
|
-
export declare const foundation: typeof GeneratedTypes.foundation;
|
|
82
|
-
export declare const fxemoji: typeof GeneratedTypes.fxemoji;
|
|
83
|
-
export declare const gala: typeof GeneratedTypes.gala;
|
|
84
|
-
export declare const gameicons: typeof GeneratedTypes.gameicons;
|
|
85
|
-
export declare const garden: typeof GeneratedTypes.garden;
|
|
86
|
-
export declare const geo: typeof GeneratedTypes.geo;
|
|
87
|
-
export declare const gg: typeof GeneratedTypes.gg;
|
|
88
|
-
export declare const gis: typeof GeneratedTypes.gis;
|
|
89
|
-
export declare const gravityui: typeof GeneratedTypes.gravityui;
|
|
90
|
-
export declare const gridicons: typeof GeneratedTypes.gridicons;
|
|
91
|
-
export declare const grommeticons: typeof GeneratedTypes.grommeticons;
|
|
92
|
-
export declare const guidance: typeof GeneratedTypes.guidance;
|
|
93
|
-
export declare const healthicons: typeof GeneratedTypes.healthicons;
|
|
94
|
-
export declare const heroicons: typeof GeneratedTypes.heroicons;
|
|
95
|
-
export declare const heroiconsoutline: typeof GeneratedTypes.heroiconsoutline;
|
|
96
|
-
export declare const heroiconssolid: typeof GeneratedTypes.heroiconssolid;
|
|
97
|
-
export declare const hugeicons: typeof GeneratedTypes.hugeicons;
|
|
98
|
-
export declare const humbleicons: typeof GeneratedTypes.humbleicons;
|
|
99
|
-
export declare const ic: typeof GeneratedTypes.ic;
|
|
100
|
-
export declare const icomoonfree: typeof GeneratedTypes.icomoonfree;
|
|
101
|
-
export declare const iconamoon: typeof GeneratedTypes.iconamoon;
|
|
102
|
-
export declare const iconoir: typeof GeneratedTypes.iconoir;
|
|
103
|
-
export declare const iconpark: typeof GeneratedTypes.iconpark;
|
|
104
|
-
export declare const iconparkoutline: typeof GeneratedTypes.iconparkoutline;
|
|
105
|
-
export declare const iconparksolid: typeof GeneratedTypes.iconparksolid;
|
|
106
|
-
export declare const iconparktwotone: typeof GeneratedTypes.iconparktwotone;
|
|
107
|
-
export declare const icons8: typeof GeneratedTypes.icons8;
|
|
108
|
-
export declare const il: typeof GeneratedTypes.il;
|
|
109
|
-
export declare const ion: typeof GeneratedTypes.ion;
|
|
110
|
-
export declare const iwwa: typeof GeneratedTypes.iwwa;
|
|
111
|
-
export declare const ix: typeof GeneratedTypes.ix;
|
|
112
|
-
export declare const jam: typeof GeneratedTypes.jam;
|
|
113
|
-
export declare const la: typeof GeneratedTypes.la;
|
|
114
|
-
export declare const letsicons: typeof GeneratedTypes.letsicons;
|
|
115
|
-
export declare const lineicons: typeof GeneratedTypes.lineicons;
|
|
116
|
-
export declare const linemd: typeof GeneratedTypes.linemd;
|
|
117
|
-
export declare const logos: typeof GeneratedTypes.logos;
|
|
118
|
-
export declare const ls: typeof GeneratedTypes.ls;
|
|
119
|
-
export declare const lsicon: typeof GeneratedTypes.lsicon;
|
|
120
|
-
export declare const lucide: typeof GeneratedTypes.lucide;
|
|
121
|
-
export declare const lucidelab: typeof GeneratedTypes.lucidelab;
|
|
122
|
-
export declare const mage: typeof GeneratedTypes.mage;
|
|
123
|
-
export declare const majesticons: typeof GeneratedTypes.majesticons;
|
|
124
|
-
export declare const maki: typeof GeneratedTypes.maki;
|
|
125
|
-
export declare const map: typeof GeneratedTypes.map;
|
|
126
|
-
export declare const marketeq: typeof GeneratedTypes.marketeq;
|
|
127
|
-
export declare const materialicontheme: typeof GeneratedTypes.materialicontheme;
|
|
128
|
-
export declare const materialsymbols: typeof GeneratedTypes.materialsymbols;
|
|
129
|
-
export declare const materialsymbolslight: typeof GeneratedTypes.materialsymbolslight;
|
|
130
|
-
export declare const mdi: typeof GeneratedTypes.mdi;
|
|
131
|
-
export declare const mdilight: typeof GeneratedTypes.mdilight;
|
|
132
|
-
export declare const medicalicon: typeof GeneratedTypes.medicalicon;
|
|
133
|
-
export declare const memory: typeof GeneratedTypes.memory;
|
|
134
|
-
export declare const meteocons: typeof GeneratedTypes.meteocons;
|
|
135
|
-
export declare const meteoricons: typeof GeneratedTypes.meteoricons;
|
|
136
|
-
export declare const mi: typeof GeneratedTypes.mi;
|
|
137
|
-
export declare const mingcute: typeof GeneratedTypes.mingcute;
|
|
138
|
-
export declare const monoicons: typeof GeneratedTypes.monoicons;
|
|
139
|
-
export declare const mynaui: typeof GeneratedTypes.mynaui;
|
|
140
|
-
export declare const nimbus: typeof GeneratedTypes.nimbus;
|
|
141
|
-
export declare const nonicons: typeof GeneratedTypes.nonicons;
|
|
142
|
-
export declare const noto: typeof GeneratedTypes.noto;
|
|
143
|
-
export declare const notov1: typeof GeneratedTypes.notov1;
|
|
144
|
-
export declare const nrk: typeof GeneratedTypes.nrk;
|
|
145
|
-
export declare const octicon: typeof GeneratedTypes.octicon;
|
|
146
|
-
export declare const oi: typeof GeneratedTypes.oi;
|
|
147
|
-
export declare const ooui: typeof GeneratedTypes.ooui;
|
|
148
|
-
export declare const openmoji: typeof GeneratedTypes.openmoji;
|
|
149
|
-
export declare const oui: typeof GeneratedTypes.oui;
|
|
150
|
-
export declare const pajamas: typeof GeneratedTypes.pajamas;
|
|
151
|
-
export declare const pepicons: typeof GeneratedTypes.pepicons;
|
|
152
|
-
export declare const pepiconspencil: typeof GeneratedTypes.pepiconspencil;
|
|
153
|
-
export declare const pepiconspop: typeof GeneratedTypes.pepiconspop;
|
|
154
|
-
export declare const pepiconsprint: typeof GeneratedTypes.pepiconsprint;
|
|
155
|
-
export declare const ph: typeof GeneratedTypes.ph;
|
|
156
|
-
export declare const picon: typeof GeneratedTypes.picon;
|
|
157
|
-
export declare const pixel: typeof GeneratedTypes.pixel;
|
|
158
|
-
export declare const pixelarticons: typeof GeneratedTypes.pixelarticons;
|
|
159
|
-
export declare const prime: typeof GeneratedTypes.prime;
|
|
160
|
-
export declare const proicons: typeof GeneratedTypes.proicons;
|
|
161
|
-
export declare const ps: typeof GeneratedTypes.ps;
|
|
162
|
-
export declare const qlementineicons: typeof GeneratedTypes.qlementineicons;
|
|
163
|
-
export declare const quill: typeof GeneratedTypes.quill;
|
|
164
|
-
export declare const radixicons: typeof GeneratedTypes.radixicons;
|
|
165
|
-
export declare const raphael: typeof GeneratedTypes.raphael;
|
|
166
|
-
export declare const ri: typeof GeneratedTypes.ri;
|
|
167
|
-
export declare const riveticons: typeof GeneratedTypes.riveticons;
|
|
168
|
-
export declare const si: typeof GeneratedTypes.si;
|
|
169
|
-
export declare const sidekickicons: typeof GeneratedTypes.sidekickicons;
|
|
170
|
-
export declare const siglyph: typeof GeneratedTypes.siglyph;
|
|
171
|
-
export declare const simpleicons: typeof GeneratedTypes.simpleicons;
|
|
172
|
-
export declare const simplelineicons: typeof GeneratedTypes.simplelineicons;
|
|
173
|
-
export declare const skillicons: typeof GeneratedTypes.skillicons;
|
|
174
|
-
export declare const solar: typeof GeneratedTypes.solar;
|
|
175
|
-
export declare const stash: typeof GeneratedTypes.stash;
|
|
176
|
-
export declare const streamline: typeof GeneratedTypes.streamline;
|
|
177
|
-
export declare const streamlineblock: typeof GeneratedTypes.streamlineblock;
|
|
178
|
-
export declare const streamlinecolor: typeof GeneratedTypes.streamlinecolor;
|
|
179
|
-
export declare const streamlinecyber: typeof GeneratedTypes.streamlinecyber;
|
|
180
|
-
export declare const streamlinecybercolor: typeof GeneratedTypes.streamlinecybercolor;
|
|
181
|
-
export declare const streamlineemojis: typeof GeneratedTypes.streamlineemojis;
|
|
182
|
-
export declare const streamlineflex: typeof GeneratedTypes.streamlineflex;
|
|
183
|
-
export declare const streamlineflexcolor: typeof GeneratedTypes.streamlineflexcolor;
|
|
184
|
-
export declare const streamlinefreehand: typeof GeneratedTypes.streamlinefreehand;
|
|
185
|
-
export declare const streamlinefreehandcolor: typeof GeneratedTypes.streamlinefreehandcolor;
|
|
186
|
-
export declare const streamlineguidance: typeof GeneratedTypes.streamlineguidance;
|
|
187
|
-
export declare const streamlinekameleoncolor: typeof GeneratedTypes.streamlinekameleoncolor;
|
|
188
|
-
export declare const streamlinelogos: typeof GeneratedTypes.streamlinelogos;
|
|
189
|
-
export declare const streamlinepixel: typeof GeneratedTypes.streamlinepixel;
|
|
190
|
-
export declare const streamlineplump: typeof GeneratedTypes.streamlineplump;
|
|
191
|
-
export declare const streamlineplumpcolor: typeof GeneratedTypes.streamlineplumpcolor;
|
|
192
|
-
export declare const streamlinesharp: typeof GeneratedTypes.streamlinesharp;
|
|
193
|
-
export declare const streamlinesharpcolor: typeof GeneratedTypes.streamlinesharpcolor;
|
|
194
|
-
export declare const streamlinestickiescolor: typeof GeneratedTypes.streamlinestickiescolor;
|
|
195
|
-
export declare const streamlineultimate: typeof GeneratedTypes.streamlineultimate;
|
|
196
|
-
export declare const streamlineultimatecolor: typeof GeneratedTypes.streamlineultimatecolor;
|
|
197
|
-
export declare const subway: typeof GeneratedTypes.subway;
|
|
198
|
-
export declare const svgspinners: typeof GeneratedTypes.svgspinners;
|
|
199
|
-
export declare const systemuicons: typeof GeneratedTypes.systemuicons;
|
|
200
|
-
export declare const tabler: typeof GeneratedTypes.tabler;
|
|
201
|
-
export declare const tdesign: typeof GeneratedTypes.tdesign;
|
|
202
|
-
export declare const teenyicons: typeof GeneratedTypes.teenyicons;
|
|
203
|
-
export declare const token: typeof GeneratedTypes.token;
|
|
204
|
-
export declare const tokenbranded: typeof GeneratedTypes.tokenbranded;
|
|
205
|
-
export declare const topcoat: typeof GeneratedTypes.topcoat;
|
|
206
|
-
export declare const twemoji: typeof GeneratedTypes.twemoji;
|
|
207
|
-
export declare const typcn: typeof GeneratedTypes.typcn;
|
|
208
|
-
export declare const uil: typeof GeneratedTypes.uil;
|
|
209
|
-
export declare const uim: typeof GeneratedTypes.uim;
|
|
210
|
-
export declare const uis: typeof GeneratedTypes.uis;
|
|
211
|
-
export declare const uit: typeof GeneratedTypes.uit;
|
|
212
|
-
export declare const uiw: typeof GeneratedTypes.uiw;
|
|
213
|
-
export declare const unjs: typeof GeneratedTypes.unjs;
|
|
214
|
-
export declare const vaadin: typeof GeneratedTypes.vaadin;
|
|
215
|
-
export declare const vs: typeof GeneratedTypes.vs;
|
|
216
|
-
export declare const vscodeicons: typeof GeneratedTypes.vscodeicons;
|
|
217
|
-
export declare const websymbol: typeof GeneratedTypes.websymbol;
|
|
218
|
-
export declare const weui: typeof GeneratedTypes.weui;
|
|
219
|
-
export declare const whh: typeof GeneratedTypes.whh;
|
|
220
|
-
export declare const wi: typeof GeneratedTypes.wi;
|
|
221
|
-
export declare const wpf: typeof GeneratedTypes.wpf;
|
|
222
|
-
export declare const zmdi: typeof GeneratedTypes.zmdi;
|
|
223
|
-
export declare const zondicons: typeof GeneratedTypes.zondicons;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export type PacksMap = Record<string, {
|
|
2
|
-
iconifyPrefix: string;
|
|
3
|
-
sanitizeIcon?: (pascal: string) => string;
|
|
4
|
-
}>;
|
|
5
|
-
export type IconsPluginOptions = {
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* The sources to scan for imports. By default this includes QDS, you can also add your own when creating library wrappers.
|
|
9
|
-
*/
|
|
10
|
-
importSources?: string[];
|
|
11
|
-
packs?: PacksMap;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Rolldown plugin that transforms icon JSX elements to direct <svg /> calls
|
|
15
|
-
* @param options - Plugin configuration options
|
|
16
|
-
* @returns Rolldown-compatible plugin object
|
|
17
|
-
*/
|
|
18
|
-
export declare const icons: (options?: IconsPluginOptions) => {
|
|
19
|
-
name: string;
|
|
20
|
-
enforce: "pre";
|
|
21
|
-
configResolved(): void;
|
|
22
|
-
transform: {
|
|
23
|
-
filter: {
|
|
24
|
-
id: import("magic-regexp").MagicRegExp<"/\\.(?:tsx|jsx|mdx)$/", never, [], never>;
|
|
25
|
-
};
|
|
26
|
-
handler(code: string, id: string): {
|
|
27
|
-
code: string;
|
|
28
|
-
map: import("magic-string").SourceMap;
|
|
29
|
-
} | null;
|
|
30
|
-
};
|
|
31
|
-
resolveId: {
|
|
32
|
-
filter: {
|
|
33
|
-
id: import("magic-regexp").MagicRegExp<"/^virtual:icons\\//", never, [], never>;
|
|
34
|
-
};
|
|
35
|
-
handler(source: string): string | null;
|
|
36
|
-
};
|
|
37
|
-
load: {
|
|
38
|
-
filter: {
|
|
39
|
-
id: import("magic-regexp").MagicRegExp<`/${string}virtual:icons\\//`, never, [], never>;
|
|
40
|
-
};
|
|
41
|
-
handler(id: string): Promise<{
|
|
42
|
-
code: string;
|
|
43
|
-
} | null>;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rolldown plugin to handle CSS imports with ?inline query parameter
|
|
3
|
-
* Mimics Vite's ?inline behavior by returning CSS content as a string
|
|
4
|
-
*/
|
|
5
|
-
interface PluginContext {
|
|
6
|
-
error: (msg: string) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function inlineCssPlugin(): {
|
|
9
|
-
name: string;
|
|
10
|
-
resolveId: {
|
|
11
|
-
filter: {
|
|
12
|
-
id: import("magic-regexp").MagicRegExp<"/\\.css(?:$|\\?(?:[^\n])+)/", never, any[], never>;
|
|
13
|
-
};
|
|
14
|
-
handler(source: string, _importer?: string, _options?: unknown): null;
|
|
15
|
-
};
|
|
16
|
-
load: {
|
|
17
|
-
filter: {
|
|
18
|
-
id: import("magic-regexp").MagicRegExp<"/\\.css(?:$|\\?(?:[^\n])+)/", never, any[], never>;
|
|
19
|
-
};
|
|
20
|
-
handler(this: PluginContext, id: string): {
|
|
21
|
-
code: string;
|
|
22
|
-
map: null;
|
|
23
|
-
} | null;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { OutputOptions } from "rolldown";
|
|
2
|
-
/**
|
|
3
|
-
* Plugin to ensure .qwik.mjs extension and correct output dir
|
|
4
|
-
* Runs after qwikRollup to override its settings
|
|
5
|
-
*/
|
|
6
|
-
export declare function qwikRolldown(): {
|
|
7
|
-
name: string;
|
|
8
|
-
outputOptions(outputOpts: OutputOptions): OutputOptions;
|
|
9
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{lib-types/tools/src/generate/icon-types.unit.d.ts → lib/rolldown/inline-asset.unit.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|