@studiocms/ui 1.0.0-beta.6 → 1.0.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/events.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** biome-ignore-all lint/correctness/noUnusedVariables: Global augments */
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* CustomEventMap defines the custom events used in the application.
|
|
3
5
|
*
|
|
@@ -39,6 +41,18 @@ interface SuiTooltipApi {
|
|
|
39
41
|
hide: (id: string) => void;
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
interface Window {
|
|
45
|
+
/**
|
|
46
|
+
* The StudioCMS UI API, which includes various tools and utilities for the UI.
|
|
47
|
+
*/
|
|
48
|
+
sui: {
|
|
49
|
+
/**
|
|
50
|
+
* The tooltip API, which provides methods for managing tooltips in the UI.
|
|
51
|
+
*/
|
|
52
|
+
tooltips: SuiTooltipApi;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
42
56
|
/**
|
|
43
57
|
* Extends the global `Document` interface to include custom event handling methods.
|
|
44
58
|
*
|
|
@@ -89,16 +103,4 @@ declare global {
|
|
|
89
103
|
*/
|
|
90
104
|
dispatchEvent<K extends keyof CustomEventMap>(ev: CustomEventMap[K]): void;
|
|
91
105
|
}
|
|
92
|
-
|
|
93
|
-
interface Window {
|
|
94
|
-
/**
|
|
95
|
-
* The StudioCMS UI API, which includes various tools and utilities for the UI.
|
|
96
|
-
*/
|
|
97
|
-
sui: {
|
|
98
|
-
/**
|
|
99
|
-
* The tooltip API, which provides methods for managing tooltips in the UI.
|
|
100
|
-
*/
|
|
101
|
-
tooltips: SuiTooltipApi;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
106
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triple slash references for ambient types
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The references are duplicated here to ensure that they are included in the
|
|
6
|
+
* emitted declaration files. as well as available in the source code for IDEs
|
|
7
|
+
* during development.
|
|
8
|
+
*/
|
|
1
9
|
/// <reference path="events.d.ts" preserve="true" />
|
|
2
10
|
/// <reference path="virtuals.d.ts" preserve="true" />
|
|
3
11
|
import type { IconifyJSON } from '@iconify/types';
|
package/dist/utils/headers.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export declare const HeadConfigSchema: () => z.ZodDefault<z.ZodArray<z.ZodObject
|
|
|
8
8
|
/** Content to place inside the tag (optional). */
|
|
9
9
|
content: z.ZodDefault<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
tag: "
|
|
11
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
12
12
|
attrs: Record<string, string | boolean | undefined>;
|
|
13
13
|
content: string;
|
|
14
14
|
}, {
|
|
15
|
-
tag: "
|
|
15
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
16
16
|
attrs?: Record<string, string | boolean | undefined> | undefined;
|
|
17
17
|
content?: string | undefined;
|
|
18
18
|
}>, "many">>;
|
|
@@ -29,7 +29,7 @@ export declare const HeadConfigSchema: () => z.ZodDefault<z.ZodArray<z.ZodObject
|
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
31
|
export declare const headDefaults: (title: string, description: string, Astro: AstroGlobalPartial, ogImage: string | undefined, canonical: URL | undefined) => {
|
|
32
|
-
tag: "
|
|
32
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
33
33
|
attrs?: Record<string, string | boolean | undefined> | undefined;
|
|
34
34
|
content?: string | undefined;
|
|
35
35
|
}[];
|
|
@@ -41,11 +41,11 @@ export declare const HeadSchema: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
|
41
41
|
/** Content to place inside the tag (optional). */
|
|
42
42
|
content: z.ZodDefault<z.ZodString>;
|
|
43
43
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
tag: "
|
|
44
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
45
45
|
attrs: Record<string, string | boolean | undefined>;
|
|
46
46
|
content: string;
|
|
47
47
|
}, {
|
|
48
|
-
tag: "
|
|
48
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
49
49
|
attrs?: Record<string, string | boolean | undefined> | undefined;
|
|
50
50
|
content?: string | undefined;
|
|
51
51
|
}>, "many">>;
|
|
@@ -69,21 +69,21 @@ export declare function hasOneOf(head: HeadConfig, entry: HeadConfig[number], ke
|
|
|
69
69
|
export declare function getAttr(keys: string[], entry: HeadConfig[number]): [key: string, value: string | boolean] | undefined;
|
|
70
70
|
/** Merge two heads, overwriting entries in the first head that exist in the second. */
|
|
71
71
|
export declare function mergeHead(oldHead: HeadConfig, newHead: HeadConfig): {
|
|
72
|
-
tag: "
|
|
72
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
73
73
|
attrs: Record<string, string | boolean | undefined>;
|
|
74
74
|
content: string;
|
|
75
75
|
}[];
|
|
76
76
|
/** Sort head tags to place important tags first and relegate “SEO” meta tags. */
|
|
77
77
|
export declare function sortHead(head: HeadConfig): {
|
|
78
|
-
tag: "
|
|
78
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
79
79
|
attrs: Record<string, string | boolean | undefined>;
|
|
80
80
|
content: string;
|
|
81
81
|
}[];
|
|
82
82
|
/** Get the relative importance of a specific head tag. */
|
|
83
|
-
export declare function getImportance(entry: HeadConfig[number]):
|
|
83
|
+
export declare function getImportance(entry: HeadConfig[number]): 80 | 0 | 100 | 90 | 70;
|
|
84
84
|
/** Create a fully parsed, merged, and sorted head entry array from multiple sources. */
|
|
85
85
|
export declare function createHead(defaultHeaders: HeadUserConfig, ...heads: HeadConfig[]): {
|
|
86
|
-
tag: "
|
|
86
|
+
tag: "base" | "link" | "meta" | "noscript" | "script" | "style" | "template" | "title";
|
|
87
87
|
attrs: Record<string, string | boolean | undefined>;
|
|
88
88
|
content: string;
|
|
89
89
|
}[];
|