@sakura-ui/markdown 0.0.1
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/index.cjs.js +339 -0
- package/dist/index.es.js +18095 -0
- package/dist/types/components/LinkCard.d.ts +9 -0
- package/dist/types/components/LinkCard.d.ts.map +1 -0
- package/dist/types/components/Markdown.d.ts +13 -0
- package/dist/types/components/Markdown.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/plugins/attr.d.ts +3 -0
- package/dist/types/plugins/attr.d.ts.map +1 -0
- package/dist/types/plugins/card.d.ts +3 -0
- package/dist/types/plugins/card.d.ts.map +1 -0
- package/dist/types/plugins/cell.d.ts +3 -0
- package/dist/types/plugins/cell.d.ts.map +1 -0
- package/dist/types/plugins/faq.d.ts +3 -0
- package/dist/types/plugins/faq.d.ts.map +1 -0
- package/dist/types/plugins/grid.d.ts +3 -0
- package/dist/types/plugins/grid.d.ts.map +1 -0
- package/dist/types/plugins/headings.d.ts +9 -0
- package/dist/types/plugins/headings.d.ts.map +1 -0
- package/dist/types/plugins/helper.d.ts +14 -0
- package/dist/types/plugins/helper.d.ts.map +1 -0
- package/dist/types/plugins/index.d.ts +9 -0
- package/dist/types/plugins/index.d.ts.map +1 -0
- package/dist/types/plugins/linkButton.d.ts +3 -0
- package/dist/types/plugins/linkButton.d.ts.map +1 -0
- package/dist/types/plugins/youtube.d.ts +3 -0
- package/dist/types/plugins/youtube.d.ts.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LinkCardProps extends React.ComponentProps<'article'> {
|
|
3
|
+
href: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const LinkCard: ({ href, className, children, ...rest }: LinkCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export interface LinkCardHeaderProps extends React.ComponentProps<'div'> {
|
|
7
|
+
}
|
|
8
|
+
export declare const LinkCardHeader: ({ className, children }: LinkCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=LinkCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkCard.d.ts","sourceRoot":"","sources":["../../../src/components/LinkCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC;IACpE,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,QAAQ,2CAKlB,aAAa,4CAgCf,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;CAAG;AAE3E,eAAO,MAAM,cAAc,4BAGxB,mBAAmB,4CAkCrB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as production from 'react/jsx-runtime';
|
|
2
|
+
import { type HeadingItem } from '../plugins';
|
|
3
|
+
interface TocProps {
|
|
4
|
+
items: HeadingItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare const TableOfContents: ({ items }: TocProps) => production.JSX.Element;
|
|
7
|
+
type Props = {
|
|
8
|
+
showToc?: boolean;
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const Markdown: ({ children, showToc }: Props) => production.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA0C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAGnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;AA2JD,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,0BAA2B,KAAK,2BAoGpD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attr.d.ts","sourceRoot":"","sources":["../../../src/plugins/attr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,eACP,IAAI,SASnB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/plugins/card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,wBAAgB,UAAU,WACV,IAAI,UA+CnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/plugins/cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,wBAAgB,UAAU,WACV,IAAI,UAqCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../src/plugins/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,wBAAgB,SAAS,WACT,IAAI,UA8BnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/plugins/grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,wBAAgB,UAAU,WACV,IAAI,UAyCnB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Root } from 'mdast';
|
|
2
|
+
export type HeadingItem = {
|
|
3
|
+
id?: string;
|
|
4
|
+
depth: number;
|
|
5
|
+
value?: string;
|
|
6
|
+
children?: Array<HeadingItem>;
|
|
7
|
+
};
|
|
8
|
+
export declare const headingsPlugin: () => (tree: Root, vFile: any) => void;
|
|
9
|
+
//# sourceMappingURL=headings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../src/plugins/headings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,OAAO,CAAA;AAM1C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,cAAc,eACX,IAAI,SAAS,GAAG,SAkB/B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Directives } from 'mdast-util-directive';
|
|
2
|
+
import { Node } from 'unist';
|
|
3
|
+
export declare const isDirective: (node: Node) => node is Directives;
|
|
4
|
+
export declare const isContainerDirective: (node: Node) => node is Directives;
|
|
5
|
+
export declare const isLeafDirective: (node: Node) => node is Directives;
|
|
6
|
+
export declare const isTextDirective: (node: Node) => node is Directives;
|
|
7
|
+
type TreeNode<I> = Omit<I, 'children'> & {
|
|
8
|
+
children?: TreeNode<I>[];
|
|
9
|
+
};
|
|
10
|
+
export declare const treefy: <I extends {
|
|
11
|
+
depth: number;
|
|
12
|
+
}>(input: I[]) => TreeNode<I>[];
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/plugins/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,eAAO,MAAM,WAAW,SAAU,IAAI,uBAMrC,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAU,IAAI,uBAE9C,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,IAAI,uBAEzC,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,IAAI,uBAEzC,CAAA;AAED,KAAK,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;CAAE,CAAA;AAGrE,eAAO,MAAM,MAAM;WAAuB,MAAM;UAAW,CAAC,EAAE,kBAkB7D,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { youtubePlugin } from './youtube';
|
|
2
|
+
export { attrPlugin } from './attr';
|
|
3
|
+
export { linkButtonPlugin } from './linkButton';
|
|
4
|
+
export { gridPlugin } from './grid';
|
|
5
|
+
export { cellPlugin } from './cell';
|
|
6
|
+
export { cardPlugin } from './card';
|
|
7
|
+
export { faqPlugin } from './faq';
|
|
8
|
+
export { headingsPlugin, type HeadingItem } from './headings';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/linkButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,wBAAgB,gBAAgB,WAChB,IAAI,UAenB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../../src/plugins/youtube.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAOjC,wBAAgB,aAAa,WACb,IAAI,UAuCnB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sakura-ui/markdown",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"author": "glassonion1",
|
|
7
|
+
"homepage": "https://github.com/glassonion1/sakura-ui",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+ssh://git@github.com:glassonion1/sakura-ui.git",
|
|
11
|
+
"directory": "packages/markdown"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.cjs.js",
|
|
16
|
+
"types": "dist/types/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/types/index.d.ts",
|
|
20
|
+
"require": "./dist/index.cjs.js",
|
|
21
|
+
"import": "./dist/index.es.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"lint": "run-s lint:*",
|
|
33
|
+
"lint:lint": "biome lint ./",
|
|
34
|
+
"lint:prettier": "prettier --write --ignore-path .gitignore './src/*.ts'",
|
|
35
|
+
"prebuild": "rimraf dist",
|
|
36
|
+
"build": "run-p build:*",
|
|
37
|
+
"build:scripts": "vite build",
|
|
38
|
+
"build:types": "tsc && tsc-alias",
|
|
39
|
+
"test": "vitest"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^18.2.0",
|
|
43
|
+
"react-dom": "^18.2.0",
|
|
44
|
+
"tailwindcss": "^3.2.7"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@testing-library/jest-dom": "^6.4.5",
|
|
48
|
+
"@testing-library/react": "^16.0.0",
|
|
49
|
+
"@types/mdast": "^4.0.4",
|
|
50
|
+
"@types/react": "^18.3.3",
|
|
51
|
+
"@types/react-dom": "^18.3.0",
|
|
52
|
+
"@types/unist": "^3.0.2",
|
|
53
|
+
"autoprefixer": "^10.4.19",
|
|
54
|
+
"happy-dom": "^14.12.0",
|
|
55
|
+
"postcss": "^8.4.38",
|
|
56
|
+
"react": "^18.3.1",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
58
|
+
"tailwindcss": "^3.4.3"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"github-slugger": "^2.0.0",
|
|
62
|
+
"hastscript": "^9.0.0",
|
|
63
|
+
"mdast-util-directive": "^3.0.0",
|
|
64
|
+
"mdast-util-to-string": "^4.0.0",
|
|
65
|
+
"rehype-external-links": "^3.0.0",
|
|
66
|
+
"rehype-raw": "^7.0.0",
|
|
67
|
+
"rehype-react": "^8.0.0",
|
|
68
|
+
"rehype-shift-heading": "^2.0.0",
|
|
69
|
+
"rehype-slug": "^6.0.0",
|
|
70
|
+
"remark-breaks": "^4.0.0",
|
|
71
|
+
"remark-directive": "^3.0.0",
|
|
72
|
+
"remark-gfm": "^4.0.0",
|
|
73
|
+
"remark-parse": "^11.0.0",
|
|
74
|
+
"remark-rehype": "^11.1.0",
|
|
75
|
+
"system": "workspace:*",
|
|
76
|
+
"unified": "^11.0.5",
|
|
77
|
+
"unist-util-visit": "^5.0.0"
|
|
78
|
+
}
|
|
79
|
+
}
|