@axzydev/axzy_ui_system 1.7.3 → 1.8.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.cjs +1845 -721
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +386 -15
- package/dist/index.d.ts +386 -15
- package/dist/index.js +1532 -418
- package/dist/index.js.map +1 -1
- package/dist/layered.css +1 -1
- package/package.json +4 -2
- package/src/App.tsx +6 -8
- package/src/components/atoms/button/button.tsx +7 -0
- package/src/components/atoms/flex/flex.props.ts +3 -1
- package/src/components/atoms/flex/flex.tsx +11 -3
- package/src/components/atoms/input/input.tsx +5 -0
- package/src/components/atoms/segmented-control/segmented-control.tsx +22 -5
- package/src/components/atoms/textarea/textarea.props.ts +4 -0
- package/src/components/atoms/textarea/textarea.tsx +13 -3
- package/src/components/molecules/card/card.props.ts +14 -0
- package/src/components/molecules/card/card.tsx +66 -23
- package/src/components/molecules/chip-input/chip-input.tsx +2 -0
- package/src/components/molecules/line-bar-chart/line-bar-chart.props.ts +4 -0
- package/src/components/molecules/line-bar-chart/line-bar-chart.tsx +57 -41
- package/src/components/molecules/multi-select/multi-select.tsx +2 -0
- package/src/components/molecules/tabs/tabs.tsx +22 -8
- package/src/components/organisms/dropfile/dropfile.props.ts +8 -2
- package/src/components/organisms/dropfile/dropfile.tsx +17 -0
- package/src/components/organisms/page-header/page-header.tsx +22 -6
- package/src/components/organisms/sidebar/sidebar.tsx +8 -5
- package/src/components/organisms/topbar/topbar.props.ts +2 -0
- package/src/components/organisms/topbar/topbar.tsx +56 -34
- package/src/components/templates/layout/layout.tsx +3 -2
- package/src/components/theme-provider/themeProvider.props.ts +1 -1
- package/src/components/theme-provider/themeProvider.tsx +54 -1
- package/src/i18n/locales/en.ts +7 -0
- package/src/i18n/locales/es.ts +7 -0
- package/src/index.ts +35 -7
- package/src/json-renderer/actions/effects.test.tsx +115 -0
- package/src/json-renderer/actions/effects.ts +291 -0
- package/src/json-renderer/actions/effectsChain.test.ts +117 -0
- package/src/json-renderer/binding/binding.test.tsx +168 -0
- package/src/json-renderer/binding/resolveValue.ts +193 -0
- package/src/json-renderer/catalog/axzyCatalog.ts +5 -0
- package/src/json-renderer/estado-acciones.test.tsx +166 -0
- package/src/json-renderer/form/FormNode.tsx +92 -0
- package/src/json-renderer/form/form.test.tsx +148 -0
- package/src/json-renderer/form/formLength.test.tsx +99 -0
- package/src/json-renderer/form/rules.ts +162 -0
- package/src/json-renderer/index.ts +21 -0
- package/src/json-renderer/kernel/SchemaRenderer.tsx +83 -7
- package/src/json-renderer/kernel/capabilities.ts +30 -0
- package/src/json-renderer/kernel/renderNode.tsx +256 -3
- package/src/json-renderer/kernel/schemaRenderer.props.ts +29 -3
- package/src/json-renderer/kernel/slots.test.tsx +104 -0
- package/src/json-renderer/kernel/slots.ts +34 -0
- package/src/json-renderer/kernel/types.ts +4 -0
- package/src/json-renderer/routing/match.ts +82 -0
- package/src/json-renderer/routing/navigation.ts +71 -0
- package/src/json-renderer/routing/routes.ts +179 -0
- package/src/json-renderer/routing/routing.test.ts +147 -0
- package/src/json-renderer/seguridad.test.tsx +299 -0
- package/src/json-renderer/shared/errors.ts +1 -0
- package/src/json-renderer/stream/tolerantParse.ts +5 -0
- package/src/json-renderer/stream/useSchemaStream.test.tsx +143 -0
- package/src/json-renderer/stream/useSchemaStream.ts +227 -0
- package/src/json-renderer/validation/jsonSchema.test.ts +105 -0
- package/src/json-renderer/validation/jsonSchema.ts +317 -0
- package/src/json-renderer/validation/validate.ts +17 -0
- package/src/sandbox/axzyConfig.test.ts +4 -0
- package/src/sandbox/axzyConfig.ts +1 -1
- package/src/sandbox/i18n.ts +44 -0
- package/src/sandbox/useHashRoute.ts +2 -1
- package/src/showcases/DemoJsonDashboard.tsx +218 -103
- package/src/showcases/DemoJsonDocs.tsx +11 -11
- package/src/showcases/FeedbackShowcases.tsx +2 -1
- package/src/showcases/JsonScreenShowcase.tsx +43 -53
- package/src/showcases/StructureShowcases.tsx +17 -2
- package/src/showcases/demoApp/demoJson.test.tsx +241 -0
- package/src/showcases/demoApp/routes.test.ts +63 -0
- package/src/showcases/demoApp/schemas.test.ts +6 -17
- package/src/theme/theme-context.ts +10 -2
- package/src/theme/theme.ts +1 -1
- package/src/theme/theme.types.ts +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { CSSProperties, RefObject, ReactNode, ElementType, ChangeEvent, FocusEvent, KeyboardEvent, HTMLAttributes } from 'react';
|
|
3
|
+
import React__default, { CSSProperties, RefObject, ReactNode, ElementType, UIEvent, ChangeEvent, FocusEvent, KeyboardEvent, HTMLAttributes, ComponentType } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { Locale } from 'date-fns';
|
|
6
6
|
|
|
@@ -758,11 +758,17 @@ interface ITCalendarProps {
|
|
|
758
758
|
*/
|
|
759
759
|
declare const ITCalendar: React__default.FC<ITCalendarProps>;
|
|
760
760
|
|
|
761
|
+
/** Pastel tint applied to a card through the `--color-<tone>-soft` token. */
|
|
762
|
+
type ITCardTone = "primary" | "secondary" | "ternary" | "success" | "info" | "warning" | "danger";
|
|
761
763
|
interface ITCardProps {
|
|
764
|
+
/** Pastel tile: tints the card background with the `--color-<tone>-soft` token of the palette, overriding the default white surface. In `soft`/`flat` appearances it also uses `--color-<tone>-soft-border` for the border; in `bento` the card stays borderless. Works in every appearance and in dark mode. Omit it for the regular surface. */
|
|
765
|
+
tone?: ITCardTone;
|
|
762
766
|
/** Click handler. When provided, the card becomes interactive with hover shadow effect. */
|
|
763
767
|
onClick?: () => void;
|
|
764
768
|
/** Card title displayed in the header area. */
|
|
765
769
|
title?: string;
|
|
770
|
+
/** Optional actions rendered at the right of the title row (e.g. a play button). */
|
|
771
|
+
headerActions?: React.ReactNode;
|
|
766
772
|
/** Image source URL displayed at the top of the card. */
|
|
767
773
|
image?: string;
|
|
768
774
|
/** Alt text for the card image. @default "Card Image" */
|
|
@@ -784,7 +790,8 @@ interface ITCardProps {
|
|
|
784
790
|
}
|
|
785
791
|
|
|
786
792
|
/**
|
|
787
|
-
* Versatile card container with optional image, title, body content, and action footer. Supports interactive hover states
|
|
793
|
+
* Versatile card container with optional image, title, body content, and action footer. Supports interactive hover states
|
|
794
|
+
* and pastel `tone` tiles. Follows the provider `appearance` (`soft`, `flat`, `bento`).
|
|
788
795
|
*
|
|
789
796
|
* @example
|
|
790
797
|
* <ITCard title="Welcome" image="/hero.jpg" actions={<ITButton label="Learn more" />}>
|
|
@@ -792,11 +799,14 @@ interface ITCardProps {
|
|
|
792
799
|
* </ITCard>
|
|
793
800
|
*
|
|
794
801
|
* @example
|
|
802
|
+
* <ITCard tone="success" title="Revenue">+12.4%</ITCard>
|
|
803
|
+
*
|
|
804
|
+
* @example
|
|
795
805
|
* <ITCard onClick={() => {}} className="max-w-sm">
|
|
796
806
|
* Clickable card with hover shadow.
|
|
797
807
|
* </ITCard>
|
|
798
808
|
*/
|
|
799
|
-
declare function ITCard({ title, image, alt, children, actions, className, imageClassName, titleClassName, contentClassName, actionClassName, onClick, }: ITCardProps): react_jsx_runtime.JSX.Element;
|
|
809
|
+
declare function ITCard({ title, tone, headerActions, image, alt, children, actions, className, imageClassName, titleClassName, contentClassName, actionClassName, onClick, }: ITCardProps): react_jsx_runtime.JSX.Element;
|
|
800
810
|
|
|
801
811
|
interface ITCheckboxProps {
|
|
802
812
|
/** Controlled checked state. @default false */
|
|
@@ -1892,6 +1902,8 @@ interface ITFlexProps {
|
|
|
1892
1902
|
as?: ElementType;
|
|
1893
1903
|
/** Click handler */
|
|
1894
1904
|
onClick?: (e: React.MouseEvent) => void;
|
|
1905
|
+
/** Scroll handler (useful for scrollable chat/log panels) */
|
|
1906
|
+
onScroll?: (e: UIEvent<HTMLElement>) => void;
|
|
1895
1907
|
}
|
|
1896
1908
|
|
|
1897
1909
|
/**
|
|
@@ -1909,7 +1921,7 @@ interface ITFlexProps {
|
|
|
1909
1921
|
* <main>Content</main>
|
|
1910
1922
|
* </ITFlex>
|
|
1911
1923
|
*/
|
|
1912
|
-
declare
|
|
1924
|
+
declare const ITFlex: React$1.ForwardRefExoticComponent<ITFlexProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1913
1925
|
|
|
1914
1926
|
/** @deprecated Legacy (V1) field definition consumed by `ITFormBuilder`'s `fields` prop. Prefer `FieldConfigV2` via the `config` prop for new forms. */
|
|
1915
1927
|
interface FieldConfig {
|
|
@@ -3547,6 +3559,10 @@ interface ITLineBarChartProps {
|
|
|
3547
3559
|
lineColor?: string;
|
|
3548
3560
|
/** Color de las barras. */
|
|
3549
3561
|
barColor?: string;
|
|
3562
|
+
/** Muestra la serie de línea. @default true */
|
|
3563
|
+
showLine?: boolean;
|
|
3564
|
+
/** Muestra la serie de barras. @default true */
|
|
3565
|
+
showBars?: boolean;
|
|
3550
3566
|
height?: number;
|
|
3551
3567
|
/** Formatea los valores del tooltip; por defecto número con separadores. */
|
|
3552
3568
|
formatValue?: (value: number) => string;
|
|
@@ -3562,7 +3578,7 @@ interface ITLineBarChartProps {
|
|
|
3562
3578
|
* el cursor. El SVG escala con `viewBox`, así que el trazo y el texto no se
|
|
3563
3579
|
* deforman al cambiar el ancho del contenedor.
|
|
3564
3580
|
*/
|
|
3565
|
-
declare function ITLineBarChart({ data, ariaLabel, lineLabel, barLabel, lineColor, barColor, height, formatValue, formatAxis, className, }: ITLineBarChartProps): react_jsx_runtime.JSX.Element;
|
|
3581
|
+
declare function ITLineBarChart({ data, ariaLabel, lineLabel, barLabel, lineColor, barColor, showLine, showBars, height, formatValue, formatAxis, className, }: ITLineBarChartProps): react_jsx_runtime.JSX.Element;
|
|
3566
3582
|
|
|
3567
3583
|
/**
|
|
3568
3584
|
* A feature-rich data table with per-column filtering, sortable columns,
|
|
@@ -3632,6 +3648,10 @@ interface ITTextareaProps {
|
|
|
3632
3648
|
maxLength?: number;
|
|
3633
3649
|
/** Resize behavior of the textarea: "none" | "vertical" | "horizontal" | "both". */
|
|
3634
3650
|
resize?: "none" | "vertical" | "horizontal" | "both";
|
|
3651
|
+
/** Keydown handler (e.g. Enter to send in a chat composer). */
|
|
3652
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
3653
|
+
/** Autofocus the textarea. */
|
|
3654
|
+
autoFocus?: boolean;
|
|
3635
3655
|
}
|
|
3636
3656
|
|
|
3637
3657
|
/**
|
|
@@ -3650,7 +3670,7 @@ interface ITTextareaProps {
|
|
|
3650
3670
|
* error={bio.length > 500 ? "Max 500 characters" : undefined}
|
|
3651
3671
|
* />
|
|
3652
3672
|
*/
|
|
3653
|
-
declare
|
|
3673
|
+
declare const ITTextarea: React$1.ForwardRefExoticComponent<ITTextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
3654
3674
|
|
|
3655
3675
|
interface ITTabItem {
|
|
3656
3676
|
/** Unique identifier for the tab. */
|
|
@@ -3682,6 +3702,7 @@ interface ITTabsProps {
|
|
|
3682
3702
|
/**
|
|
3683
3703
|
* Tabbed navigation component with "line" and "pill" visual variants.
|
|
3684
3704
|
* Manages its own active state internally via a defaultActiveId.
|
|
3705
|
+
* With `appearance="bento"` the "pill" variant becomes a rounded track with an ink active pill.
|
|
3685
3706
|
*
|
|
3686
3707
|
* @example
|
|
3687
3708
|
* <ITTabs
|
|
@@ -4044,7 +4065,7 @@ declare function getExclusionReason(catalog: Catalog, type: string): string | un
|
|
|
4044
4065
|
/** Gravedad de un aviso del motor. */
|
|
4045
4066
|
type JsonEngineSeverity = "error" | "warning" | "info";
|
|
4046
4067
|
/** Códigos de aviso del motor. Contrato estable. */
|
|
4047
|
-
type JsonEngineCode = "JR010" | "JR011" | "JR012" | "JR013" | "JR014" | "JR020" | "JR021" | "JR030" | "JR031" | "JR040" | "JR041" | "JR042" | "JR050" | "JR060" | "JR061" | "JR070" | "JR080" | "JR081";
|
|
4068
|
+
type JsonEngineCode = "JR010" | "JR011" | "JR012" | "JR013" | "JR014" | "JR020" | "JR021" | "JR030" | "JR031" | "JR032" | "JR040" | "JR041" | "JR042" | "JR050" | "JR060" | "JR061" | "JR070" | "JR080" | "JR081";
|
|
4048
4069
|
/** Aviso del motor: lo que pasó, dónde y qué hacer. */
|
|
4049
4070
|
interface JsonEngineIssue {
|
|
4050
4071
|
/** Código estable (`JR010`…). */
|
|
@@ -4221,6 +4242,10 @@ interface EffectSchema {
|
|
|
4221
4242
|
openOverlay?: string;
|
|
4222
4243
|
/** Cierra el overlay indicado, o el que esté abierto si se omite. */
|
|
4223
4244
|
closeOverlay?: string;
|
|
4245
|
+
/** Escribe en el estado de la pantalla: `{ "clave": valor }`. Los valores admiten referencias. */
|
|
4246
|
+
set?: Record<string, SchemaValue>;
|
|
4247
|
+
/** Capacidad que exige la acción. Sin concesión, la acción no se ejecuta (`JR061`). */
|
|
4248
|
+
requires?: string | string[];
|
|
4224
4249
|
/** Refresca una fuente de datos. */
|
|
4225
4250
|
refresh?: string;
|
|
4226
4251
|
}
|
|
@@ -4294,6 +4319,119 @@ interface ScreenSchema {
|
|
|
4294
4319
|
content: NodeSchema | NodeSchema[];
|
|
4295
4320
|
}
|
|
4296
4321
|
|
|
4322
|
+
/**
|
|
4323
|
+
* Binding mínimo del motor: resuelve las referencias declarativas del esquema
|
|
4324
|
+
* (`$source`, `$state`, `$param`) antes de pintar cada prop.
|
|
4325
|
+
*
|
|
4326
|
+
* Solo lee y nunca hace red. Una fuente es un **loader**: el componente lo invoca
|
|
4327
|
+
* cuando necesita datos (una tabla, al paginar o filtrar) y la función que lo
|
|
4328
|
+
* atiende es un `handler` que registra el host por nombre. El esquema no puede
|
|
4329
|
+
* nombrar una URL ni un endpoint.
|
|
4330
|
+
*
|
|
4331
|
+
* Escribir estado llega con las acciones (fase 5); `$row` y `$form` llegan con las
|
|
4332
|
+
* tablas y los formularios (fase 8). Hasta entonces avisan con `JR032`.
|
|
4333
|
+
*/
|
|
4334
|
+
|
|
4335
|
+
/**
|
|
4336
|
+
* Handler que registra el host. Recibe la query que pide el componente (por ejemplo,
|
|
4337
|
+
* página y filtros de una tabla) y los parámetros declarados en la fuente.
|
|
4338
|
+
*/
|
|
4339
|
+
type DataHandler = (query: unknown, params: Record<string, SchemaValue>) => unknown;
|
|
4340
|
+
/** Función de carga que recibe el componente. Siempre devuelve una promesa. */
|
|
4341
|
+
type DataLoader = (query?: unknown) => Promise<unknown>;
|
|
4342
|
+
/** Lo que el binding necesita del esquema, del host y del render en curso. */
|
|
4343
|
+
interface BindingScope {
|
|
4344
|
+
/** Fuentes declaradas por la pantalla (`ScreenSchema.data`). */
|
|
4345
|
+
data?: Record<string, DataSourceSchema>;
|
|
4346
|
+
/** Estado inicial de la pantalla (`ScreenSchema.state`). */
|
|
4347
|
+
state?: Record<string, SchemaValue>;
|
|
4348
|
+
/** Parámetros de la ruta, aportados por el host (`$param`). */
|
|
4349
|
+
params?: Record<string, SchemaValue>;
|
|
4350
|
+
/** Handlers que registra el host, por nombre. */
|
|
4351
|
+
handlers?: Record<string, DataHandler>;
|
|
4352
|
+
/** Recibe los avisos del binding (`JR030`, `JR032`). */
|
|
4353
|
+
report: (aviso: JsonEngineIssue) => void;
|
|
4354
|
+
/** Resuelve el resto de valores (por ejemplo, textos `{ i18n }`). Lo aporta el host. */
|
|
4355
|
+
host?: (value: unknown, path: SchemaPath) => unknown;
|
|
4356
|
+
}
|
|
4357
|
+
/** Resolutor de valores que consume el kernel al pintar cada prop. */
|
|
4358
|
+
type BindingResolver = (value: unknown, path: SchemaPath) => unknown;
|
|
4359
|
+
/**
|
|
4360
|
+
* Crea el resolutor de valores de una pantalla.
|
|
4361
|
+
*
|
|
4362
|
+
* Las referencias se resuelven aquí; el resto de valores pasa al `host`. Los
|
|
4363
|
+
* loaders de fuente no llaman a ningún handler hasta que el componente los invoca.
|
|
4364
|
+
*
|
|
4365
|
+
* @example
|
|
4366
|
+
* const resolve = createBindingResolver({
|
|
4367
|
+
* data: { usuarios: { handler: "usuarios" } },
|
|
4368
|
+
* handlers: { usuarios: (query) => fetchUsuarios(query) },
|
|
4369
|
+
* report: (aviso) => issues.push(aviso),
|
|
4370
|
+
* });
|
|
4371
|
+
* resolve({ $source: "usuarios" }, ["content", 0]); // loader (no se llama aún)
|
|
4372
|
+
*/
|
|
4373
|
+
declare function createBindingResolver(scope: BindingScope): BindingResolver;
|
|
4374
|
+
|
|
4375
|
+
/**
|
|
4376
|
+
* Slots: bloques que registra el **host** y el esquema solo nombra.
|
|
4377
|
+
*
|
|
4378
|
+
* Un nodo `{ "type": "slot", "props": { "name": "…", … } }` monta el componente que
|
|
4379
|
+
* el host registró con ese nombre en `slots`. El esquema no puede elegir el
|
|
4380
|
+
* componente ni inyectar código: solo pasa valores (ya resueltos por el binding)
|
|
4381
|
+
* como props. Es la vía para reutilizar pantallas JSX existentes dentro de un JSON.
|
|
4382
|
+
*
|
|
4383
|
+
* Los slots no están en el catálogo: son autoridad del host, igual que los handlers
|
|
4384
|
+
* de datos. Un nombre que el host no registró avisa con `JR010` y no se pinta nada.
|
|
4385
|
+
*/
|
|
4386
|
+
|
|
4387
|
+
/** Componente que el host registra como slot. Recibe los props del nodo ya resueltos. */
|
|
4388
|
+
type SlotComponent = ComponentType<Record<string, unknown>>;
|
|
4389
|
+
/** Slots que registra el host, por nombre. */
|
|
4390
|
+
type SlotRegistry = Record<string, SlotComponent>;
|
|
4391
|
+
|
|
4392
|
+
/**
|
|
4393
|
+
* Efectos de acción: lo que el esquema pide que pase después de una acción.
|
|
4394
|
+
*
|
|
4395
|
+
* Una acción declara su efecto en el JSON; el host decide cómo se cumple. El motor:
|
|
4396
|
+
*
|
|
4397
|
+
* - ejecuta el handler del host (la acción en sí);
|
|
4398
|
+
* - si termina bien, aplica `then` (y los efectos sueltos de la acción);
|
|
4399
|
+
* - si falla o rechaza, aplica `onError`.
|
|
4400
|
+
*
|
|
4401
|
+
* Los efectos (`toast`, `navigate`, `refresh`, `openOverlay`, `closeOverlay`) los
|
|
4402
|
+
* cumple el registro `effects` que pasa el host. Un efecto también puede ser otra
|
|
4403
|
+
* acción (`{ action, args, then, onError }`): el motor la resuelve con el handler del
|
|
4404
|
+
* host y aplica sus propios efectos. Como el JSON es finito, el encadenado termina;
|
|
4405
|
+
* `MAX_EFFECT_DEPTH` lo limita de todos modos (`JR042`).
|
|
4406
|
+
*
|
|
4407
|
+
* Los textos y rutas pueden leer el resultado del handler con `{ "$result": "campo" }`
|
|
4408
|
+
* o `{campo}` dentro de una dirección.
|
|
4409
|
+
*
|
|
4410
|
+
* Si el esquema pide un efecto que el host no implementa, o una acción encadenada que
|
|
4411
|
+
* no existe, el motor avisa al pintar (`JR040`), nunca al ejecutar.
|
|
4412
|
+
*
|
|
4413
|
+
* Sin `then`, `onError` ni efectos, el handler se devuelve tal cual: no cambia nada.
|
|
4414
|
+
*/
|
|
4415
|
+
|
|
4416
|
+
/** Variante de un aviso (`toast`). */
|
|
4417
|
+
type ToastVariant = "success" | "error" | "info" | "warning";
|
|
4418
|
+
/** Lo que el host implementa. Cada efecto es opcional: el motor avisa si falta uno que se usa. */
|
|
4419
|
+
interface EffectRegistry {
|
|
4420
|
+
/** Muestra un aviso al usuario. */
|
|
4421
|
+
toast?: (aviso: {
|
|
4422
|
+
variant: ToastVariant;
|
|
4423
|
+
message: string;
|
|
4424
|
+
}) => void;
|
|
4425
|
+
/** Navega a una dirección. */
|
|
4426
|
+
navigate?: (href: string) => void;
|
|
4427
|
+
/** Refresca una fuente de datos. */
|
|
4428
|
+
refresh?: (source: string) => void;
|
|
4429
|
+
/** Abre un overlay declarado. */
|
|
4430
|
+
openOverlay?: (name: string) => void;
|
|
4431
|
+
/** Cierra un overlay; sin nombre, el que esté abierto. */
|
|
4432
|
+
closeOverlay?: (name?: string) => void;
|
|
4433
|
+
}
|
|
4434
|
+
|
|
4297
4435
|
/**
|
|
4298
4436
|
* Props de `ITSchemaRenderer`.
|
|
4299
4437
|
*
|
|
@@ -4307,9 +4445,32 @@ interface ITJsonRenderEngineProps {
|
|
|
4307
4445
|
catalog?: Catalog;
|
|
4308
4446
|
/** Presupuesto de nodos, profundidad y tiempos. */
|
|
4309
4447
|
limits?: Partial<EngineLimits>;
|
|
4448
|
+
/** Valores de la ruta para `$param`. Los pone el host; el esquema no puede crearlos. */
|
|
4449
|
+
params?: Record<string, SchemaValue>;
|
|
4450
|
+
/**
|
|
4451
|
+
* Handlers de datos que registra el host, por nombre. Las fuentes de `data` los
|
|
4452
|
+
* referencian con `handler`. Conviene memoizarlo: cada fuente se resuelve contra él.
|
|
4453
|
+
*/
|
|
4454
|
+
dataHandlers?: Record<string, DataHandler>;
|
|
4455
|
+
/**
|
|
4456
|
+
* Bloques JSX que registra el host, por nombre. Un nodo `{ "type": "slot", "props": { "name": "…" } }`
|
|
4457
|
+
* monta el componente con ese nombre; el esquema no puede elegir otro.
|
|
4458
|
+
*/
|
|
4459
|
+
slots?: SlotRegistry;
|
|
4310
4460
|
/**
|
|
4311
|
-
*
|
|
4312
|
-
*
|
|
4461
|
+
* Efectos que cumple el host. Una acción con `then`, `onError` o efectos sueltos
|
|
4462
|
+
* los ejecuta después de su handler; `toast` y `navigate` son los más comunes.
|
|
4463
|
+
*/
|
|
4464
|
+
effects?: EffectRegistry;
|
|
4465
|
+
/**
|
|
4466
|
+
* Capacidades que concede el host (`["usuarios.leer", …]`). Un nodo o la pantalla que
|
|
4467
|
+
* declara `requires` solo se pinta si todas están concedidas; si no, avisa con `JR060`.
|
|
4468
|
+
* Sin esta prop, cualquier `requires` se deniega.
|
|
4469
|
+
*/
|
|
4470
|
+
capabilities?: readonly string[];
|
|
4471
|
+
/**
|
|
4472
|
+
* Resuelve los valores que no son referencias del motor (por ejemplo, textos
|
|
4473
|
+
* `{ i18n }`). Las referencias `$source`, `$state` y `$param` las resuelve el motor.
|
|
4313
4474
|
*/
|
|
4314
4475
|
resolveValue?: (value: unknown, path: SchemaPath) => unknown;
|
|
4315
4476
|
/**
|
|
@@ -4337,7 +4498,7 @@ interface ITJsonRenderEngineProps {
|
|
|
4337
4498
|
* @example
|
|
4338
4499
|
* <ITSchemaRenderer schema={schema} onIssue={(issue) => console.warn(issue.code, issue.path)} />
|
|
4339
4500
|
*/
|
|
4340
|
-
declare function ITSchemaRenderer({ schema, catalog, limits, resolveValue, resolveAction, pendingFallback, onIssue, className, }: ITJsonRenderEngineProps): react_jsx_runtime.JSX.Element;
|
|
4501
|
+
declare function ITSchemaRenderer({ schema, catalog, limits, params, dataHandlers, slots, effects, capabilities, resolveValue, resolveAction, pendingFallback, onIssue, className, }: ITJsonRenderEngineProps): react_jsx_runtime.JSX.Element;
|
|
4341
4502
|
|
|
4342
4503
|
/** Props de `NodeBoundary`. */
|
|
4343
4504
|
interface NodeBoundaryProps {
|
|
@@ -4391,6 +4552,18 @@ interface RenderNodeOptions {
|
|
|
4391
4552
|
resolveValue?: (value: unknown, path: SchemaPath) => unknown;
|
|
4392
4553
|
/** Resuelve el handler de una acción declarada. */
|
|
4393
4554
|
resolveAction?: (node: NodeSchema, prop: string, action: unknown, path: SchemaPath) => ((...args: unknown[]) => void) | undefined;
|
|
4555
|
+
/** Slots que registra el host. Un nodo `slot` monta el componente con su nombre. */
|
|
4556
|
+
slots?: SlotRegistry;
|
|
4557
|
+
/** Efectos que cumple el host (`toast`, `navigate`…) tras una acción. */
|
|
4558
|
+
effects?: EffectRegistry;
|
|
4559
|
+
/** Milisegundos que una acción puede tardar antes de considerarla colgada (`JR041`). */
|
|
4560
|
+
actionTimeoutMs?: number;
|
|
4561
|
+
/** Escribe en el estado de la pantalla (efecto `set`). */
|
|
4562
|
+
setState?: (cambios: Record<string, unknown>) => void;
|
|
4563
|
+
/** Capacidades que concede el host (para las acciones con `requires`). */
|
|
4564
|
+
capabilities?: readonly string[];
|
|
4565
|
+
/** Recibe los avisos que se producen fuera del render (por ejemplo, un timeout). */
|
|
4566
|
+
onIssue?: (aviso: JsonEngineIssue) => void;
|
|
4394
4567
|
/** Renderiza los hijos de un nodo (lo aporta el recorrido del árbol). */
|
|
4395
4568
|
renderChildren?: (node: NodeSchema, path: SchemaPath) => React__default.ReactNode;
|
|
4396
4569
|
/** Qué pintar mientras un nodo está pendiente (streaming). */
|
|
@@ -4440,6 +4613,148 @@ declare function auditTree(schema: ScreenSchema, limits: EngineLimits): TreeAudi
|
|
|
4440
4613
|
/** Cuenta los nodos pendientes de un esquema ya parseado. */
|
|
4441
4614
|
declare function countPendingNodes(schema: ScreenSchema | null): number;
|
|
4442
4615
|
|
|
4616
|
+
/**
|
|
4617
|
+
* Contrato de rutas declarativas: un `routes.json` describe qué pantalla pinta cada
|
|
4618
|
+
* dirección, con qué parámetros y query, y qué entradas aparecen en la navegación.
|
|
4619
|
+
*
|
|
4620
|
+
* Como el resto del motor, es entrada no confiable: no hay código ni URLs externas,
|
|
4621
|
+
* solo nombres de pantalla (`page`) que el host resuelve. Las rutas con `children`
|
|
4622
|
+
* son grupos (agrupan entradas de menú); solo las hojas se pueden pintar.
|
|
4623
|
+
*/
|
|
4624
|
+
|
|
4625
|
+
/** Entrada de menú asociada a una ruta. Sin `nav`, la ruta existe pero no se muestra. */
|
|
4626
|
+
interface RouteNavSchema {
|
|
4627
|
+
/** Texto de la entrada; admite `{ i18n }`. */
|
|
4628
|
+
label: SchemaValue;
|
|
4629
|
+
/** Nombre de icono del registro del host. */
|
|
4630
|
+
icon?: string;
|
|
4631
|
+
/** Contador visible junto a la entrada. */
|
|
4632
|
+
badge?: number | string;
|
|
4633
|
+
}
|
|
4634
|
+
/** Ruta tal como la escribe el JSON. */
|
|
4635
|
+
interface RouteSchema {
|
|
4636
|
+
/** Identificador estable: lo usa la navegación para marcar la entrada activa. */
|
|
4637
|
+
id: string;
|
|
4638
|
+
/**
|
|
4639
|
+
* Segmentos de la ruta, relativos al padre (`usuarios`, `:id`). Los hijos sin `path`
|
|
4640
|
+
* heredan el del padre. Las rutas raíz empiezan por `/`.
|
|
4641
|
+
*/
|
|
4642
|
+
path?: string;
|
|
4643
|
+
/** Pantalla JSON que pinta la ruta. Obligatoria en las hojas; prohibida en los grupos. */
|
|
4644
|
+
page?: string;
|
|
4645
|
+
/** Query que exige la ruta (`{ estado: "Activo" }`). Más claves = más específica. */
|
|
4646
|
+
query?: Record<string, string>;
|
|
4647
|
+
/** Entrada de menú. */
|
|
4648
|
+
nav?: RouteNavSchema;
|
|
4649
|
+
/** Rutas hijas. Si existen, la ruta es un grupo. */
|
|
4650
|
+
children?: RouteSchema[];
|
|
4651
|
+
}
|
|
4652
|
+
/** Documento de rutas completo. */
|
|
4653
|
+
interface RoutesSchema {
|
|
4654
|
+
/** Identificador del formato. */
|
|
4655
|
+
$schema?: "axzy/routes";
|
|
4656
|
+
/** Versión del formato. */
|
|
4657
|
+
version: number;
|
|
4658
|
+
/** Rutas raíz. */
|
|
4659
|
+
routes: RouteSchema[];
|
|
4660
|
+
}
|
|
4661
|
+
/** Ruta aplanada y lista para casarla: solo hojas, con su path completo. */
|
|
4662
|
+
interface FlatRoute {
|
|
4663
|
+
/** Identificador de la ruta. */
|
|
4664
|
+
id: string;
|
|
4665
|
+
/** Segmentos completos, sin barras (`["usuarios", ":id"]`). Vacío para la raíz. */
|
|
4666
|
+
segments: string[];
|
|
4667
|
+
/** Pantalla que pinta. */
|
|
4668
|
+
page: string;
|
|
4669
|
+
/** Query que exige la ruta. */
|
|
4670
|
+
query: Record<string, string>;
|
|
4671
|
+
/** Entrada de menú, si la tiene. */
|
|
4672
|
+
nav?: RouteNavSchema;
|
|
4673
|
+
/** Ids de los grupos a los que pertenece, de fuera a dentro. */
|
|
4674
|
+
groups: string[];
|
|
4675
|
+
}
|
|
4676
|
+
/** Une un path de padre con el propio y normaliza las barras. */
|
|
4677
|
+
declare function joinRoutePath(parent: string, own: unknown): string;
|
|
4678
|
+
/**
|
|
4679
|
+
* Valida un documento de rutas. Nunca lanza: devuelve los avisos con su código y su ruta.
|
|
4680
|
+
*
|
|
4681
|
+
* @example
|
|
4682
|
+
* validateRoutes({ version: 1, routes: [{ id: "inicio", path: "/inicio", page: "inicio" }] }); // []
|
|
4683
|
+
*/
|
|
4684
|
+
declare function validateRoutes(input: unknown): JsonEngineIssue[];
|
|
4685
|
+
/**
|
|
4686
|
+
* Aplana las rutas en hojas con su path completo. Asume un documento válido
|
|
4687
|
+
* (ver `validateRoutes`); las ramas sin `page` se descartan.
|
|
4688
|
+
*/
|
|
4689
|
+
declare function flattenRoutes(routes: RouteSchema[]): FlatRoute[];
|
|
4690
|
+
|
|
4691
|
+
/**
|
|
4692
|
+
* Casa una dirección (path + query) con una ruta declarada.
|
|
4693
|
+
*
|
|
4694
|
+
* Reglas, de más a menos específica:
|
|
4695
|
+
* 1. Más segmentos estáticos gana a un `:param` en la misma posición
|
|
4696
|
+
* (`/usuarios/nuevo` antes que `/usuarios/:id`).
|
|
4697
|
+
* 2. Con el mismo path, gana la ruta que exige más claves de query
|
|
4698
|
+
* (`?estado=Activo` antes que la ruta sin query).
|
|
4699
|
+
* 3. Empate: la primera declarada.
|
|
4700
|
+
*
|
|
4701
|
+
* Nunca lanza: una dirección que no casa devuelve `null`.
|
|
4702
|
+
*/
|
|
4703
|
+
|
|
4704
|
+
/** Resultado de casar una dirección. */
|
|
4705
|
+
interface RouteMatch {
|
|
4706
|
+
/** Ruta que casa. */
|
|
4707
|
+
route: FlatRoute;
|
|
4708
|
+
/** Valores de los `:param` de la ruta, por nombre (sin los dos puntos). */
|
|
4709
|
+
params: Record<string, string>;
|
|
4710
|
+
}
|
|
4711
|
+
/**
|
|
4712
|
+
* Busca la ruta que corresponde a una dirección.
|
|
4713
|
+
*
|
|
4714
|
+
* @example
|
|
4715
|
+
* matchRoute(flattenRoutes(routes), ["usuarios"], { estado: "Activo" })?.route.id; // "u-activos"
|
|
4716
|
+
*/
|
|
4717
|
+
declare function matchRoute(routes: FlatRoute[], segments: string[], query?: Record<string, string>): RouteMatch | null;
|
|
4718
|
+
/**
|
|
4719
|
+
* Dirección (`/usuarios/42?estado=Activo`) de una ruta, con sus `:param` rellenos.
|
|
4720
|
+
* Los `:param` sin valor se dejan tal cual para que se vean en el menú.
|
|
4721
|
+
*/
|
|
4722
|
+
declare function routeHref(route: FlatRoute, params?: Record<string, string>): string;
|
|
4723
|
+
|
|
4724
|
+
/**
|
|
4725
|
+
* Árbol de navegación derivado de `routes.json`.
|
|
4726
|
+
*
|
|
4727
|
+
* Solo entran las rutas con `nav`. Un grupo con `nav` se convierte en una entrada con
|
|
4728
|
+
* hijos y, como enlace, apunta a su primera hija con dirección. Un grupo sin `nav` no
|
|
4729
|
+
* aparece: sus hijos suben de nivel. El host decide cómo pintar el árbol (sidebar, top
|
|
4730
|
+
* bar…); el motor solo entrega la forma y las direcciones.
|
|
4731
|
+
*/
|
|
4732
|
+
|
|
4733
|
+
/** Entrada del árbol de navegación. */
|
|
4734
|
+
interface NavNode {
|
|
4735
|
+
/** Id de la ruta (o del grupo) de origen. */
|
|
4736
|
+
id: string;
|
|
4737
|
+
/** Texto de la entrada; puede ser una referencia `{ i18n }` que resuelve el host. */
|
|
4738
|
+
label: SchemaValue;
|
|
4739
|
+
/** Icono, tal como lo declara el JSON. */
|
|
4740
|
+
icon?: string;
|
|
4741
|
+
/** Contador de la entrada. */
|
|
4742
|
+
badge?: number | string;
|
|
4743
|
+
/** Dirección a la que lleva la entrada. Los grupos apuntan a su primera hija con dirección. */
|
|
4744
|
+
href?: string;
|
|
4745
|
+
/** Entradas hijas. Presentes solo en los grupos. */
|
|
4746
|
+
children?: NavNode[];
|
|
4747
|
+
}
|
|
4748
|
+
/**
|
|
4749
|
+
* Construye el árbol de navegación a partir de las rutas declaradas.
|
|
4750
|
+
*
|
|
4751
|
+
* @example
|
|
4752
|
+
* buildNavigationTree(routes.routes)[0]; // { id: "inicio", label: {...}, href: "/inicio" }
|
|
4753
|
+
*/
|
|
4754
|
+
declare function buildNavigationTree(routes: RouteSchema[]): NavNode[];
|
|
4755
|
+
/** `true` cuando la entrada, o alguno de sus hijos, es la ruta indicada. */
|
|
4756
|
+
declare function navContainsRoute(entry: NavNode, routeId: string): boolean;
|
|
4757
|
+
|
|
4443
4758
|
/** Entradas del catálogo por defecto. */
|
|
4444
4759
|
declare const AXZY_CATALOG_ENTRIES: CatalogEntry[];
|
|
4445
4760
|
/** Tipos excluidos a propósito, con el motivo que se muestra en el aviso. */
|
|
@@ -4689,10 +5004,52 @@ interface StreamState {
|
|
|
4689
5004
|
pendingNodes: number;
|
|
4690
5005
|
/** `true` cuando el emisor está activo. */
|
|
4691
5006
|
streaming: boolean;
|
|
5007
|
+
/** Texto acumulado hasta ahora. */
|
|
5008
|
+
text: string;
|
|
5009
|
+
/** Avisos del stream (`JR080`: falló, o terminó sin cerrar el JSON). */
|
|
5010
|
+
issues: JsonEngineIssue[];
|
|
4692
5011
|
}
|
|
4693
5012
|
/** `true` cuando un nodo está pendiente según el parser. */
|
|
4694
5013
|
declare function isNodePending(node: NodeSchema | undefined): boolean;
|
|
4695
5014
|
|
|
5015
|
+
/**
|
|
5016
|
+
* `useSchemaStream`: pinta un esquema mientras llega por trozos.
|
|
5017
|
+
*
|
|
5018
|
+
* Acepta una fuente completa (`string`), un iterable asíncrono o un `ReadableStream` de
|
|
5019
|
+
* texto. Acumula el texto, lo parsea en modo tolerante con cada trozo y devuelve el último
|
|
5020
|
+
* árbol válido. Lo que aún no está cerrado no se pinta a medias (ver `pendingFallback`).
|
|
5021
|
+
*
|
|
5022
|
+
* Garantías:
|
|
5023
|
+
*
|
|
5024
|
+
* - **Sin pérdida con StrictMode:** el texto acumulado vive en un registro asociado a la
|
|
5025
|
+
* fuente, no en el efecto. Si React monta dos veces, el segundo montaje continúa donde
|
|
5026
|
+
* quedó el primero; ningún fragmento se pierde ni se duplica.
|
|
5027
|
+
* - **Cancelación:** si el componente deja de usar la fuente, el registro se cierra y se
|
|
5028
|
+
* devuelve el control a la fuente (`return()` del iterable, `cancel()` del stream).
|
|
5029
|
+
* - **Sin árbol roto:** si el texto deja de ser recuperable, se conserva el último árbol
|
|
5030
|
+
* válido. Un stream que falla o termina sin cerrar avisa con `JR080`.
|
|
5031
|
+
*
|
|
5032
|
+
* **La fuente debe ser estable entre renders.** Crea el iterable o el stream una vez
|
|
5033
|
+
* (en un estado, o fuera del componente) y pásalo tal cual. Crearlo dentro del render
|
|
5034
|
+
* arranca un stream nuevo en cada render.
|
|
5035
|
+
*
|
|
5036
|
+
* @example
|
|
5037
|
+
* const { tree, streaming, issues } = useSchemaStream(respuestaDelModelo);
|
|
5038
|
+
* <ITSchemaRenderer schema={tree} onIssue={registrar} pendingFallback={<ITSkeleton />} />
|
|
5039
|
+
*/
|
|
5040
|
+
|
|
5041
|
+
/** Fuente de un esquema que llega por trozos. */
|
|
5042
|
+
type StreamSource = string | AsyncIterable<string> | ReadableStream<string>;
|
|
5043
|
+
/**
|
|
5044
|
+
* Devuelve el estado de un esquema que llega por trozos.
|
|
5045
|
+
*
|
|
5046
|
+
* @example
|
|
5047
|
+
* const estado = useSchemaStream(stream);
|
|
5048
|
+
* estado.tree; // árbol pintable, o null si aún no hay nada válido
|
|
5049
|
+
* estado.streaming; // true mientras la fuente sigue emitiendo
|
|
5050
|
+
*/
|
|
5051
|
+
declare function useSchemaStream(source: StreamSource | null | undefined): StreamState;
|
|
5052
|
+
|
|
4696
5053
|
/** Allowed file MIME types for the dropzone */
|
|
4697
5054
|
declare enum FileTypeEnum {
|
|
4698
5055
|
PDF = "application/pdf",
|
|
@@ -4721,8 +5078,14 @@ interface ITDropfileProps {
|
|
|
4721
5078
|
onFileSelect: (file: File | null) => void;
|
|
4722
5079
|
/** Called when the user cancels the current selection. */
|
|
4723
5080
|
onCancel?: () => void;
|
|
4724
|
-
/** Called when the user confirms and submits the file. */
|
|
4725
|
-
onSubmit?: (file: File) => void
|
|
5081
|
+
/** Called when the user confirms and submits the file. With `autoUpload`, it runs right after selection and may return a promise that drives the status. */
|
|
5082
|
+
onSubmit?: (file: File) => void | Promise<void>;
|
|
5083
|
+
/**
|
|
5084
|
+
* Sube en cuanto se elige el archivo, sin paso de confirmar. Usa `onSubmit` como la subida:
|
|
5085
|
+
* el estado pasa a subiendo y luego a subido, o a error si la promesa falla.
|
|
5086
|
+
* @default false
|
|
5087
|
+
*/
|
|
5088
|
+
autoUpload?: boolean;
|
|
4726
5089
|
/** List of accepted MIME types. */
|
|
4727
5090
|
acceptedFileTypes?: FileTypeEnum[];
|
|
4728
5091
|
/** Additional classes for the preview/content area. */
|
|
@@ -4795,6 +5158,8 @@ interface ITTopBarNavItem {
|
|
|
4795
5158
|
label: string;
|
|
4796
5159
|
/** Optional icon element rendered beside the label. */
|
|
4797
5160
|
icon?: any;
|
|
5161
|
+
/** Marks the item as the current one. Sets `aria-current="page"`; with `appearance="bento"` it renders as the ink pill (dark fill, white text), in the other appearances as a subtle highlight. @default false */
|
|
5162
|
+
isActive?: boolean;
|
|
4798
5163
|
/** Click handler for this navigation item (legacy, prefer onNavItemClick). */
|
|
4799
5164
|
action: () => void;
|
|
4800
5165
|
}
|
|
@@ -5018,8 +5383,9 @@ type ColorScale = {
|
|
|
5018
5383
|
* Visual language of the whole system.
|
|
5019
5384
|
* - `"soft"`: soft depth — floating cards, tinted shadows, glass sidebar and top bar (default).
|
|
5020
5385
|
* - `"flat"`: flat surfaces — hairline borders instead of shadows, plain sidebar and top bar, compact page headers.
|
|
5386
|
+
* - `"bento"`: modern pastel "bento" dashboards — light-gray canvas, borderless white cards with a diffuse shadow and 24px radius, pill controls (buttons, inputs), ink-pill navigation and pastel tiles via `ITCard` `tone`.
|
|
5021
5387
|
*/
|
|
5022
|
-
type ITThemeAppearance = "soft" | "flat";
|
|
5388
|
+
type ITThemeAppearance = "soft" | "flat" | "bento";
|
|
5023
5389
|
interface ITThemePalette$1 {
|
|
5024
5390
|
/** Main brand accent color (hex). Drives primary buttons, active nav items, focus rings, links, and the `--color-primary` CSS variable. @default "#06b6d4" */
|
|
5025
5391
|
primary: string;
|
|
@@ -5199,7 +5565,7 @@ interface ITThemeProviderProps {
|
|
|
5199
5565
|
radius?: number;
|
|
5200
5566
|
/** Global shadow strength level. `0` ⇒ no shadows, `1` ⇒ subtle, `2` ⇒ default current look, `3` ⇒ pronounced. Shadows are injected as `--shadow-*`/`.shadow-*` overrides so cards, dropdowns and dialogs follow the level. @default 2 (keeps current default when omitted) */
|
|
5201
5567
|
shadow?: number;
|
|
5202
|
-
/** Visual language of the whole system. `"soft"` keeps the current look (floating cards, tinted shadows, glass sidebar/top bar). `"flat"` switches the app shell and surfaces to flat ones: hairline borders instead of shadows on `ITCard`, a plain `ITSidebar` (no glow, no accent bar, narrower), a plain `ITTopBar` (no shadow, initials avatar) and a compact `ITPageHeader` without the icon tile. It also sets `data-it-appearance` on `<html>` so app CSS can follow it. Combine it with `shadow` and `radius` to finish the look. @default "soft" */
|
|
5568
|
+
/** Visual language of the whole system. `"soft"` keeps the current look (floating cards, tinted shadows, glass sidebar/top bar). `"flat"` switches the app shell and surfaces to flat ones: hairline borders instead of shadows on `ITCard`, a plain `ITSidebar` (no glow, no accent bar, narrower), a plain `ITTopBar` (no shadow, initials avatar) and a compact `ITPageHeader` without the icon tile. It also sets `data-it-appearance` on `<html>` so app CSS can follow it. `"bento"` gives a modern pastel dashboard: light-gray canvas, borderless white cards with a diffuse shadow and 24px radius, pill buttons and inputs, an ink-pill active item in `ITTopBar` and a neutral-pill one in `ITSidebar`, a large `ITPageHeader` title and pastel tiles through `ITCard` `tone`; an explicit `radius`/`shadow` prop wins over the bento defaults. Combine it with `shadow` and `radius` to finish the look. @default "soft" */
|
|
5203
5569
|
appearance?: ITThemeAppearance;
|
|
5204
5570
|
}
|
|
5205
5571
|
|
|
@@ -5227,6 +5593,11 @@ declare const useITTheme: () => ITThemeContextType;
|
|
|
5227
5593
|
* si se usa fuera de ITThemeProvider (no lanza error).
|
|
5228
5594
|
*/
|
|
5229
5595
|
declare const useITThemeSafe: () => ITThemeContextType | undefined;
|
|
5596
|
+
/**
|
|
5597
|
+
* Lenguaje visual activo (`"soft"` | `"flat"` | `"bento"`).
|
|
5598
|
+
* Fuera de un ITThemeProvider devuelve `"soft"` (aspecto por defecto).
|
|
5599
|
+
*/
|
|
5600
|
+
declare const useITAppearance: () => ITThemeAppearance;
|
|
5230
5601
|
/**
|
|
5231
5602
|
* `true` cuando el provider pide el lenguaje visual plano (`appearance="flat"`).
|
|
5232
5603
|
* Fuera de un ITThemeProvider devuelve `false` (aspecto por defecto).
|
|
@@ -5412,4 +5783,4 @@ declare const es: ITMessages;
|
|
|
5412
5783
|
*/
|
|
5413
5784
|
declare const en: ITMessages;
|
|
5414
5785
|
|
|
5415
|
-
export { AXZY_CATALOG_ENTRIES, AXZY_EXCLUDED_TYPES, type ActionSchema, CURRENT_SCHEMA_VERSION, type Catalog, type CatalogEntry, type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type ComponentContract, DEFAULT_LIMITS, DEFAULT_MIGRATIONS, type DataSourceSchema, type EffectSchema, type EngineLimits, type FieldConfig, type FieldConfigV2, FileTypeEnum, GLOBALLY_FORBIDDEN_PROPS, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITI18nProvider, type ITI18nProviderProps, type ITI18nValue, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITJSONEditor, type ITJSONEditorProps, type ITJsonRenderEngineProps, ITJsonRenderer, type ITJsonRendererProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, type ITLocale, ITMaskedInput, type ITMaskedInputProps, type ITMessages, type ITMessagesByLocale, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSchemaRenderer, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type JsonComponentNode, type JsonComponentType, type JsonEngineCode, JsonEngineError, type JsonEngineIssue, type JsonEngineSeverity, type LimitTracker, type MigrationRegistry, type MigrationResult, NodeBoundary, type NodeSchema, type NodeStatus, type PartialParseResult, type PathSegment, type PropContract, type PropKind, type PropSpec, type ResolvedNode, type SchemaMigration, type SchemaPath, type SchemaReference, type SchemaValue, type ScreenSchema, type StreamState, type TableColors, type TableDensity, type TableDesign, type TableDesignProps, type TableDesignSlot, type UnresolvedNode, UploadStatus, type UseTableStateOptions, type UseTableStateResult, type ValidateOptions, type ValidationReport, type ValidationVerdict, type VocabularyContract, type WhenSchema, auditTree, axzyCatalog, axzyCatalogTypes, buildVocabularyContract, countPendingNodes, createCatalog, createLimitTracker, createValidationSchema, en as enMessages, es as esMessages, formatPath, formatVocabularyForPrompt, getCatalogEntry, getContrastTextColor, getExclusionReason, hasPath, isExcludedType, isLightColor, isNodePending, issue, migrateSchema, parsePartialSchema, parsePath, propPath, pushPath, readPath, renderNode, resolveCssColor, resolveLimits, resolveNode, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITFlatAppearance, useITTheme, useITThemeSafe, useITTranslation, useJsonRender, useTableState, validateSchema };
|
|
5786
|
+
export { AXZY_CATALOG_ENTRIES, AXZY_EXCLUDED_TYPES, type ActionSchema, type BindingResolver, type BindingScope, CURRENT_SCHEMA_VERSION, type Catalog, type CatalogEntry, type Column, type ColumnFilterMode, type ColumnFilterValue, type ColumnFilters, type ComponentContract, DEFAULT_LIMITS, DEFAULT_MIGRATIONS, type DataHandler, type DataLoader, type DataSourceSchema, type EffectRegistry, type EffectSchema, type EngineLimits, type FieldConfig, type FieldConfigV2, FileTypeEnum, type FlatRoute, GLOBALLY_FORBIDDEN_PROPS, ITAccordion, type ITAccordionItem, type ITAccordionProps, ITAlert, type ITAlertProps, ITAvatar, type ITAvatarProps, ITBadget, type ITBadgetProps, type ITBreadcrumbItem, ITBreadcrumbs, type ITBreadcrumbsProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, type ITCardTone, ITCheckbox, type ITCheckboxProps, ITChip, ITChipInput, type ITChipInputProps, type ITChipProps, ITConfirmDialog, type ITConfirmDialogProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDivider, type ITDividerProps, ITDrawer, type ITDrawerProps, ITDropdownMenu, type ITDropdownMenuItem, type ITDropdownMenuProps, ITDropfile, ITEmptyState, type ITEmptyStateProps, ITField, type ITFieldProps, ITFlex, type ITFlexProps, ITFormBuilder, type ITFormBuilderProps, ITFormHeader, type ITFormHeaderProps, ITGrid, type ITGridProps, ITI18nProvider, type ITI18nProviderProps, type ITI18nValue, ITImage, type ITImageProps, ITInput, ITInputNumber, type ITInputNumberProps, type ITInputProps, ITJSONEditor, type ITJSONEditorProps, type ITJsonRenderEngineProps, ITJsonRenderer, type ITJsonRendererProps, ITLayout, type ITLayoutProps, ITLineBarChart, type ITLineBarChartProps, type ITLineBarDatum, ITLoader, type LoaderProps as ITLoaderProps, type ITLocale, ITMaskedInput, type ITMaskedInputProps, type ITMessages, type ITMessagesByLocale, ITMultiSelect, type ITMultiSelectOption, type ITMultiSelectProps, ITNavbar, type ITNavbarProps, type ITNavigationItem, type ITNavigationSubItem, type ITNavigationSubItemEntry, type ITNavigationSubItemGroup, ITPage, ITPageHeader, type ITPageHeaderProps, type ITPageProps, ITPagination, type ITPaginationProps, ITPopover, type ITPopoverProps, ITProgress, type ITProgressProps, ITRadioGroup, type ITRadioGroupProps, type ITRadioOption, ITSchemaRenderer, ITSearchSelect, type ITSearchSelectProps, ITSearchTable, type ITSearchTableProps, ITSegmentedControl, type ITSegmentedControlProps, ITSelect, type ITSelectProps, ITSidebar, type ITSidebarBrand, type ITSidebarNotification, type ITSidebarProps, ITSkeleton, type ITSkeletonProps, ITSlideToggle, type ITSlideToggleProps, ITSlider, type ITSliderProps, ITStack, type ITStackProps, ITStatCard, type ITStatCardProps, ITStepper, type ITStepperProps, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITTextProps, ITTextarea, type ITTextareaProps, type ITThemeAppearance, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, ITWysiwyg, type ITWysiwygProps, type JsonComponentNode, type JsonComponentType, type JsonEngineCode, JsonEngineError, type JsonEngineIssue, type JsonEngineSeverity, type LimitTracker, type MigrationRegistry, type MigrationResult, type NavNode, NodeBoundary, type NodeSchema, type NodeStatus, type PartialParseResult, type PathSegment, type PropContract, type PropKind, type PropSpec, type ResolvedNode, type RouteMatch, type RouteNavSchema, type RouteSchema, type RoutesSchema, type SchemaMigration, type SchemaPath, type SchemaReference, type SchemaValue, type ScreenSchema, type SlotComponent, type SlotRegistry, type StreamSource, type StreamState, type TableColors, type TableDensity, type TableDesign, type TableDesignProps, type TableDesignSlot, type ToastVariant, type UnresolvedNode, UploadStatus, type UseTableStateOptions, type UseTableStateResult, type ValidateOptions, type ValidationReport, type ValidationVerdict, type VocabularyContract, type WhenSchema, auditTree, axzyCatalog, axzyCatalogTypes, buildNavigationTree, buildVocabularyContract, countPendingNodes, createBindingResolver, createCatalog, createLimitTracker, createValidationSchema, en as enMessages, es as esMessages, flattenRoutes, formatPath, formatVocabularyForPrompt, getCatalogEntry, getContrastTextColor, getExclusionReason, hasPath, isExcludedType, isLightColor, isNodePending, issue, joinRoutePath, matchRoute, migrateSchema, navContainsRoute, parsePartialSchema, parsePath, propPath, pushPath, readPath, renderNode, resolveCssColor, resolveLimits, resolveNode, routeHref, useClickOutside, useDebouncedSearch, useEditableRow, useFloatingPanel, useITAppearance, useITFlatAppearance, useITTheme, useITThemeSafe, useITTranslation, useJsonRender, useSchemaStream, useTableState, validateRoutes, validateSchema };
|