@hackersheet/next-document-content-components 0.1.0-alpha.1 → 0.1.0-alpha.11
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/cjs/components/code-block/code-block-copy-button.js +1 -1
- package/dist/cjs/components/code-block/code-block.d.ts +1 -1
- package/dist/cjs/components/code-block/code-block.js +3 -9
- package/dist/cjs/components/code-block/directory-tree.d.ts +6 -0
- package/dist/cjs/components/code-block/directory-tree.js +102 -0
- package/dist/cjs/components/code-block/shiki.js +7 -2
- package/dist/cjs/components/gist/gist.d.ts +6 -0
- package/dist/cjs/components/gist/gist.js +55 -0
- package/dist/cjs/components/heading/heading.d.ts +6 -0
- package/dist/cjs/components/{kifu-to/kifu-to.js → heading/heading.js} +7 -9
- package/dist/cjs/components/index.d.ts +4 -1
- package/dist/cjs/components/index.js +12 -3
- package/dist/cjs/components/link-card/link-card.js +1 -1
- package/dist/cjs/components/mermaid/mermaid.d.ts +6 -0
- package/dist/cjs/components/{code-block/code-block-mermaid.js → mermaid/mermaid.js} +9 -8
- package/dist/cjs/components/youtube/youtube.js +1 -1
- package/dist/cjs/index.d.ts +4 -1
- package/dist/esm/components/code-block/code-block-copy-button.mjs +1 -1
- package/dist/esm/components/code-block/code-block.d.mts +1 -1
- package/dist/esm/components/code-block/code-block.mjs +3 -9
- package/dist/esm/components/code-block/directory-tree.d.mts +6 -0
- package/dist/esm/components/code-block/directory-tree.mjs +72 -0
- package/dist/esm/components/code-block/shiki.mjs +13 -3
- package/dist/esm/components/gist/gist.d.mts +6 -0
- package/dist/esm/components/gist/gist.mjs +25 -0
- package/dist/esm/components/heading/heading.d.mts +6 -0
- package/dist/esm/components/heading/heading.mjs +9 -0
- package/dist/esm/components/index.d.mts +4 -1
- package/dist/esm/components/index.mjs +8 -2
- package/dist/esm/components/link-card/link-card.mjs +1 -1
- package/dist/esm/components/mermaid/mermaid.d.mts +6 -0
- package/dist/esm/components/{code-block/code-block-mermaid.mjs → mermaid/mermaid.mjs} +6 -5
- package/dist/esm/components/youtube/youtube.mjs +1 -1
- package/dist/esm/index.d.mts +4 -1
- package/package.json +6 -20
- package/dist/cjs/components/code-block/code-block-kifu.d.ts +0 -9
- package/dist/cjs/components/code-block/code-block-kifu.js +0 -66
- package/dist/cjs/components/code-block/code-block-mermaid.d.ts +0 -8
- package/dist/cjs/components/kifu-to/kifu-to.d.ts +0 -6
- package/dist/esm/components/code-block/code-block-kifu.d.mts +0 -9
- package/dist/esm/components/code-block/code-block-kifu.mjs +0 -36
- package/dist/esm/components/code-block/code-block-mermaid.d.mts +0 -8
- package/dist/esm/components/kifu-to/kifu-to.d.mts +0 -6
- package/dist/esm/components/kifu-to/kifu-to.mjs +0 -11
- package/dist/style.module.css +0 -279
- package/dist/style.module.scss.d.ts +0 -9
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import CodeBlock from "./code-block/code-block";
|
|
2
|
+
import DirectoryTree from "./code-block/directory-tree";
|
|
3
|
+
import Gist from "./gist/gist";
|
|
4
|
+
import Heading from "./heading/heading";
|
|
2
5
|
import Image from "./image/image";
|
|
3
|
-
import KifuTo from "./kifu-to/kifu-to";
|
|
4
6
|
import Link from "./link/link";
|
|
5
7
|
import LinkCard from "./link-card/link-card";
|
|
8
|
+
import Mermaid from "./mermaid/mermaid";
|
|
6
9
|
import XPost from "./x-post/x-post";
|
|
7
10
|
import Youtube from "./youtube/youtube";
|
|
8
11
|
export {
|
|
9
12
|
CodeBlock,
|
|
13
|
+
DirectoryTree,
|
|
14
|
+
Gist,
|
|
15
|
+
Heading,
|
|
10
16
|
Image,
|
|
11
|
-
KifuTo,
|
|
12
17
|
Link,
|
|
13
18
|
LinkCard,
|
|
19
|
+
Mermaid,
|
|
14
20
|
XPost,
|
|
15
21
|
Youtube
|
|
16
22
|
};
|
|
@@ -10,7 +10,7 @@ function LinkCard({
|
|
|
10
10
|
imageWidth
|
|
11
11
|
}) {
|
|
12
12
|
const faviconUrl = `https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://${domain}&size=16`;
|
|
13
|
-
return /* @__PURE__ */ React.createElement("a", { href: url, className: "link-card" }, /* @__PURE__ */ React.createElement("div", { className: "link-card-main" }, /* @__PURE__ */ React.createElement("div", { className: "link-card-title" }, title), /* @__PURE__ */ React.createElement("div", { className: "link-card-description" }, description), /* @__PURE__ */ React.createElement("div", { className: "link-card-domain" }, /* @__PURE__ */ React.createElement("picture", null, /* @__PURE__ */ React.createElement("img", { src: faviconUrl, alt: `${domain} favicon`, width: 16, height: 16 })), /* @__PURE__ */ React.createElement("div", null, domain))), imageUrl && /* @__PURE__ */ React.createElement("div", { className: "link-card-image" }, /* @__PURE__ */ React.createElement(Image, { alt: title, src: imageUrl, height: imageHeight, width: imageWidth })));
|
|
13
|
+
return /* @__PURE__ */ React.createElement("a", { href: url, className: "link-card" }, /* @__PURE__ */ React.createElement("div", { className: "link-card-main" }, /* @__PURE__ */ React.createElement("div", { className: "link-card-title-container" }, /* @__PURE__ */ React.createElement("div", { className: "link-card-title" }, title)), /* @__PURE__ */ React.createElement("div", { className: "link-card-description" }, description), /* @__PURE__ */ React.createElement("div", { className: "link-card-domain" }, /* @__PURE__ */ React.createElement("picture", null, /* @__PURE__ */ React.createElement("img", { src: faviconUrl, alt: `${domain} favicon`, width: 16, height: 16 })), /* @__PURE__ */ React.createElement("div", null, domain))), imageUrl && /* @__PURE__ */ React.createElement("div", { className: "link-card-image" }, /* @__PURE__ */ React.createElement(Image, { alt: title, src: imageUrl, height: imageHeight, width: imageWidth })));
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
16
|
LinkCard as default
|
|
@@ -8,7 +8,7 @@ function createId(code) {
|
|
|
8
8
|
hash.update(code);
|
|
9
9
|
return "id-" + hash.digest("hex");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function Mermaid({ code }) {
|
|
12
12
|
const ref = useRef(null);
|
|
13
13
|
const [mounted, setMounted] = useState(false);
|
|
14
14
|
const [svg, setSvg] = useState("");
|
|
@@ -32,10 +32,11 @@ function CodeBlockMermaid({ code }) {
|
|
|
32
32
|
};
|
|
33
33
|
renderMermaid();
|
|
34
34
|
}, [mounted, code, id, theme, systemTheme, setSvg, setMounted]);
|
|
35
|
-
if (!mounted)
|
|
36
|
-
return /* @__PURE__ */ React.createElement("div",
|
|
37
|
-
|
|
35
|
+
if (!mounted) {
|
|
36
|
+
return /* @__PURE__ */ React.createElement("div", { className: "mermaid-block mermaid-loading" }, /* @__PURE__ */ React.createElement("div", null, "Loading..."));
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ React.createElement("div", { className: "mermaid-block", dangerouslySetInnerHTML: { __html: svg }, ref });
|
|
38
39
|
}
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
Mermaid as default
|
|
41
42
|
};
|
|
@@ -2,7 +2,7 @@ import { YouTubeEmbed } from "@next/third-parties/google";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
async function Youtube({ videoId, params, playLabel, ...props }) {
|
|
4
4
|
const paramsString = params ? Object.entries(params).filter(([, value]) => value !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&") : void 0;
|
|
5
|
-
return /* @__PURE__ */ React.createElement(YouTubeEmbed, { ...props, videoid: videoId, params: paramsString, playlabel: playLabel });
|
|
5
|
+
return /* @__PURE__ */ React.createElement("div", { className: "youtube-block" }, /* @__PURE__ */ React.createElement(YouTubeEmbed, { ...props, videoid: videoId, params: paramsString, playlabel: playLabel }));
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
Youtube as default
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { default as CodeBlock } from './components/code-block/code-block.mjs';
|
|
2
|
+
export { default as DirectoryTree } from './components/code-block/directory-tree.mjs';
|
|
3
|
+
export { default as Gist } from './components/gist/gist.mjs';
|
|
4
|
+
export { default as Heading } from './components/heading/heading.mjs';
|
|
2
5
|
export { default as Image } from './components/image/image.mjs';
|
|
3
|
-
export { default as KifuTo } from './components/kifu-to/kifu-to.mjs';
|
|
4
6
|
export { default as Link } from './components/link/link.mjs';
|
|
5
7
|
export { default as LinkCard } from './components/link-card/link-card.mjs';
|
|
8
|
+
export { default as Mermaid } from './components/mermaid/mermaid.mjs';
|
|
6
9
|
export { default as XPost } from './components/x-post/x-post.mjs';
|
|
7
10
|
export { default as Youtube } from './components/youtube/youtube.mjs';
|
|
8
11
|
import 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hackersheet/next-document-content-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.11",
|
|
4
4
|
"description": "Hacker Sheet document content components for Next.js",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -10,19 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "",
|
|
13
|
-
"sideEffects": [
|
|
14
|
-
"*.css"
|
|
15
|
-
],
|
|
16
13
|
"exports": {
|
|
17
14
|
".": {
|
|
18
15
|
"require": "./dist/cjs/index.js",
|
|
19
16
|
"import": "./dist/esm/index.mjs",
|
|
20
17
|
"types": "./dist/esm/index.d.ts"
|
|
21
|
-
},
|
|
22
|
-
"./style": {
|
|
23
|
-
"import": "./dist/style.module.css",
|
|
24
|
-
"require": "./dist/style.module.css",
|
|
25
|
-
"types": "./dist/style.module.scss.d.ts"
|
|
26
18
|
}
|
|
27
19
|
},
|
|
28
20
|
"main": "./dist/cjs/index.js",
|
|
@@ -32,26 +24,22 @@
|
|
|
32
24
|
"dist"
|
|
33
25
|
],
|
|
34
26
|
"dependencies": {
|
|
35
|
-
"@hackersheet/core": "alpha",
|
|
36
|
-
"@hackersheet/react-document-content": "alpha",
|
|
37
27
|
"@next/third-parties": "^14.2.5",
|
|
38
28
|
"@shikijs/transformers": "^1.10.3",
|
|
39
|
-
"kifu-for-js": "^5.4.1",
|
|
40
29
|
"mermaid": "^10.9.1",
|
|
41
30
|
"next-themes": "^0.3.0",
|
|
42
31
|
"react-icons": "^5.2.1",
|
|
43
32
|
"react-tweet": "^3.2.1",
|
|
44
|
-
"shiki": "^1.10.3"
|
|
33
|
+
"shiki": "^1.10.3",
|
|
34
|
+
"@hackersheet/core": "0.1.0-alpha.9",
|
|
35
|
+
"@hackersheet/react-document-content": "0.1.0-alpha.11"
|
|
45
36
|
},
|
|
46
37
|
"devDependencies": {
|
|
47
38
|
"@types/react": "^18.0.0",
|
|
48
39
|
"@types/react-dom": "^18.0.0",
|
|
49
40
|
"next": "14.2.5",
|
|
50
|
-
"postcss": "8.4.39",
|
|
51
41
|
"react": "^18.0.0",
|
|
52
42
|
"react-dom": "^18.0.0",
|
|
53
|
-
"sass": "1.77.8",
|
|
54
|
-
"typed-scss-modules": "8.0.1",
|
|
55
43
|
"@hackersheet/eslint-config-custom": "0.0.0"
|
|
56
44
|
},
|
|
57
45
|
"peerDependencies": {
|
|
@@ -60,14 +48,12 @@
|
|
|
60
48
|
"react-dom": "^18.0.0"
|
|
61
49
|
},
|
|
62
50
|
"scripts": {
|
|
63
|
-
"build": "rm -rf ./dist && pnpm tsup
|
|
64
|
-
"build:css": "cp src/styles/*.ts dist && pnpm sass src/styles/style.module.scss dist/style.module.css --no-source-map",
|
|
51
|
+
"build": "rm -rf ./dist && pnpm tsup",
|
|
65
52
|
"check": "pnpm tsc && pnpm lint",
|
|
66
53
|
"format": "pnpm -w format && pnpm lint:fix",
|
|
67
54
|
"lint": "eslint \"**/*.{ts,tsx}\"",
|
|
68
55
|
"lint:fix": "eslint --fix \"**/*.{ts,tsx}\"",
|
|
69
56
|
"pub": "pnpm publish --access=public --tag alpha",
|
|
70
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
71
|
-
"typegen:scss": "typed-scss-modules src/styles/style.module.scss"
|
|
57
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
72
58
|
}
|
|
73
59
|
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
var code_block_kifu_exports = {};
|
|
31
|
-
__export(code_block_kifu_exports, {
|
|
32
|
-
default: () => CodeBlockKifu
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(code_block_kifu_exports);
|
|
35
|
-
var import_kifu_for_js = require("kifu-for-js");
|
|
36
|
-
var import_navigation = require("next/navigation");
|
|
37
|
-
var import_react = __toESM(require("react"));
|
|
38
|
-
function CodeBlockKifu({ kifu, filename }) {
|
|
39
|
-
const searchParams = (0, import_navigation.useSearchParams)();
|
|
40
|
-
const id = filename ? `user-content-${filename}` : void 0;
|
|
41
|
-
const [kifuStore] = (0, import_react.useState)(() => new import_kifu_for_js.KifuStore({ kifu }));
|
|
42
|
-
(0, import_react.useEffect)(() => {
|
|
43
|
-
initKifuUserSettings();
|
|
44
|
-
}, []);
|
|
45
|
-
(0, import_react.useEffect)(() => {
|
|
46
|
-
const newPly = Number(searchParams.get("ply") ?? 0);
|
|
47
|
-
const hash = typeof window !== "undefined" ? window.location.hash.replace(/^#!?/, "") : "";
|
|
48
|
-
if (hash === id) {
|
|
49
|
-
kifuStore.player.goto(newPly);
|
|
50
|
-
}
|
|
51
|
-
}, [searchParams, kifuStore, id]);
|
|
52
|
-
if (!kifuStore) {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "my-4 flex justify-center", id }, /* @__PURE__ */ import_react.default.createElement(import_kifu_for_js.KifuLite, { style: { width: "100%" }, kifuStore }));
|
|
56
|
-
}
|
|
57
|
-
function initKifuUserSettings() {
|
|
58
|
-
const LOCALSTORAGE_KEY = "kifuforjs";
|
|
59
|
-
const defaultSettings = {
|
|
60
|
-
hapticFeedback: false
|
|
61
|
-
};
|
|
62
|
-
const settings = localStorage.getItem(LOCALSTORAGE_KEY);
|
|
63
|
-
if (!settings) {
|
|
64
|
-
localStorage.setItem(LOCALSTORAGE_KEY, JSON.stringify(defaultSettings));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { KifuLite, KifuStore } from "kifu-for-js";
|
|
3
|
-
import { useSearchParams } from "next/navigation";
|
|
4
|
-
import React, { useEffect, useState } from "react";
|
|
5
|
-
function CodeBlockKifu({ kifu, filename }) {
|
|
6
|
-
const searchParams = useSearchParams();
|
|
7
|
-
const id = filename ? `user-content-${filename}` : void 0;
|
|
8
|
-
const [kifuStore] = useState(() => new KifuStore({ kifu }));
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
initKifuUserSettings();
|
|
11
|
-
}, []);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
const newPly = Number(searchParams.get("ply") ?? 0);
|
|
14
|
-
const hash = typeof window !== "undefined" ? window.location.hash.replace(/^#!?/, "") : "";
|
|
15
|
-
if (hash === id) {
|
|
16
|
-
kifuStore.player.goto(newPly);
|
|
17
|
-
}
|
|
18
|
-
}, [searchParams, kifuStore, id]);
|
|
19
|
-
if (!kifuStore) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
return /* @__PURE__ */ React.createElement("div", { className: "my-4 flex justify-center", id }, /* @__PURE__ */ React.createElement(KifuLite, { style: { width: "100%" }, kifuStore }));
|
|
23
|
-
}
|
|
24
|
-
function initKifuUserSettings() {
|
|
25
|
-
const LOCALSTORAGE_KEY = "kifuforjs";
|
|
26
|
-
const defaultSettings = {
|
|
27
|
-
hapticFeedback: false
|
|
28
|
-
};
|
|
29
|
-
const settings = localStorage.getItem(LOCALSTORAGE_KEY);
|
|
30
|
-
if (!settings) {
|
|
31
|
-
localStorage.setItem(LOCALSTORAGE_KEY, JSON.stringify(defaultSettings));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
CodeBlockKifu as default
|
|
36
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Link from "next/link";
|
|
2
|
-
import React from "react";
|
|
3
|
-
function KifuTo({ id, ply, label: defaultLabel }) {
|
|
4
|
-
const fullId = `user-content-${id}`;
|
|
5
|
-
const href = `?ply=${ply}#${fullId}`;
|
|
6
|
-
const label = defaultLabel ?? `${ply}\u624B\u76EE`;
|
|
7
|
-
return /* @__PURE__ */ React.createElement(Link, { href }, label);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
KifuTo as default
|
|
11
|
-
};
|
package/dist/style.module.css
DELETED
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
.main :first-child {
|
|
2
|
-
margin-top: 0;
|
|
3
|
-
}
|
|
4
|
-
.main * {
|
|
5
|
-
word-break: break-word;
|
|
6
|
-
scroll-margin-top: var(--hsdc-scroll-margin-top);
|
|
7
|
-
}
|
|
8
|
-
.main h1,
|
|
9
|
-
.main h2,
|
|
10
|
-
.main h3,
|
|
11
|
-
.main h4,
|
|
12
|
-
.main h5,
|
|
13
|
-
.main h6 {
|
|
14
|
-
margin: 4rem 0 1.5rem 0;
|
|
15
|
-
padding: 0.5rem 0;
|
|
16
|
-
font-weight: 700;
|
|
17
|
-
border-bottom: 1px solid hsl(var(--hsdc-border));
|
|
18
|
-
}
|
|
19
|
-
.main p {
|
|
20
|
-
margin: 1.8rem 0;
|
|
21
|
-
}
|
|
22
|
-
.main strong {
|
|
23
|
-
font-weight: 700;
|
|
24
|
-
}
|
|
25
|
-
.main hr {
|
|
26
|
-
margin: 4rem 0;
|
|
27
|
-
}
|
|
28
|
-
.main h1 {
|
|
29
|
-
font-size: 2rem;
|
|
30
|
-
}
|
|
31
|
-
.main h2 {
|
|
32
|
-
font-size: 1.5rem;
|
|
33
|
-
}
|
|
34
|
-
.main h3 {
|
|
35
|
-
font-size: 1.2rem;
|
|
36
|
-
}
|
|
37
|
-
.main h4 {
|
|
38
|
-
font-size: 1rem;
|
|
39
|
-
}
|
|
40
|
-
.main h5 {
|
|
41
|
-
font-size: 0.8rem;
|
|
42
|
-
}
|
|
43
|
-
.main h6 {
|
|
44
|
-
font-size: 0.7rem;
|
|
45
|
-
}
|
|
46
|
-
.main p {
|
|
47
|
-
line-height: 2.2;
|
|
48
|
-
letter-spacing: 0.04em;
|
|
49
|
-
}
|
|
50
|
-
.main ol,
|
|
51
|
-
.main ul {
|
|
52
|
-
padding-left: 1.5em;
|
|
53
|
-
}
|
|
54
|
-
.main ol ol,
|
|
55
|
-
.main ol ul,
|
|
56
|
-
.main ul ol,
|
|
57
|
-
.main ul ul {
|
|
58
|
-
padding-left: 1em;
|
|
59
|
-
}
|
|
60
|
-
.main ol li,
|
|
61
|
-
.main ul li {
|
|
62
|
-
line-height: 2rem;
|
|
63
|
-
padding-left: 0.5rem;
|
|
64
|
-
}
|
|
65
|
-
.main ul {
|
|
66
|
-
list-style-type: disc;
|
|
67
|
-
}
|
|
68
|
-
.main ul ul {
|
|
69
|
-
list-style-type: circle;
|
|
70
|
-
}
|
|
71
|
-
.main ul ul ul {
|
|
72
|
-
list-style-type: square;
|
|
73
|
-
}
|
|
74
|
-
.main ol {
|
|
75
|
-
list-style-type: decimal;
|
|
76
|
-
}
|
|
77
|
-
.main ol ul {
|
|
78
|
-
list-style-type: circle;
|
|
79
|
-
}
|
|
80
|
-
.main ol ul ul {
|
|
81
|
-
list-style-type: square;
|
|
82
|
-
}
|
|
83
|
-
.main table {
|
|
84
|
-
width: 100%;
|
|
85
|
-
table-layout: fixed;
|
|
86
|
-
border-collapse: separate;
|
|
87
|
-
border-radius: 8px;
|
|
88
|
-
border-spacing: 0;
|
|
89
|
-
border: 1px solid hsl(var(--hsdc-border));
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
}
|
|
92
|
-
.main table thead {
|
|
93
|
-
background-color: hsl(var(--hsdc-muted));
|
|
94
|
-
}
|
|
95
|
-
.main table tbody td {
|
|
96
|
-
border-top: 1px solid hsl(var(--hsdc-border));
|
|
97
|
-
}
|
|
98
|
-
.main table tbody tr:hover {
|
|
99
|
-
background-color: hsl(var(--hsdc-muted)/0.5);
|
|
100
|
-
}
|
|
101
|
-
.main table th,
|
|
102
|
-
.main table td {
|
|
103
|
-
padding: 8px;
|
|
104
|
-
font-size: 0.875rem;
|
|
105
|
-
text-align: left;
|
|
106
|
-
}
|
|
107
|
-
.main table th :global(&.left),
|
|
108
|
-
.main table td :global(&.left) {
|
|
109
|
-
text-align: left;
|
|
110
|
-
}
|
|
111
|
-
.main table th :global(&.center),
|
|
112
|
-
.main table td :global(&.center) {
|
|
113
|
-
text-align: center;
|
|
114
|
-
}
|
|
115
|
-
.main table th :global(&.right),
|
|
116
|
-
.main table td :global(&.right) {
|
|
117
|
-
text-align: right;
|
|
118
|
-
}
|
|
119
|
-
.main code:not(pre code) {
|
|
120
|
-
border-radius: 4px;
|
|
121
|
-
display: inline-block;
|
|
122
|
-
box-sizing: border-box;
|
|
123
|
-
padding: 2px 8px;
|
|
124
|
-
font-family: var(--hsdc-font-code);
|
|
125
|
-
line-height: 1.5;
|
|
126
|
-
border: 1px solid hsl(var(--hsdc-border));
|
|
127
|
-
background-color: hsl(var(--hsdc-muted));
|
|
128
|
-
}
|
|
129
|
-
.main blockquote {
|
|
130
|
-
border-left: 12px solid hsl(var(--hsdc-border));
|
|
131
|
-
color: hsl(var(--hsdc-muted-foreground));
|
|
132
|
-
margin: 0;
|
|
133
|
-
padding: 0 16px;
|
|
134
|
-
}
|
|
135
|
-
.main blockquote blockquote {
|
|
136
|
-
margin: 0 12px;
|
|
137
|
-
}
|
|
138
|
-
.main a:not(article a) {
|
|
139
|
-
color: hsl(var(--hsdc-link));
|
|
140
|
-
}
|
|
141
|
-
.main a:not(article a):hover {
|
|
142
|
-
text-decoration-line: underline;
|
|
143
|
-
}
|
|
144
|
-
.main summary {
|
|
145
|
-
cursor: pointer;
|
|
146
|
-
}
|
|
147
|
-
.main :global(.footnotes) {
|
|
148
|
-
margin: 4rem 0 1.5rem 0;
|
|
149
|
-
color: hsl(var(--hsdc-muted-foreground));
|
|
150
|
-
}
|
|
151
|
-
.main :global(.footnotes) p {
|
|
152
|
-
margin: 0;
|
|
153
|
-
}
|
|
154
|
-
.main :global(.contains-task-list) {
|
|
155
|
-
list-style-type: none;
|
|
156
|
-
padding-left: 0;
|
|
157
|
-
}
|
|
158
|
-
.main :global(.contains-task-list) input {
|
|
159
|
-
margin-right: 0.5rem;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.main :global(.react-tweet-theme) p {
|
|
163
|
-
margin: 0;
|
|
164
|
-
line-height: 1.5;
|
|
165
|
-
font-size: 17px;
|
|
166
|
-
}
|
|
167
|
-
.main :global(.code-block) {
|
|
168
|
-
margin: 1.5rem 0;
|
|
169
|
-
border: 1px solid hsl(var(--hsdc-border));
|
|
170
|
-
border-radius: 8px;
|
|
171
|
-
overflow: hidden;
|
|
172
|
-
}
|
|
173
|
-
.main :global(.code-block) pre {
|
|
174
|
-
font-family: var(--hsdc-font-code);
|
|
175
|
-
font-size: 14px;
|
|
176
|
-
padding: 16px;
|
|
177
|
-
overflow: auto;
|
|
178
|
-
background-color: hsl(var(--hsdc-code-block));
|
|
179
|
-
}
|
|
180
|
-
.main :global(.code-block) :global(.code-block-header) {
|
|
181
|
-
display: flex;
|
|
182
|
-
flex-direction: row;
|
|
183
|
-
align-items: center;
|
|
184
|
-
gap: 8px;
|
|
185
|
-
font-size: 14px;
|
|
186
|
-
padding: 8px 16px;
|
|
187
|
-
background-color: hsl(var(--hsdc-muted));
|
|
188
|
-
border-bottom: 1px solid hsl(var(--hsdc-border));
|
|
189
|
-
}
|
|
190
|
-
.main :global(.code-block) :global(.code-block-filename) {
|
|
191
|
-
flex: 1 1 auto;
|
|
192
|
-
}
|
|
193
|
-
.main :global(.shiki) code {
|
|
194
|
-
width: 100%;
|
|
195
|
-
min-width: max-content;
|
|
196
|
-
display: flex;
|
|
197
|
-
flex-direction: column;
|
|
198
|
-
margin: 0 -16px;
|
|
199
|
-
}
|
|
200
|
-
.main :global(.shiki) :global(span.line) {
|
|
201
|
-
position: relative;
|
|
202
|
-
width: 100%;
|
|
203
|
-
padding: 0 16px;
|
|
204
|
-
}
|
|
205
|
-
.main :global(.shiki) :global(span.line.diff.add) {
|
|
206
|
-
background-color: hsl(var(--hsdc-shiki-diff-add)/0.1) !important;
|
|
207
|
-
}
|
|
208
|
-
.main :global(.shiki) :global(span.line.diff.add)::before {
|
|
209
|
-
position: absolute;
|
|
210
|
-
left: 2px;
|
|
211
|
-
content: "+";
|
|
212
|
-
color: hsl(var(--hsdc-shiki-diff-add));
|
|
213
|
-
}
|
|
214
|
-
.main :global(.shiki) :global(span.line.diff.remove) {
|
|
215
|
-
background-color: hsl(var(--hsdc-shiki-diff-remove)/0.1) !important;
|
|
216
|
-
}
|
|
217
|
-
.main :global(.shiki) :global(span.line.diff.remove)::before {
|
|
218
|
-
position: absolute;
|
|
219
|
-
left: 2px;
|
|
220
|
-
content: "-";
|
|
221
|
-
color: hsl(var(--hsdc-shiki-diff-remove));
|
|
222
|
-
}
|
|
223
|
-
.main :global(.shiki) :global(.highlighted-word) {
|
|
224
|
-
background-color: hsl(var(--hsdc-shiki-highlighted-word)/0.2);
|
|
225
|
-
padding: 2px 0;
|
|
226
|
-
margin: -2px 0;
|
|
227
|
-
}
|
|
228
|
-
.main :global(.link-card) {
|
|
229
|
-
display: flex;
|
|
230
|
-
flex-direction: row;
|
|
231
|
-
border: 1px solid hsl(var(--hsdc-border));
|
|
232
|
-
border-radius: 8px;
|
|
233
|
-
overflow: hidden;
|
|
234
|
-
color: inherit;
|
|
235
|
-
width: 100%;
|
|
236
|
-
max-height: 144px;
|
|
237
|
-
margin: 1.8rem 0;
|
|
238
|
-
}
|
|
239
|
-
.main :global(.link-card):hover {
|
|
240
|
-
text-decoration: none;
|
|
241
|
-
background-color: hsl(var(--hsdc-muted)/0.5);
|
|
242
|
-
}
|
|
243
|
-
.main :global(.link-card) :global(.link-card-main) {
|
|
244
|
-
flex: 1;
|
|
245
|
-
display: flex;
|
|
246
|
-
flex-direction: column;
|
|
247
|
-
padding: 12px 16px;
|
|
248
|
-
overflow: hidden;
|
|
249
|
-
gap: 8px;
|
|
250
|
-
}
|
|
251
|
-
.main :global(.link-card) :global(.link-card-main) > div {
|
|
252
|
-
overflow: hidden;
|
|
253
|
-
display: -webkit-box;
|
|
254
|
-
-webkit-box-orient: vertical;
|
|
255
|
-
line-clamp: 2;
|
|
256
|
-
}
|
|
257
|
-
.main :global(.link-card) :global(.link-card-main) :global(.link-card-title) {
|
|
258
|
-
flex: 1 1 auto;
|
|
259
|
-
}
|
|
260
|
-
.main :global(.link-card) :global(.link-card-main) :global(.link-card-description) {
|
|
261
|
-
font-size: 0.75rem;
|
|
262
|
-
color: hsl(var(--hsdc-muted-foreground));
|
|
263
|
-
}
|
|
264
|
-
.main :global(.link-card) :global(.link-card-main) :global(.link-card-domain) {
|
|
265
|
-
display: flex;
|
|
266
|
-
flex-direction: row;
|
|
267
|
-
align-items: center;
|
|
268
|
-
gap: 8px;
|
|
269
|
-
font-size: 0.75rem;
|
|
270
|
-
color: hsl(var(--hsdc-muted-foreground));
|
|
271
|
-
}
|
|
272
|
-
.main :global(.link-card) :global(.link-card-image) {
|
|
273
|
-
width: 35%;
|
|
274
|
-
}
|
|
275
|
-
.main :global(.link-card) :global(.link-card-image) img {
|
|
276
|
-
object-fit: cover;
|
|
277
|
-
width: 100%;
|
|
278
|
-
height: 100%;
|
|
279
|
-
}
|