@docubook/markdown 2.0.0-beta.1 → 2.0.0-beta.3

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.
@@ -0,0 +1,3 @@
1
+ import { type ComponentType } from "react";
2
+ export type MdxComponentMap = Record<string, ComponentType<any>>;
3
+ export declare function createMdxComponents(customComponents?: MdxComponentMap): MdxComponentMap;
@@ -0,0 +1,7 @@
1
+ type AccordionGroupContextType = {
2
+ inGroup: boolean;
3
+ openTitle: string | null;
4
+ setOpenTitle: (title: string | null) => void;
5
+ };
6
+ export declare const AccordionGroupContext: import("react").Context<AccordionGroupContextType | null>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ type CopyButtonProps = {
2
+ content: string;
3
+ };
4
+ export declare function CopyButton({ content }: CopyButtonProps): import("react").JSX.Element;
5
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from "react";
2
+ type ExpandableCodeProps = {
3
+ isExpandable: boolean;
4
+ totalLines: number;
5
+ preContent: ReactNode;
6
+ preProps: Record<string, unknown>;
7
+ className?: string;
8
+ };
9
+ export declare function ExpandableCode({ isExpandable, totalLines, preContent, preProps, className, }: ExpandableCodeProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ import * as LucideIcons from "lucide-react";
2
+ import type { ReactNode } from "react";
3
+ export type IconName = keyof typeof LucideIcons;
4
+ export type IconProp = IconName | string;
5
+ export declare function resolveLucideIcon(icon?: IconProp): ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/markdown",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "Portable MDX components and framework adapters for DocuBook",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "react": ">=18",
44
44
  "react-dom": ">=18",
45
45
  "react-icons": "^5.0.0",
46
- "@docubook/core": "^2.0.0-beta.0"
46
+ "@docubook/core": "^2.0.0-beta.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@testing-library/jest-dom": "^6.9.1",
@@ -55,11 +55,11 @@
55
55
  "react": "^19.2.7",
56
56
  "react-dom": "^19.2.7",
57
57
  "react-icons": "^5.0.0",
58
- "tsup": "^8.5.1",
59
- "typescript": "^5.9.3"
58
+ "vite": "^8.2.1",
59
+ "typescript": "^7.0.2"
60
60
  },
61
61
  "scripts": {
62
- "build": "rm -rf dist tsconfig.tsbuildinfo && tsup",
62
+ "build": "rm -rf dist tsconfig.tsbuildinfo && vite build && tsc -p tsconfig.build.json",
63
63
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
64
64
  "test": "vitest run",
65
65
  "typecheck": "tsc -p tsconfig.json --noEmit"
package/styles.css CHANGED
@@ -39,13 +39,16 @@
39
39
  .prose .contains-task-list {
40
40
  list-style-type: none !important;
41
41
  list-style: none !important;
42
+ /* Override both physical and logical padding from @tailwindcss/typography */
42
43
  padding-left: 0 !important;
44
+ padding-inline-start: 0 !important;
43
45
  margin-left: 0 !important;
44
46
  }
45
47
 
46
48
  .contains-task-list .contains-task-list,
47
49
  .prose .contains-task-list .contains-task-list {
48
50
  padding-left: 1.5rem !important;
51
+ padding-inline-start: 1.5rem !important;
49
52
  margin-top: 0.25rem !important;
50
53
  margin-bottom: 0.25rem !important;
51
54
  }
@@ -55,13 +58,18 @@
55
58
  list-style-type: none !important;
56
59
  list-style: none !important;
57
60
  padding-left: 0 !important;
61
+ padding-inline-start: 0 !important;
58
62
  margin-top: 0.35rem;
59
63
  margin-bottom: 0.35rem;
60
64
  }
61
65
 
66
+ /* content:none hides ::marker (valid); display:none is ignored on ::marker */
62
67
  .contains-task-list > .task-list-item::marker,
68
+ .prose .contains-task-list > .task-list-item::marker {
69
+ content: none !important;
70
+ }
71
+ /* ::before fallback for browsers that don't use ::marker */
63
72
  .contains-task-list > .task-list-item::before,
64
- .prose .contains-task-list > .task-list-item::marker,
65
73
  .prose .contains-task-list > .task-list-item::before {
66
74
  content: none !important;
67
75
  display: none !important;
@@ -96,6 +104,7 @@
96
104
 
97
105
  .task-list-item > input[type="checkbox"]:checked::after {
98
106
  content: "";
107
+ display: block;
99
108
  width: 0.3rem;
100
109
  height: 0.55rem;
101
110
  border-right: 2px solid hsl(var(--primary-foreground, 210 40% 98%));