oasis-editor 0.0.132 → 0.0.133
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/{OasisEditorApp-D-v1-Asf.js → OasisEditorApp-DmXn9H33.js} +9 -3
- package/dist/{index-DEBNBBUG.js → index-BOj4-NlJ.js} +425 -396
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +49 -49
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/components/Toolbar/LineSpacingButton.d.ts +10 -0
- package/dist/ui/components/Toolbar/primitives/DropdownChevron.d.ts +20 -0
- package/dist/ui/utils/customIcons.d.ts +30 -0
- package/package.json +1 -1
|
@@ -4,4 +4,14 @@ import { JSX } from 'solid-js';
|
|
|
4
4
|
export interface LineSpacingButtonProps {
|
|
5
5
|
api: ToolbarActionApi;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Line-spacing dropdown. Composes the shared `Menu` primitive (which owns the
|
|
9
|
+
* trigger, the popover, the affordance chevron and the close-on-click behavior)
|
|
10
|
+
* instead of re-implementing that plumbing. The only line-spacing-specific
|
|
11
|
+
* concerns left here are the preset list, the active-state check and the
|
|
12
|
+
* "more options" dialog.
|
|
13
|
+
*
|
|
14
|
+
* The trigger glyph is the registered `lineSpacing` custom icon (see
|
|
15
|
+
* `customIcons`); the active-item check uses the shared `CheckIcon`.
|
|
16
|
+
*/
|
|
7
17
|
export declare function LineSpacingButton(props: LineSpacingButtonProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface DropdownChevronProps {
|
|
4
|
+
/**
|
|
5
|
+
* Extra class for the affordance element. The base `.oasis-editor-dropdown-chevron`
|
|
6
|
+
* class is always applied and owns the canonical small/crisp size (13px, full
|
|
7
|
+
* opacity) shared by every dropdown in the toolbar.
|
|
8
|
+
*/
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The single dropdown-affordance glyph for the whole toolbar. Every dropdown-ish
|
|
13
|
+
* control (Menu, SplitButton's menu side, StyleGallery expand) composes this so
|
|
14
|
+
* there is exactly one chevron look — no per-control re-implementations.
|
|
15
|
+
*
|
|
16
|
+
* Rendered as a lucide `<i data-lucide="chevron-down">` placeholder (resolved by
|
|
17
|
+
* the icon observer) rather than an inline SVG, so it stays consistent with the
|
|
18
|
+
* rest of the icon set and inherits `currentColor`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function DropdownChevron(props: DropdownChevronProps): JSX.Element;
|
|
@@ -10,6 +10,36 @@ import { JSX } from 'solid-js';
|
|
|
10
10
|
* existing toolbar/menubar icon sizing applies identically.
|
|
11
11
|
*/
|
|
12
12
|
export type CustomIconRenderer = () => JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Shared SVG shell for custom icons. Centralizes the boilerplate
|
|
15
|
+
* (`xmlns`/`width`/`height`/`viewBox`/`aria-hidden`) that every custom icon used
|
|
16
|
+
* to repeat, so new glyphs only declare their inner markup. Defaults to lucide's
|
|
17
|
+
* 24x24 viewBox so existing toolbar icon sizing applies identically; callers can
|
|
18
|
+
* override `width`/`height`/`viewBox` for non-default glyphs (e.g. the line
|
|
19
|
+
* spacing arrow) and pass arbitrary SVG presentation attributes.
|
|
20
|
+
*/
|
|
21
|
+
export interface SvgIconProps {
|
|
22
|
+
width?: number | string;
|
|
23
|
+
height?: number | string;
|
|
24
|
+
viewBox?: string;
|
|
25
|
+
fill?: string;
|
|
26
|
+
stroke?: string;
|
|
27
|
+
"stroke-width"?: number | string;
|
|
28
|
+
"stroke-linecap"?: JSX.SvgSVGAttributes<SVGSVGElement>["stroke-linecap"];
|
|
29
|
+
"stroke-linejoin"?: JSX.SvgSVGAttributes<SVGSVGElement>["stroke-linejoin"];
|
|
30
|
+
class?: string;
|
|
31
|
+
children: JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
export declare function SvgIcon(props: SvgIconProps): JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Checkmark glyph used to mark the active item in radio/check menus. Replaces the
|
|
36
|
+
* duplicated inline `<polyline points="20 6 9 17 4 12">` previously copy-pasted
|
|
37
|
+
* into LineSpacingButton and ContextMenu. Rendered at 14px to match the previous
|
|
38
|
+
* line-spacing check size; ContextMenu renders its own 18px variant via lucide.
|
|
39
|
+
*/
|
|
40
|
+
export declare const CheckIcon: (props: {
|
|
41
|
+
size?: number;
|
|
42
|
+
}) => JSX.Element;
|
|
13
43
|
export declare function getCustomIcon(name?: string): CustomIconRenderer | undefined;
|
|
14
44
|
/**
|
|
15
45
|
* Renders an icon by name: a registered custom inline SVG when available,
|