@xyd-js/atlas 0.1.0-xyd.6 → 0.1.0-xyd.8

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/index.ts CHANGED
@@ -1,3 +1,2 @@
1
- // export * from "./src/Example";
2
1
 
3
2
  export * from "./src/components/Atlas"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyd-js/atlas",
3
- "version": "0.1.0-xyd.6",
3
+ "version": "0.1.0-xyd.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,10 +17,10 @@
17
17
  "@radix-ui/react-tabs": "^1.1.1",
18
18
  "codehike": "^1.0.2",
19
19
  "lucide-react": "^0.447.0",
20
- "@xyd-js/uniform": "0.1.0-xyd.5"
20
+ "@xyd-js/uniform": "0.1.0-xyd.7"
21
21
  },
22
22
  "peerDependencies": {
23
- "react": "^18.3.1"
23
+ "react": "^19.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@linaria/atomic": "^6.2.0",
@@ -56,7 +56,7 @@
56
56
  "rimraf": "^3.0.2",
57
57
  "prop-types": "^15.8.1",
58
58
  "storybook": "^8.4.5",
59
- "@xyd-js/gql": "0.1.0-xyd.3"
59
+ "@xyd-js/gql": "0.1.0-xyd.5"
60
60
  },
61
61
  "scripts": {
62
62
  "clean": "rimraf build",
@@ -27,8 +27,14 @@ export function ApiRefItem({reference}: ApiRefItemProps) {
27
27
  case ReferenceCategory.REST: {
28
28
  const ctx = reference.context as MDXReference<OpenAPIReferenceContext>
29
29
 
30
+ if (!ctx || !ctx.method || !ctx.path || !ctx.path.title) {
31
+ break;
32
+ }
30
33
  // TODO: finish subitlte from ref
31
- topNavbar = <$Navbar label={ctx.method.title} subtitle={`${ctx.path.title}`}/>
34
+ topNavbar = <$Navbar
35
+ label={ctx.method.title}
36
+ subtitle={`${decodeURIComponent(ctx.path.title)}`}
37
+ />
32
38
  break;
33
39
  }
34
40
  }
@@ -42,7 +48,7 @@ export function ApiRefItem({reference}: ApiRefItemProps) {
42
48
 
43
49
  <div className={$refItem.grid}>
44
50
  <$Properties reference={reference}/>
45
- <ApiRefSamples examples={reference.examples}/>
51
+ {reference.examples && <ApiRefSamples examples={reference.examples}/>}
46
52
  </div>
47
53
 
48
54
  </div>
@@ -9,14 +9,16 @@ export const $sample = {
9
9
  display: flex;
10
10
  align-items: center;
11
11
  border-radius: 8px;
12
- background-color: var(--atlas-comp-code-sample_buttons-container-background);
12
+ //background-color: var(--atlas-comp-code-sample_buttons-container-background);
13
+ background-color: #F3F4F6;
13
14
  `
14
15
  }
15
16
 
16
17
  export const $arrow = {
17
18
  host: css`
18
19
  padding: 8px;
19
- background-color: var(--atlas-comp-code-sample_buttons-background--active);
20
+ //background-color: var(--atlas-comp-code-sample_buttons-background--active);
21
+ background-color: #ffffff;
20
22
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
21
23
  `,
22
24
  icon: css`
@@ -53,15 +55,89 @@ export const $button = {
53
55
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
54
56
  transition-duration: 300ms;
55
57
 
56
- color: var(--atlas-comp-code-sample_buttons-color);
58
+ //color: var(--atlas-comp-code-sample_buttons-color);
59
+ color: #6B7280;
60
+
61
+ &:hover {
62
+ //color: var(--atlas-comp-code-sample_buttons-color--active);
63
+ color: #111827;
64
+ }
65
+ `,
66
+ $$active: css`
67
+ //color: var(--atlas-comp-code-sample_buttons-color--active);
68
+ //background-color: var(--atlas-comp-code-sample_buttons-background--active);
69
+ color: #111827;
70
+ background-color: #ffffff;
71
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
72
+ `
73
+ }
74
+
75
+ /*
76
+ import {css} from "@linaria/core";
77
+
78
+ export const $sample = {
79
+ host: css`
80
+ position: relative;
81
+ max-width: 100%;
82
+ `,
83
+ container: css`
84
+ display: flex;
85
+ align-items: center;
86
+ border-radius: 8px;
87
+ background-color: #F3F4F6;
88
+ `
89
+ }
90
+
91
+ export const $arrow = {
92
+ host: css`
93
+ padding: 8px;
94
+ background-color: #ffffff;
95
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
96
+ `,
97
+ icon: css`
98
+ width: 16px;
99
+ height: 16px;
100
+ `
101
+ }
102
+
103
+ export const $scroller = {
104
+ host: css`
105
+ overflow-x: auto;
106
+ flex-grow: 1;
107
+ `,
108
+ container: css`
109
+ display: inline-flex;
110
+ gap: 4px;
111
+
112
+ padding: 4px;
113
+ margin-left: 4px;
114
+ `
115
+ }
116
+
117
+ export const $button = {
118
+ host: css`
119
+ padding: 0.5rem 1rem;
120
+
121
+ border-radius: 0.375rem;
122
+ font-size: 0.875rem;
123
+ line-height: 1.25rem;
124
+ font-weight: 500;
125
+ white-space: nowrap;
126
+
127
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
128
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
129
+ transition-duration: 300ms;
130
+
131
+ color: #6B7280;
57
132
 
58
133
  &:hover {
59
- color: var(--atlas-comp-code-sample_buttons-color--active);
134
+ color: #111827;
60
135
  }
61
136
  `,
62
137
  $$active: css`
63
- color: var(--atlas-comp-code-sample_buttons-color--active);
64
- background-color: var(--atlas-comp-code-sample_buttons-background--active);
138
+ color: #111827;
139
+ background-color: #ffffff;
65
140
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
66
141
  `
67
- }
142
+ }
143
+ */
@@ -36,7 +36,7 @@
36
36
  {
37
37
  "name": "id",
38
38
  "type": "ID!",
39
- "description": "The unique ID of the user",
39
+ "description": "The unique ID of the user, more details [here](#/example).",
40
40
  "properties": []
41
41
  },
42
42
  {