@nice2dev/ui-presentations 1.2.0 → 1.2.2
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 +142 -0
- package/dist/__tests__/editorGridIcon.test.d.ts +1 -0
- package/dist/__tests__/globalLanguage.test.d.ts +1 -0
- package/dist/components/NicePresentationEditor.d.ts +4 -1
- package/dist/core/i18n.d.ts +11 -0
- package/dist/index.cjs +28 -28
- package/dist/index.mjs +2710 -2568
- package/dist/puppetShow/gameEngineIntegration.d.ts +2 -2
- package/dist/ui-presentations.css +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,147 @@
|
|
|
1
1
|
# @nice2dev/ui-presentations — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 06eb0d2: 1.2.2 — library texts through the translator, a translator in the packages that had none, and the
|
|
8
|
+
end of the hook-dependency warnings. Nothing removed or renamed. Upgrade notes:
|
|
9
|
+
`documentation/omniverk/OMNIVERK_UPGRADE_1.2.2.md`.
|
|
10
|
+
|
|
11
|
+
**Translations.** 2,825 new keys in the global dictionary (en, pl, de, fr, es, uk), 80 in the local
|
|
12
|
+
dictionaries of ui-math, ui-diagrams and ui-presentations: column headers, option labels, texts in
|
|
13
|
+
conditions and templates, messages given to setters, labels returned by helpers, Polish texts that
|
|
14
|
+
were the English default. Relative dates through `Intl.RelativeTimeFormat`, plural forms through
|
|
15
|
+
`…One` / `…Many` keys. ui-science, ui-platform, ui-mobile, auth, licensing, templates, social and
|
|
16
|
+
the icon tools translate through `useNiceTranslation` (new peer `@nice2dev/ui-core ^1.2.0`);
|
|
17
|
+
ui-security reads the global translator when its own provider is absent.
|
|
18
|
+
|
|
19
|
+
**Additions.** `labelKey` on ui-mobile `TabItem` and `SwipeAction` (the presets set it);
|
|
20
|
+
`registerWebAuthn` / `authenticateWebAuthn` take the WebAuthn options `NiceWebAuthnButton` used to
|
|
21
|
+
drop (defaults unchanged); `NiceKeyboardHint` shows `descriptionKey`. Eight icons in
|
|
22
|
+
`@nice2dev/icons` — `NtdPoint`, `NtdSegment`, `NtdPerpendicular`, `NtdParallel`, `NtdMidpoint`,
|
|
23
|
+
`NtdAngleBisector`, `NtdGroup`, `NtdUngroup` — and the same names as `NiceIcon` built-ins.
|
|
24
|
+
|
|
25
|
+
**Behaviour changes, agreed.** ui-math, ui-diagrams and ui-presentations follow the app's global
|
|
26
|
+
`NiceI18nProvider` language when their own provider is absent (they stayed English);
|
|
27
|
+
`NicePresentationEditor` without `lang` takes the surrounding language. Icons drawn as glyphs are
|
|
28
|
+
Nice icons: the `NiceGeometry` tools, Align / Group / Ungroup / Layout of the diagram toolbar, the
|
|
29
|
+
presentation grid toggle, zoom and "Add Track" of `NiceDMXTimeline`. icons-gaming and
|
|
30
|
+
icons-filetypes name an icon by its `title` and are decorative without one, like `createIcon`
|
|
31
|
+
(screen readers read "GiHeart" or "DOCX file icon"); new optional `title` on the gaming icon props.
|
|
32
|
+
|
|
33
|
+
**Hook dependencies (161 → 0).** Fixed along the way: `NiceLowPowerMode` re-rendered forever from
|
|
34
|
+
mount and overflowed the stack on wake; `GenericPlayer` / `NiceGenericPlayerStage` restarted the
|
|
35
|
+
track on a volume change; `NiceDMXTimeline` called `onPlay` on every frame and missed cues added
|
|
36
|
+
during playback; `NiceConflictResolution` `autoResolve` never resolved; `NiceMAM` selected by the
|
|
37
|
+
previous filter; `NiceRulesEngine` "Run All" kept only the last result; `NiceCodeEditor` saved with
|
|
38
|
+
the first render's `onSave`; a consumer's cursor handler switched off `NiceCodeEditorAI`
|
|
39
|
+
completion; `useRadioStream` lost a volume set before the first play; `NiceGameEditor` shortcuts,
|
|
40
|
+
`useVoiceControl` continuous sessions, `NiceDeviceTrust` with a host storing the score.
|
|
41
|
+
|
|
42
|
+
## 1.2.1
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- 8c82c30: 1.2.1 — the decisions that waited since 1.2.0, and the debts the CI gates were holding. One API
|
|
47
|
+
change, agreed: `NiceIconSuggestorAI` suggests Nice icons only. Two stylesheets to import if you use
|
|
48
|
+
the packages: `@nice2dev/social/style.css`, `@nice2dev/ui-science/style.css`. Upgrade notes:
|
|
49
|
+
`documentation/omniverk/OMNIVERK_UPGRADE_1.2.1.md`.
|
|
50
|
+
|
|
51
|
+
**Tree-shaking.** An import from a package no longer brings the whole package. Module-level
|
|
52
|
+
statements that may have a side effect — a `displayName` assigned after each component (now
|
|
53
|
+
`Object.assign` inside `/* @__PURE__ */`, or under a development check for plain functions),
|
|
54
|
+
unannotated `forwardRef` / `memo` / `createContext` / icon-factory calls, spreads, registries filled
|
|
55
|
+
at import, `<style>` tags injected at import, a direct `eval` in ui-math — are gone. One import from
|
|
56
|
+
each of 53 packages: 5066.5 kB → 1171.6 kB (`@nice2dev/ui` 1928.2 kB → 12.9 kB, icon packs 48–275 kB
|
|
57
|
+
→ 1.6–2.6 kB). `defaultViewRegistry` has the Nice\* input controls from the start, each loading its
|
|
58
|
+
module on first render; sixteen controls add their styles to `<head>` on first render.
|
|
59
|
+
|
|
60
|
+
**Dead code.** 405 source files no entry point imported (never on npm) are deleted;
|
|
61
|
+
`NiceClipboardStack` (`@nice2dev/ui`) and `NiceSampleBrowser` (`@nice2dev/ui-audio`), finished and
|
|
62
|
+
documented, are exported.
|
|
63
|
+
|
|
64
|
+
**ui-mobile draws Nice icons.** New peer `@nice2dev/icons ^1.2.0`; `TabIcons`, `DrawerIcons`,
|
|
65
|
+
`HeaderIcons`, the `NiceSwipeActions` presets and the `NiceInfiniteScroll` states are `Ntd*` icons
|
|
66
|
+
instead of pasted `<svg>`, simple glyphs are CSS marks. `@nice2dev/icons` adds `NtdReply` and
|
|
67
|
+
`NtdInbox`; an icon no longer throws without `window.matchMedia`.
|
|
68
|
+
|
|
69
|
+
**`NiceIconSuggestorAI` (breaking, agreed).** `AIIconLibrary` is `'nice'`; `svgPath` and `unicode`
|
|
70
|
+
left `AISuggestedIcon`; the preview is a `<NiceIcon>`, "Copy SVG" is "Copy JSX".
|
|
71
|
+
|
|
72
|
+
**Peer ranges.** Every internal `@nice2dev/*` peer is `^1.2.0` (was as wide as `^1.0.20`), except
|
|
73
|
+
`@nice2dev/icons ^1.2.1` where a package draws an icon new in 1.2.1: ui-mobile (`NtdReply`,
|
|
74
|
+
`NtdInbox`), ui-audio (`NtdMicrophoneOff`) and ui-security (`NtdBackspace`). ui-security, licensing
|
|
75
|
+
(`^1.2.0`) and templates (`^1.2.0`) gain the `@nice2dev/icons` peer: their glyph icons (`⌫`, `←`,
|
|
76
|
+
`→`, `↑`, `↓`) are Nice icons now. `@nice2dev/icons` adds `NtdBackspace`.
|
|
77
|
+
|
|
78
|
+
**Class names inside components.** 834 class names in library stylesheets had no `nice-` prefix
|
|
79
|
+
(`.tab-button`, `.status-badge`, `.selected`, …) and styled every element of that name on the page.
|
|
80
|
+
They follow `nice-{block}__{element}--{modifier}` now — no change on screen. The class theme hooks
|
|
81
|
+
next to `[data-theme]` on seven controls (`dark` on the AI chart / data grid / code and HTML
|
|
82
|
+
editors / form builder, `light-theme` on `NiceMAM` and `NiceVideoAnnotator`) are `nice-dark` /
|
|
83
|
+
`nice-light`; `NiceLowPowerMode` marks `<html>` with `nice-lpm-no-animations` /
|
|
84
|
+
`nice-lpm-reduced-quality`; the `NiceVideoEditor` of `@nice2dev/ui-video` styles its elements under
|
|
85
|
+
`nice-video-studio`, so they no longer collide with the `NiceVideoEditor` of `@nice2dev/ui`.
|
|
86
|
+
Rules for classes nothing rendered are gone, among them the stylesheet of `NiceGanttChart`, which
|
|
87
|
+
left ui-erp in 1.0.10.
|
|
88
|
+
|
|
89
|
+
**Translations.** About 3,400 UI texts in 32 packages were hard-coded; they go through `t()` now,
|
|
90
|
+
with the English text unchanged and pl / de / fr / es / uk in `@nice2dev/i18n` (ui-diagrams,
|
|
91
|
+
ui-presentations and ui-math in their own dictionaries). In `@nice2dev/events` and
|
|
92
|
+
`@nice2dev/admin` that includes column headers, option labels and the statuses and roles they used
|
|
93
|
+
to print raw (`checked-in`, `no-show`) — English labels for those come from the dictionary. ui-3d and ui-graphics read the app's
|
|
94
|
+
global translator, as ui-audio does since 1.2.0 — their own provider overrides it. ui-audio's
|
|
95
|
+
controls used 631 keys the dictionary did not have (English in every language), and the radio
|
|
96
|
+
player showed raw keys (`search_stations`). Texts that were hard-coded **in Polish** — in
|
|
97
|
+
`NiceSidebarNav`, `NiceNetworkDiscoveryPanel`, the backup and smart-home controls,
|
|
98
|
+
`NiceSavedQueryPanel`, `NiceNotificationPreferences`, the ui-buildings panels, the ui-printing
|
|
99
|
+
template editor and the photo editor — default to English now; Polish is in the dictionary. English
|
|
100
|
+
plurals glued on (`result{s}`) are two keys. `presentationsTranslator(lang)` (ui-presentations)
|
|
101
|
+
translates outside its provider.
|
|
102
|
+
|
|
103
|
+
**List props are optional.** 170 list props (`items`, `columns`, `data`, …) in 15 packages that
|
|
104
|
+
were required without a default are optional, with a stable empty default; every one of those
|
|
105
|
+
controls mounts without data (tested). `NiceStockChart` without data no longer computes NaN
|
|
106
|
+
coordinates.
|
|
107
|
+
|
|
108
|
+
**Unstyled components get stylesheets.** 98 components rendered class names no stylesheet had —
|
|
109
|
+
admin panels, auth forms, events rounds and pickers, the ERP invoice / purchase order / VAT table /
|
|
110
|
+
HR dashboard, the radio player, `NiceInbox`, PWA prompts, `NiceViewRenderer`, shells, smart-home,
|
|
111
|
+
… The fixed layout that sat in inline style objects is in classes now, so an app can override it;
|
|
112
|
+
values that depend on data stay inline. **`@nice2dev/social` and `@nice2dev/ui-science` ship a
|
|
113
|
+
stylesheet — import `@nice2dev/social/style.css` / `@nice2dev/ui-science/style.css`.** ui-science's
|
|
114
|
+
`sideEffects` is `["*.css"]`. Colours, spacing and radii in every stylesheet come from theme tokens
|
|
115
|
+
(visible in dark themes: `NiceRecipe` difficulty badges, transcoder states, warehouse heat map).
|
|
116
|
+
|
|
117
|
+
**Icons only from Nice.** About 130 glyphs (`×`, `→`, `↑`) and 100 pasted `<svg>` used as icons
|
|
118
|
+
are Nice icons; 11 `<svg>` stay as the control's own graphic (logos, spinners, checkbox mark). `NiceIcon`
|
|
119
|
+
gains `pin`, `mic-off`, `log-out`, `chevrons-left`, `chevrons-right`, `zoom-in`, `zoom-out`,
|
|
120
|
+
`navigation`, `refresh-ccw`, `minimize` and `smartphone`; `@nice2dev/icons` gains
|
|
121
|
+
`NtdMicrophoneOff`. The `icon` fields of the module, menu, tab, mode, quick-action, scene and admin
|
|
122
|
+
widget DTOs, notification channels and view toolbar items are rendered through `NiceIcon` — they
|
|
123
|
+
used to be printed as text. `NiceRatings` `thumbs` draws shapes instead of emoji.
|
|
124
|
+
|
|
125
|
+
**Dialogs instead of `window.prompt` / `confirm` / `alert`.** New `useNiceDialogs()` — `prompt`,
|
|
126
|
+
`confirm` and `alert` as promises on `NicePromptDialog` / `NiceConfirmDialog` — and
|
|
127
|
+
`NiceConfirmDialog.showReject`. Seventeen controls asked through the browser's blocking dialogs and
|
|
128
|
+
use the library's now (`NiceFileManager`, `NiceHtmlEditor`, `NiceViewRenderer` action `confirm`, the 3D,
|
|
129
|
+
vector and pixel editors, …). Keys pressed in `NicePromptDialog` / `NiceConfirmDialog` no longer
|
|
130
|
+
reach the page's shortcuts (Escape still closes them), and `NicePromptDialog`'s backdrop covers the
|
|
131
|
+
whole viewport.
|
|
132
|
+
|
|
133
|
+
**Smaller fixes.** `NiceFileManager.items` is optional. `NiceMLStudio` status badges: `draft`,
|
|
134
|
+
`registered`, `archived`, `cancelled` get a neutral colour, deploying / stopped deployments theirs.
|
|
135
|
+
Component docs (`doc.json`) list only props the components have. `NiceMobileTabs`: tabs beyond
|
|
136
|
+
`maxTabs` open from "More" (it only logged). `NiceInventoryManager`: new `onCreatePurchaseOrder`;
|
|
137
|
+
without it the "Create PO" button is gone (it only logged). Keyboard: `NiceNavShell` tabs follow the
|
|
138
|
+
WAI-ARIA tabs pattern, clickable `NiceDeviceTile` / `NiceCardGroup` cards and animated icons with
|
|
139
|
+
`trigger="click"` are focusable. ui-math: `CalculatorService.evaluate` parses instead of running
|
|
140
|
+
`new Function` (`asin`, `sinh`, `ceil`, exponents and `angleUnit` were wrong); `ExpressionParser`
|
|
141
|
+
takes `functions`, `constants`, `ignoreCase` and `strict`, multiplies implicitly (`2x`) and reads `^`
|
|
142
|
+
right to left. `InvoiceLine.vatRate` and `VatRate.rate` are documented as fractions (0.23).
|
|
143
|
+
`AmqpServerBinding` is `Record<string, never>`.
|
|
144
|
+
|
|
3
145
|
## 1.2.0
|
|
4
146
|
|
|
5
147
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,7 +10,10 @@ export interface NicePresentationEditorProps {
|
|
|
10
10
|
onExport?: (format: string, content: string) => void;
|
|
11
11
|
/** Launch presentation mode */
|
|
12
12
|
onPresent?: (doc: Readonly<NicePresentationDocument>, startSlide?: number) => void;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Language. Default (1.2.2): the language around the editor - this package's provider, else the
|
|
15
|
+
* app's global one; before, always English.
|
|
16
|
+
*/
|
|
14
17
|
lang?: 'en' | 'pl';
|
|
15
18
|
showToolbar?: boolean;
|
|
16
19
|
showThumbnails?: boolean;
|
package/dist/core/i18n.d.ts
CHANGED
|
@@ -10,7 +10,18 @@ export interface NiceI18nProviderProps {
|
|
|
10
10
|
lang?: NicePresentationsLang;
|
|
11
11
|
children: ReactNode;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The translator for one language — the provider's, and NicePresentationEditor's own: it renders
|
|
15
|
+
* the provider for its `lang`, so a hook in it would read the context above.
|
|
16
|
+
*/
|
|
17
|
+
export declare function presentationsTranslator(lang: NicePresentationsLang): NiceTranslateFn;
|
|
13
18
|
export declare const NiceI18nProvider: React.FC<NiceI18nProviderProps>;
|
|
19
|
+
/**
|
|
20
|
+
* This package's translator: under its `NiceI18nProvider`, that provider's language; without one
|
|
21
|
+
* (since 1.2.2), the language of the app's global `NiceI18nProvider` — English when this package
|
|
22
|
+
* has no dictionary for it. Before 1.2.2 the controls stayed English without the package's own
|
|
23
|
+
* provider, whatever language the app used.
|
|
24
|
+
*/
|
|
14
25
|
export declare function useNiceTranslation(): NiceTranslateFn;
|
|
15
26
|
/**
|
|
16
27
|
* The language set on the nearest `NiceI18nProvider` (`'en'` outside one).
|