@oxide/react-asciidoc 0.0.1-alpha.9 → 0.1.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/react-asciidoc.js +1053 -46277
- package/dist/react-asciidoc.umd.cjs +12 -20
- package/dist/types/index.d.ts +9 -8
- package/dist/types/templates/util.d.ts +5 -0
- package/package.json +6 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import asciidoctor from '@asciidoctor/core';
|
|
3
|
-
import type { AbstractBlock
|
|
3
|
+
import type { AbstractBlock } from '@asciidoctor/core';
|
|
4
4
|
import type * as AdocTypes from '@asciidoctor/core';
|
|
5
5
|
import useGetContent from './hooks/useGetContent';
|
|
6
|
-
import { Admonition, Audio, CoList, DList, Example, FloatingTitle, Image, Listing, Literal, OList, Open, PageBreak, Paragraph, Pass, Preamble, Quote, Section, Sidebar, Table, TableOfContents, ThematicBreak, UList, Verse } from './templates';
|
|
7
|
-
import { CaptionedTitle, Title, getRole } from './templates/util';
|
|
6
|
+
import { Admonition, Audio, CoList, DList, Document, Example, FloatingTitle, Image, Listing, Literal, OList, Open, PageBreak, Paragraph, Pass, Preamble, Quote, Section, Sidebar, Table, TableOfContents, ThematicBreak, UList, Verse } from './templates';
|
|
7
|
+
import { CaptionedTitle, Title, getLineNumber, getRole } from './templates/util';
|
|
8
8
|
declare type Overrides = {
|
|
9
9
|
admonition?: typeof Admonition;
|
|
10
10
|
audio?: typeof Audio;
|
|
@@ -30,16 +30,17 @@ declare type Overrides = {
|
|
|
30
30
|
ulist?: typeof UList;
|
|
31
31
|
verse?: typeof Verse;
|
|
32
32
|
};
|
|
33
|
-
declare type Options = {
|
|
33
|
+
export declare type Options = {
|
|
34
34
|
overrides?: Overrides;
|
|
35
|
-
|
|
35
|
+
customDocument?: typeof Document;
|
|
36
36
|
};
|
|
37
|
-
declare const Asciidoc: ({ content, options }: {
|
|
38
|
-
content:
|
|
37
|
+
declare const Asciidoc: ({ content, options, }: {
|
|
38
|
+
content: AdocTypes.Document;
|
|
39
39
|
options?: Options | undefined;
|
|
40
40
|
}) => JSX.Element;
|
|
41
41
|
declare const Content: ({ blocks }: {
|
|
42
42
|
blocks: AbstractBlock[];
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export default Asciidoc;
|
|
45
|
-
export { asciidoctor, Content, useGetContent, Title, getRole, CaptionedTitle, AdocTypes };
|
|
45
|
+
export { asciidoctor, Content, useGetContent, Title, getRole, getLineNumber, CaptionedTitle, AdocTypes, };
|
|
46
|
+
export * from './templates';
|
|
@@ -7,3 +7,8 @@ export declare const CaptionedTitle: ({ node }: {
|
|
|
7
7
|
node: Block | Block | List;
|
|
8
8
|
}) => JSX.Element | null;
|
|
9
9
|
export declare const getRole: (node: AbstractBlock | Block | List) => string | undefined;
|
|
10
|
+
export declare const getLineNumber: (node: AbstractBlock | Block | List) => {
|
|
11
|
+
'data-lineno': number;
|
|
12
|
+
} | {
|
|
13
|
+
'data-lineno'?: undefined;
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxide/react-asciidoc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
7
7
|
"description": "React renderer for AsciiDoc",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/oxidecomputer/react-asciidoc.git"
|
|
11
|
+
},
|
|
8
12
|
"main": "./dist/react-asciidoc.umd.cjs",
|
|
9
13
|
"module": "./dist/react-asciidoc.js",
|
|
10
14
|
"exports": {
|
|
@@ -19,8 +23,6 @@
|
|
|
19
23
|
"dev": "vite --port 8000",
|
|
20
24
|
"clean": "rimraf dist/",
|
|
21
25
|
"build": "npm run clean && vite build && tsc",
|
|
22
|
-
"preview": "vite preview",
|
|
23
|
-
"release": "auto shipit",
|
|
24
26
|
"test:init": "rm -rf ./tests/renderer.spec.ts-snapshots & npx playwright test -g html",
|
|
25
27
|
"test:run": "npx playwright test -g react",
|
|
26
28
|
"fmt": "prettier --write --ignore-path ./.gitignore .",
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
"author": "Oxide Computer Company <bots@oxidecomputer.com>",
|
|
31
33
|
"license": "MPL 2.0",
|
|
32
34
|
"dependencies": {
|
|
33
|
-
"@asciidoctor/core": "^3.0.0-rc.
|
|
35
|
+
"@asciidoctor/core": "^3.0.0-rc.2",
|
|
34
36
|
"classnames": "^2.3.2",
|
|
35
37
|
"highlight.js": "^11.6.0",
|
|
36
38
|
"html-react-parser": "^3.0.4",
|
|
@@ -44,7 +46,6 @@
|
|
|
44
46
|
"@types/react": "^18.0.18",
|
|
45
47
|
"@types/react-dom": "^18.0.6",
|
|
46
48
|
"@vitejs/plugin-react": "^2.1.0",
|
|
47
|
-
"auto": "^10.37.6",
|
|
48
49
|
"eslint": "^8.23.0",
|
|
49
50
|
"npm-run-all": "^4.1.5",
|
|
50
51
|
"prettier": "^2.7.1",
|