drawnui-react 0.1.0-preview.9 → 1.0.1
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/README.md +229 -22
- package/SKIPPED.md +37 -28
- package/dist/controls/AnimatedFramesRenderer.d.ts +9 -0
- package/dist/controls/AnimatedFramesRenderer.js +18 -1
- package/dist/controls/DrawnGame.d.ts +44 -0
- package/dist/controls/DrawnGame.js +82 -0
- package/dist/controls/GridStructure.d.ts +25 -3
- package/dist/controls/GridStructure.js +81 -5
- package/dist/controls/SkiaBackdrop.d.ts +8 -2
- package/dist/controls/SkiaBackdrop.js +42 -14
- package/dist/controls/SkiaButton.d.ts +17 -3
- package/dist/controls/SkiaButton.js +26 -8
- package/dist/controls/SkiaCarousel.d.ts +22 -3
- package/dist/controls/SkiaCarousel.js +85 -9
- package/dist/controls/SkiaCheckbox.d.ts +0 -1
- package/dist/controls/SkiaCheckbox.js +2 -7
- package/dist/controls/SkiaDrawer.d.ts +15 -0
- package/dist/controls/SkiaDrawer.js +42 -7
- package/dist/controls/SkiaEditor.d.ts +51 -2
- package/dist/controls/SkiaEditor.js +292 -58
- package/dist/controls/SkiaGif.d.ts +7 -0
- package/dist/controls/SkiaGif.js +25 -4
- package/dist/controls/SkiaImage.d.ts +10 -0
- package/dist/controls/SkiaImage.js +80 -19
- package/dist/controls/SkiaLabel.d.ts +200 -11
- package/dist/controls/SkiaLabel.js +925 -93
- package/dist/controls/SkiaLabelFps.d.ts +12 -0
- package/dist/controls/SkiaLabelFps.js +35 -0
- package/dist/controls/SkiaLayout.d.ts +89 -9
- package/dist/controls/SkiaLayout.js +397 -23
- package/dist/controls/SkiaLottie.js +5 -3
- package/dist/controls/SkiaProgress.d.ts +2 -1
- package/dist/controls/SkiaProgress.js +8 -5
- package/dist/controls/SkiaRadioButton.d.ts +2 -0
- package/dist/controls/SkiaRadioButton.js +16 -4
- package/dist/controls/SkiaRichLabel.d.ts +1 -1
- package/dist/controls/SkiaRichLabel.js +11 -1
- package/dist/controls/SkiaScroll.d.ts +86 -7
- package/dist/controls/SkiaScroll.js +361 -40
- package/dist/controls/SkiaScrollBar.d.ts +27 -0
- package/dist/controls/SkiaScrollBar.js +51 -2
- package/dist/controls/SkiaShaderCarousel.d.ts +11 -1
- package/dist/controls/SkiaShaderCarousel.js +27 -5
- package/dist/controls/SkiaShape.d.ts +15 -2
- package/dist/controls/SkiaShape.js +57 -10
- package/dist/controls/SkiaShell.d.ts +282 -0
- package/dist/controls/SkiaShell.js +972 -0
- package/dist/controls/SkiaSlider.d.ts +20 -2
- package/dist/controls/SkiaSlider.js +61 -7
- package/dist/controls/SkiaSprite.d.ts +4 -0
- package/dist/controls/SkiaSprite.js +27 -11
- package/dist/controls/SkiaSvg.d.ts +4 -0
- package/dist/controls/SkiaSvg.js +28 -4
- package/dist/controls/SkiaSwitch.d.ts +0 -1
- package/dist/controls/SkiaSwitch.js +4 -8
- package/dist/controls/SkiaToggle.d.ts +25 -5
- package/dist/controls/SkiaToggle.js +58 -5
- package/dist/controls/SnappingLayout.d.ts +12 -1
- package/dist/controls/SnappingLayout.js +21 -2
- package/dist/controls/TooltipStyle.d.ts +52 -0
- package/dist/controls/TooltipStyle.js +88 -0
- package/dist/core/Accessibility.d.ts +162 -11
- package/dist/core/Accessibility.js +882 -22
- package/dist/core/Animators.d.ts +37 -1
- package/dist/core/Animators.js +102 -9
- package/dist/core/Canvas.d.ts +307 -8
- package/dist/core/Canvas.js +1202 -66
- package/dist/core/ControlStyle.d.ts +2 -0
- package/dist/core/ControlStyle.js +2 -0
- package/dist/core/DesignerActions.d.ts +32 -0
- package/dist/core/DesignerActions.js +68 -0
- package/dist/core/Easing.d.ts +12 -1
- package/dist/core/Easing.js +25 -1
- package/dist/core/Gestures.d.ts +86 -2
- package/dist/core/Gestures.js +184 -4
- package/dist/core/Hover.d.ts +51 -0
- package/dist/core/Hover.js +140 -0
- package/dist/core/ImageEffects.d.ts +2 -0
- package/dist/core/ImageEffects.js +2 -0
- package/dist/core/KeyboardManager.d.ts +40 -0
- package/dist/core/KeyboardManager.js +98 -8
- package/dist/core/PopupWindows.d.ts +94 -0
- package/dist/core/PopupWindows.js +207 -0
- package/dist/core/Props.d.ts +11 -0
- package/dist/core/Props.js +44 -0
- package/dist/core/ScrollAnimators.d.ts +6 -0
- package/dist/core/ScrollAnimators.js +16 -1
- package/dist/core/Shaping.d.ts +40 -0
- package/dist/core/Shaping.js +224 -0
- package/dist/core/SkiaControl.d.ts +306 -13
- package/dist/core/SkiaControl.js +681 -75
- package/dist/core/SkiaEffect.d.ts +29 -1
- package/dist/core/SkiaEffect.js +78 -16
- package/dist/core/SkiaImageManager.d.ts +101 -18
- package/dist/core/SkiaImageManager.js +318 -63
- package/dist/core/Styles.js +7 -1
- package/dist/core/Super.d.ts +33 -2
- package/dist/core/Super.js +58 -12
- package/dist/core/TextInputProxy.d.ts +31 -1
- package/dist/core/TextInputProxy.js +97 -15
- package/dist/core/Tooltips.d.ts +71 -0
- package/dist/core/Tooltips.js +205 -0
- package/dist/core/Types.d.ts +11 -1
- package/dist/core/Types.js +32 -1
- package/dist/core/ViewsAdapter.d.ts +7 -2
- package/dist/core/ViewsAdapter.js +10 -3
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/react/SkiaShell.d.ts +8 -74
- package/dist/react/SkiaShell.js +163 -475
- package/dist/react/index.d.ts +48 -4
- package/dist/react/index.js +210 -43
- package/dist/react/reconciler.d.ts +32 -0
- package/dist/react/reconciler.js +71 -40
- package/dist/vite/index.d.ts +9 -0
- package/dist/vite/index.js +36 -3
- package/package.json +103 -5
package/dist/index.js
CHANGED
|
@@ -9,9 +9,14 @@ export * from "./core/SkiaControl";
|
|
|
9
9
|
export * from "./core/Canvas";
|
|
10
10
|
export * from "./controls/SkiaLayout";
|
|
11
11
|
export * from "./core/Accessibility";
|
|
12
|
+
export * from "./core/Hover";
|
|
13
|
+
export * from "./core/Tooltips";
|
|
14
|
+
export * from "./core/PopupWindows";
|
|
12
15
|
export * from "./controls/SkiaLabel";
|
|
13
16
|
export * from "./controls/TextSpan";
|
|
14
17
|
export * from "./controls/SkiaRichLabel";
|
|
18
|
+
export * from "./controls/SkiaLabelFps";
|
|
19
|
+
export * from "./controls/TooltipStyle";
|
|
15
20
|
export * from "./core/ControlStyle";
|
|
16
21
|
export * from "./core/ImageEffects";
|
|
17
22
|
export * from "./controls/SkiaToggle";
|
|
@@ -30,6 +35,7 @@ export * from "./controls/RefreshIndicator";
|
|
|
30
35
|
export * from "./core/TextInputProxy";
|
|
31
36
|
export * from "./core/SkiaEffect";
|
|
32
37
|
export * from "./controls/SkiaDrawer";
|
|
38
|
+
export * from "./controls/SkiaShell";
|
|
33
39
|
export * from "./controls/SkiaHotspot";
|
|
34
40
|
export * from "./controls/SkiaShape";
|
|
35
41
|
export * from "./controls/SkiaButton";
|
|
@@ -40,6 +46,7 @@ export * from "./controls/SkiaBackdrop";
|
|
|
40
46
|
export * from "./controls/SkiaEditor";
|
|
41
47
|
export * from "./controls/SkiaSprite";
|
|
42
48
|
export * from "./controls/SkiaSpriteSet";
|
|
49
|
+
export * from "./controls/DrawnGame";
|
|
43
50
|
export * from "./core/KeyboardManager";
|
|
44
51
|
export * from "./controls/AnimatedFramesRenderer";
|
|
45
52
|
export * from "./controls/SkiaLottie";
|
|
@@ -47,3 +54,4 @@ export * from "./controls/SkiaGif";
|
|
|
47
54
|
export * from "./controls/SkiaScroll";
|
|
48
55
|
export * from "./controls/SkiaDynamicDrawnCell";
|
|
49
56
|
export * from "./core/ViewsAdapter";
|
|
57
|
+
export * from "./core/DesignerActions";
|
|
@@ -1,55 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { Thickness } from "../core/Types";
|
|
3
|
-
import type
|
|
4
|
-
|
|
5
|
-
export type ShellArguments = Record<string, unknown>;
|
|
2
|
+
import type { Thickness } from "../core/Types";
|
|
3
|
+
import { type ModalOptions, type PopupOptions, type ShellArguments, type ShellTab, type SkiaShellNavigatedArgs, type SkiaShellNavigatingArgs } from "../controls/SkiaShell";
|
|
4
|
+
export { BuildRoute, ShellDefaults, SplitRoute, type ModalOptions, type NavigationSource, type PopupOptions, type ShellArguments, type ShellTab, type SkiaShellNavigatedArgs, type SkiaShellNavigatingArgs } from "../controls/SkiaShell";
|
|
6
5
|
/** Route name -> page factory receiving the navigation arguments. Pages are plain JSX, rendered inside the shell when navigated to. */
|
|
7
6
|
export type ShellRoutes = Record<string, (args: ShellArguments) => ReactNode>;
|
|
8
|
-
/** C# NavigationSource. */
|
|
9
|
-
export type NavigationSource = "Push" | "Pop";
|
|
10
|
-
/** C# SkiaShellNavigatingArgs: set Cancel to stop the navigation. */
|
|
11
|
-
export interface SkiaShellNavigatingArgs {
|
|
12
|
-
Route: string;
|
|
13
|
-
Source: NavigationSource;
|
|
14
|
-
Cancel: boolean;
|
|
15
|
-
View?: SkiaControl;
|
|
16
|
-
Previous?: SkiaControl;
|
|
17
|
-
}
|
|
18
|
-
/** C# SkiaShellNavigatedArgs. */
|
|
19
|
-
export interface SkiaShellNavigatedArgs {
|
|
20
|
-
Route: string;
|
|
21
|
-
Source: NavigationSource;
|
|
22
|
-
View?: SkiaControl;
|
|
23
|
-
}
|
|
24
|
-
/** "name?a=1&b=2" -> name + arguments (query values are strings). */
|
|
25
|
-
export declare function SplitRoute(route: string): {
|
|
26
|
-
name: string;
|
|
27
|
-
args: ShellArguments;
|
|
28
|
-
};
|
|
29
|
-
/** name + arguments -> "name?a=1" (only string / number / boolean values travel in the route, the rest stays in memory). */
|
|
30
|
-
export declare function BuildRoute(name: string, args?: ShellArguments): string;
|
|
31
|
-
/** C# OpenPopupAsync parameters. */
|
|
32
|
-
export interface PopupOptions {
|
|
33
|
-
animated?: boolean;
|
|
34
|
-
/** A tap outside the content closes the popup (default true). */
|
|
35
|
-
closeWhenBackgroundTapped?: boolean;
|
|
36
|
-
/** Dim + blur the page behind (default true). */
|
|
37
|
-
showOverlay?: boolean;
|
|
38
|
-
backgroundColor?: string;
|
|
39
|
-
}
|
|
40
|
-
/** C# PushModalAsync parameters. */
|
|
41
|
-
export interface ModalOptions {
|
|
42
|
-
/** The modal can be dragged down to close (default false). */
|
|
43
|
-
useGestures?: boolean;
|
|
44
|
-
animated?: boolean;
|
|
45
|
-
/** Dim + blur the page behind (C# freezeBackground; the frozen screenshot is not ported). */
|
|
46
|
-
freezeBackground?: boolean;
|
|
47
|
-
}
|
|
48
|
-
/** A shell tab: its root route and the label shown in the tab bar. */
|
|
49
|
-
export interface ShellTab {
|
|
50
|
-
route: string;
|
|
51
|
-
title: string;
|
|
52
|
-
}
|
|
53
7
|
/** Navigation API, same verbs as DrawnUi SkiaShell. */
|
|
54
8
|
export interface ShellNavigation {
|
|
55
9
|
/** Pushes a registered route; `route` may carry a query ("detail?id=42") and/or explicit arguments (C# GoToAsync(route, animate, arguments)). */
|
|
@@ -114,31 +68,11 @@ export interface SkiaShellProps {
|
|
|
114
68
|
/** Safe-area insets (points) reserved above the nav bar and below the tab bar; default Super.Insets (C# Super.Insets). */
|
|
115
69
|
Insets?: Thickness;
|
|
116
70
|
}
|
|
117
|
-
/** C# SkiaShell static defaults (mutable). */
|
|
118
|
-
export declare const ShellDefaults: {
|
|
119
|
-
ToastBackgroundColor: string;
|
|
120
|
-
ToastTextColor: "#FFFFFF";
|
|
121
|
-
ToastTextFont: string;
|
|
122
|
-
ToastTextSize: number;
|
|
123
|
-
ToastTextMargins: number;
|
|
124
|
-
/** Default overlay tint behind popups / modals. */
|
|
125
|
-
PopupBackgroundColor: string;
|
|
126
|
-
/** Backdrop blur behind popups / modals, points. */
|
|
127
|
-
PopupsBackgroundBlur: number;
|
|
128
|
-
PopupsAnimationSpeed: number;
|
|
129
|
-
PopupsCancelAnimationsAfterMs: number;
|
|
130
|
-
ZIndexModals: number;
|
|
131
|
-
ZIndexPopups: number;
|
|
132
|
-
ZIndexToasts: number;
|
|
133
|
-
/** Accent of the selected tab. */
|
|
134
|
-
TabSelectedColor: string;
|
|
135
|
-
TabColor: string;
|
|
136
|
-
};
|
|
137
71
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* backdrop, scale + fade, tap outside to close), modals (full-screen SkiaDrawer from the bottom, optionally
|
|
141
|
-
*
|
|
142
|
-
*
|
|
72
|
+
* DrawnUi SkiaShell for React: the engine SkiaShell ("drawnui-react/core") with JSX content. A root page (or tabs) plus
|
|
73
|
+
* per-tab stacks of routed pages with a nav bar (pages slide in/out like SkiaViewSwitcher), popups (blurred + dimmed
|
|
74
|
+
* backdrop, scale + fade, tap outside to close), modals (full-screen SkiaDrawer from the bottom, optionally draggable),
|
|
75
|
+
* toasts (bottom banner, slide + fade, auto close). Pages live in the URL hash and the browser back button behaves like
|
|
76
|
+
* C# GoBack (popup, then modal, then page). Navigation via ref or useShell().
|
|
143
77
|
*/
|
|
144
78
|
export declare const SkiaShell: import("react").ForwardRefExoticComponent<SkiaShellProps & import("react").RefAttributes<ShellNavigation>>;
|