@llmnative/react 1.12.0 → 1.14.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/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +760 -746
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/Theme.d.ts +15 -0
- package/dist/types/src/components/ui/fields/CodeEditor.d.ts +12 -0
- package/package.json +1 -1
- package/themes/cyber.ts +5 -0
- package/themes/default.ts +5 -0
- package/themes/flat.ts +5 -0
|
@@ -147,6 +147,20 @@ export interface GalleryTheme {
|
|
|
147
147
|
gap?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
148
148
|
rowCols?: 1 | 2 | 3 | 4 | 6;
|
|
149
149
|
}
|
|
150
|
+
export interface RepeatTheme {
|
|
151
|
+
/** Extra classes merged (via twMerge — later wins on conflicting utilities) onto the
|
|
152
|
+
* per-item shell of every `Repeat`, on top of its hardcoded default (rounded card + border).
|
|
153
|
+
* Applies app-wide to every `Repeat`, regardless of `layout`. */
|
|
154
|
+
itemClassName?: string;
|
|
155
|
+
/** Same as `itemClassName`, but only for `layout="inline"` — merged AFTER `itemClassName`, so
|
|
156
|
+
* it wins on any conflicting utility. Lets a consumer keep the bordered/carded look for
|
|
157
|
+
* `horizontal`/`vertical` repeats (e.g. content list fields) while flattening only the compact
|
|
158
|
+
* inline ones (e.g. inline chip-like rows nested inside an already-bordered popover/card). */
|
|
159
|
+
inlineItemClassName?: string;
|
|
160
|
+
/** Extra classes merged onto the "Add" button rendered when `label` + `labelPosition="bottom"`
|
|
161
|
+
* are set. */
|
|
162
|
+
addButtonClassName?: string;
|
|
163
|
+
}
|
|
150
164
|
export interface ModalTheme {
|
|
151
165
|
size?: "sm" | "md" | "lg" | "xl" | "fullscreen";
|
|
152
166
|
position?: "center" | "top" | "left" | "right" | "bottom";
|
|
@@ -348,6 +362,7 @@ export interface ThemeConfig {
|
|
|
348
362
|
wrapperClassName?: string;
|
|
349
363
|
className?: string;
|
|
350
364
|
};
|
|
365
|
+
Repeat?: RepeatTheme;
|
|
351
366
|
}
|
|
352
367
|
type DeepRequired<T> = {
|
|
353
368
|
[K in keyof T]-?: NonNullable<T[K]> extends (...args: unknown[]) => unknown ? NonNullable<T[K]> : NonNullable<T[K]> extends object ? DeepRequired<NonNullable<T[K]>> : NonNullable<T[K]>;
|
|
@@ -42,6 +42,18 @@ export interface CodeEditorProps extends FormFieldProps {
|
|
|
42
42
|
feedback?: string;
|
|
43
43
|
labelClassName?: string;
|
|
44
44
|
validateSyntax?: boolean;
|
|
45
|
+
/** Overrides the built-in `language`-based syntax check used by `validateSyntax` — for a
|
|
46
|
+
* consumer whose content embeds a foreign template syntax inside `language` (e.g. Liquid
|
|
47
|
+
* tags inside a `'css'` block: `.x { color: {{ tone | default: "#000" }}; }`). The stock
|
|
48
|
+
* single-language parser has no notion of the embedded syntax and false-positives on it
|
|
49
|
+
* (a `|` filter pipe isn't valid CSS). Receives the current raw value and must return the
|
|
50
|
+
* same shape as `getCodeValidationResult`; typically that means running the embedded
|
|
51
|
+
* syntax's OWN parser (e.g. Liquid via `getCodeValidationResult(code, 'liquid')`, which
|
|
52
|
+
* only inspects `{{ }}`/`{% %}` tags and ignores surrounding text) plus the base language's
|
|
53
|
+
* parser against a copy with the foreign tags masked out (same length, so reported
|
|
54
|
+
* line/column stay accurate) — see `getCodeValidationResult`. Omit to keep the default
|
|
55
|
+
* `language`-only check unchanged. */
|
|
56
|
+
validate?: (code: string) => Promise<CodeValidationResult>;
|
|
45
57
|
validator?: (value: FieldValue) => string | undefined | Promise<string | undefined>;
|
|
46
58
|
extensions?: unknown[];
|
|
47
59
|
commands?: EditorCommand[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
package/themes/cyber.ts
CHANGED
|
@@ -468,6 +468,11 @@ export const components: Theme = {
|
|
|
468
468
|
wrapperClassName: '',
|
|
469
469
|
className: '',
|
|
470
470
|
},
|
|
471
|
+
Repeat: {
|
|
472
|
+
itemClassName: '',
|
|
473
|
+
inlineItemClassName: '',
|
|
474
|
+
addButtonClassName: '',
|
|
475
|
+
},
|
|
471
476
|
};
|
|
472
477
|
|
|
473
478
|
const definition: ThemeDefinition = { preset, motion, components };
|
package/themes/default.ts
CHANGED
|
@@ -482,6 +482,11 @@ export const components: Theme = {
|
|
|
482
482
|
wrapperClassName: '',
|
|
483
483
|
className: '',
|
|
484
484
|
},
|
|
485
|
+
Repeat: {
|
|
486
|
+
itemClassName: '',
|
|
487
|
+
inlineItemClassName: '',
|
|
488
|
+
addButtonClassName: '',
|
|
489
|
+
},
|
|
485
490
|
};
|
|
486
491
|
|
|
487
492
|
const definition: ThemeDefinition = { preset, motion, components };
|
package/themes/flat.ts
CHANGED
|
@@ -468,6 +468,11 @@ export const components: Theme = {
|
|
|
468
468
|
wrapperClassName: '',
|
|
469
469
|
className: '',
|
|
470
470
|
},
|
|
471
|
+
Repeat: {
|
|
472
|
+
itemClassName: '',
|
|
473
|
+
inlineItemClassName: '',
|
|
474
|
+
addButtonClassName: '',
|
|
475
|
+
},
|
|
471
476
|
};
|
|
472
477
|
|
|
473
478
|
const definition: ThemeDefinition = { preset, motion, components };
|