@oxide/react-asciidoc 0.0.1-alpha.3 → 0.0.1-alpha.4
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 +6 -7
- package/dist/react-asciidoc.umd.cjs +23 -23
- package/dist/types/hooks/useGetContent.d.ts +3 -0
- package/dist/{index.d.ts → types/index.d.ts} +4 -4
- package/dist/types/templates/Admonition.d.ts +6 -0
- package/dist/types/templates/Audio.d.ts +6 -0
- package/dist/types/templates/CoList.d.ts +6 -0
- package/dist/types/templates/DList.d.ts +6 -0
- package/dist/types/templates/Document.d.ts +6 -0
- package/dist/types/templates/Example.d.ts +6 -0
- package/dist/types/templates/FloatingTitle.d.ts +6 -0
- package/dist/types/templates/Image.d.ts +6 -0
- package/dist/types/templates/Listing.d.ts +6 -0
- package/dist/types/templates/Literal.d.ts +6 -0
- package/dist/types/templates/OList.d.ts +6 -0
- package/dist/types/templates/Open.d.ts +6 -0
- package/dist/types/templates/Outline.d.ts +10 -0
- package/dist/types/templates/PageBreak.d.ts +3 -0
- package/dist/types/templates/Paragraph.d.ts +6 -0
- package/dist/types/templates/Pass.d.ts +6 -0
- package/dist/types/templates/Preamble.d.ts +6 -0
- package/dist/types/templates/Quote.d.ts +6 -0
- package/dist/types/templates/Section.d.ts +6 -0
- package/dist/types/templates/Sidebar.d.ts +6 -0
- package/dist/types/templates/Table.d.ts +6 -0
- package/dist/types/templates/TableOfContents.d.ts +6 -0
- package/dist/types/templates/ThematicBreak.d.ts +3 -0
- package/dist/types/templates/UList.d.ts +6 -0
- package/dist/types/templates/Verse.d.ts +6 -0
- package/dist/types/templates/index.d.ts +26 -0
- package/dist/types/templates/util.d.ts +9 -0
- package/package.json +6 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { AbstractBlock, Attributes } from '@asciidoctor/core';
|
|
2
3
|
import type * as AdocTypes from '@asciidoctor/core';
|
|
3
4
|
import useGetContent from './hooks/useGetContent';
|
|
4
5
|
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';
|
|
5
6
|
import { CaptionedTitle, Title, getRole } from './templates/util';
|
|
6
|
-
declare
|
|
7
|
-
type Overrides = {
|
|
7
|
+
declare type Overrides = {
|
|
8
8
|
admonition?: typeof Admonition;
|
|
9
9
|
audio?: typeof Audio;
|
|
10
10
|
colist?: typeof CoList;
|
|
@@ -29,7 +29,7 @@ type Overrides = {
|
|
|
29
29
|
ulist?: typeof UList;
|
|
30
30
|
verse?: typeof Verse;
|
|
31
31
|
};
|
|
32
|
-
type Options = {
|
|
32
|
+
declare type Options = {
|
|
33
33
|
overrides?: Overrides;
|
|
34
34
|
attributes?: Attributes;
|
|
35
35
|
};
|
|
@@ -41,4 +41,4 @@ declare const Content: ({ blocks }: {
|
|
|
41
41
|
blocks: AbstractBlock[];
|
|
42
42
|
}) => JSX.Element;
|
|
43
43
|
export default Asciidoc;
|
|
44
|
-
export { Content, useGetContent, Title, getRole, CaptionedTitle,
|
|
44
|
+
export { Content, useGetContent, Title, getRole, CaptionedTitle, AdocTypes };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AbstractBlock } from '@asciidoctor/core';
|
|
3
|
+
declare const Outline: ({ node, opts, }: {
|
|
4
|
+
node: AbstractBlock;
|
|
5
|
+
opts?: {
|
|
6
|
+
tocLevels?: number | undefined;
|
|
7
|
+
sectNumLevels?: number | undefined;
|
|
8
|
+
} | undefined;
|
|
9
|
+
}) => JSX.Element | null;
|
|
10
|
+
export default Outline;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Admonition from './Admonition';
|
|
2
|
+
import Audio from './Audio';
|
|
3
|
+
import CoList from './CoList';
|
|
4
|
+
import DList from './DList';
|
|
5
|
+
import Document from './Document';
|
|
6
|
+
import Example from './Example';
|
|
7
|
+
import FloatingTitle from './FloatingTitle';
|
|
8
|
+
import Image from './Image';
|
|
9
|
+
import Listing from './Listing';
|
|
10
|
+
import Literal from './Literal';
|
|
11
|
+
import OList from './OList';
|
|
12
|
+
import Open from './Open';
|
|
13
|
+
import Outline from './Outline';
|
|
14
|
+
import PageBreak from './PageBreak';
|
|
15
|
+
import Paragraph from './Paragraph';
|
|
16
|
+
import Pass from './Pass';
|
|
17
|
+
import Preamble from './Preamble';
|
|
18
|
+
import Quote from './Quote';
|
|
19
|
+
import Section from './Section';
|
|
20
|
+
import Sidebar from './Sidebar';
|
|
21
|
+
import Table from './Table';
|
|
22
|
+
import TableOfContents from './TableOfContents';
|
|
23
|
+
import ThematicBreak from './ThematicBreak';
|
|
24
|
+
import UList from './UList';
|
|
25
|
+
import Verse from './Verse';
|
|
26
|
+
export { Audio, Admonition, CoList, Document, DList, Example, Outline, FloatingTitle, Listing, Literal, Image, OList, Open, PageBreak, Pass, Paragraph, Preamble, Section, Sidebar, Table, ThematicBreak, UList, Quote, Verse, TableOfContents, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AbstractBlock, Block, List } from '@asciidoctor/core';
|
|
3
|
+
export declare const Title: ({ node }: {
|
|
4
|
+
node: AbstractBlock | Block | List;
|
|
5
|
+
}) => JSX.Element | null;
|
|
6
|
+
export declare const CaptionedTitle: ({ node }: {
|
|
7
|
+
node: Block | Block | List;
|
|
8
|
+
}) => JSX.Element | null;
|
|
9
|
+
export declare const getRole: (node: AbstractBlock | Block | List) => string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxide/react-asciidoc",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
17
|
+
"types": "./dist/types/index.d.ts",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"dev": "vite --port 8000",
|
|
20
20
|
"clean": "rimraf dist/",
|
|
21
|
-
"build": "npm run clean &&
|
|
21
|
+
"build": "npm run clean && vite build && tsc",
|
|
22
22
|
"preview": "vite preview",
|
|
23
23
|
"release": "auto shipit",
|
|
24
24
|
"test:init": "rm -rf ./tests/renderer.spec.ts-snapshots & npx playwright test -g html",
|
|
@@ -48,9 +48,11 @@
|
|
|
48
48
|
"eslint": "^8.23.0",
|
|
49
49
|
"npm-run-all": "^4.1.5",
|
|
50
50
|
"prettier": "^2.7.1",
|
|
51
|
+
"rollup-plugin-dts": "^5.3.0",
|
|
51
52
|
"typescript": "^4.6.4",
|
|
52
53
|
"vite": "^3.1.0",
|
|
53
|
-
"vite-
|
|
54
|
+
"vite-dts": "^1.0.4",
|
|
55
|
+
"vite-plugin-dts": "^2.3.0"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
58
|
"react": "^18.2.0",
|