@neo-ui-kit/react 1.2.3 → 1.3.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.
@@ -10,6 +10,12 @@ export interface QuantumBackgroundSettings {
10
10
  density: number;
11
11
  /** Share of the scene the field spans: 1 reaches the edges, above 1 runs past them. */
12
12
  fieldSize: number;
13
+ /** 0 keeps the original plane; 1 separates near and far particles in space and speed. */
14
+ particleDepth: number;
15
+ /** Multiplies particle size without changing the field's footprint, 0.5–3. */
16
+ particleScale: number;
17
+ /** 0 keeps the original glow; 1 uses a crisp light core and a compact halo. */
18
+ particleSharpness: number;
13
19
  timeScale: number;
14
20
  nebulaEnabled: boolean;
15
21
  nebulaIntensity: number;
@@ -8,6 +8,8 @@ export interface ThemePickerOption<V extends string = string> {
8
8
  description?: string;
9
9
  /** Picture of the theme (with transparency); the chosen one gets a moving shine. */
10
10
  image?: string;
11
+ /** Optional full-card backdrop, kept separate from the foreground picture. */
12
+ background?: string;
11
13
  /** The theme's own colour for the card's edge and glow. */
12
14
  color?: string;
13
15
  }
@@ -54,6 +54,7 @@
54
54
  /* Gallery: one picture card per theme, edged and lit in that theme's colour. */
55
55
  .ad-theme-picker[data-gallery] {
56
56
  display: grid;
57
+ width: 100%;
57
58
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
58
59
  gap: var(--ad-space-3);
59
60
  }
@@ -63,17 +64,31 @@
63
64
  isolation: isolate;
64
65
  display: grid;
65
66
  grid-template-rows: minmax(0, 1fr) auto;
67
+ min-width: 0;
66
68
  aspect-ratio: 5 / 4;
67
69
  padding: 0;
68
70
  overflow: hidden;
69
71
  border: 0.0625rem solid rgb(from var(--ad-theme-card) r g b / 0.38);
70
72
  border-radius: 0.8rem;
71
73
  background: linear-gradient(135deg, var(--ad-neutral-900), var(--ad-neutral-950));
72
- color: var(--ad-text);
74
+ color: #fff;
73
75
  font: inherit;
74
76
  cursor: pointer;
75
77
  transition: filter 0.18s, box-shadow 0.18s, border-color 0.18s;
76
78
  }
79
+ .ad-theme-card-background {
80
+ position: absolute;
81
+ inset: 0;
82
+ z-index: -1;
83
+ width: 100%;
84
+ height: 100%;
85
+ object-fit: cover;
86
+ pointer-events: none;
87
+ }
88
+ .ad-theme-card:focus-visible {
89
+ outline: 0.125rem solid var(--ad-theme-card);
90
+ outline-offset: 0.2rem;
91
+ }
77
92
  .ad-theme-card:hover {
78
93
  filter: brightness(1.13);
79
94
  }
@@ -88,28 +103,48 @@
88
103
  0 0 1rem rgb(from var(--ad-theme-card) r g b / 0.28);
89
104
  }
90
105
  .ad-theme-card-preview {
106
+ position: relative;
91
107
  display: grid;
92
108
  place-items: center;
93
109
  min-height: 0;
94
- padding: var(--ad-space-2);
110
+ margin: 4% 12% 0.2rem;
95
111
  background: radial-gradient(ellipse at 50% 76%, rgb(from var(--ad-theme-card) r g b / 0.18), transparent 72%);
96
112
  }
