@pantoken/icons 0.2.0 → 0.2.1
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/index.d.mts +8 -9
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconResolver, PantokenPlugin } from "@pantoken/model";
|
|
2
2
|
//#region src/index.d.ts
|
|
3
3
|
/** A pantoken icon, derived from an `<image>` token. */
|
|
4
|
-
interface PantokenIcon {
|
|
4
|
+
export interface PantokenIcon {
|
|
5
5
|
/** The icon name, without the `--instui-icon-` prefix (e.g. `arrow-left`). */
|
|
6
6
|
name: string;
|
|
7
7
|
/** The `url('data:image/svg+xml;utf8,…')` value, as stored in the IR. */
|
|
@@ -30,7 +30,7 @@ interface PantokenIcon {
|
|
|
30
30
|
* icons.filter((i) => i.source === "lucide"); // just the Lucide glyphs
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
declare const icons: PantokenIcon[];
|
|
33
|
+
export declare const icons: PantokenIcon[];
|
|
34
34
|
/**
|
|
35
35
|
* Every pantoken icon, keyed by name.
|
|
36
36
|
*
|
|
@@ -41,7 +41,7 @@ declare const icons: PantokenIcon[];
|
|
|
41
41
|
* iconsByName.get("arrow-left")?.svg; // inline SVG markup
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
declare const iconsByName: Map<string, PantokenIcon>;
|
|
44
|
+
export declare const iconsByName: Map<string, PantokenIcon>;
|
|
45
45
|
/**
|
|
46
46
|
* Look up an icon by name.
|
|
47
47
|
*
|
|
@@ -53,7 +53,7 @@ declare const iconsByName: Map<string, PantokenIcon>;
|
|
|
53
53
|
* icon?.viewBox; // "0 0 24 24"
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
declare function getIcon(name: string): PantokenIcon | undefined;
|
|
56
|
+
export declare function getIcon(name: string): PantokenIcon | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* An {@link IconResolver} backed by the pantoken icon set (for the plugin/rehype stages).
|
|
59
59
|
*
|
|
@@ -64,9 +64,9 @@ declare function getIcon(name: string): PantokenIcon | undefined;
|
|
|
64
64
|
* resolve("arrow-left"); // { name, svg, viewBox, source } | undefined
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
declare const resolve: IconResolver;
|
|
67
|
+
export declare const resolve: IconResolver;
|
|
68
68
|
/** Options shared by the icon-resolving renderers ({@link buildIconResolverChain}). */
|
|
69
|
-
interface IconResolverChainOptions {
|
|
69
|
+
export interface IconResolverChainOptions {
|
|
70
70
|
/** An explicit resolver, tried before the built-in pantoken icon set. */
|
|
71
71
|
resolve?: IconResolver;
|
|
72
72
|
/** Plugins whose `rehype` hooks contribute resolvers (tried first). */
|
|
@@ -85,6 +85,5 @@ interface IconResolverChainOptions {
|
|
|
85
85
|
* resolveIcon("arrow-left"); // { name, svg, viewBox, source } | undefined
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
|
-
declare function buildIconResolverChain(options: IconResolverChainOptions): IconResolver;
|
|
89
|
-
//#endregion
|
|
90
|
-
export { IconResolverChainOptions, PantokenIcon, buildIconResolverChain, getIcon, icons, iconsByName, resolve };
|
|
88
|
+
export declare function buildIconResolverChain(options: IconResolverChainOptions): IconResolver;
|
|
89
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantoken/icons",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "An ergonomic view over the pantoken IR's <image> tokens: decoded SVGs and per-icon metadata.",
|
|
5
|
-
"homepage": "https://pantoken.
|
|
5
|
+
"homepage": "https://pantoken.app",
|
|
6
6
|
"bugs": "https://github.com/thedannywahl/pantoken/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"provenance": true
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@pantoken/model": "0.3.
|
|
28
|
-
"@pantoken/tokens": "0.3.
|
|
29
|
-
"@pantoken/utils": "1.0.
|
|
27
|
+
"@pantoken/model": "0.3.2",
|
|
28
|
+
"@pantoken/tokens": "0.3.1",
|
|
29
|
+
"@pantoken/utils": "1.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^26.
|
|
32
|
+
"@types/node": "^26.5.0",
|
|
33
33
|
"typescript": "^7.0.2",
|
|
34
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.
|
|
35
|
-
"vite-plus": "0.3.
|
|
34
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
35
|
+
"vite-plus": "0.3.1"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=22.18.0"
|