uhuu-components 0.3.2 → 0.3.4

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
@@ -7,6 +7,29 @@ All notable changes to the `uhuu-components` Storybook workspace are documented
7
7
  - `package.json` declares the Node floor (>=24) and the package-manager pin (pnpm@10.30.3) the ecosystem
8
8
  toolchain policy measures. Metadata only; the dependency resolution is unchanged.
9
9
 
10
+ ## 0.3.3 (unreleased)
11
+
12
+ ### Added
13
+
14
+ - The editor shell's chrome follows the host's light or dark appearance: the stage behind the
15
+ pages, page labels and their menus, the floating page toolbar and zoom menu, the add and reorder
16
+ sheets, notices and the stage's scrollbars. Pages, and the page thumbnails in the sheets, stay
17
+ paper. Inside the uhuu document editor the shell takes `?appearance=light|dark` from the template
18
+ URL before the first render, then `appearance` in the handshake answer (`shaked`, re-emitted by
19
+ the SDK as `loaded`), then `{ action: 'appearance', data: { appearance } }` when the user
20
+ switches; it reads the editor's messages itself, so templates that pin an older SDK follow too.
21
+ Light by default; never a cookie or the OS preference; the renderer is always light. No new
22
+ exports: `InteractiveModeProvider` takes `appearance` to force one, and `useInteractive()`
23
+ reports the resolved `appearance` for template-owned chrome. Dark values mirror `@uhuuio/theme`
24
+ (not a dependency). See `docs/editor-shell-appearance.md`.
25
+
26
+ ### Changed
27
+
28
+ - Chrome surfaces draw with a shell token instead of `bg-white` (`bg-(--uhuu-shell-surface)`, and
29
+ `text-(--uhuu-shell-on-inverse)` on dark buttons); the light look is pixel-identical.
30
+ - Chrome roots without `data-uhuu-editor` (the "added" notice, `Section`'s default header, the
31
+ legacy `PageResizer` controls, the drag grid's debug box) now carry it.
32
+
10
33
  ## 0.3.2 (unreleased)
11
34
 
12
35
  ### Fixed
package/README.md CHANGED
@@ -7,7 +7,7 @@ React components for printable documents with fixed pages, static flow paginatio
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- npm install uhuu-components@^0.3.2 react react-dom
10
+ npm install uhuu-components@^0.3.3 react react-dom
11
11
  ```
12
12
 
13
13
  The delivery package declares React and React DOM `^18.0.0 || ^19.0.0` peers. Both must use the same React installation. Local owning verification uses React 19; the declared React 18 range is not evidence of a tested React 18 release. UI dependencies are bundled; React and React DOM remain external. No Next dependency is required by the delivery package.
@@ -47,6 +47,8 @@ Dialog click handlers are omitted in renderer mode. Empty text bindings remain e
47
47
 
48
48
  The shell's own words ship in German, French, Italian and English and follow the host's language; `InteractiveModeProvider` takes `locale` and `translations` to pin, override or add a language, and template labels accept one string per language. See [editor shell translations](https://github.com/uhuuio/uhuu-storybook/blob/main/docs/editor-shell-translations.md).
49
49
 
50
+ The shell's chrome follows the host's light or dark appearance (`?appearance=`, then the uhuu document editor's handshake and live changes); pages stay paper. `InteractiveModeProvider` takes `appearance` to force one and `useInteractive().appearance` lets template-owned chrome follow. See [editor shell appearance](https://github.com/uhuuio/uhuu-storybook/blob/main/docs/editor-shell-appearance.md).
51
+
50
52
  ## Images and BrandKit
51
53
 
52
54
  Use public `ImageBlock` with `mode="bleed"`, `mode="spread"` or `mode="auto"`; internal ImageBleed and ImageSpread components are not package exports. `imageUrl` provides print-aware thumbnail URLs and preserves SVG/data/relative URLs.
package/index.d.ts CHANGED
@@ -471,8 +471,16 @@ export interface InteractiveModeContextValue {
471
471
  enableDevTools?: boolean;
472
472
  /** The shell's resolved interface language (`de`, `fr`, `it`, `en`, or what the template passed). */
473
473
  locale: string;
474
+ /**
475
+ * The shell chrome's resolved appearance, so template-owned chrome (a floating button, a panel)
476
+ * can follow it. Pages are paper: never style document content with it.
477
+ */
478
+ appearance: EditorShellAppearance;
474
479
  }
475
480
 
481
+ /** The editor shell's chrome appearance (docs/editor-shell-appearance.md). */
482
+ export type EditorShellAppearance = "light" | "dark";
483
+
476
484
  /**
477
485
  * A label as one string, or one string per language: `{ en: 'Cover', de: 'Titelseite' }`.
478
486
  * Accepted wherever `templateConfig` and `pageOptions` take a `label` (pages, groups, options,
@@ -498,6 +506,12 @@ export interface InteractiveModeProviderProps {
498
506
  * does not ship: `{ de: { toolbar: { add: 'Neu' } }, rm: romanshCatalog }`. Pass a stable object.
499
507
  */
500
508
  translations?: Record<string, EditorShellTranslations>;
509
+ /**
510
+ * Forces the shell chrome's appearance. Default: the host's (the uhuu document editor's
511
+ * handshake `appearance` and later `appearance` messages), then `?appearance=`, then `light`.
512
+ * Pages never follow it.
513
+ */
514
+ appearance?: EditorShellAppearance;
501
515
  }
502
516
 
503
517
  export interface BrandKitOption {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.2",
2
+ "version": "0.3.4",
3
3
  "name": "uhuu-components",
4
4
  "main": "uhuu-components.umd.cjs",
5
5
  "module": "uhuu-components.es.js",