@nice2dev/licensing 1.1.9 → 1.2.0

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,78 @@
1
1
  # @nice2dev/licensing
2
2
 
3
+ ## 1.2.0
4
+
5
+ No changes in this release.
6
+
7
+ ## 1.1.10
8
+
9
+ ### Patch Changes
10
+
11
+ - The package description on npm shows a dash instead of the mis-encoded "—".
12
+ - 1.1.10 — the additive part of OmniVerk's 1.2.0 list: ui-audio builds without optional packages, one
13
+ i18n context, dictionaries per language, data props optional. No breaking changes.
14
+
15
+ **`@nice2dev/ui-audio` no longer breaks the consumer's build.** It imported `react-bootstrap`,
16
+ `recharts`, `react-window`, `react-youtube` and `pitchy` statically while declaring none of them
17
+ (only optional entries in `peerDependenciesMeta`), so a Vite app without them failed with "failed to
18
+ resolve import". Loading them with `import()` is no way out: Vite 8 (Rolldown) resolves dynamic
19
+ imports at build time and fails the same way, which made `hls.js` and `phaser` mandatory too.
20
+ `react-bootstrap`, `recharts`, `react-window` and `phaser` are now gone from the code
21
+ (`NiceBarFillEditor` uses Nice controls, `NiceVocalPerformanceReport` uses `NiceChart` /
22
+ `NicePieChart`, the karaoke editor list uses `NiceVirtualScroller`, `NiceKaraokePhaserRenderer`
23
+ renders with the DOM and keeps its name); `pitchy`, `react-youtube` and `hls.js` are regular
24
+ `dependencies`. Found on the way: in live mode the vocal performance report subtracted UltraStar note
25
+ numbers from MIDI pitch, so every singer got thousands of cents of deviation and 0 % accuracy — it now
26
+ compares pitch within the octave, as the scoring does; `NiceBarFillEditor` put a colour into a
27
+ percentage slider.
28
+
29
+ **Every package declares what its bundle imports.** A new CI gate checks every `import`, `import()`
30
+ and `require()` in the published `dist` against `dependencies` and non-optional `peerDependencies`.
31
+ To reach zero: `@nice2dev/licensing` no longer has `require('webpack')` in its main bundle (the webpack
32
+ plugin uses `compiler.webpack`; webpack 4 gets a warning instead of feature flags) and `react` is a
33
+ required peer; `@nice2dev/erp-adapter` lists `@microsoft/signalr` in `dependencies` (still loaded on
34
+ first use); `@nice2dev/icons-cursor` declares its `react-dom` peer; `@nice2dev/ui-printing` treats
35
+ `@nice2dev/ui` as a required peer.
36
+
37
+ **One copy of each package, one i18n context.** `@nice2dev/ui` carried its own copy of
38
+ `@nice2dev/ui-core` and `@nice2dev/i18n`, and `ui-forms`, `ui-api`, `ui-bi`, `ui-designers`, `ui-math`
39
+ and `ui-video` each carried a copy of all of `@nice2dev/ui` (about 4.4 MB each). Every copy had its own
40
+ React contexts: a `NiceI18nProvider` imported from `@nice2dev/i18n` did not reach the controls of
41
+ `@nice2dev/ui`, which kept their English defaults and `lang` `'en'`, and the dictionaries ended up in
42
+ an app several times. These packages now import `@nice2dev/*` instead (`ui-forms` 4.4 MB → 82 kB).
43
+ Keep every `@nice2dev/*` package on the same version.
44
+
45
+ **Dictionaries per language.** `NiceI18nLazyProvider` takes the same props as `NiceI18nProvider`
46
+ (`t`, `lang`, `overrides`, plus `fallback` and `onError`) but loads only the active language's
47
+ dictionary, with `import()`; until it arrives the controls show their built-in English (or
48
+ `fallback`), and with `t` nothing is loaded at all. Also `loadNiceDictionary(lang)`, to start in a
49
+ language without a flash of English, and `getLoadedNiceDictionary(lang)`. Exported from
50
+ `@nice2dev/i18n`, `@nice2dev/ui-core` and `@nice2dev/ui`; in the `i18n` build every language is its own
51
+ file. `NiceI18nProvider` and `NICE_I18N_DICTIONARIES` are unchanged and still bring all 30 dictionaries.
52
+ `NiceTestWrapper` (ui-core) and `NiceShowcase` (ui) use the lazy provider now, so they no longer pull
53
+ every dictionary into the apps that bundle them.
54
+
55
+ **Data props are optional.** These controls threw a `TypeError` without data and now render empty:
56
+ `NiceTreeView.nodes`, `NiceAccordion.items`, `NiceCascadeSelect.options`, `NiceAutocomplete.options`,
57
+ `NiceAuditLog.entries`, `NiceDocumentVersionList.versions`, `NicePermissionMatrix.roles` / `actions`,
58
+ `WizardStep.content`, `NiceDiagramViewer.document`, `NiceOrgChartVisualizer.data`,
59
+ `NiceSpatialViewer.document`, and in `@nice2dev/events` the lists of `NiceGiftRegistry`,
60
+ `NiceParticipantList`, `NiceExpenseSplit`, `NiceSeatingChart`, `NiceMediaCollage` and `NiceEventMedia`.
61
+ `NiceMap` without `center` centres on its markers (the whole world without markers), `NiceCountdown`
62
+ without `targetDate` shows zero and never calls `onComplete`, `NiceChat` without `onSend` is read-only
63
+ (no input), and `NiceInvitationDesigner` gains `defaultTemplate`. A CI ratchet counts the required
64
+ array props that remain.
65
+
66
+ **Smaller fixes.** `NicePieChart` draws a 100 % slice as a full circle instead of nothing. In
67
+ development `NiceThemeProvider` warns when `--nice-primary` / `--nice-color-primary` (or another linked
68
+ pair) resolves to nothing on `:root` — usually an alias cycle in the app's CSS; the theming guides say
69
+ which side to set. `@nice2dev/game-engine` exports `createAnimationClip`, `AnimatorController` and
70
+ `createAnimatorController` (two modules exported each name, so `export *` dropped all three); the other
71
+ implementations are `StateMachineAnimatorController`, `createStateMachineAnimatorController`,
72
+ `createTimelineAnimationClip` and `createRetargetingAnimationClip`.
73
+
74
+ Nothing was renamed or removed.
75
+
3
76
  ## 1.1.9
