@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.
Files changed (32) hide show
  1. package/dist/react-asciidoc.js +6 -7
  2. package/dist/react-asciidoc.umd.cjs +23 -23
  3. package/dist/types/hooks/useGetContent.d.ts +3 -0
  4. package/dist/{index.d.ts → types/index.d.ts} +4 -4
  5. package/dist/types/templates/Admonition.d.ts +6 -0
  6. package/dist/types/templates/Audio.d.ts +6 -0
  7. package/dist/types/templates/CoList.d.ts +6 -0
  8. package/dist/types/templates/DList.d.ts +6 -0
  9. package/dist/types/templates/Document.d.ts +6 -0
  10. package/dist/types/templates/Example.d.ts +6 -0
  11. package/dist/types/templates/FloatingTitle.d.ts +6 -0
  12. package/dist/types/templates/Image.d.ts +6 -0
  13. package/dist/types/templates/Listing.d.ts +6 -0
  14. package/dist/types/templates/Literal.d.ts +6 -0
  15. package/dist/types/templates/OList.d.ts +6 -0
  16. package/dist/types/templates/Open.d.ts +6 -0
  17. package/dist/types/templates/Outline.d.ts +10 -0
  18. package/dist/types/templates/PageBreak.d.ts +3 -0
  19. package/dist/types/templates/Paragraph.d.ts +6 -0
  20. package/dist/types/templates/Pass.d.ts +6 -0
  21. package/dist/types/templates/Preamble.d.ts +6 -0
  22. package/dist/types/templates/Quote.d.ts +6 -0
  23. package/dist/types/templates/Section.d.ts +6 -0
  24. package/dist/types/templates/Sidebar.d.ts +6 -0
  25. package/dist/types/templates/Table.d.ts +6 -0
  26. package/dist/types/templates/TableOfContents.d.ts +6 -0
  27. package/dist/types/templates/ThematicBreak.d.ts +3 -0
  28. package/dist/types/templates/UList.d.ts +6 -0
  29. package/dist/types/templates/Verse.d.ts +6 -0
  30. package/dist/types/templates/index.d.ts +26 -0
  31. package/dist/types/templates/util.d.ts +9 -0
  32. package/package.json +6 -4
@@ -0,0 +1,3 @@
1
+ import type { AbstractBlock, Block, Table } from '@asciidoctor/core';
2
+ declare const useGetContent: (node: Block | AbstractBlock | Table.Cell) => string;
3
+ export default useGetContent;
@@ -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 const ad: AdocTypes.Asciidoctor;
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, ad as asciidoctor, AdocTypes, };
44
+ export { Content, useGetContent, Title, getRole, CaptionedTitle, AdocTypes };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Admonition: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Admonition;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Audio: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Audio;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { List } from '@asciidoctor/core';
3
+ declare const CoList: ({ node }: {
4
+ node: List;
5
+ }) => JSX.Element;
6
+ export default CoList;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { List } from '@asciidoctor/core';
3
+ declare const DList: ({ node }: {
4
+ node: List;
5
+ }) => JSX.Element;
6
+ export default DList;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Document as DocumentType } from '@asciidoctor/core';
3
+ declare const Document: ({ document }: {
4
+ document: DocumentType;
5
+ }) => JSX.Element;
6
+ export default Document;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Example: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Example;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const FloatingTitle: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default FloatingTitle;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Image: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Image;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Listing: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Listing;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Literal: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Literal;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { List } from '@asciidoctor/core';
3
+ declare const OList: ({ node }: {
4
+ node: List;
5
+ }) => JSX.Element;
6
+ export default OList;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Open: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Open;
@@ -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,3 @@
1
+ /// <reference types="react" />
2
+ declare const PageBreak: () => JSX.Element;
3
+ export default PageBreak;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Paragraph: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Paragraph;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { AbstractBlock } from '@asciidoctor/core';
3
+ declare const Pass: ({ node }: {
4
+ node: AbstractBlock;
5
+ }) => JSX.Element;
6
+ export default Pass;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { AbstractBlock } from '@asciidoctor/core';
3
+ declare const Preamble: ({ node }: {
4
+ node: AbstractBlock;
5
+ }) => JSX.Element;
6
+ export default Preamble;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Quote: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Quote;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Section as SectionType } from '@asciidoctor/core';
3
+ declare const Section: ({ node }: {
4
+ node: SectionType;
5
+ }) => JSX.Element;
6
+ export default Section;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Sidebar: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Sidebar;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Table as TableType } from '@asciidoctor/core';
3
+ declare const Table: ({ node }: {
4
+ node: TableType;
5
+ }) => JSX.Element;
6
+ export default Table;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const TableOfContents: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element | null;
6
+ export default TableOfContents;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ThematicBreak: () => JSX.Element;
3
+ export default ThematicBreak;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { List } from '@asciidoctor/core';
3
+ declare const UList: ({ node }: {
4
+ node: List;
5
+ }) => JSX.Element;
6
+ export default UList;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Block } from '@asciidoctor/core';
3
+ declare const Verse: ({ node }: {
4
+ node: Block;
5
+ }) => JSX.Element;
6
+ export default Verse;
@@ -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",
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 && tsc && vite build",
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-plugin-dts": "^2.1.0"
54
+ "vite-dts": "^1.0.4",
55
+ "vite-plugin-dts": "^2.3.0"
54
56
  },
55
57
  "peerDependencies": {
56
58
  "react": "^18.2.0",