@nice2dev/ui-core 1.1.5 → 1.1.7
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 +52 -0
- package/dist/core/NiceFieldStatus.d.ts +0 -1
- package/dist/core/NiceInlineHelp.d.ts +0 -1
- package/dist/core/NiceThemeProvider.d.ts +0 -1
- package/dist/core/NiceThemeVariants.d.ts +0 -1
- package/dist/core/NiceUserPreferences.d.ts +0 -1
- package/dist/core/a11y-advanced.d.ts +0 -1
- package/dist/core/a11y.d.ts +0 -1
- package/dist/core/access-control.d.ts +0 -1
- package/dist/core/adapters.d.ts +0 -1
- package/dist/core/ai.d.ts +0 -1
- package/dist/core/animations.d.ts +0 -1
- package/dist/core/colorBlind.d.ts +0 -1
- package/dist/core/datasource-advanced.d.ts +0 -1
- package/dist/core/datasource-aggregation.d.ts +0 -1
- package/dist/core/datasource-hooks.d.ts +0 -1
- package/dist/core/datasource-offline.d.ts +0 -1
- package/dist/core/datasource.d.ts +0 -1
- package/dist/core/deprecation.d.ts +0 -1
- package/dist/core/displayMode.d.ts +0 -1
- package/dist/core/displayStyle.d.ts +0 -1
- package/dist/core/filterToSql.d.ts +0 -1
- package/dist/core/helpContext.d.ts +0 -1
- package/dist/core/hooks.d.ts +0 -1
- package/dist/core/i18n.d.ts +0 -1
- package/dist/core/i18nDictionaries.d.ts +0 -1
- package/dist/core/icons.d.ts +0 -1
- package/dist/core/icuMessageFormat.d.ts +0 -1
- package/dist/core/leak-detector.d.ts +0 -1
- package/dist/core/omniverkTypes.d.ts +0 -1
- package/dist/core/pluginSystem.d.ts +0 -1
- package/dist/core/profiling.d.ts +0 -1
- package/dist/core/responsive.d.ts +0 -1
- package/dist/core/rtl.d.ts +0 -1
- package/dist/core/sanitizeHtml.d.ts +0 -1
- package/dist/core/spatialNav.d.ts +0 -1
- package/dist/core/standardProps.d.ts +0 -1
- package/dist/core/testing.d.ts +0 -1
- package/dist/core/theme.d.ts +0 -1
- package/dist/core/themeGallery.d.ts +0 -1
- package/dist/core/themePacks.d.ts +0 -1
- package/dist/core/themePacksExtended.d.ts +0 -1
- package/dist/core/themePresets.d.ts +0 -1
- package/dist/core/themeVariants.d.ts +0 -1
- package/dist/core/touch.d.ts +0 -1
- package/dist/core/traceless.d.ts +0 -1
- package/dist/core/tutorials.d.ts +0 -1
- package/dist/core/types.d.ts +0 -1
- package/dist/core/useControllableState.d.ts +20 -5
- package/dist/core/useGamepad.d.ts +0 -1
- package/dist/core/useThemeIsDark.d.ts +0 -1
- package/dist/core/validation.d.ts +0 -1
- package/dist/index.cjs +22 -23
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +1099 -1081
- package/dist/performance/concurrent.d.ts +0 -1
- package/dist/performance/images.d.ts +0 -1
- package/dist/performance/index.d.ts +0 -1
- package/dist/performance/memory.d.ts +0 -1
- package/dist/performance/virtualization.d.ts +0 -1
- package/dist/performance/workers.d.ts +0 -1
- package/dist/viewSchema.d.ts +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @nice2dev/ui-core — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Close the three items left open in the 1.1.6 response to OmniVerk.
|
|
8
|
+
|
|
9
|
+
**Every value control works without state in the parent.** The `audit-controllable-state` gate
|
|
10
|
+
counted 87 value props that were required with no `default*`, so the control could not render from a
|
|
11
|
+
manifest without data. It now reports 0 and gates CI at `--max=0`. 48 controls gained `default*` props
|
|
12
|
+
through `useControllableState` (existing `value` + handler call sites behave as before); 33 read-only
|
|
13
|
+
data lists are optional with a stable empty default; 4 props paired with a handler only by name are
|
|
14
|
+
optional; `NiceWhiteboard` and `NiceMetricsDashboard` render an empty state until a session or
|
|
15
|
+
dashboard arrives. Additive API only — nothing renamed or removed.
|
|
16
|
+
|
|
17
|
+
- `NicePivotGrid.fields`, `NiceScheduler.events` and `NiceGitHooks.hooks` are controlled only together
|
|
18
|
+
with their change handler, as `NiceScheduler` already documented for `currentDate`/`view`. A bare
|
|
19
|
+
prop stays an initial value; prop plus handler now always wins (later prop updates used to be
|
|
20
|
+
ignored). `NiceGitHooks.onHookChange` is now called; `onHooksChange` and
|
|
21
|
+
`NiceLocaleManager.onTranslationsChange` are new.
|
|
22
|
+
- `NiceCodeEditor` / `NiceCodeDiffEditor` no longer report a value written from the prop back through
|
|
23
|
+
`onChange`, and call the latest handler rather than the one captured at mount.
|
|
24
|
+
- `NiceHtmlEditor` no longer rewrites its content on every render (React 19 compares the
|
|
25
|
+
`dangerouslySetInnerHTML` object, not its string), which moved the caret; the HTML source and
|
|
26
|
+
Markdown views can be closed again.
|
|
27
|
+
- Selections seeded once from the first item (access manager, automation/scene editors, git diff
|
|
28
|
+
viewer, ribbon, setup wizard) follow data that arrives after mount.
|
|
29
|
+
- `useControllableState`: new `fallbackValue` seed that never triggers the value/default clash warning;
|
|
30
|
+
two functional updates in one tick no longer lose the first; `onChange` is called with one argument
|
|
31
|
+
when there is no meta. `UseControllableStateOptions` is now a union type alias.
|
|
32
|
+
|
|
33
|
+
**`--nice-*` is the source of truth for design tokens.** Controls read only `--nice-*` (9,225 reads in
|
|
34
|
+
339 files). The unprefixed names (`--color-primary`, `--bg-primary`, `--text-muted`, …) stay declared
|
|
35
|
+
as aliases pointing at the Nice tokens, so reading them works, but setting them no longer repaints Nice
|
|
36
|
+
controls. Apps that relied on that can import `@nice2dev/ui/css/legacy-bg-text-aliases.css` after
|
|
37
|
+
`style.css` (removed in 1.2), or set `--nice-color-primary` and friends directly. 13 tokens that were
|
|
38
|
+
read and never declared (`--color-danger`, `--text-on-primary`, `--color-white`, …) are defined; the
|
|
39
|
+
dark blocks define the canonical names, so `.nice-dark` on `<body>` no longer leaves them on light
|
|
40
|
+
values; `--nice-primary-bg` and `--nice-selected-bg` are a primary tint instead of falling through to
|
|
41
|
+
grey. New gate `audit-token-names`.
|
|
42
|
+
|
|
43
|
+
**Node ESM and `require()`.** `@nice2dev/spatial-core` imports from plain Node ESM (51 relative
|
|
44
|
+
specifiers gained extensions, enforced by `nodenext`), and so does `@nice2dev/ui-buildings`, which
|
|
45
|
+
failed through it. `require()` works for `ui-3d`, `ui-graphics` and `game-engine`. The package-exports
|
|
46
|
+
gate now loads every entry in both module systems.
|
|
47
|
+
|
|
48
|
+
**Hygiene.** Sources are prettier-formatted and CI gates on it; 640 stale `.d.ts` files were removed
|
|
49
|
+
from source trees (never published).
|
|
50
|
+
|
|
51
|
+
## 1.1.6
|
|
52
|
+
|
|
53
|
+
No changes in this release.
|
|
54
|
+
|
|
3
55
|
## 1.1.5
|
|
4
56
|
|
|
5
57
|
No changes in this release.
|
|
@@ -52,4 +52,3 @@ export interface NiceThemeVariantConfiguratorProps {
|
|
|
52
52
|
export declare function NiceThemeVariantConfigurator({ showPresets, showPreview, showCSS, collapsible, className, style, }: NiceThemeVariantConfiguratorProps): React.JSX.Element;
|
|
53
53
|
export type { ThemeVariantConfig, RadiusVariant, ShadowVariant, FillVariant as _FillVariant, ButtonStyleVariant, InputStyleVariant, CardStyleVariant, AnimationIntensity, DensityVariant, } from './themeVariants';
|
|
54
54
|
export { DEFAULT_VARIANT_CONFIG, VARIANT_PRESETS, applyVariantConfig, generateVariantCSS, } from './themeVariants';
|
|
55
|
-
//# sourceMappingURL=NiceThemeVariants.d.ts.map
|
|
@@ -301,4 +301,3 @@ export interface NicePreferencesPanelProps {
|
|
|
301
301
|
*/
|
|
302
302
|
export declare function NicePreferencesPanel({ showGlobal, showControls, showExportImport, showSync, className, style, }: NicePreferencesPanelProps): React.JSX.Element;
|
|
303
303
|
export {};
|
|
304
|
-
//# sourceMappingURL=NiceUserPreferences.d.ts.map
|
|
@@ -154,4 +154,3 @@ export declare function checkContrastAAA(foreground: string, background: string,
|
|
|
154
154
|
* Run a comprehensive WCAG 2.2 AAA audit on the current document.
|
|
155
155
|
*/
|
|
156
156
|
export declare function auditWCAG22AAA(): WCAGCheckResult[];
|
|
157
|
-
//# sourceMappingURL=a11y-advanced.d.ts.map
|
package/dist/core/a11y.d.ts
CHANGED
package/dist/core/adapters.d.ts
CHANGED
|
@@ -175,4 +175,3 @@ export declare function generateFromOpenAPI(swaggerUrl: string, schemaName: stri
|
|
|
175
175
|
export declare function generateColumnsFromSchema(schema: OpenAPISchema): GridColumnDef[];
|
|
176
176
|
/** Generate form fields from schema object directly (no fetch). */
|
|
177
177
|
export declare function generateFormFieldsFromSchema(schema: OpenAPISchema): FormFieldDef[];
|
|
178
|
-
//# sourceMappingURL=adapters.d.ts.map
|
package/dist/core/ai.d.ts
CHANGED
|
@@ -45,4 +45,3 @@ export declare function useNiceCollapse(ref: React.RefObject<HTMLElement | null>
|
|
|
45
45
|
*/
|
|
46
46
|
export declare function niceStaggerDelay(index: number, interval?: number): string;
|
|
47
47
|
export declare function getNiceAnimationClass(preset: NiceAnimationPreset, phase: 'enter' | 'exit'): string;
|
|
48
|
-
//# sourceMappingURL=animations.d.ts.map
|
|
@@ -258,4 +258,3 @@ export interface NiceSSEDataSource<T> extends NiceDataSource<T> {
|
|
|
258
258
|
* Writes (insert/update/remove) are delegated to the base data source.
|
|
259
259
|
*/
|
|
260
260
|
export declare function createSSEDataSource<T extends Record<string, any>>(config: NiceSSEConfig<T>): NiceSSEDataSource<T>;
|
|
261
|
-
//# sourceMappingURL=datasource-advanced.d.ts.map
|
|
@@ -90,4 +90,3 @@ export interface NiceLookupSourceState {
|
|
|
90
90
|
reload: () => void;
|
|
91
91
|
}
|
|
92
92
|
export declare function useNiceLookupSource<T = any>(source: NiceDataSource<T> | null | undefined, valueField: string, labelField: string, opts?: UseNiceLookupSourceOptions): NiceLookupSourceState;
|
|
93
|
-
//# sourceMappingURL=datasource-hooks.d.ts.map
|
|
@@ -178,4 +178,3 @@ export interface NiceCustomDataSourceHandlers<T = any> {
|
|
|
178
178
|
*/
|
|
179
179
|
export declare function createCustomDataSource<T extends Record<string, any> = any>(handlers: NiceCustomDataSourceHandlers<T>): NiceDataSource<T>;
|
|
180
180
|
export {};
|
|
181
|
-
//# sourceMappingURL=datasource.d.ts.map
|
|
@@ -22,4 +22,3 @@ export declare function sortModelToOrderBy(sort: NiceSortExpression[], opts?: Fi
|
|
|
22
22
|
export declare function matchesFilterCondition(row: Record<string, unknown>, c: NiceFilterCondition): boolean;
|
|
23
23
|
/** Evaluate a {@link NiceFilterGroup} tree against a row (empty group ⇒ matches). */
|
|
24
24
|
export declare function matchesFilterGroup(row: Record<string, unknown>, group: NiceFilterGroup): boolean;
|
|
25
|
-
//# sourceMappingURL=filterToSql.d.ts.map
|
package/dist/core/hooks.d.ts
CHANGED
package/dist/core/i18n.d.ts
CHANGED
|
@@ -7,4 +7,3 @@
|
|
|
7
7
|
export { NiceI18nProvider, useNiceTranslation } from '@nice2dev/i18n';
|
|
8
8
|
export type { NiceTranslateFn, NiceSupportedLang, NiceI18nProviderProps } from '@nice2dev/i18n';
|
|
9
9
|
export { NICE_SUPPORTED_LANGS, NICE_I18N_DICTIONARIES } from '@nice2dev/i18n';
|
|
10
|
-
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const NICE_SUPPORTED_LANGS: readonly ["en", "pl", "de", "fr", "es", "it", "pt", "nl", "sv", "no", "da", "fi", "cs", "sk", "hu", "ro", "bg", "uk", "ja", "ko", "zh", "ar"];
|
|
2
2
|
export type NiceSupportedLang = (typeof NICE_SUPPORTED_LANGS)[number];
|
|
3
3
|
export declare const NICE_I18N_DICTIONARIES: Record<NiceSupportedLang, Record<string, string>>;
|
|
4
|
-
//# sourceMappingURL=i18nDictionaries.d.ts.map
|
package/dist/core/icons.d.ts
CHANGED
package/dist/core/profiling.d.ts
CHANGED
package/dist/core/rtl.d.ts
CHANGED
|
@@ -114,4 +114,3 @@ export declare function warnControlledClash(componentName: string, value: unknow
|
|
|
114
114
|
/** Re-export common types this module is built upon. */
|
|
115
115
|
export type { NiceBaseProps, NiceFormFieldProps, NiceSize, NiceVariant } from './types';
|
|
116
116
|
export type NiceReactNode = React.ReactNode;
|
|
117
|
-
//# sourceMappingURL=standardProps.d.ts.map
|
package/dist/core/testing.d.ts
CHANGED
package/dist/core/theme.d.ts
CHANGED
|
@@ -50,4 +50,3 @@ export type NiceThemePackId = keyof typeof NICE_THEME_PACKS;
|
|
|
50
50
|
export declare function getNiceThemePack(id: string): NiceThemePack | undefined;
|
|
51
51
|
/** Filter packs by tag (e.g. 'dark', 'serif', 'retro'). */
|
|
52
52
|
export declare function filterNiceThemePacksByTag(tag: string): NiceThemePack[];
|
|
53
|
-
//# sourceMappingURL=themePacks.d.ts.map
|
|
@@ -56,4 +56,3 @@ export type NiceThemePackIdExtended = keyof typeof NICE_THEME_PACKS_EXTENDED;
|
|
|
56
56
|
export declare function getNiceThemePackExtended(id: string): NiceThemePack | undefined;
|
|
57
57
|
/** Filter extended packs by tag. */
|
|
58
58
|
export declare function filterNiceThemePacksExtendedByTag(tag: string): NiceThemePack[];
|
|
59
|
-
//# sourceMappingURL=themePacksExtended.d.ts.map
|
|
@@ -201,4 +201,3 @@ export declare function removeVariantConfig(scopeId: string, element?: HTMLEleme
|
|
|
201
201
|
export declare function applyVariantsToTheme(theme: NiceTheme, config: Partial<ThemeVariantConfig>): NiceTheme & {
|
|
202
202
|
variantConfig: ThemeVariantConfig;
|
|
203
203
|
};
|
|
204
|
-
//# sourceMappingURL=themeVariants.d.ts.map
|
package/dist/core/touch.d.ts
CHANGED
package/dist/core/traceless.d.ts
CHANGED
package/dist/core/tutorials.d.ts
CHANGED
package/dist/core/types.d.ts
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import type { NiceChangeMeta, NiceOnChange } from './standardProps';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Where uncontrolled state is seeded from. Two roles that used to share one field:
|
|
4
|
+
* `defaultValue` is the consumer's raw `default*` prop (the only thing the
|
|
5
|
+
* value+default clash warning looks at), `fallbackValue` is the control's own
|
|
6
|
+
* empty seed (`''`, `[]`, `0`) and never triggers a warning. One of them must be
|
|
7
|
+
* a `T`, so the returned value is always a `T`.
|
|
8
|
+
*/
|
|
9
|
+
export type UseControllableStateSeed<T> = {
|
|
5
10
|
/** Initial value used in uncontrolled mode. */
|
|
6
11
|
defaultValue: T;
|
|
12
|
+
/** Seed used when `defaultValue` is undefined. */
|
|
13
|
+
fallbackValue?: T;
|
|
14
|
+
} | {
|
|
15
|
+
/** The consumer's `default*` prop, possibly undefined. */
|
|
16
|
+
defaultValue?: T | undefined;
|
|
17
|
+
/** Seed used when `defaultValue` is undefined. Never triggers the clash warning. */
|
|
18
|
+
fallbackValue: T;
|
|
19
|
+
};
|
|
20
|
+
export type UseControllableStateOptions<T, TEvent = unknown> = {
|
|
21
|
+
/** Controlled value. When defined, hook is in controlled mode. */
|
|
22
|
+
value?: T;
|
|
7
23
|
/** Change callback invoked in both modes. */
|
|
8
24
|
onChange?: NiceOnChange<T, TEvent>;
|
|
9
25
|
/** Component name (used for dev warnings). */
|
|
10
26
|
componentName?: string;
|
|
11
|
-
}
|
|
27
|
+
} & UseControllableStateSeed<T>;
|
|
12
28
|
export type UseControllableStateReturn<T, TEvent = unknown> = readonly [
|
|
13
29
|
T,
|
|
14
30
|
(next: T | ((prev: T) => T), meta?: NiceChangeMeta<TEvent>) => void,
|
|
@@ -16,4 +32,3 @@ export type UseControllableStateReturn<T, TEvent = unknown> = readonly [
|
|
|
16
32
|
boolean
|
|
17
33
|
];
|
|
18
34
|
export declare function useControllableState<T, TEvent = unknown>(opts: UseControllableStateOptions<T, TEvent>): UseControllableStateReturn<T, TEvent>;
|
|
19
|
-
//# sourceMappingURL=useControllableState.d.ts.map
|
|
@@ -67,4 +67,3 @@ export interface NavigationActions {
|
|
|
67
67
|
}
|
|
68
68
|
/** Create a standard UI-navigation action map for {@link useGamepad}. */
|
|
69
69
|
export declare function createNavigationActions(handlers: NavigationActions): Record<string, GamepadAction>;
|
|
70
|
-
//# sourceMappingURL=useGamepad.d.ts.map
|
|
@@ -43,4 +43,3 @@ export declare function evaluateValidationRule(rule: NiceFieldValidationRule, re
|
|
|
43
43
|
export declare function evaluateValidation(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>): NiceFieldValidationIssue[];
|
|
44
44
|
/** Convenience: does the record satisfy every `error`-severity rule? */
|
|
45
45
|
export declare function isRecordValid(rules: NiceFieldValidationRule[] | undefined, record: Record<string, unknown>): boolean;
|
|
46
|
-
//# sourceMappingURL=validation.d.ts.map
|