@openpkg-ts/ui 0.5.1 → 0.5.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/badge/index.d.ts +12 -2
- package/dist/docskit/index.d.ts +11 -2
- package/package.json +1 -1
- package/src/styles/docskit.css +64 -31
package/dist/badge/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
type KindBadgeKind = "function" | "class" | "interface" | "type" | "enum" | "variable" | "namespace" | "module" | "reference" | "external";
|
|
3
3
|
type KindBadgeSize = "sm" | "md";
|
|
4
|
-
declare const kindBadgeVariants:
|
|
4
|
+
declare const kindBadgeVariants: (props?: {
|
|
5
|
+
kind?: KindBadgeKind | null;
|
|
6
|
+
size?: KindBadgeSize | null;
|
|
7
|
+
class?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => string;
|
|
5
10
|
interface KindBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
11
|
kind?: KindBadgeKind | null;
|
|
7
12
|
size?: KindBadgeSize | null;
|
|
@@ -10,7 +15,12 @@ interface KindBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
10
15
|
declare const KindBadge: React.ForwardRefExoticComponent<KindBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
11
16
|
type StatusBadgeStatus = "success" | "warning" | "error" | "neutral";
|
|
12
17
|
type StatusBadgeSize = "sm" | "md";
|
|
13
|
-
declare const statusBadgeVariants:
|
|
18
|
+
declare const statusBadgeVariants: (props?: {
|
|
19
|
+
status?: StatusBadgeStatus | null;
|
|
20
|
+
size?: StatusBadgeSize | null;
|
|
21
|
+
class?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}) => string;
|
|
14
24
|
interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
15
25
|
status?: StatusBadgeStatus | null;
|
|
16
26
|
size?: StatusBadgeSize | null;
|
package/dist/docskit/index.d.ts
CHANGED
|
@@ -145,7 +145,12 @@ declare function CollapsiblePanel({ title, children, defaultExpanded, expanded:
|
|
|
145
145
|
import * as React6 from "react";
|
|
146
146
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
147
147
|
type EndpointBadgeSize = "sm" | "md";
|
|
148
|
-
declare const endpointBadgeVariants:
|
|
148
|
+
declare const endpointBadgeVariants: (props?: {
|
|
149
|
+
method?: HttpMethod | null;
|
|
150
|
+
size?: EndpointBadgeSize | null;
|
|
151
|
+
class?: string;
|
|
152
|
+
className?: string;
|
|
153
|
+
}) => string;
|
|
149
154
|
interface EndpointBadgeProps extends React6.HTMLAttributes<HTMLSpanElement> {
|
|
150
155
|
method: HttpMethod;
|
|
151
156
|
size?: EndpointBadgeSize | null;
|
|
@@ -664,7 +669,11 @@ type TypeColor = "string" | "number" | "boolean" | "null" | "undefined" | "objec
|
|
|
664
669
|
* Type coloring for syntax display.
|
|
665
670
|
* Follows Stripe-style: consistent colors for primitives vs complex types.
|
|
666
671
|
*/
|
|
667
|
-
declare const typeBadgeVariants:
|
|
672
|
+
declare const typeBadgeVariants: (props?: {
|
|
673
|
+
typeColor?: TypeColor | null;
|
|
674
|
+
class?: string;
|
|
675
|
+
className?: string;
|
|
676
|
+
}) => string;
|
|
668
677
|
interface TypeBadgeProps extends React13.HTMLAttributes<HTMLSpanElement> {
|
|
669
678
|
/** Type string to display */
|
|
670
679
|
type: string;
|
package/package.json
CHANGED
package/src/styles/docskit.css
CHANGED
|
@@ -6,8 +6,40 @@
|
|
|
6
6
|
* Usage: @import '@openpkg-ts/ui/styles/docskit.css';
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/* CodeHike custom theme (
|
|
9
|
+
/* CodeHike custom theme (light default) */
|
|
10
10
|
:root {
|
|
11
|
+
--ch-0: light;
|
|
12
|
+
--ch-1: #999999;
|
|
13
|
+
--ch-2: #c9555a;
|
|
14
|
+
--ch-3: #3a3a3a;
|
|
15
|
+
--ch-4: #3a3a3a;
|
|
16
|
+
--ch-5: #7c3aed;
|
|
17
|
+
--ch-6: #b8860b;
|
|
18
|
+
--ch-7: #c9555a;
|
|
19
|
+
--ch-8: #b8860b;
|
|
20
|
+
--ch-9: #c9555a;
|
|
21
|
+
--ch-10: #ebebeb;
|
|
22
|
+
--ch-11: #fde8e8;
|
|
23
|
+
--ch-12: #e8f5e8;
|
|
24
|
+
--ch-13: #fdf0d5;
|
|
25
|
+
--ch-14: #e8e8e8;
|
|
26
|
+
--ch-15: #999999;
|
|
27
|
+
--ch-16: #f5f5f5;
|
|
28
|
+
--ch-17: #d0d0d080;
|
|
29
|
+
--ch-18: #fdff0033;
|
|
30
|
+
--ch-19: #c9555a;
|
|
31
|
+
--ch-20: #d0d0e0;
|
|
32
|
+
--ch-21: #c9555a;
|
|
33
|
+
--ch-22: #ebebeb;
|
|
34
|
+
--ch-23: #e0e0e0;
|
|
35
|
+
--ch-24: #b0b0b0;
|
|
36
|
+
--ch-25: #b0b0b033;
|
|
37
|
+
--ch-26: #f5f5f5e6;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* CodeHike custom theme (dark) — explicit class or data attribute */
|
|
41
|
+
.dark,
|
|
42
|
+
[data-theme="dark"] {
|
|
11
43
|
--ch-0: dark;
|
|
12
44
|
--ch-1: #5c5c5c;
|
|
13
45
|
--ch-2: #c9555a;
|
|
@@ -37,36 +69,37 @@
|
|
|
37
69
|
--ch-26: #1a1a1ae6;
|
|
38
70
|
}
|
|
39
71
|
|
|
40
|
-
/* CodeHike
|
|
41
|
-
|
|
42
|
-
[data-theme="light"] {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
/* CodeHike dark theme — system preference */
|
|
73
|
+
@media (prefers-color-scheme: dark) {
|
|
74
|
+
:root:not(.light):not([data-theme="light"]) {
|
|
75
|
+
--ch-0: dark;
|
|
76
|
+
--ch-1: #5c5c5c;
|
|
77
|
+
--ch-2: #c9555a;
|
|
78
|
+
--ch-3: #d4d4d4;
|
|
79
|
+
--ch-4: #d4d4d4;
|
|
80
|
+
--ch-5: #c4a7e7;
|
|
81
|
+
--ch-6: #d4a553;
|
|
82
|
+
--ch-7: #c9555a;
|
|
83
|
+
--ch-8: #d4a553;
|
|
84
|
+
--ch-9: #c9555a;
|
|
85
|
+
--ch-10: #2a2a2a;
|
|
86
|
+
--ch-11: #3a1515;
|
|
87
|
+
--ch-12: #1a2a1a;
|
|
88
|
+
--ch-13: #3a2a15;
|
|
89
|
+
--ch-14: #1e1e1e;
|
|
90
|
+
--ch-15: #5c5c5c;
|
|
91
|
+
--ch-16: #1a1a1a;
|
|
92
|
+
--ch-17: #3a3a3a1a;
|
|
93
|
+
--ch-18: #ffffff0b;
|
|
94
|
+
--ch-19: #c9555a;
|
|
95
|
+
--ch-20: #3a3a5a;
|
|
96
|
+
--ch-21: #c9555a;
|
|
97
|
+
--ch-22: #141414;
|
|
98
|
+
--ch-23: #2a2a2a;
|
|
99
|
+
--ch-24: #4a4a4a;
|
|
100
|
+
--ch-25: #4a4a4a66;
|
|
101
|
+
--ch-26: #1a1a1ae6;
|
|
102
|
+
}
|
|
70
103
|
}
|
|
71
104
|
|
|
72
105
|
/* openpkg-code-* Tailwind v4 color theme (maps to --ch-* vars) */
|