@sakoa/ui 0.2.0 → 0.2.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/dist/cli/index.js +1 -1
- package/package.json +1 -1
- package/registry/source/lib/icon.ts +14 -0
package/dist/cli/index.js
CHANGED
|
@@ -8510,7 +8510,7 @@ function resolveDependencies(registryRoot, name, visited = /* @__PURE__ */ new S
|
|
|
8510
8510
|
import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync } from "fs";
|
|
8511
8511
|
import { resolve as resolve4, dirname, relative, extname } from "path";
|
|
8512
8512
|
var PROVENANCE_PREFIX = "// @saka-ui/registry";
|
|
8513
|
-
var LIB_FILES = ["lib/utils.ts"];
|
|
8513
|
+
var LIB_FILES = ["lib/utils.ts", "lib/icon.ts"];
|
|
8514
8514
|
function copyLibFiles(registrySourceRoot, config, cwd) {
|
|
8515
8515
|
const results = [];
|
|
8516
8516
|
for (const libFile of LIB_FILES) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Component } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Icon prop type: accepts either an MDI icon name string (e.g. "home")
|
|
5
|
+
* or a Vue component (e.g. a Lucide icon component).
|
|
6
|
+
*/
|
|
7
|
+
export type IconProp = string | Component
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Check if an icon prop value is a Vue component (not a string).
|
|
11
|
+
*/
|
|
12
|
+
export function isIconComponent(icon: IconProp): icon is Component {
|
|
13
|
+
return typeof icon !== 'string'
|
|
14
|
+
}
|