chaeditor 0.1.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/LICENSE.txt +21 -0
- package/README.ko.md +250 -0
- package/README.md +242 -0
- package/dist/core.cjs +1034 -0
- package/dist/core.d.mts +347 -0
- package/dist/core.d.ts +347 -0
- package/dist/core.mjs +988 -0
- package/dist/default-host.cjs +243 -0
- package/dist/default-host.d.mts +52 -0
- package/dist/default-host.d.ts +52 -0
- package/dist/default-host.mjs +239 -0
- package/dist/default-markdown-primitive-registry-B3PGEkqs.d.mts +12 -0
- package/dist/default-markdown-primitive-registry-CqzwhHj2.d.ts +12 -0
- package/dist/image-upload-kind-BJqItE_C.d.mts +18 -0
- package/dist/image-upload-kind-BJqItE_C.d.ts +18 -0
- package/dist/index.cjs +8736 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.mjs +8668 -0
- package/dist/markdown-editor-B1qvE40Z.d.mts +460 -0
- package/dist/markdown-editor-Ce6DpnQk.d.ts +460 -0
- package/dist/markdown-primitive-contract-BXsqbKwY.d.mts +124 -0
- package/dist/markdown-primitive-contract-BXsqbKwY.d.ts +124 -0
- package/dist/panda-primitives.cjs +1299 -0
- package/dist/panda-primitives.d.mts +21127 -0
- package/dist/panda-primitives.d.ts +21127 -0
- package/dist/panda-primitives.mjs +1285 -0
- package/dist/react.cjs +8558 -0
- package/dist/react.d.mts +35 -0
- package/dist/react.d.ts +35 -0
- package/dist/react.mjs +8531 -0
- package/dist/toolbar-preset-B9ttTEol.d.ts +236 -0
- package/dist/toolbar-preset-DIsQN390.d.mts +236 -0
- package/package.json +151 -0
- package/recipes/host-presets/README.md +16 -0
- package/recipes/host-presets/emotion-host-preset.tsx.template +109 -0
- package/recipes/host-presets/styled-components-host-preset.tsx.template +102 -0
- package/recipes/host-presets/tailwind-host-preset.tsx.template +116 -0
- package/recipes/host-presets/vanilla-extract-host-preset.tsx.template +116 -0
- package/styled-system/styles.css +3370 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type ButtonTone = 'white' | 'primary' | 'black';
|
|
4
|
+
type ButtonVariant = 'solid' | 'ghost' | 'underline';
|
|
5
|
+
type ButtonSize = 'xs' | 'sm' | 'md';
|
|
6
|
+
type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
leadingVisual?: React.ReactNode;
|
|
11
|
+
leadingVisualClassName?: string;
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
tone?: ButtonTone;
|
|
14
|
+
trailingVisual?: React.ReactNode;
|
|
15
|
+
trailingVisualClassName?: string;
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
};
|
|
18
|
+
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
19
|
+
type ModalProps = {
|
|
20
|
+
ariaDescribedBy?: string;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
ariaLabelledBy?: string;
|
|
23
|
+
backdropClassName?: string;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
closeAriaLabel: string;
|
|
26
|
+
closeButtonClassName?: string;
|
|
27
|
+
frameClassName?: string;
|
|
28
|
+
initialFocusRef?: React.RefObject<HTMLElement | null>;
|
|
29
|
+
isOpen: boolean;
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
};
|
|
32
|
+
type ClosePopover = (options?: {
|
|
33
|
+
restoreFocus?: boolean;
|
|
34
|
+
}) => void;
|
|
35
|
+
type PopoverProps = {
|
|
36
|
+
children: React.ReactNode | ((args: {
|
|
37
|
+
closePopover: ClosePopover;
|
|
38
|
+
}) => React.ReactNode);
|
|
39
|
+
isOpen?: boolean;
|
|
40
|
+
label?: string;
|
|
41
|
+
onOpenChange?: (nextOpen: boolean) => void;
|
|
42
|
+
onTriggerMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
|
|
43
|
+
panelClassName?: string;
|
|
44
|
+
panelLabel: string;
|
|
45
|
+
portalPlacement?: 'end' | 'start';
|
|
46
|
+
renderInPortal?: boolean;
|
|
47
|
+
rootClassName?: string;
|
|
48
|
+
triggerAriaLabel?: string;
|
|
49
|
+
triggerClassName?: string;
|
|
50
|
+
triggerContent?: React.ReactNode;
|
|
51
|
+
triggerLabelClassName?: string;
|
|
52
|
+
triggerSize?: ButtonSize;
|
|
53
|
+
triggerTone?: ButtonTone;
|
|
54
|
+
triggerTooltip?: string;
|
|
55
|
+
triggerValueClassName?: string;
|
|
56
|
+
triggerVariant?: ButtonVariant;
|
|
57
|
+
value?: string;
|
|
58
|
+
};
|
|
59
|
+
type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
60
|
+
autoResize?: boolean;
|
|
61
|
+
};
|
|
62
|
+
type TooltipTriggerProps = {
|
|
63
|
+
'aria-describedby'?: string;
|
|
64
|
+
};
|
|
65
|
+
type TooltipProps = {
|
|
66
|
+
children: React.ReactElement<TooltipTriggerProps>;
|
|
67
|
+
content: string;
|
|
68
|
+
className?: string;
|
|
69
|
+
contentClassName?: string;
|
|
70
|
+
forceOpen?: boolean;
|
|
71
|
+
openOnFocus?: boolean;
|
|
72
|
+
portalClassName?: string;
|
|
73
|
+
preferredPlacement?: 'auto' | 'bottom' | 'top';
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type MarkdownRefPrimitive<Element, Props> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<Element>>;
|
|
77
|
+
/**
|
|
78
|
+
* Host-overridable button primitive used across the editor surface.
|
|
79
|
+
*/
|
|
80
|
+
type MarkdownButtonPrimitive = MarkdownRefPrimitive<HTMLButtonElement, ButtonProps>;
|
|
81
|
+
/**
|
|
82
|
+
* Host-overridable single-line field primitive used across the editor surface.
|
|
83
|
+
*/
|
|
84
|
+
type MarkdownInputPrimitive = MarkdownRefPrimitive<HTMLInputElement, InputProps>;
|
|
85
|
+
/**
|
|
86
|
+
* Host-overridable modal primitive used across the editor surface.
|
|
87
|
+
*/
|
|
88
|
+
type MarkdownModalPrimitive = React.ComponentType<ModalProps>;
|
|
89
|
+
/**
|
|
90
|
+
* Host-overridable popover primitive used across the editor surface.
|
|
91
|
+
*/
|
|
92
|
+
type MarkdownPopoverPrimitive = React.ComponentType<PopoverProps>;
|
|
93
|
+
/**
|
|
94
|
+
* Host-overridable multiline field primitive used across the editor surface.
|
|
95
|
+
*/
|
|
96
|
+
type MarkdownTextareaPrimitive = MarkdownRefPrimitive<HTMLTextAreaElement, TextareaProps>;
|
|
97
|
+
/**
|
|
98
|
+
* Host-overridable tooltip primitive used across the editor surface.
|
|
99
|
+
*/
|
|
100
|
+
type MarkdownTooltipPrimitive = React.ComponentType<TooltipProps>;
|
|
101
|
+
/**
|
|
102
|
+
* Partial host registry that can replace one or more shared editor primitives.
|
|
103
|
+
*/
|
|
104
|
+
type MarkdownPrimitiveRegistry = Partial<{
|
|
105
|
+
Button: MarkdownButtonPrimitive;
|
|
106
|
+
Input: MarkdownInputPrimitive;
|
|
107
|
+
Modal: MarkdownModalPrimitive;
|
|
108
|
+
Popover: MarkdownPopoverPrimitive;
|
|
109
|
+
Textarea: MarkdownTextareaPrimitive;
|
|
110
|
+
Tooltip: MarkdownTooltipPrimitive;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Fully resolved primitive registry with concrete implementations for every slot.
|
|
114
|
+
*/
|
|
115
|
+
type ResolvedMarkdownPrimitiveRegistry = {
|
|
116
|
+
Button: MarkdownButtonPrimitive;
|
|
117
|
+
Input: MarkdownInputPrimitive;
|
|
118
|
+
Modal: MarkdownModalPrimitive;
|
|
119
|
+
Popover: MarkdownPopoverPrimitive;
|
|
120
|
+
Textarea: MarkdownTextareaPrimitive;
|
|
121
|
+
Tooltip: MarkdownTooltipPrimitive;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export type { ButtonSize as B, ClosePopover as C, InputProps as I, MarkdownPrimitiveRegistry as M, PopoverProps as P, ResolvedMarkdownPrimitiveRegistry as R, TooltipProps as T, MarkdownButtonPrimitive as a, MarkdownInputPrimitive as b, MarkdownModalPrimitive as c, MarkdownPopoverPrimitive as d, MarkdownTextareaPrimitive as e, MarkdownTooltipPrimitive as f, ButtonTone as g, ButtonVariant as h, ModalProps as i, ButtonProps as j, TextareaProps as k };
|