Skip to content

Commit

Permalink
doc: update jsdoc style
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg committed Oct 24, 2024
1 parent 509882e commit 53a137c
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 5 deletions.
310 changes: 310 additions & 0 deletions doc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
/* Base styles */
:root {
/* Colors */
--background-color: hsl(0, 0%, 100%);
--foreground-color: hsl(222.2, 84%, 4.9%);

--card-bg: hsl(0, 0%, 100%);
--card-color: hsl(222.2, 84%, 4.9%);

--primary-color: hsl(221.2, 83.2%, 53.3%);
--primary-foreground: hsl(210, 40%, 98%);

--secondary-color: hsl(222, 47.4%, 34.7%);
--secondary-foreground: hsl(210, 40%, 98%);

--muted-color: hsl(210, 40%, 96.1%);
--muted-foreground: hsl(215.4, 16.3%, 46.9%);

--accent-color: hsl(210, 40%, 96.1%);
--accent-foreground: hsl(222.2, 47.4%, 11.2%);

--destructive-color: hsl(0, 84.2%, 60.2%);
--destructive-foreground: hsl(210, 40%, 98%);

--border-color: hsl(214.3, 31.8%, 91.4%);
--input-color: hsl(214.3, 31.8%, 91.4%);
--ring-color: hsl(221.2, 83.2%, 53.3%);

/* Spacing & Sizing */
--radius: 0.5rem;
--spacing-1: 0.25rem;
--spacing-2: 0.5rem;
--spacing-3: 0.75rem;
--spacing-4: 1rem;
--spacing-6: 1.5rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
:root {
--background-color: hsl(222.2, 84%, 4.9%);
--foreground-color: hsl(210, 40%, 98%);

--card-bg: hsl(222.2, 84%, 4.9%);
--card-color: hsl(210, 40%, 98%);

--primary-color: hsl(217.2, 91.2%, 59.8%);
--primary-foreground: hsl(222.2, 47.4%, 11.2%);

--secondary-color: hsl(217.2, 32.6%, 17.5%);
--secondary-foreground: hsl(210, 40%, 98%);

--muted-color: hsl(217.2, 32.6%, 17.5%);
--muted-foreground: hsl(215, 20.2%, 65.1%);

--accent-color: hsl(217.2, 32.6%, 17.5%);
--accent-foreground: hsl(210, 40%, 98%);

--destructive-color: hsl(0, 62.8%, 30.6%);
--destructive-foreground: hsl(210, 40%, 98%);

--border-color: hsl(217.2, 32.6%, 17.5%);
--input-color: hsl(217.2, 32.6%, 17.5%);
--ring-color: hsl(224.3, 76.3%, 48%);
}
}

/* Base elements */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
border-color: var(--border-color);
}

body {
background-color: var(--background-color);
color: var(--foreground-color);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: 'rlig' 1, 'calt' 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
letter-spacing: -0.025em;
font-weight: 700;
line-height: 1.2;
}

h1 {
font-size: 2.5rem;
}

h2 {
font-size: 2rem;
}

h3 {
font-size: 1.75rem;
}

h4 {
font-size: 1.5rem;
}

p {
line-height: 1.75;
margin-top: 1.5rem;
}

p:first-child {
margin-top: 0;
}

/* Block elements */
blockquote {
margin-top: 1.5rem;
border-left: 4px solid var(--primary-color);
padding-left: 1.5rem;
font-style: italic;
}

code {
position: relative;
border-radius: var(--radius);
background-color: var(--muted-color);
padding: 0.2rem 0.3rem;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 0.875rem;
}

pre {
margin: 1.5rem 0 1rem 0;
padding: 1rem;
overflow-x: auto;
border-radius: var(--radius);
border: 1px solid var(--border-color);
background-color: var(--muted-color);
}

pre code {
background-color: transparent;
padding: 0;
}

