@nice2dev/ui-core 1.4.26 → 1.4.28
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/CHANGELOG.md +37 -0
- package/dist/core/fullscreen.d.ts +31 -0
- package/dist/index.cjs +15 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +3882 -3821
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @nice2dev/ui-core — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.28
|
|
4
|
+
|
|
5
|
+
No changes in this release.
|
|
6
|
+
|
|
7
|
+
## 1.4.27
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 7523286: NicePixelEditor (round 44, 1.4.27).
|
|
12
|
+
|
|
13
|
+
- **View → Full screen**: the editor covers the screen (Esc leaves it). Menus, dialogs, selects and
|
|
14
|
+
colour pickers stay visible meanwhile.
|
|
15
|
+
- **View → Animations**: the bottom panel is titled Animations and hidden at start (new
|
|
16
|
+
`defaultShowAnimations`); it has a close button. **View → Properties** shows or hides the right
|
|
17
|
+
panel (new `defaultShowProperties`).
|
|
18
|
+
- **Grouped tools**: one button per group shows its last-used tool, and a small corner arrow lists
|
|
19
|
+
the rest (Draw: pencil / dither, Fill: bucket / gradient, Shapes: line / rectangle / ellipse,
|
|
20
|
+
Select: select / move). Eleven buttons used to run into the Animations panel and hide the last
|
|
21
|
+
ones. The lists open with the keyboard too.
|
|
22
|
+
- **Colour picker**: it picked a colour away from the pointer. A click was divided by the canvas's
|
|
23
|
+
own 150 px while CSS showed it at another size; it now uses the displayed size, follows a drag
|
|
24
|
+
and has arrow keys.
|
|
25
|
+
- **Eyedropper**: it samples what is on screen (every visible layer), not the active layer only,
|
|
26
|
+
and the pointer maps correctly on a zoomed or CSS-scaled canvas.
|
|
27
|
+
- **Right panel**: it scrolls inside the editor (it ran past the Animations panel) and narrows in
|
|
28
|
+
small containers. The brush sliders keep their values inside the panel.
|
|
29
|
+
- **Filters menu**: Filter gallery… and Adjustments… apply the filters and adjustments of
|
|
30
|
+
NicePhotoEditor to the active layer of the frame (inside the selection when there is one), with
|
|
31
|
+
a preview and one undo step. NicePhotoEditor stays the simple retouch app.
|
|
32
|
+
- **Brush presets**: the presets of the removed NiceBrushEngine (hard / soft round, calligraphy,
|
|
33
|
+
airbrush, watercolour), scaled to pixel art; new exports `PIXEL_BRUSH_PRESETS`,
|
|
34
|
+
`matchBrushPreset`, type `PixelBrushConfig`.
|
|
35
|
+
- **ui-core / ui**: new `useNiceFullscreen(ref)` (Fullscreen API, window-covering fallback) and
|
|
36
|
+
`NicePortalTargetProvider` (overlays portal into a given element, such as the fullscreen one).
|
|
37
|
+
`NiceColorPicker` portals to the theme's portal host like `NiceColorPalette`.
|
|
38
|
+
- The NicePixelEditor doc lists its real props.
|
|
39
|
+
|
|
3
40
|
## 1.4.26
|
|
4
41
|
|
|
5
42
|
No changes in this release.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full screen for an editor (1.4.27): `useNiceFullscreen(ref)` puts one element on the whole screen
|
|
3
|
+
* through the Fullscreen API — or, where the API is missing or refuses (an iframe without
|
|
4
|
+
* `allowfullscreen`), over the whole window with `position: fixed`. `NicePortalTargetProvider` makes the
|
|
5
|
+
* menus, modals, selects and tooltips inside it portal into that element while it is full screen:
|
|
6
|
+
* anything portaled to `document.body` would be hidden behind the fullscreen element.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { CSSProperties, ReactNode, RefObject } from 'react';
|
|
10
|
+
export interface NiceFullscreenState {
|
|
11
|
+
/** On: the element covers the screen (or the window, see `isFallback`). */
|
|
12
|
+
isFullscreen: boolean;
|
|
13
|
+
/** The window-covering fallback is in use — spread `fallbackStyle` on the element. */
|
|
14
|
+
isFallback: boolean;
|
|
15
|
+
enter(): Promise<void>;
|
|
16
|
+
exit(): Promise<void>;
|
|
17
|
+
toggle(): Promise<void>;
|
|
18
|
+
/** `position: fixed` over the window while the fallback is on; otherwise undefined. */
|
|
19
|
+
fallbackStyle: CSSProperties | undefined;
|
|
20
|
+
/** Where overlays should portal while full screen (the element itself); otherwise null. */
|
|
21
|
+
portalTarget: HTMLElement | null;
|
|
22
|
+
}
|
|
23
|
+
export declare function useNiceFullscreen(ref: RefObject<HTMLElement | null>): NiceFullscreenState;
|
|
24
|
+
/**
|
|
25
|
+
* Overlays inside portal into `target` instead of the theme's portal host — e.g. the element that
|
|
26
|
+
* is full screen. Without a target (or a theme provider) it renders its children unchanged.
|
|
27
|
+
*/
|
|
28
|
+
export declare function NicePortalTargetProvider({ target, children, }: {
|
|
29
|
+
target: HTMLElement | null;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}): React.ReactElement;
|