@xyd-js/theme-gusto 0.0.0-build
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/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1497 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
- package/rollup.config.js +3 -0
- package/src/imports.css +1 -0
- package/src/index.css +6 -0
- package/src/index.ts +1 -0
- package/src/override.css +122 -0
- package/src/theme.tsx +67 -0
- package/src/vars.css +61 -0
- package/tsconfig.json +40 -0
- package/types.d.ts +10 -0
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xyd-js/theme-gusto",
|
|
3
|
+
"version": "0.0.0-build+6952c2c-20250813013245",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./package.json": "./package.json",
|
|
10
|
+
"./index.css": "./dist/index.css",
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./presets/*": "./dist/presets/*"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@linaria/core": "^6.2.0"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": "^19.1.0",
|
|
21
|
+
"react-dom": "^19.1.0",
|
|
22
|
+
"react-router": "^7.7.1",
|
|
23
|
+
"@xyd-js/atlas": "0.0.0-build+6952c2c-20250813013245",
|
|
24
|
+
"@xyd-js/components": "0.0.0-build+6952c2c-20250813013245",
|
|
25
|
+
"@xyd-js/framework": "0.0.0-build+6952c2c-20250813013245",
|
|
26
|
+
"@xyd-js/themes": "0.0.0-build+6952c2c-20250813013245",
|
|
27
|
+
"@xyd-js/ui": "0.0.0-build+6952c2c-20250813013245"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"clean": "rimraf build",
|
|
32
|
+
"build": "rollup -c rollup.config.js"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/rollup.config.js
ADDED
package/src/imports.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
|
package/src/index.css
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default} from "./theme"
|
package/src/override.css
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@import "@xyd-js/themes/dist/decorators/header-sketch.css";
|
|
2
|
+
@import "@xyd-js/themes/dist/decorators/sidebar-scroll.css";
|
|
3
|
+
|
|
4
|
+
@layer themes {
|
|
5
|
+
:root {
|
|
6
|
+
--decorator-sketch-border-color: var(--dark32);
|
|
7
|
+
--decorator-sidebar-scroll-bgcolor: var(--dark48);
|
|
8
|
+
--color-header-border: var(--decorator-sketch-border-color);
|
|
9
|
+
--xyd-sidebar-divider-color: var(--decorator-sketch-border-color);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@layer themes {
|
|
14
|
+
xyd-layout-primary {
|
|
15
|
+
--xyd-layout-width-small: 700px;
|
|
16
|
+
--xyd-layout-width-medium: 900px;
|
|
17
|
+
--xyd-layout-width-large: 1100px;
|
|
18
|
+
|
|
19
|
+
@media (min-width: 1024px) {
|
|
20
|
+
&:not([data-layout="page"]) header[part="header"] {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:not([data-layout="page"]):not([data-layout="reader"]) {
|
|
25
|
+
[part="page"] {
|
|
26
|
+
left: var(--xyd-sidebar-width);
|
|
27
|
+
margin-right: var(--xyd-sidebar-width);
|
|
28
|
+
}
|
|
29
|
+
footer {
|
|
30
|
+
margin-left: var(--xyd-sidebar-width);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:not([data-layout="page"]):not([data-layout="wide"]) {
|
|
35
|
+
[part=page-article] {
|
|
36
|
+
max-width: var(--xyd-layout-width-small);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[part="sidebar"] {
|
|
42
|
+
position: fixed;
|
|
43
|
+
top: var(--xyd-page-gutter);
|
|
44
|
+
z-index: 10;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[part="page"] {
|
|
48
|
+
position: relative;
|
|
49
|
+
right: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[part=page-container] {
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[part=page-article] {
|
|
57
|
+
margin: 0 auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* component: SubNav */
|
|
61
|
+
xyd-subnav {
|
|
62
|
+
padding: 0;
|
|
63
|
+
|
|
64
|
+
[part="list"] {
|
|
65
|
+
padding: 0 var(--xyd-nav-item-padding);
|
|
66
|
+
margin-left: var(--xyd-nav-item-padding);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (min-width: 1024px) {
|
|
71
|
+
|
|
72
|
+
/* component: Nav */
|
|
73
|
+
xyd-nav {
|
|
74
|
+
[part="nav"] {
|
|
75
|
+
padding-left: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[part="nav"]>*:first-child {
|
|
79
|
+
position: relative;
|
|
80
|
+
left: calc(var(--xyd-sidebar-width));
|
|
81
|
+
margin-left: var(--xyd-nav-item-padding);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* component: SubNav */
|
|
86
|
+
xyd-subnav {
|
|
87
|
+
position: relative;
|
|
88
|
+
left: calc(var(--xyd-sidebar-width) / 1);
|
|
89
|
+
width: calc(100% - var(--xyd-sidebar-width));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
xyd-sidebar-tabs-dropdown {
|
|
94
|
+
[part="dropdown-trigger"] {
|
|
95
|
+
border-radius: var(--xyd-border-radius-medium);
|
|
96
|
+
/* padding: 8px 8px; */
|
|
97
|
+
|
|
98
|
+
[part="dropdown-icon"] {
|
|
99
|
+
color: var(--color-primary);
|
|
100
|
+
}
|
|
101
|
+
[part="dropdown-icon"] svg {
|
|
102
|
+
width: 16px !important;
|
|
103
|
+
height: 16px !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
xyd-search-button {
|
|
109
|
+
height: 40px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
xyd-sidebar-tabs-dropdown [part="dropdown-trigger"], xyd-search-button {
|
|
113
|
+
border-radius: var(--xyd-button-border-radius, 8px);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
xyd-sidebar {
|
|
117
|
+
[part=item-button]::after {
|
|
118
|
+
width: 10px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
package/src/theme.tsx
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React, {} from "react"
|
|
2
|
+
|
|
3
|
+
import {css} from "@linaria/core";
|
|
4
|
+
|
|
5
|
+
import {ColorSchemeButton} from "@xyd-js/components/writer";
|
|
6
|
+
import {UISidebar} from "@xyd-js/ui";
|
|
7
|
+
import {BaseTheme} from "@xyd-js/themes"
|
|
8
|
+
import {FwLogo} from "@xyd-js/framework/react";
|
|
9
|
+
import syntaxThemeClassic from "@xyd-js/components/coder/themes/classic.js"
|
|
10
|
+
|
|
11
|
+
import "./imports.css"
|
|
12
|
+
|
|
13
|
+
import "@xyd-js/themes/index.css"
|
|
14
|
+
import "@xyd-js/components/coder/themes/classic.css"
|
|
15
|
+
|
|
16
|
+
import './index.css';
|
|
17
|
+
import './vars.css';
|
|
18
|
+
import './override.css';
|
|
19
|
+
|
|
20
|
+
const styles = {
|
|
21
|
+
SidebarTop: css`
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
width: 100%;
|
|
26
|
+
`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default class ThemeGusto extends BaseTheme {
|
|
30
|
+
constructor() {
|
|
31
|
+
super()
|
|
32
|
+
|
|
33
|
+
this.theme.Update({
|
|
34
|
+
coder: {
|
|
35
|
+
syntaxHighlight: syntaxThemeClassic
|
|
36
|
+
},
|
|
37
|
+
appearance: {
|
|
38
|
+
search: {
|
|
39
|
+
sidebar: true
|
|
40
|
+
},
|
|
41
|
+
tabs: {
|
|
42
|
+
surface: "sidebar"
|
|
43
|
+
},
|
|
44
|
+
buttons: {
|
|
45
|
+
rounded: "lg"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
this.surfaces.define("sidebar.top", <_SidebarTop/>);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _SidebarTop() {
|
|
55
|
+
return <>
|
|
56
|
+
<UISidebar.Item ghost>
|
|
57
|
+
<div className={styles.SidebarTop}>
|
|
58
|
+
<FwLogo/>
|
|
59
|
+
<div>
|
|
60
|
+
<ColorSchemeButton/>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</UISidebar.Item>
|
|
64
|
+
</>
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
package/src/vars.css
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import "@xyd-js/themes/dist/decorators/atlas-vars.css";
|
|
2
|
+
|
|
3
|
+
/* Core */
|
|
4
|
+
:root {
|
|
5
|
+
--dark32: #ececf1;
|
|
6
|
+
--dark48: #484444;
|
|
7
|
+
--color-text: #000;
|
|
8
|
+
--color-primary: #10a37f;
|
|
9
|
+
--color-primary--active: #1a7f64;
|
|
10
|
+
|
|
11
|
+
--theme-color-primary: var(--color-primary);
|
|
12
|
+
/* --theme-color-primary-active: var(--color-primary--active); */
|
|
13
|
+
--color-primary--active: color-mix(in srgb, var(--color-primary) 85%, transparent);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Utils */
|
|
17
|
+
:root {
|
|
18
|
+
--xyd-page-gutter: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Subnav */
|
|
22
|
+
:root {
|
|
23
|
+
--xyd-subnav-bgcolor: var(--white);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Banner Item */
|
|
27
|
+
:root {
|
|
28
|
+
--xyd-banner-bgcolor: color(display-p3 .004 .643 .494 / .24);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Sidebar */
|
|
32
|
+
:root {
|
|
33
|
+
--xyd-sidebar-width: 320px;
|
|
34
|
+
--xyd-sidebar-bgcolor: var(--white);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Coder */
|
|
38
|
+
:root {
|
|
39
|
+
--xyd-codetabs-color: var(--color-text);
|
|
40
|
+
|
|
41
|
+
--xyd-coder-code-mark-bgcolor: var(--dark32);
|
|
42
|
+
--xyd-coder-code-mark-border-color: var(--color-primary);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@define-mixin dark-theme {
|
|
46
|
+
--color-text: rgb(222, 226, 226);
|
|
47
|
+
--dark16: rgb(222, 226, 226, 0.05);
|
|
48
|
+
--dark32: rgb(255,255,255, 0.07);
|
|
49
|
+
--dark48: rgb(158,163,162);
|
|
50
|
+
--xyd-codetabs-color: var(--black);
|
|
51
|
+
--color-text: var(--black);
|
|
52
|
+
}
|
|
53
|
+
[data-color-scheme="dark"] {
|
|
54
|
+
@mixin dark-theme;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (prefers-color-scheme: dark) {
|
|
58
|
+
:root:not([data-color-scheme="light"]):not([data-color-scheme="dark"]) {
|
|
59
|
+
@mixin dark-theme;
|
|
60
|
+
}
|
|
61
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"paths": {
|
|
4
|
+
"@xyd-js/themes": ["../xyd-themes/src"],
|
|
5
|
+
},
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"module": "esnext",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"target": "ES6",
|
|
10
|
+
"lib": [
|
|
11
|
+
"dom",
|
|
12
|
+
"dom.iterable",
|
|
13
|
+
"esnext"
|
|
14
|
+
],
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": false,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"incremental": false,
|
|
20
|
+
"resolveJsonModule": true,
|
|
21
|
+
"isolatedModules": true,
|
|
22
|
+
"jsx": "react",
|
|
23
|
+
"plugins": [
|
|
24
|
+
{
|
|
25
|
+
"name": "next"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"strictNullChecks": true
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"packages/css/src",
|
|
32
|
+
"next-env.d.ts",
|
|
33
|
+
"**/*.ts",
|
|
34
|
+
"**/*.tsx",
|
|
35
|
+
".next/types/**/*.ts"
|
|
36
|
+
],
|
|
37
|
+
"exclude": [
|
|
38
|
+
"node_modules"
|
|
39
|
+
]
|
|
40
|
+
}
|