@lax-wp/design-system 0.8.42 → 0.9.0
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/components/button/Button.d.ts +1 -2
- package/dist/components/buttons/option-button/OptionButton.d.ts +0 -2
- package/dist/components/data-display/code-editor-beta/CodeEditorBeta.d.ts +14 -10
- package/dist/components/data-display/comparison/Comparison.d.ts +2 -2
- package/dist/components/data-display/comparison/ComparisonContext.d.ts +1 -1
- package/dist/components/data-display/comparison/components/SortableItem.d.ts +1 -1
- package/dist/components/data-display/comparison/constants.d.ts +1 -1
- package/dist/components/data-display/comparison/utils.d.ts +1 -1
- package/dist/components/data-display/label-value/LabelValue.d.ts +0 -2
- package/dist/components/data-display/popper/Popper.d.ts +0 -3
- package/dist/components/forms/creatable-select/CreatableSelect.d.ts +1 -1
- package/dist/components/forms/select-field/SelectField.d.ts +0 -1
- package/dist/design-system.css +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.es.js +21941 -52434
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +170 -84
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +0 -18
- package/package.json +3 -14
- package/dist/components/forms/form/Form.d.ts +0 -2
- package/dist/components/forms/md-input/MarkdownPreview.d.ts +0 -45
- package/dist/components/forms/md-input/RichMarkdownInput.d.ts +0 -79
- package/dist/components/forms/md-input/index.d.ts +0 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -33,18 +33,6 @@ export interface CodeBlockInfo {
|
|
|
33
33
|
cursorLine: number;
|
|
34
34
|
/** 1-based column where the cursor was when clicked */
|
|
35
35
|
cursorColumn: number;
|
|
36
|
-
/**
|
|
37
|
-
* The outermost (top-level) enclosing block, excluding the root document.
|
|
38
|
-
* For `{ a: { b: { c: {} } } }`, clicking inside `c` returns `c` as the
|
|
39
|
-
* main block and `a` as the `parentBlock`.
|
|
40
|
-
* `undefined` if the innermost block is already a top-level block.
|
|
41
|
-
*/
|
|
42
|
-
parentBlock?: {
|
|
43
|
-
startLine: number;
|
|
44
|
-
endLine: number;
|
|
45
|
-
text: string;
|
|
46
|
-
kind?: string;
|
|
47
|
-
};
|
|
48
36
|
}
|
|
49
37
|
export interface CodeEditorProps {
|
|
50
38
|
value: string;
|
|
@@ -74,12 +62,6 @@ export interface CodeEditorProps {
|
|
|
74
62
|
* Change the value to trigger navigation; set to `undefined` to clear.
|
|
75
63
|
*/
|
|
76
64
|
focusBlock?: string;
|
|
77
|
-
/**
|
|
78
|
-
* When `true`, `focusBlock` only matches top-level keys (depth 1 in JSON).
|
|
79
|
-
* This avoids jumping to nested occurrences of the same key name.
|
|
80
|
-
* Defaults to `false` (matches the first occurrence anywhere).
|
|
81
|
-
*/
|
|
82
|
-
focusBlockTopLevelOnly?: boolean;
|
|
83
65
|
}
|
|
84
66
|
export interface ThemeContextType {
|
|
85
67
|
theme: 'light' | 'dark';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lax-wp/design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -81,14 +81,12 @@
|
|
|
81
81
|
"react-popper-tooltip": "^4.0.0",
|
|
82
82
|
"react-router-dom": "^6.0.0",
|
|
83
83
|
"react-select": "^5.0.0",
|
|
84
|
-
"react-syntax-highlighter": "^15.0.0",
|
|
85
84
|
"react-toastify": "^9.0.0",
|
|
86
85
|
"react-window": "^1.8.0",
|
|
87
86
|
"react-zoom-pan-pinch": "^3.0.0",
|
|
88
|
-
"rehype-raw": "^7.0.0",
|
|
89
87
|
"remark-gfm": "^4.0.0",
|
|
90
88
|
"styled-components": "^6.0.0",
|
|
91
|
-
"swiper": "^
|
|
89
|
+
"swiper": "^11.0.0"
|
|
92
90
|
},
|
|
93
91
|
"peerDependenciesMeta": {
|
|
94
92
|
"@codeium/react-code-editor": {
|
|
@@ -103,12 +101,6 @@
|
|
|
103
101
|
"react-markdown": {
|
|
104
102
|
"optional": true
|
|
105
103
|
},
|
|
106
|
-
"react-syntax-highlighter": {
|
|
107
|
-
"optional": true
|
|
108
|
-
},
|
|
109
|
-
"rehype-raw": {
|
|
110
|
-
"optional": true
|
|
111
|
-
},
|
|
112
104
|
"remark-gfm": {
|
|
113
105
|
"optional": true
|
|
114
106
|
},
|
|
@@ -134,7 +126,6 @@
|
|
|
134
126
|
"@types/lodash": "^4.17.0",
|
|
135
127
|
"@types/react": "^18.2.0",
|
|
136
128
|
"@types/react-dom": "^18.2.0",
|
|
137
|
-
"@types/react-syntax-highlighter": "^15.5.13",
|
|
138
129
|
"@types/react-window": "^1.8.8",
|
|
139
130
|
"@vitejs/plugin-react": "^4.6.0",
|
|
140
131
|
"@vitest/browser": "^3.2.4",
|
|
@@ -174,15 +165,13 @@
|
|
|
174
165
|
"react-popper-tooltip": "^4.4.2",
|
|
175
166
|
"react-router-dom": "^6.30.3",
|
|
176
167
|
"react-select": "^5.7.3",
|
|
177
|
-
"react-syntax-highlighter": "^15.5.0",
|
|
178
168
|
"react-toastify": "^9.1.3",
|
|
179
169
|
"react-window": "1.8.11",
|
|
180
170
|
"react-zoom-pan-pinch": "^3.1.0",
|
|
181
|
-
"rehype-raw": "^7.0.0",
|
|
182
171
|
"remark-gfm": "^4.0.1",
|
|
183
172
|
"storybook": "^9.0.18",
|
|
184
173
|
"styled-components": "^6.1.9",
|
|
185
|
-
"swiper": "^
|
|
174
|
+
"swiper": "^11.2.10",
|
|
186
175
|
"tailwindcss": "^3.4.13",
|
|
187
176
|
"typescript": "^5.6.3",
|
|
188
177
|
"typescript-eslint": "^8.35.1",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for the MarkdownPreview component
|
|
3
|
-
*/
|
|
4
|
-
export interface MarkdownPreviewProps {
|
|
5
|
-
/** Markdown content to display */
|
|
6
|
-
content: string;
|
|
7
|
-
/** Additional CSS classes for the wrapper container */
|
|
8
|
-
className?: string;
|
|
9
|
-
/** Link target behavior: '_blank' for new tab, '_self' for current tab */
|
|
10
|
-
linkTarget?: '_blank' | '_self';
|
|
11
|
-
/** Whether to show syntax highlighting for code blocks */
|
|
12
|
-
enableSyntaxHighlighting?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* MarkdownPreview component displays rendered markdown content.
|
|
16
|
-
*
|
|
17
|
-
* **Supported Markdown Features:**
|
|
18
|
-
* - Headings (H1-H6)
|
|
19
|
-
* - Text formatting (bold, italic, underline, strikethrough)
|
|
20
|
-
* - Lists (bullet and numbered)
|
|
21
|
-
* - Code blocks with syntax highlighting
|
|
22
|
-
* - Inline code
|
|
23
|
-
* - Block quotes
|
|
24
|
-
* - Links with configurable target
|
|
25
|
-
* - Images (responsive)
|
|
26
|
-
* - Tables
|
|
27
|
-
* - Horizontal rules
|
|
28
|
-
*
|
|
29
|
-
* **Features:**
|
|
30
|
-
* - GFM (GitHub Flavored Markdown) support
|
|
31
|
-
* - HTML support via rehype-raw
|
|
32
|
-
* - Syntax highlighting for code blocks
|
|
33
|
-
* - Responsive images
|
|
34
|
-
* - Dark mode support
|
|
35
|
-
* - Configurable link behavior
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* <MarkdownPreview
|
|
40
|
-
* content="# Hello World\n\nThis is **bold** text."
|
|
41
|
-
* linkTarget="_blank"
|
|
42
|
-
* />
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare const MarkdownPreview: import("react").ForwardRefExoticComponent<MarkdownPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for the RichMarkdownInput component
|
|
3
|
-
*/
|
|
4
|
-
export interface RichMarkdownInputProps {
|
|
5
|
-
/** Unique identifier for the markdown input */
|
|
6
|
-
id?: string;
|
|
7
|
-
/** Current markdown value */
|
|
8
|
-
value?: string;
|
|
9
|
-
/** Placeholder text for the textarea */
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
/** Minimum number of visible text lines */
|
|
12
|
-
minRows?: number;
|
|
13
|
-
/** Maximum number of visible text lines */
|
|
14
|
-
maxRows?: number;
|
|
15
|
-
/** Whether the input is disabled */
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
/** Additional CSS classes for the wrapper container */
|
|
18
|
-
className?: string;
|
|
19
|
-
/** Additional CSS classes for the textarea */
|
|
20
|
-
textareaClassName?: string;
|
|
21
|
-
/** Additional CSS classes for the preview container */
|
|
22
|
-
previewClassName?: string;
|
|
23
|
-
/** Label text to display above the input */
|
|
24
|
-
label?: string;
|
|
25
|
-
/** Whether the field is required */
|
|
26
|
-
required?: boolean;
|
|
27
|
-
/** Whether to show the preview button */
|
|
28
|
-
showPreviewOnModal?: boolean;
|
|
29
|
-
/** Maximum character count */
|
|
30
|
-
maxLength?: number;
|
|
31
|
-
/** Link target behavior: '_blank' for new tab, '_self' for current tab */
|
|
32
|
-
linkTarget?: '_blank' | '_self';
|
|
33
|
-
/** Callback function called when the markdown value changes */
|
|
34
|
-
onChange: (value: string) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A rich markdown input component with comprehensive formatting toolbar.
|
|
38
|
-
*
|
|
39
|
-
* **Text Formatting:**
|
|
40
|
-
* - Bold (Ctrl+B) - Always visible
|
|
41
|
-
* - Italic (Ctrl+I) - Always visible
|
|
42
|
-
* - Underline (Ctrl+U) - Always visible
|
|
43
|
-
* - Strikethrough - Hidden on mobile (< 640px)
|
|
44
|
-
*
|
|
45
|
-
* **Lists:**
|
|
46
|
-
* - Bullet lists - Always visible
|
|
47
|
-
* - Numbered lists - Always visible
|
|
48
|
-
*
|
|
49
|
-
* **Additional:**
|
|
50
|
-
* - Inline code (Ctrl+E) - Hidden on small screens (< 1024px)
|
|
51
|
-
* - Block quotes - Hidden on medium screens (< 1280px)
|
|
52
|
-
* - Headings - Hidden on small screens (< 1024px)
|
|
53
|
-
* - Links (Ctrl+K) - Hidden on medium screens (< 1280px)
|
|
54
|
-
* - Images - Supported in preview
|
|
55
|
-
* - Horizontal rules - Hidden on large screens (< 1536px)
|
|
56
|
-
*
|
|
57
|
-
* **Features:**
|
|
58
|
-
* - Edit/Preview toggle with icons
|
|
59
|
-
* - Character counter (optional)
|
|
60
|
-
* - Preview modal with scrolling
|
|
61
|
-
* - Keyboard shortcuts
|
|
62
|
-
* - Syntax highlighting for code blocks
|
|
63
|
-
* - Responsive toolbar (hides buttons progressively on smaller screens)
|
|
64
|
-
* - Dark mode support
|
|
65
|
-
* - Configurable link target behavior
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```tsx
|
|
69
|
-
* <RichMarkdownInput
|
|
70
|
-
* value={markdown}
|
|
71
|
-
* onChange={setMarkdown}
|
|
72
|
-
* placeholder="Enter description..."
|
|
73
|
-
* label="Description"
|
|
74
|
-
* maxLength={300}
|
|
75
|
-
* linkTarget="_blank"
|
|
76
|
-
* />
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare const RichMarkdownInput: import("react").ForwardRefExoticComponent<RichMarkdownInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { MdInput } from './MdInput';
|
|
2
|
-
export type { MdInputProps } from './MdInput';
|
|
3
|
-
export { RichMarkdownInput } from './RichMarkdownInput';
|
|
4
|
-
export type { RichMarkdownInputProps } from './RichMarkdownInput';
|
|
5
|
-
export { MarkdownPreview } from './MarkdownPreview';
|
|
6
|
-
export type { MarkdownPreviewProps } from './MarkdownPreview';
|