@web-portfolio/icons-sanity 1.0.3 → 3.0.0

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.cts DELETED
@@ -1,40 +0,0 @@
1
- import * as sanity from 'sanity';
2
- import { StringInputProps } from 'sanity';
3
- import * as react from 'react';
4
-
5
- declare const iconRef: {
6
- type: "string";
7
- name: "iconRef";
8
- } & Omit<sanity.StringDefinition, "preview">;
9
-
10
- /**
11
- * The shape of one metadata entry, redeclared here rather than re-exported
12
- * from icons-core. icons-core is private and unpublished, so any reference to
13
- * it that survives into dist/*.d.ts is a type import consumers cannot resolve.
14
- * Structurally identical to icons-core's `IconMetadata` — and the picker
15
- * passes real metadata entries to the functions below, so a drift in the
16
- * fields this actually uses fails typecheck at those call sites.
17
- *
18
- * Rendering (viewBox/innerHTML) isn't part of this shape at all: the picker
19
- * delegates actual icon markup to `@web-portfolio/icons`'s `<Icon>` rather
20
- * than reading SVG data out of icons-core directly, so this package never
21
- * needs to bundle it.
22
- */
23
- interface IconEntry {
24
- label: string;
25
- tags: string[];
26
- category: string | null;
27
- }
28
- declare function matchesQuery(name: string, entry: IconEntry, query: string): boolean;
29
- /**
30
- * Alphabetical order alone buries the obvious answer: searching "react" put
31
- * `react` behind nothing, but searching "go" led with `godot` and `gopher`
32
- * rather than `go`. Lower score wins; ties fall back to alphabetical.
33
- */
34
- declare function rankMatch(name: string, entry: IconEntry, query: string): number;
35
- declare function formatCategoryLabel(category: string): string;
36
- declare function IconPickerInput(props: StringInputProps): react.JSX.Element;
37
-
38
- declare const sanityIconPicker: sanity.Plugin<void>;
39
-
40
- export { type IconEntry, IconPickerInput, formatCategoryLabel, iconRef, matchesQuery, rankMatch, sanityIconPicker };