/* Tables */
table {
width: 100%;
border-collapse: collapse;
}

tr {
margin: 0;
border-top: 1px solid var(--border-color);
padding: 0;
}

th,
td {
border: 1px solid var(--border-color);
padding: 0.5rem 1rem;
text-align: left;
}

th[align='center'],
td[align='center'] {
text-align: center;
}

th[align='right'],
td[align='right'] {
text-align: right;
}

/* Lists */
ul,
ol {
margin: 1.5rem 0;
padding-left: 1.5rem;
}

ul {
list-style-type: disc;
}

ol {
list-style-type: decimal;
}

li {
margin-top: 0.5rem;
}

/* Interactive elements */
details {
border-radius: var(--radius);
border: 1px solid var(--border-color);
padding: 1rem;
}

summary {
cursor: pointer;
font-weight: 600;
}

summary:hover {
color: var(--primary-color);
}

/* Media elements */
img {
max-width: 100%;
height: auto;
border-radius: var(--radius);
}

/* Scrollbar */
::-webkit-scrollbar {
width: 0.5rem;
}

::-webkit-scrollbar-track {
background-color: var(--muted-color);
}

::-webkit-scrollbar-thumb {
border-radius: 9999px;
background-color: color-mix(
in srgb,
var(--muted-foreground) 50%,
transparent
);
}

::-webkit-scrollbar-thumb:hover {
background-color: var(--muted-foreground);
}

/* Selection */
::selection {
background-color: color-mix(in srgb, var(--primary-color) 20%, transparent);
color: var(--foreground-color);
}

/* Focus */
:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--background-color), 0 0 0 4px var(--ring-color);
}

/* Animations */
@keyframes enter {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

@keyframes exit {
from {
opacity: 1;
}
to {
opacity: 0;
}
}

.animate-in {
animation: enter 0.2s ease-out;
}

.animate-out {
animation: exit 0.2s ease-in;
}

/* Responsive Design */
@media (min-width: 768px) {
h1 {
font-size: 3rem;
}

h2 {
font-size: 2.5rem;
}

h3 {
font-size: 2rem;
}

h4 {
font-size: 1.75rem;
}
}
.tsd-page-title {
display: none;
}
.col-content {
margin-left: 16px;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"prettier": "^2.6.2",
"ts-jest": "29.2.5",
"typedoc": "^0.26.6",
"typedoc-theme-hierarchy": "^5.0.0",
"typescript": "5.5.4"
},
"workspaces": [
Expand Down
13 changes: 8 additions & 5 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"./packages/access-control-conditions/src/index.ts",
"./packages/auth-browser/src/index.ts",
"./packages/auth-helpers/src/index.ts",
"./packages/bls-sdk/src/index.ts",
"./packages/constants/src/index.ts",
"./packages/contracts-sdk/src/index.ts",
"./packages/core/src/index.ts",
"./packages/crypto/src/index.ts",
"./packages/ecdsa-sdk/src/index.ts",
"./packages/encryption/src/index.ts",
"./packages/lit-auth-client/src/index.ts",
"./packages/lit-node-client/src/index.ts",
Expand All @@ -23,12 +21,17 @@
"./packages/pkp-ethers/src/index.ts",
"./packages/pkp-sui/src/index.ts",
"./packages/pkp-walletconnect/src/index.ts",
"./packages/sev-snp-utils-sdk/src/index.ts",
"./packages/types/src/index.ts",
"./packages/uint8arrays/src/index.ts",
"./packages/wasm/src/index.ts",
"./packages/wrapped-keys/src/index.ts",
"./packages/wrapped-keys-lit-actions/src/index.ts"
],
"out": "doc",
"skipErrorChecking": true
}
"skipErrorChecking": true,
"plugin": [
"typedoc-theme-hierarchy"
],
"theme": "hierarchy",
"customCss": "doc.css"
}

0 comments on commit 53a137c

Please sign in to comment.