4
77
 
5
78
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -3828,7 +3828,13 @@ class Nice2DevLicenseWebpackPlugin {
3828
3828
  });
3829
3829
  compiler.hooks.compilation.tap("Nice2DevLicensePlugin", (_compilation) => {
3830
3830
  var _a, _b;
3831
- const DefinePlugin = ((_a = compiler.webpack) == null ? void 0 : _a.DefinePlugin) || require("webpack").DefinePlugin;
3831
+ const DefinePlugin = (_a = compiler.webpack) == null ? void 0 : _a.DefinePlugin;
3832
+ if (!DefinePlugin) {
3833
+ console.warn(
3834
+ "[Nice2DevLicensePlugin] compiler.webpack is missing (webpack < 5): license feature flags are not defined."
3835
+ );
3836
+ return;
3837
+ }
3832
3838
  const license = this.validator.getLicenseInfo();
3833
3839
  new DefinePlugin({
3834
3840
  "process.env.NICE2DEV_LICENSE_VALID": JSON.stringify(
package/dist/index.mjs CHANGED
@@ -3827,7 +3827,13 @@ class Nice2DevLicenseWebpackPlugin {
3827
3827
  });
3828
3828
  compiler.hooks.compilation.tap("Nice2DevLicensePlugin", (_compilation) => {
3829
3829
  var _a, _b;
3830
- const DefinePlugin = ((_a = compiler.webpack) == null ? void 0 : _a.DefinePlugin) || require("webpack").DefinePlugin;
3830
+ const DefinePlugin = (_a = compiler.webpack) == null ? void 0 : _a.DefinePlugin;
3831
+ if (!DefinePlugin) {
3832
+ console.warn(
3833
+ "[Nice2DevLicensePlugin] compiler.webpack is missing (webpack < 5): license feature flags are not defined."
3834
+ );
3835
+ return;
3836
+ }
3831
3837
  const license = this.validator.getLicenseInfo();
3832
3838
  new DefinePlugin({
3833
3839
  "process.env.NICE2DEV_LICENSE_VALID": JSON.stringify(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nice2dev/licensing",
3
- "version": "1.1.9",
4
- "description": "Nice2Dev Enterprise Licensing System — license key generation, validation, hardware fingerprinting, seat management and feature gating",
3
+ "version": "1.2.0",
4
+ "description": "Nice2Dev Enterprise Licensing System — license key generation, validation, hardware fingerprinting, seat management and feature gating",
5
5
  "author": "NiceToDev <contact@nicetodev.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://github.com/NiceToDev/NiceToDev.UI#readme",
@@ -61,9 +61,6 @@
61
61
  "react-dom": ">=17.0.0"
62
62
  },
63
63
  "peerDependenciesMeta": {
64
- "react": {
65
- "optional": true
66
- },
67
64
  "react-dom": {
68
65
  "optional": true
69
66
  }