@nice2dev/ui-core 1.4.25 → 1.4.27

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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # @nice2dev/ui-core — Changelog
2
2
 
3
+ ## 1.4.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 7523286: NicePixelEditor (round 44, 1.4.27).
8
+
9
+ - **View → Full screen**: the editor covers the screen (Esc leaves it). Menus, dialogs, selects and
10
+ colour pickers stay visible meanwhile.
11
+ - **View → Animations**: the bottom panel is titled Animations and hidden at start (new
12
+ `defaultShowAnimations`); it has a close button. **View → Properties** shows or hides the right
13
+ panel (new `defaultShowProperties`).
14
+ - **Grouped tools**: one button per group shows its last-used tool, and a small corner arrow lists
15
+ the rest (Draw: pencil / dither, Fill: bucket / gradient, Shapes: line / rectangle / ellipse,
16
+ Select: select / move). Eleven buttons used to run into the Animations panel and hide the last
17
+ ones. The lists open with the keyboard too.
18
+ - **Colour picker**: it picked a colour away from the pointer. A click was divided by the canvas's
19
+ own 150 px while CSS showed it at another size; it now uses the displayed size, follows a drag
20
+ and has arrow keys.
21
+ - **Eyedropper**: it samples what is on screen (every visible layer), not the active layer only,
22
+ and the pointer maps correctly on a zoomed or CSS-scaled canvas.
23
+ - **Right panel**: it scrolls inside the editor (it ran past the Animations panel) and narrows in
24
+ small containers. The brush sliders keep their values inside the panel.
25
+ - **Filters menu**: Filter gallery… and Adjustments… apply the filters and adjustments of
26
+ NicePhotoEditor to the active layer of the frame (inside the selection when there is one), with
27
+ a preview and one undo step. NicePhotoEditor stays the simple retouch app.
28
+ - **Brush presets**: the presets of the removed NiceBrushEngine (hard / soft round, calligraphy,
29
+ airbrush, watercolour), scaled to pixel art; new exports `PIXEL_BRUSH_PRESETS`,
30
+ `matchBrushPreset`, type `PixelBrushConfig`.
31
+ - **ui-core / ui**: new `useNiceFullscreen(ref)` (Fullscreen API, window-covering fallback) and
32
+ `NicePortalTargetProvider` (overlays portal into a given element, such as the fullscreen one).
33
+ `NiceColorPicker` portals to the theme's portal host like `NiceColorPalette`.
34
+ - The NicePixelEditor doc lists its real props.
35
+
36
+ ## 1.4.26
37
+
38
+ No changes in this release.
39
+
3
40
  ## 1.4.25
4
41
 
5
42
  ### Patch Changes
@@ -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;