97
- .ad-theme-card-preview > :is(img, svg, .ad-image-shine) {
98
- width: auto;
99
- max-width: 100%;
113
+ .ad-theme-card-image {
114
+ position: absolute;
115
+ inset: 0;
116
+ }
117
+ .ad-theme-card-image > :is(img, .ad-image-shine) {
118
+ width: 100%;
100
119
  height: 100%;
101
- aspect-ratio: 1;
120
+ aspect-ratio: auto;
102
121
  object-fit: contain;
103
122
  }
104
123
  .ad-theme-card-caption {
105
124
  display: grid;
106
125
  justify-items: center;
107
- gap: 0.15rem;
108
- padding: var(--ad-space-2);
109
- background: linear-gradient(180deg, transparent, var(--ad-neutral-950));
126
+ gap: 0.1rem;
127
+ padding: 0 0.5rem 0.35rem;
128
+ text-align: center;
129
+ text-shadow: 0 0.125rem 0.4rem #000;
130
+ background: linear-gradient(180deg, transparent, #000b);
131
+ }
132
+ .ad-theme-card-caption > strong {
133
+ font-size: 1em;
134
+ line-height: 1.2;
135
+ overflow-wrap: anywhere;
136
+ }
137
+ .ad-theme-card-caption::after {
138
+ content: "";
139
+ width: 20%;
140
+ height: 0.125rem;
141
+ margin-top: 0.15rem;
142
+ border-radius: 1rem;
143
+ background: var(--ad-theme-card);
144
+ box-shadow: 0 0 0.7rem var(--ad-theme-card);
110
145
  }
111
146
  .ad-theme-card-caption > span {
112
- color: var(--ad-muted);
147
+ color: #fffd;
113
148
  font-size: var(--ad-font-size-caption);
114
149
  text-align: center;
115
150
  }
@@ -1,14 +1,20 @@
1
1
  import { type ComponentType, type ReactNode } from "react";
2
2
  import { type GridResponsive } from "../../layout/Grid/Grid";
3
- export type FieldKind = "text" | "number" | "textarea" | "select" | "autocomplete" | "checkbox" | "switch" | "color" | "date" | "file" | "people" | "slider" | "rotary" | "tags";
4
- export interface FormFieldDefinition<T extends Record<string, unknown> = Record<string, unknown>> {
3
+ import { type FormApi } from "../Form/Form";
4
+ export type FieldKind = "text" | "number" | "textarea" | "select" | "autocomplete" | "checkbox" | "switch" | "color" | "date" | "file" | "people" | "slider" | "rotary" | "tags" | "theme" | "toggle" | "segmented" | "tabs" | "custom";
5
+ export type FormFieldDefinition<T extends Record<string, unknown> = Record<string, unknown>> = {
5
6
  name: string;
6
- kind?: FieldKind;
7
7
  label?: ReactNode;
8
8
  span?: GridResponsive<number | "full">;
9
9
  showWhen?: (values: T) => boolean;
10
10
  props?: Record<string, unknown>;
11
- }
11
+ } & ({
12
+ kind: "custom";
13
+ render: (field: ReturnType<FormApi<T>["field"]>, form: FormApi<T>) => ReactNode;
14
+ } | {
15
+ kind?: Exclude<FieldKind, "custom">;
16
+ render?: never;
17
+ });
12
18
  export type FieldRegistry = Record<string, ComponentType<any>>;
13
19
  export declare const defaultFieldRegistry: FieldRegistry;
14
20
  export interface FormFieldsProps<T extends Record<string, unknown>> {
@@ -12,6 +12,9 @@
12
12
  grid-row-end: span 4;
13
13
  grid-template-rows: subgrid;
14
14
  }
15
+ .ad-form-field[data-custom] {
16
+ display: block;
17
+ }
15
18
  .ad-form-field > * {
16
19
  grid-row: 2;
17
20
  align-self: center;
@@ -44,7 +47,8 @@
44
47
  align-self: start;
45
48
  margin-block-start: calc(var(--ad-space-1) * 1.5);
46
49
  }
47
- .ad-form-field > :has(> .ad-field) > :not(.ad-field) {
50
+ .ad-form-field > * > .ad-field ~ :not(.ad-field),
51
+ .ad-form-field > * > :not(.ad-field):has(~ .ad-field) {
48
52
  grid-row: 4;
49
53
  }
50
54
  }
@@ -15,14 +15,14 @@ export interface LoaderGeneratorProps extends CommonProps {
15
15
  defaultValue?: Partial<LoaderSettings>;
16
16
  onValueChange?: (settings: LoaderSettings) => void;
17
17
  }
18
- export declare const loaderGeneratorAnimations: ("flip" | "fill" | "wave" | "palette" | "pulse" | "spin" | "breathe" | "bounce" | "glow" | "shine" | "wobble")[];
18
+ export declare const loaderGeneratorAnimations: ("flip" | "fill" | "wave" | "palette" | "glow" | "pulse" | "spin" | "breathe" | "bounce" | "shine" | "wobble")[];
19
19
  export declare const loaderSizes: {
20
20
  readonly xs: 4.5;
21
21
  readonly sm: 6.5;
22
22
  readonly md: 9;
23
23
  readonly lg: 12;
24
24
  };
25
- export declare const loaderRenderKey: ({ animation }: Pick<LoaderSettings, "animation">) => "flip" | "fill" | "wave" | "palette" | "pulse" | "spin" | "breathe" | "bounce" | "orbit" | "glow" | "shine" | "wobble" | "radar";
25
+ export declare const loaderRenderKey: ({ animation }: Pick<LoaderSettings, "animation">) => "flip" | "fill" | "wave" | "palette" | "glow" | "pulse" | "spin" | "breathe" | "bounce" | "orbit" | "shine" | "wobble" | "radar";
26
26
  /** Removes large, smoothly connected background regions while preserving enclosed logo details. */
27
27
  export declare function removeBackgroundPixels(pixels: Uint8ClampedArray, width: number, height: number, signal?: AbortSignal): Promise<Uint8ClampedArray<ArrayBufferLike>>;
28
28
  /** Finds a representative visible colour for rings, highlights and image glow. */
package/dist/core.d.ts CHANGED
@@ -2,7 +2,7 @@ export { ThemeProvider, themes, } from "./components/foundation/ThemeProvider/Th
2
2
  export type { ThemeName, ThemeProviderProps, } from "./components/foundation/ThemeProvider/ThemeProvider";
3
3
  export { useReducedMotion, useMotion } from "./core/providers/context";
4
4
  export { useBorder, usePauseOffscreen, useTick, useDecoration, useSmoothWheel, useTabShape, } from "./core/motion/hooks";
5
- export { getMotionStats, setMotionFrameRate, subscribeTick } from "./core/motion-engine.js";
5
+ export { getMotionStats, refreshMotion, setMotionFrameRate, subscribeTick } from "./core/motion-engine.js";
6
6
  export { LocaleProvider, addMessages, getLocale, plural, setLocale, tr, translate, useLocale, useTr } from "./core/i18n";
7
7
  export type { Locale, LocaleProviderProps, Messages } from "./core/i18n";
8
8
  export { messages as builtInMessages } from "./core/messages";
package/dist/core.js CHANGED
@@ -1,18 +1,17 @@
1
1
  import {
2
2
  ThemeProvider,
3
- themes
4
- } from "./chunks/chunk-JZ4GDTH5.js";
5
- import {
6
3
  getMotionStats,
4
+ refreshMotion,
7
5
  setMotionFrameRate,
8
6
  subscribeTick,
7
+ themes,
9
8
  useBorder,
10
9
  useDecoration,
11
10
  usePauseOffscreen,
12
11
  useSmoothWheel,
13
12
  useTabShape,
14
13
  useTick
15
- } from "./chunks/chunk-YKCUOZ7V.js";
14
+ } from "./chunks/chunk-ICRXRGIW.js";
16
15
  import {
17
16
  LocaleProvider,
18
17
  addMessages,
@@ -37,6 +36,7 @@ export {
37
36
  getLocale,
38
37
  getMotionStats,
39
38
  plural,
39
+ refreshMotion,
40
40
  setLocale,
41
41
  setMotionFrameRate,
42
42
  subscribeTick,
package/dist/forms.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  defaultFieldRegistry,
5
5
  useForm,
6
6
  useFormContext
7
- } from "./chunks/chunk-RHMNSDIW.js";
8
- import "./chunks/chunk-YKCUOZ7V.js";
7
+ } from "./chunks/chunk-TAQHE3C5.js";
8
+ import "./chunks/chunk-ICRXRGIW.js";
9
9
  import "./chunks/chunk-BJSFN52W.js";
10
10
  import "./chunks/chunk-FCOU3ODR.js";
11
11
  export {
package/dist/index.d.ts CHANGED
@@ -151,7 +151,7 @@ export { WaveDecoration } from "./components/media/WaveDecoration/WaveDecoration
151
151
  export { Waveform } from "./components/media/Waveform/Waveform";
152
152
  export { useWaveformPeaks } from "./components/media/Waveform/useWaveformPeaks";
153
153
  export * from "./components/media/shared";
154
- export { getMotionStats, setMotionFrameRate, subscribeTick } from "./core/motion-engine.js";
154
+ export { getMotionStats, refreshMotion, setMotionFrameRate, subscribeTick } from "./core/motion-engine.js";
155
155
  export { Router, useRouter, matchRoute, } from "./components/navigation/Router/Router";
156
156
  export type { RouterProps, RouterValue, RouteDefinition, RouteMatch, RouteAccessContext, } from "./components/navigation/Router/Router";
157
157
  export { Form, useForm, useFormContext } from "./components/forms/Form/Form";