@entifix/react-controls 0.1.1 → 0.1.3
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/README.md +5 -5
- package/dist/i18n/catalog/es.d.ts +2 -2
- package/dist/i18n/catalog/es.js +2 -2
- package/dist/i18n/catalog/es.js.map +1 -1
- package/dist/i18n/entity-labels.d.ts +2 -1
- package/dist/i18n/entity-labels.d.ts.map +1 -1
- package/dist/i18n/entity-labels.js +2 -1
- package/dist/i18n/entity-labels.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/primitives.d.ts +12 -0
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +12 -0
- package/dist/primitives.js.map +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/theme-script.d.ts +26 -0
- package/dist/theme/theme-script.d.ts.map +1 -0
- package/dist/theme/theme-script.js +38 -0
- package/dist/theme/theme-script.js.map +1 -0
- package/dist/ui/actions/index.d.ts +1 -0
- package/dist/ui/actions/index.d.ts.map +1 -1
- package/dist/ui/actions/index.js +1 -0
- package/dist/ui/actions/index.js.map +1 -1
- package/dist/ui/actions/render-link.d.ts +40 -0
- package/dist/ui/actions/render-link.d.ts.map +1 -0
- package/dist/ui/actions/render-link.js +8 -0
- package/dist/ui/actions/render-link.js.map +1 -0
- package/dist/ui/atoms/external-link/external-link.d.ts +9 -0
- package/dist/ui/atoms/external-link/external-link.d.ts.map +1 -0
- package/dist/ui/atoms/external-link/external-link.js +13 -0
- package/dist/ui/atoms/external-link/external-link.js.map +1 -0
- package/dist/ui/atoms/external-link/index.d.ts +2 -0
- package/dist/ui/atoms/external-link/index.d.ts.map +1 -0
- package/dist/ui/atoms/external-link/index.js +3 -0
- package/dist/ui/atoms/external-link/index.js.map +1 -0
- package/dist/ui/atoms/switch/index.d.ts +2 -0
- package/dist/ui/atoms/switch/index.d.ts.map +1 -0
- package/dist/ui/atoms/switch/index.js +3 -0
- package/dist/ui/atoms/switch/index.js.map +1 -0
- package/dist/ui/atoms/switch/switch.d.ts +10 -0
- package/dist/ui/atoms/switch/switch.d.ts.map +1 -0
- package/dist/ui/atoms/switch/switch.js +43 -0
- package/dist/ui/atoms/switch/switch.js.map +1 -0
- package/dist/ui/atoms/text/text.d.ts +5 -0
- package/dist/ui/atoms/text/text.d.ts.map +1 -1
- package/dist/ui/atoms/text/text.js +5 -1
- package/dist/ui/atoms/text/text.js.map +1 -1
- package/dist/ui/molecules/nav-menu/index.d.ts +2 -0
- package/dist/ui/molecules/nav-menu/index.d.ts.map +1 -0
- package/dist/ui/molecules/nav-menu/index.js +3 -0
- package/dist/ui/molecules/nav-menu/index.js.map +1 -0
- package/dist/ui/molecules/nav-menu/nav-menu.d.ts +30 -0
- package/dist/ui/molecules/nav-menu/nav-menu.d.ts.map +1 -0
- package/dist/ui/molecules/nav-menu/nav-menu.js +58 -0
- package/dist/ui/molecules/nav-menu/nav-menu.js.map +1 -0
- package/dist/ui/molecules/segmented-control/index.d.ts +2 -0
- package/dist/ui/molecules/segmented-control/index.d.ts.map +1 -0
- package/dist/ui/molecules/segmented-control/index.js +3 -0
- package/dist/ui/molecules/segmented-control/index.js.map +1 -0
- package/dist/ui/molecules/segmented-control/segmented-control.d.ts +21 -0
- package/dist/ui/molecules/segmented-control/segmented-control.d.ts.map +1 -0
- package/dist/ui/molecules/segmented-control/segmented-control.js +55 -0
- package/dist/ui/molecules/segmented-control/segmented-control.js.map +1 -0
- package/dist/ui/molecules/segmented-nav/index.d.ts +2 -0
- package/dist/ui/molecules/segmented-nav/index.d.ts.map +1 -0
- package/dist/ui/molecules/segmented-nav/index.js +3 -0
- package/dist/ui/molecules/segmented-nav/index.js.map +1 -0
- package/dist/ui/molecules/segmented-nav/segment-classes.d.ts +9 -0
- package/dist/ui/molecules/segmented-nav/segment-classes.d.ts.map +1 -0
- package/dist/ui/molecules/segmented-nav/segment-classes.js +9 -0
- package/dist/ui/molecules/segmented-nav/segment-classes.js.map +1 -0
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts +30 -0
- package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts.map +1 -0
- package/dist/ui/molecules/segmented-nav/segmented-nav.js +46 -0
- package/dist/ui/molecules/segmented-nav/segmented-nav.js.map +1 -0
- package/dist/ui/molecules/split-button/index.d.ts +2 -0
- package/dist/ui/molecules/split-button/index.d.ts.map +1 -0
- package/dist/ui/molecules/split-button/index.js +3 -0
- package/dist/ui/molecules/split-button/index.js.map +1 -0
- package/dist/ui/molecules/split-button/split-button.d.ts +21 -0
- package/dist/ui/molecules/split-button/split-button.d.ts.map +1 -0
- package/dist/ui/molecules/split-button/split-button.js +35 -0
- package/dist/ui/molecules/split-button/split-button.js.map +1 -0
- package/dist/ui/molecules/split-view/index.d.ts +2 -0
- package/dist/ui/molecules/split-view/index.d.ts.map +1 -0
- package/dist/ui/molecules/split-view/index.js +3 -0
- package/dist/ui/molecules/split-view/index.js.map +1 -0
- package/dist/ui/molecules/split-view/split-view.d.ts +35 -0
- package/dist/ui/molecules/split-view/split-view.d.ts.map +1 -0
- package/dist/ui/molecules/split-view/split-view.js +76 -0
- package/dist/ui/molecules/split-view/split-view.js.map +1 -0
- package/dist/ui/organisms/entity-form/entity-form.d.ts +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.js +12 -10
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts +6 -0
- package/dist/ui/organisms/entity-form/entity-form.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.types.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.js +16 -7
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +7 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -1
- package/dist/ui/utils/active-heading/active-heading.d.ts +16 -0
- package/dist/ui/utils/active-heading/active-heading.d.ts.map +1 -0
- package/dist/ui/utils/active-heading/active-heading.js +68 -0
- package/dist/ui/utils/active-heading/active-heading.js.map +1 -0
- package/dist/ui/utils/active-heading/index.d.ts +2 -0
- package/dist/ui/utils/active-heading/index.d.ts.map +1 -0
- package/dist/ui/utils/active-heading/index.js +3 -0
- package/dist/ui/utils/active-heading/index.js.map +1 -0
- package/dist/ui/utils/active-section/active-section.d.ts +11 -0
- package/dist/ui/utils/active-section/active-section.d.ts.map +1 -0
- package/dist/ui/utils/active-section/active-section.js +45 -0
- package/dist/ui/utils/active-section/active-section.js.map +1 -0
- package/dist/ui/utils/active-section/index.d.ts +2 -0
- package/dist/ui/utils/active-section/index.d.ts.map +1 -0
- package/dist/ui/utils/active-section/index.js +3 -0
- package/dist/ui/utils/active-section/index.js.map +1 -0
- package/dist/ui/utils/fold-script/fold-script.d.ts +20 -0
- package/dist/ui/utils/fold-script/fold-script.d.ts.map +1 -0
- package/dist/ui/utils/fold-script/fold-script.js +30 -0
- package/dist/ui/utils/fold-script/fold-script.js.map +1 -0
- package/dist/ui/utils/fold-script/index.d.ts +2 -0
- package/dist/ui/utils/fold-script/index.d.ts.map +1 -0
- package/dist/ui/utils/fold-script/index.js +3 -0
- package/dist/ui/utils/fold-script/index.js.map +1 -0
- package/dist/ui/utils/keep-section/index.d.ts +2 -0
- package/dist/ui/utils/keep-section/index.d.ts.map +1 -0
- package/dist/ui/utils/keep-section/index.js +3 -0
- package/dist/ui/utils/keep-section/index.js.map +1 -0
- package/dist/ui/utils/keep-section/keep-section.d.ts +8 -0
- package/dist/ui/utils/keep-section/keep-section.d.ts.map +1 -0
- package/dist/ui/utils/keep-section/keep-section.js +24 -0
- package/dist/ui/utils/keep-section/keep-section.js.map +1 -0
- package/dist/ui/utils/media-query/index.d.ts +2 -0
- package/dist/ui/utils/media-query/index.d.ts.map +1 -0
- package/dist/ui/utils/media-query/index.js +3 -0
- package/dist/ui/utils/media-query/index.js.map +1 -0
- package/dist/ui/utils/media-query/media-query.d.ts +7 -0
- package/dist/ui/utils/media-query/media-query.d.ts.map +1 -0
- package/dist/ui/utils/media-query/media-query.js +18 -0
- package/dist/ui/utils/media-query/media-query.js.map +1 -0
- package/package.json +5 -8
- package/dist/i18n/spec-support/catalogs.d.ts +0 -2
- package/dist/i18n/spec-support/catalogs.d.ts.map +0 -1
- package/dist/i18n/spec-support/catalogs.js +0 -142
- package/dist/i18n/spec-support/catalogs.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ pnpm add @entifix/react-controls effect react
|
|
|
12
12
|
|
|
13
13
|
## Entry points
|
|
14
14
|
|
|
15
|
-
| Import | What it holds
|
|
16
|
-
| ------------------------------------ |
|
|
17
|
-
| `@entifix/react-controls` | Everything: entity organisms, layout primitives, atoms, theme and UI-preference providers
|
|
18
|
-
| `@entifix/react-controls/primitives` | Layout primitives and
|
|
19
|
-
| `@entifix/react-controls/i18next` | `I18nProvider`, binding the controls to i18next
|
|
15
|
+
| Import | What it holds |
|
|
16
|
+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `@entifix/react-controls` | Everything: entity organisms, layout primitives, atoms, theme and UI-preference providers |
|
|
18
|
+
| `@entifix/react-controls/primitives` | Layout primitives, atoms and presentational molecules (`SegmentedNav`, `SplitView`, `NavMenu`…), `ThemeScript` — no entity metadata |
|
|
19
|
+
| `@entifix/react-controls/i18next` | `I18nProvider`, binding the controls to i18next |
|
|
20
20
|
|
|
21
21
|
## Optional peers
|
|
22
22
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives
|
|
3
3
|
* here rather than next to the components because the typed-key augmentation has
|
|
4
|
-
* to see every namespace from one module, and
|
|
5
|
-
*
|
|
4
|
+
* to see every namespace from one module, and `@entifix/tooling` (T0) may not
|
|
5
|
+
* import a T3 package.
|
|
6
6
|
*/
|
|
7
7
|
export declare const controls: {
|
|
8
8
|
table: {
|
package/dist/i18n/catalog/es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives
|
|
3
3
|
* here rather than next to the components because the typed-key augmentation has
|
|
4
|
-
* to see every namespace from one module, and
|
|
5
|
-
*
|
|
4
|
+
* to see every namespace from one module, and `@entifix/tooling` (T0) may not
|
|
5
|
+
* import a T3 package.
|
|
6
6
|
*/ export const controls = {
|
|
7
7
|
table: {
|
|
8
8
|
open: 'Abrir',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/i18n/catalog/es.ts"],"sourcesContent":["/**\n * Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives\n * here rather than next to the components because the typed-key augmentation has\n * to see every namespace from one module, and `entifix:tooling` may not import\n * `entifix:react`.\n */\nexport const controls = {\n table: {\n open: 'Abrir',\n select: 'Seleccionar',\n actions: 'Acciones',\n new: 'Nuevo',\n filters: 'Filtros',\n sorting: 'Orden',\n loading: 'Cargando…',\n empty: 'Sin registros',\n error: 'No se pudieron cargar los registros',\n /**\n * La columna de selección. `selectRow` nombra la fila porque una casilla\n * sin etiqueta visible sólo se anuncia por su `aria-label`, y repetir el\n * encabezado en cada fila no diría cuál es.\n */\n selection: 'Selección',\n selectRow: 'Seleccionar {{record}}',\n selectAllOnPage: 'Seleccionar todo en esta página',\n /**\n * La segunda selección — la que el servidor evalúa — lleva el número\n * siempre: es la diferencia entre actuar sobre 25 filas y sobre 3.200.\n */\n selectAllMatching_one: 'Seleccionar {{count}} coincidencia',\n selectAllMatching_other: 'Seleccionar las {{count}} coincidencias',\n selectedCount_one: '{{count}} seleccionado',\n selectedCount_other: '{{count}} seleccionados',\n clearSelection: 'Limpiar selección',\n },\n /**\n * Una acción sobre una selección. El resultado es por fila, nunca un aviso\n * único: 40 seleccionadas y 3 fallidas no es ni un éxito ni un error.\n */\n bulk: {\n running: 'Ejecutando…',\n succeeded_one: '{{count}} registro actualizado',\n succeeded_other: '{{count}} registros actualizados',\n failed_one: '{{count}} registro falló',\n failed_other: '{{count}} registros fallaron',\n retryFailed: 'Reintentar los fallidos',\n dismiss: 'Cerrar resultado',\n resultLabel: 'Resultado de la acción masiva',\n barLabel: 'Acciones sobre la selección',\n },\n form: {\n details: 'Detalles',\n new: 'Nuevo',\n view: 'Ver',\n edit: 'Editar',\n save: 'Guardar',\n saving: 'Guardando…',\n delete: 'Eliminar',\n deleting: 'Eliminando…',\n clone: 'Duplicar',\n moreActions: 'Más acciones',\n back: 'Volver',\n loading: 'Cargando…',\n },\n pagination: {\n summary: 'Página {{current}} de {{total}} · {{items}} registros',\n rows: 'Filas',\n previous: 'Anterior',\n next: 'Siguiente',\n },\n columns: {\n title: 'Columnas',\n subtitle: 'Visibilidad y orden',\n reset: 'Restablecer',\n moveUp: 'Subir {{column}}',\n moveDown: 'Bajar {{column}}',\n },\n filter: {\n match: 'Coincidir',\n all: 'todos',\n any: 'cualquiera',\n add: 'Añadir filtro',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros filtrables.',\n listPlaceholder: 'valores, separados, por comas',\n matchAria: 'Coincidir todos o cualquiera de los filtros',\n member: 'Miembro del filtro',\n operator: 'Operador del filtro',\n value: 'Valor del filtro',\n rangeEnd: 'Fin del rango del filtro',\n remove: 'Quitar filtro',\n applyAria: 'Aplicar filtros',\n clearAria: 'Limpiar filtros',\n },\n sort: {\n by: 'Ordenar por',\n then: 'después por',\n ascending: 'ascendente',\n descending: 'descendente',\n add: 'Añadir orden',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros ordenables.',\n member: 'Miembro de orden',\n direction: 'Dirección de orden',\n raisePriority: 'Subir prioridad de orden',\n lowerPriority: 'Bajar prioridad de orden',\n remove: 'Quitar orden',\n applyAria: 'Aplicar orden',\n clearAria: 'Limpiar orden',\n },\n tabs: {\n close: 'Cerrar {{label}}',\n new: 'Abrir una pestaña nueva',\n },\n /**\n * El editor de una relación. `search` es la búsqueda rápida y `browse` abre el\n * catálogo completo; ambos botones son iconos, así que sus etiquetas `aria` son\n * lo único que un lector de pantalla anuncia.\n */\n link: {\n search: 'Buscar {{field}}',\n suggestAria: 'Ver sugerencias de {{field}}',\n browseAria: 'Examinar {{field}}',\n browseTitle: 'Seleccionar {{field}}',\n clear: 'Quitar {{field}}',\n empty: '— sin asignar —',\n loading: 'Cargando…',\n noResults: 'Sin coincidencias',\n error: 'No se pudieron cargar las opciones',\n close: 'Cerrar',\n },\n /**\n * La rejilla de detalle: las filas que un registro **posee** — las líneas de\n * un pedido, los renglones de una factura. `errorSummary` es el único\n * `role=\"alert\"` del control: un aviso por celda anunciaría la rejilla entera\n * en cada pulsación, y un mensaje que sólo vive en la celda es inalcanzable\n * cuando la fila que falla está fuera de pantalla.\n */\n detail: {\n addRow: 'Añadir fila',\n removeRow: 'Quitar fila {{row}}',\n rowActions: 'Acciones de fila',\n empty: 'Todavía no hay filas.',\n errorSummary_one: '{{count}} celda con errores',\n errorSummary_other: '{{count}} celdas con errores',\n },\n value: {\n none: '— ninguno —',\n yes: 'Sí',\n no: 'No',\n /**\n * Una `composition` en una tabla: sus filas se editan en la pantalla del\n * maestro, no en la celda, así que la celda dice cuántas hay.\n */\n rowCount_one: '{{count}} fila',\n rowCount_other: '{{count}} filas',\n },\n /**\n * `required`…`option` son las reglas derivadas de la metadata. El resto es el\n * vocabulario en el que un Standard Schema de una entidad escribe sus\n * mensajes: el esquema lleva la *clave*, nunca una frase, para que la regla\n * siga siendo traducible.\n *\n * `field` es el único parámetro disponible — un issue de Standard Schema\n * expone un mensaje y una ruta, nada más — así que estos mensajes no indican\n * el límite. Una regla que deba enunciarlo escribe su propia clave en el\n * catálogo de su dominio (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} es obligatorio',\n number: '{{field}} debe ser un número',\n date: '{{field}} debe ser una fecha',\n option: '{{field}} no es una opción válida',\n minLength: '{{field}} es demasiado corto',\n maxLength: '{{field}} es demasiado largo',\n min: '{{field}} es demasiado pequeño',\n max: '{{field}} es demasiado grande',\n pattern: '{{field}} tiene un formato inválido',\n },\n /**\n * The filter vocabulary shown to a user. Deliberately distinct from\n * `RSQL_TOKENS` in `@entifix/core` — those are wire tokens (`==`, `=gt=`)\n * and must never be translated.\n */\n operator: {\n eq: 'es',\n ne: 'no es',\n gt: 'mayor que',\n gte: 'mayor o igual',\n lt: 'menor que',\n lte: 'menor o igual',\n in: 'es uno de',\n nin: 'no es ninguno de',\n between: 'entre',\n nbetween: 'fuera de',\n like: 'contiene',\n nlike: 'no contiene',\n isNull: 'está vacío',\n isNotNull: 'no está vacío',\n },\n theme: {\n label: 'Tema',\n },\n /**\n * Captions for the theme presets shipped by `@entifix/style`, plus the\n * per-app brand sets. They name design-system tokens, not app copy, so they\n * live beside the switcher that renders them and stay reachable from\n * Storybook, where no shell is mounted.\n */\n themes: {\n aurora: 'Aurora',\n sunset: 'Atardecer',\n midnight: 'Medianoche',\n ocean: 'Océano (en runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace oscuro',\n auth: 'Identidad',\n authDark: 'Identidad oscura',\n },\n confirm: {\n confirm: 'Confirmar',\n cancel: 'Cancelar',\n title: 'Confirmar',\n },\n breadcrumbs: {\n label: 'Ruta de navegación',\n },\n /**\n * El asistente. Las etiquetas de cada paso las traduce quien declara el\n * asistente, no el control: un paso es del dominio que lo definió, y su copy\n * vive en `shell:` junto al resto de sus nombres.\n */\n wizard: {\n steps: 'Pasos',\n previous: 'Atrás',\n /**\n * \"Continuar\" y no \"Siguiente\": una tabla dentro de un paso trae su propio\n * paginador, cuyo botón **es** \"Siguiente\". Dos controles con el mismo\n * nombre en la misma pantalla se anuncian igual y hacen cosas distintas.\n */\n next: 'Continuar',\n finish: 'Finalizar',\n /**\n * Un envío que **no** resuelve. El asistente entrega el trabajo y vuelve\n * antes de que la escritura termine (ADR 0043), así que dice \"enviando\" y\n * nunca \"guardado\": lo segundo sería una afirmación que el control no puede\n * comprobar.\n */\n submitting: 'Enviando…',\n stepOf: 'Paso {{current}} de {{total}}',\n goToStep: 'Volver a {{label}}',\n /**\n * El estado de cada paso, anunciado además de mostrarse. El color por sí\n * solo no lo dice, y un lector de pantalla recorre la lista sin verlo.\n */\n status: {\n pending: 'pendiente',\n active: 'en curso',\n complete: 'completado',\n error: 'con errores',\n },\n /**\n * El recordatorio al retomar. La persistencia da el \"continuar\" gratis; lo\n * que no da es acordarse de lo ya decidido, que es la falla conocida de los\n * asistentes largos.\n */\n resume: {\n title: 'Retomando donde lo dejaste',\n dismiss: 'Entendido',\n },\n },\n};\n"],"names":["controls","table","open","select","actions","new","filters","sorting","loading","empty","error","selection","selectRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","moreActions","back","pagination","summary","rows","previous","next","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","tabs","close","link","search","suggestAria","browseAria","browseTitle","noResults","detail","addRow","removeRow","rowActions","errorSummary_one","errorSummary_other","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","theme","label","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","pending","active","complete","resume"],"mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/catalog/es.ts"],"sourcesContent":["/**\n * Copy owned by `@entifix/react-controls` — the agnostic entity UI. It lives\n * here rather than next to the components because the typed-key augmentation has\n * to see every namespace from one module, and `@entifix/tooling` (T0) may not\n * import a T3 package.\n */\nexport const controls = {\n table: {\n open: 'Abrir',\n select: 'Seleccionar',\n actions: 'Acciones',\n new: 'Nuevo',\n filters: 'Filtros',\n sorting: 'Orden',\n loading: 'Cargando…',\n empty: 'Sin registros',\n error: 'No se pudieron cargar los registros',\n /**\n * La columna de selección. `selectRow` nombra la fila porque una casilla\n * sin etiqueta visible sólo se anuncia por su `aria-label`, y repetir el\n * encabezado en cada fila no diría cuál es.\n */\n selection: 'Selección',\n selectRow: 'Seleccionar {{record}}',\n selectAllOnPage: 'Seleccionar todo en esta página',\n /**\n * La segunda selección — la que el servidor evalúa — lleva el número\n * siempre: es la diferencia entre actuar sobre 25 filas y sobre 3.200.\n */\n selectAllMatching_one: 'Seleccionar {{count}} coincidencia',\n selectAllMatching_other: 'Seleccionar las {{count}} coincidencias',\n selectedCount_one: '{{count}} seleccionado',\n selectedCount_other: '{{count}} seleccionados',\n clearSelection: 'Limpiar selección',\n },\n /**\n * Una acción sobre una selección. El resultado es por fila, nunca un aviso\n * único: 40 seleccionadas y 3 fallidas no es ni un éxito ni un error.\n */\n bulk: {\n running: 'Ejecutando…',\n succeeded_one: '{{count}} registro actualizado',\n succeeded_other: '{{count}} registros actualizados',\n failed_one: '{{count}} registro falló',\n failed_other: '{{count}} registros fallaron',\n retryFailed: 'Reintentar los fallidos',\n dismiss: 'Cerrar resultado',\n resultLabel: 'Resultado de la acción masiva',\n barLabel: 'Acciones sobre la selección',\n },\n form: {\n details: 'Detalles',\n new: 'Nuevo',\n view: 'Ver',\n edit: 'Editar',\n save: 'Guardar',\n saving: 'Guardando…',\n delete: 'Eliminar',\n deleting: 'Eliminando…',\n clone: 'Duplicar',\n moreActions: 'Más acciones',\n back: 'Volver',\n loading: 'Cargando…',\n },\n pagination: {\n summary: 'Página {{current}} de {{total}} · {{items}} registros',\n rows: 'Filas',\n previous: 'Anterior',\n next: 'Siguiente',\n },\n columns: {\n title: 'Columnas',\n subtitle: 'Visibilidad y orden',\n reset: 'Restablecer',\n moveUp: 'Subir {{column}}',\n moveDown: 'Bajar {{column}}',\n },\n filter: {\n match: 'Coincidir',\n all: 'todos',\n any: 'cualquiera',\n add: 'Añadir filtro',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros filtrables.',\n listPlaceholder: 'valores, separados, por comas',\n matchAria: 'Coincidir todos o cualquiera de los filtros',\n member: 'Miembro del filtro',\n operator: 'Operador del filtro',\n value: 'Valor del filtro',\n rangeEnd: 'Fin del rango del filtro',\n remove: 'Quitar filtro',\n applyAria: 'Aplicar filtros',\n clearAria: 'Limpiar filtros',\n },\n sort: {\n by: 'Ordenar por',\n then: 'después por',\n ascending: 'ascendente',\n descending: 'descendente',\n add: 'Añadir orden',\n apply: 'Aplicar',\n clear: 'Limpiar',\n none: 'Esta entidad no tiene miembros ordenables.',\n member: 'Miembro de orden',\n direction: 'Dirección de orden',\n raisePriority: 'Subir prioridad de orden',\n lowerPriority: 'Bajar prioridad de orden',\n remove: 'Quitar orden',\n applyAria: 'Aplicar orden',\n clearAria: 'Limpiar orden',\n },\n tabs: {\n close: 'Cerrar {{label}}',\n new: 'Abrir una pestaña nueva',\n },\n /**\n * El editor de una relación. `search` es la búsqueda rápida y `browse` abre el\n * catálogo completo; ambos botones son iconos, así que sus etiquetas `aria` son\n * lo único que un lector de pantalla anuncia.\n */\n link: {\n search: 'Buscar {{field}}',\n suggestAria: 'Ver sugerencias de {{field}}',\n browseAria: 'Examinar {{field}}',\n browseTitle: 'Seleccionar {{field}}',\n clear: 'Quitar {{field}}',\n empty: '— sin asignar —',\n loading: 'Cargando…',\n noResults: 'Sin coincidencias',\n error: 'No se pudieron cargar las opciones',\n close: 'Cerrar',\n },\n /**\n * La rejilla de detalle: las filas que un registro **posee** — las líneas de\n * un pedido, los renglones de una factura. `errorSummary` es el único\n * `role=\"alert\"` del control: un aviso por celda anunciaría la rejilla entera\n * en cada pulsación, y un mensaje que sólo vive en la celda es inalcanzable\n * cuando la fila que falla está fuera de pantalla.\n */\n detail: {\n addRow: 'Añadir fila',\n removeRow: 'Quitar fila {{row}}',\n rowActions: 'Acciones de fila',\n empty: 'Todavía no hay filas.',\n errorSummary_one: '{{count}} celda con errores',\n errorSummary_other: '{{count}} celdas con errores',\n },\n value: {\n none: '— ninguno —',\n yes: 'Sí',\n no: 'No',\n /**\n * Una `composition` en una tabla: sus filas se editan en la pantalla del\n * maestro, no en la celda, así que la celda dice cuántas hay.\n */\n rowCount_one: '{{count}} fila',\n rowCount_other: '{{count}} filas',\n },\n /**\n * `required`…`option` son las reglas derivadas de la metadata. El resto es el\n * vocabulario en el que un Standard Schema de una entidad escribe sus\n * mensajes: el esquema lleva la *clave*, nunca una frase, para que la regla\n * siga siendo traducible.\n *\n * `field` es el único parámetro disponible — un issue de Standard Schema\n * expone un mensaje y una ruta, nada más — así que estos mensajes no indican\n * el límite. Una regla que deba enunciarlo escribe su propia clave en el\n * catálogo de su dominio (`entity:product-specification.validation.codeLength`).\n */\n validation: {\n required: '{{field}} es obligatorio',\n number: '{{field}} debe ser un número',\n date: '{{field}} debe ser una fecha',\n option: '{{field}} no es una opción válida',\n minLength: '{{field}} es demasiado corto',\n maxLength: '{{field}} es demasiado largo',\n min: '{{field}} es demasiado pequeño',\n max: '{{field}} es demasiado grande',\n pattern: '{{field}} tiene un formato inválido',\n },\n /**\n * The filter vocabulary shown to a user. Deliberately distinct from\n * `RSQL_TOKENS` in `@entifix/core` — those are wire tokens (`==`, `=gt=`)\n * and must never be translated.\n */\n operator: {\n eq: 'es',\n ne: 'no es',\n gt: 'mayor que',\n gte: 'mayor o igual',\n lt: 'menor que',\n lte: 'menor o igual',\n in: 'es uno de',\n nin: 'no es ninguno de',\n between: 'entre',\n nbetween: 'fuera de',\n like: 'contiene',\n nlike: 'no contiene',\n isNull: 'está vacío',\n isNotNull: 'no está vacío',\n },\n theme: {\n label: 'Tema',\n },\n /**\n * Captions for the theme presets shipped by `@entifix/style`, plus the\n * per-app brand sets. They name design-system tokens, not app copy, so they\n * live beside the switcher that renders them and stay reachable from\n * Storybook, where no shell is mounted.\n */\n themes: {\n aurora: 'Aurora',\n sunset: 'Atardecer',\n midnight: 'Medianoche',\n ocean: 'Océano (en runtime)',\n marketplace: 'Marketplace',\n marketplaceDark: 'Marketplace oscuro',\n auth: 'Identidad',\n authDark: 'Identidad oscura',\n },\n confirm: {\n confirm: 'Confirmar',\n cancel: 'Cancelar',\n title: 'Confirmar',\n },\n breadcrumbs: {\n label: 'Ruta de navegación',\n },\n /**\n * El asistente. Las etiquetas de cada paso las traduce quien declara el\n * asistente, no el control: un paso es del dominio que lo definió, y su copy\n * vive en `shell:` junto al resto de sus nombres.\n */\n wizard: {\n steps: 'Pasos',\n previous: 'Atrás',\n /**\n * \"Continuar\" y no \"Siguiente\": una tabla dentro de un paso trae su propio\n * paginador, cuyo botón **es** \"Siguiente\". Dos controles con el mismo\n * nombre en la misma pantalla se anuncian igual y hacen cosas distintas.\n */\n next: 'Continuar',\n finish: 'Finalizar',\n /**\n * Un envío que **no** resuelve. El asistente entrega el trabajo y vuelve\n * antes de que la escritura termine (ADR 0043), así que dice \"enviando\" y\n * nunca \"guardado\": lo segundo sería una afirmación que el control no puede\n * comprobar.\n */\n submitting: 'Enviando…',\n stepOf: 'Paso {{current}} de {{total}}',\n goToStep: 'Volver a {{label}}',\n /**\n * El estado de cada paso, anunciado además de mostrarse. El color por sí\n * solo no lo dice, y un lector de pantalla recorre la lista sin verlo.\n */\n status: {\n pending: 'pendiente',\n active: 'en curso',\n complete: 'completado',\n error: 'con errores',\n },\n /**\n * El recordatorio al retomar. La persistencia da el \"continuar\" gratis; lo\n * que no da es acordarse de lo ya decidido, que es la falla conocida de los\n * asistentes largos.\n */\n resume: {\n title: 'Retomando donde lo dejaste',\n dismiss: 'Entendido',\n },\n },\n};\n"],"names":["controls","table","open","select","actions","new","filters","sorting","loading","empty","error","selection","selectRow","selectAllOnPage","selectAllMatching_one","selectAllMatching_other","selectedCount_one","selectedCount_other","clearSelection","bulk","running","succeeded_one","succeeded_other","failed_one","failed_other","retryFailed","dismiss","resultLabel","barLabel","form","details","view","edit","save","saving","delete","deleting","clone","moreActions","back","pagination","summary","rows","previous","next","columns","title","subtitle","reset","moveUp","moveDown","filter","match","all","any","add","apply","clear","none","listPlaceholder","matchAria","member","operator","value","rangeEnd","remove","applyAria","clearAria","sort","by","then","ascending","descending","direction","raisePriority","lowerPriority","tabs","close","link","search","suggestAria","browseAria","browseTitle","noResults","detail","addRow","removeRow","rowActions","errorSummary_one","errorSummary_other","yes","no","rowCount_one","rowCount_other","validation","required","number","date","option","minLength","maxLength","min","max","pattern","eq","ne","gt","gte","lt","lte","in","nin","between","nbetween","like","nlike","isNull","isNotNull","theme","label","themes","aurora","sunset","midnight","ocean","marketplace","marketplaceDark","auth","authDark","confirm","cancel","breadcrumbs","wizard","steps","finish","submitting","stepOf","goToStep","status","pending","active","complete","resume"],"mappings":"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"}
|
|
@@ -5,7 +5,8 @@ import type { EntityFieldDescriptor } from '@entifix/core';
|
|
|
5
5
|
*
|
|
6
6
|
* Done here rather than in `describeEntityColumns` because the same descriptors
|
|
7
7
|
* are the server-side filter allowlist, where a translated label would be
|
|
8
|
-
* meaningless — and because
|
|
8
|
+
* meaningless — and because `@entifix/core` (T1) cannot reach
|
|
9
|
+
* `@entifix/i18n` (T2).
|
|
9
10
|
*/
|
|
10
11
|
export declare function useLocalizedDescriptors<TDescriptor extends EntityFieldDescriptor>(descriptors: readonly TDescriptor[]): TDescriptor[];
|
|
11
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-labels.d.ts","sourceRoot":"","sources":["../../src/i18n/entity-labels.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAK3D
|
|
1
|
+
{"version":3,"file":"entity-labels.d.ts","sourceRoot":"","sources":["../../src/i18n/entity-labels.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAK3D;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,SAAS,qBAAqB,EACzC,WAAW,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAYpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,CAC9B,UAAU,EAAE,qBAAqB,EACjC,KAAK,EAAE,MAAM,KACV,MAAM,CAUV;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,CAAC,KAAK,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,KAAK,MAAM,CAYX"}
|
|
@@ -8,7 +8,8 @@ import { useTranslateKey } from './i18n-context.js';
|
|
|
8
8
|
*
|
|
9
9
|
* Done here rather than in `describeEntityColumns` because the same descriptors
|
|
10
10
|
* are the server-side filter allowlist, where a translated label would be
|
|
11
|
-
* meaningless — and because
|
|
11
|
+
* meaningless — and because `@entifix/core` (T1) cannot reach
|
|
12
|
+
* `@entifix/i18n` (T2).
|
|
12
13
|
*/ export function useLocalizedDescriptors(descriptors) {
|
|
13
14
|
const translate = useTranslateKey();
|
|
14
15
|
return useMemo(()=>descriptors.map((descriptor)=>descriptor.labelKey === undefined ? descriptor : _extends({}, descriptor, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/entity-labels.ts"],"sourcesContent":["'use client';\n\nimport type { EntityFieldDescriptor } from '@entifix/core';\nimport { useCallback, useMemo } from 'react';\n\nimport { useTranslateKey } from './i18n-context.js';\n\n/**\n * Resolves each descriptor's `labelKey` against the active catalog, leaving the\n * declared `label` in place for members that have no key yet.\n *\n * Done here rather than in `describeEntityColumns` because the same descriptors\n * are the server-side filter allowlist, where a translated label would be\n * meaningless — and because
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/entity-labels.ts"],"sourcesContent":["'use client';\n\nimport type { EntityFieldDescriptor } from '@entifix/core';\nimport { useCallback, useMemo } from 'react';\n\nimport { useTranslateKey } from './i18n-context.js';\n\n/**\n * Resolves each descriptor's `labelKey` against the active catalog, leaving the\n * declared `label` in place for members that have no key yet.\n *\n * Done here rather than in `describeEntityColumns` because the same descriptors\n * are the server-side filter allowlist, where a translated label would be\n * meaningless — and because `@entifix/core` (T1) cannot reach\n * `@entifix/i18n` (T2).\n */\nexport function useLocalizedDescriptors<\n TDescriptor extends EntityFieldDescriptor,\n>(descriptors: readonly TDescriptor[]): TDescriptor[] {\n const translate = useTranslateKey();\n\n return useMemo(\n () =>\n descriptors.map(descriptor =>\n descriptor.labelKey === undefined\n ? descriptor\n : { ...descriptor, label: translate(descriptor.labelKey) },\n ),\n [descriptors, translate],\n );\n}\n\n/**\n * Reads one value of an enum member. Falls back to the raw value when the\n * member declared no vocabulary prefix, which is what a `status` of `active`\n * used to render as everywhere.\n */\nexport function useEnumLabel(): (\n descriptor: EntityFieldDescriptor,\n value: string,\n) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n (descriptor, value) =>\n descriptor.enumLabelKey === undefined\n ? value\n : translate(`${descriptor.enumLabelKey}.${value}`),\n [translate],\n );\n}\n\n/**\n * Renders a failed request in the reader's language.\n *\n * Services answer with `{ error, code, detail }`, and the rest client carries\n * the `code` onto `EntifixError.details`. Falling back to `message` keeps a\n * failure that predates the vocabulary — or one raised client-side — readable\n * rather than blank.\n */\nexport function useErrorMessage(): (error: {\n message: string;\n details?: Record<string, unknown>;\n}) => string {\n const translate = useTranslateKey();\n\n return useCallback(\n error => {\n const code = error.details?.['code'];\n return typeof code === 'string'\n ? translate(`errors:${code}`)\n : error.message;\n },\n [translate],\n );\n}\n"],"names":["useCallback","useMemo","useTranslateKey","useLocalizedDescriptors","descriptors","translate","map","descriptor","labelKey","undefined","label","useEnumLabel","value","enumLabelKey","useErrorMessage","error","code","details","message"],"mappings":"AAAA;;AAGA,SAASA,WAAW,EAAEC,OAAO,QAAQ,QAAQ;AAE7C,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;;;;;;;CAQC,GACD,OAAO,SAASC,wBAEdC,WAAmC;IACnC,MAAMC,YAAYH;IAElB,OAAOD,QACL,IACEG,YAAYE,GAAG,CAACC,CAAAA,aACdA,WAAWC,QAAQ,KAAKC,YACpBF,aACA,aAAKA;gBAAYG,OAAOL,UAAUE,WAAWC,QAAQ;iBAE7D;QAACJ;QAAaC;KAAU;AAE5B;AAEA;;;;CAIC,GACD,OAAO,SAASM;IAId,MAAMN,YAAYH;IAElB,OAAOF,YACL,CAACO,YAAYK,QACXL,WAAWM,YAAY,KAAKJ,YACxBG,QACAP,UAAU,GAAGE,WAAWM,YAAY,CAAC,CAAC,EAAED,OAAO,GACrD;QAACP;KAAU;AAEf;AAEA;;;;;;;CAOC,GACD,OAAO,SAASS;IAId,MAAMT,YAAYH;IAElB,OAAOF,YACLe,CAAAA;YACeA;QAAb,MAAMC,QAAOD,iBAAAA,MAAME,OAAO,qBAAbF,cAAe,CAAC,OAAO;QACpC,OAAO,OAAOC,SAAS,WACnBX,UAAU,CAAC,OAAO,EAAEW,MAAM,IAC1BD,MAAMG,OAAO;IACnB,GACA;QAACb;KAAU;AAEf"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,11 @@ export * from './theme/index.js';
|
|
|
4
4
|
export * from './ui/actions/index.js';
|
|
5
5
|
export * from './ui/atoms/button/index.js';
|
|
6
6
|
export * from './ui/atoms/cell-value/index.js';
|
|
7
|
+
export * from './ui/atoms/external-link/index.js';
|
|
7
8
|
export * from './ui/atoms/field/index.js';
|
|
8
9
|
export * from './ui/atoms/field-control/index.js';
|
|
9
10
|
export * from './ui/atoms/skeleton/index.js';
|
|
11
|
+
export * from './ui/atoms/switch/index.js';
|
|
10
12
|
export * from './ui/atoms/table/index.js';
|
|
11
13
|
export * from './ui/atoms/text/index.js';
|
|
12
14
|
export * from './ui/layout/box/index.js';
|
|
@@ -29,8 +31,13 @@ export * from './ui/molecules/entity-record-card/index.js';
|
|
|
29
31
|
export * from './ui/molecules/filter-builder/index.js';
|
|
30
32
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
31
33
|
export * from './ui/molecules/menu/index.js';
|
|
34
|
+
export * from './ui/molecules/nav-menu/index.js';
|
|
32
35
|
export * from './ui/molecules/pagination/index.js';
|
|
36
|
+
export * from './ui/molecules/segmented-control/index.js';
|
|
37
|
+
export * from './ui/molecules/segmented-nav/index.js';
|
|
33
38
|
export * from './ui/molecules/sort-builder/index.js';
|
|
39
|
+
export * from './ui/molecules/split-button/index.js';
|
|
40
|
+
export * from './ui/molecules/split-view/index.js';
|
|
34
41
|
export * from './ui/molecules/stack/index.js';
|
|
35
42
|
export * from './ui/molecules/tab-strip/index.js';
|
|
36
43
|
export * from './ui/molecules/table-toolbar/index.js';
|
|
@@ -41,6 +48,11 @@ export * from './ui/organisms/entity-form/index.js';
|
|
|
41
48
|
export * from './ui/organisms/entity-table/index.js';
|
|
42
49
|
export * from './ui/organisms/top-bar/index.js';
|
|
43
50
|
export * from './ui/organisms/wizard/index.js';
|
|
51
|
+
export * from './ui/utils/active-heading/index.js';
|
|
52
|
+
export * from './ui/utils/active-section/index.js';
|
|
44
53
|
export * from './ui/utils/cn.js';
|
|
54
|
+
export * from './ui/utils/fold-script/index.js';
|
|
55
|
+
export * from './ui/utils/keep-section/index.js';
|
|
56
|
+
export * from './ui/utils/media-query/index.js';
|
|
45
57
|
export * from './ui/utils/use-hotkey.js';
|
|
46
58
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,11 @@ export * from './theme/index.js';
|
|
|
4
4
|
export * from './ui/actions/index.js';
|
|
5
5
|
export * from './ui/atoms/button/index.js';
|
|
6
6
|
export * from './ui/atoms/cell-value/index.js';
|
|
7
|
+
export * from './ui/atoms/external-link/index.js';
|
|
7
8
|
export * from './ui/atoms/field/index.js';
|
|
8
9
|
export * from './ui/atoms/field-control/index.js';
|
|
9
10
|
export * from './ui/atoms/skeleton/index.js';
|
|
11
|
+
export * from './ui/atoms/switch/index.js';
|
|
10
12
|
export * from './ui/atoms/table/index.js';
|
|
11
13
|
export * from './ui/atoms/text/index.js';
|
|
12
14
|
export * from './ui/layout/box/index.js';
|
|
@@ -29,8 +31,13 @@ export * from './ui/molecules/entity-record-card/index.js';
|
|
|
29
31
|
export * from './ui/molecules/filter-builder/index.js';
|
|
30
32
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
31
33
|
export * from './ui/molecules/menu/index.js';
|
|
34
|
+
export * from './ui/molecules/nav-menu/index.js';
|
|
32
35
|
export * from './ui/molecules/pagination/index.js';
|
|
36
|
+
export * from './ui/molecules/segmented-control/index.js';
|
|
37
|
+
export * from './ui/molecules/segmented-nav/index.js';
|
|
33
38
|
export * from './ui/molecules/sort-builder/index.js';
|
|
39
|
+
export * from './ui/molecules/split-button/index.js';
|
|
40
|
+
export * from './ui/molecules/split-view/index.js';
|
|
34
41
|
export * from './ui/molecules/stack/index.js';
|
|
35
42
|
export * from './ui/molecules/tab-strip/index.js';
|
|
36
43
|
export * from './ui/molecules/table-toolbar/index.js';
|
|
@@ -41,7 +48,12 @@ export * from './ui/organisms/entity-form/index.js';
|
|
|
41
48
|
export * from './ui/organisms/entity-table/index.js';
|
|
42
49
|
export * from './ui/organisms/top-bar/index.js';
|
|
43
50
|
export * from './ui/organisms/wizard/index.js';
|
|
51
|
+
export * from './ui/utils/active-heading/index.js';
|
|
52
|
+
export * from './ui/utils/active-section/index.js';
|
|
44
53
|
export * from './ui/utils/cn.js';
|
|
54
|
+
export * from './ui/utils/fold-script/index.js';
|
|
55
|
+
export * from './ui/utils/keep-section/index.js';
|
|
56
|
+
export * from './ui/utils/media-query/index.js';
|
|
45
57
|
export * from './ui/utils/use-hotkey.js';
|
|
46
58
|
|
|
47
59
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/sort-builder/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/table-toolbar/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/organisms/command-palette/index.js';\nexport * from './ui/organisms/entity-detail-grid/index.js';\nexport * from './ui/organisms/entity-form/index.js';\nexport * from './ui/organisms/entity-table/index.js';\nexport * from './ui/organisms/top-bar/index.js';\nexport * from './ui/organisms/wizard/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/use-hotkey.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,4BAA4B;AAC1C,cAAc,oCAAoC;AAClD,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAC9C,cAAc,sCAAsC;AACpD,cAAc,0CAA0C;AACxD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,0CAA0C;AACxD,cAAc,yCAAyC;AACvD,cAAc,iCAAiC;AAC/C,cAAc,4CAA4C;AAC1D,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,uCAAuC;AACrD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,wCAAwC;AACtD,cAAc,yCAAyC;AACvD,cAAc,0CAA0C;AACxD,cAAc,6CAA6C;AAC3D,cAAc,sCAAsC;AACpD,cAAc,uCAAuC;AACrD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,mBAAmB;AACjC,cAAc,2BAA2B"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/sort-builder/index.js';\nexport * from './ui/molecules/split-button/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/table-toolbar/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/organisms/command-palette/index.js';\nexport * from './ui/organisms/entity-detail-grid/index.js';\nexport * from './ui/organisms/entity-form/index.js';\nexport * from './ui/organisms/entity-table/index.js';\nexport * from './ui/organisms/top-bar/index.js';\nexport * from './ui/organisms/wizard/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/media-query/index.js';\nexport * from './ui/utils/use-hotkey.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,oCAAoC;AAClD,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAC9C,cAAc,sCAAsC;AACpD,cAAc,0CAA0C;AACxD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,0CAA0C;AACxD,cAAc,yCAAyC;AACvD,cAAc,iCAAiC;AAC/C,cAAc,4CAA4C;AAC1D,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD,cAAc,uCAAuC;AACrD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,wCAAwC;AACtD,cAAc,yCAAyC;AACvD,cAAc,0CAA0C;AACxD,cAAc,6CAA6C;AAC3D,cAAc,sCAAsC;AACpD,cAAc,uCAAuC;AACrD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,2BAA2B"}
|
package/dist/primitives.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './i18n/index.js';
|
|
2
2
|
export * from './theme/index.js';
|
|
3
3
|
export * from './ui/atoms/button/index.js';
|
|
4
|
+
export * from './ui/atoms/external-link/index.js';
|
|
4
5
|
export * from './ui/atoms/field/index.js';
|
|
5
6
|
export * from './ui/atoms/skeleton/index.js';
|
|
7
|
+
export * from './ui/atoms/switch/index.js';
|
|
6
8
|
export * from './ui/atoms/table/index.js';
|
|
7
9
|
export * from './ui/atoms/text/index.js';
|
|
8
10
|
export * from './ui/layout/box/index.js';
|
|
@@ -17,9 +19,19 @@ export * from './ui/molecules/card/index.js';
|
|
|
17
19
|
export * from './ui/molecules/confirm-dialog/index.js';
|
|
18
20
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
19
21
|
export * from './ui/molecules/menu/index.js';
|
|
22
|
+
export * from './ui/molecules/nav-menu/index.js';
|
|
20
23
|
export * from './ui/molecules/pagination/index.js';
|
|
24
|
+
export * from './ui/molecules/segmented-control/index.js';
|
|
25
|
+
export * from './ui/molecules/segmented-nav/index.js';
|
|
26
|
+
export * from './ui/molecules/split-button/index.js';
|
|
27
|
+
export * from './ui/molecules/split-view/index.js';
|
|
21
28
|
export * from './ui/molecules/stack/index.js';
|
|
22
29
|
export * from './ui/molecules/tab-strip/index.js';
|
|
23
30
|
export * from './ui/molecules/theme-switcher/index.js';
|
|
31
|
+
export * from './ui/utils/active-heading/index.js';
|
|
32
|
+
export * from './ui/utils/active-section/index.js';
|
|
24
33
|
export * from './ui/utils/cn.js';
|
|
34
|
+
export * from './ui/utils/fold-script/index.js';
|
|
35
|
+
export * from './ui/utils/keep-section/index.js';
|
|
36
|
+
export * from './ui/utils/media-query/index.js';
|
|
25
37
|
//# sourceMappingURL=primitives.d.ts.map
|
package/dist/primitives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAyBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAyBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
|
package/dist/primitives.js
CHANGED
|
@@ -26,8 +26,10 @@ export * from './i18n/index.js';
|
|
|
26
26
|
export * from './theme/index.js';
|
|
27
27
|
// Atoms — text, buttons, fields, tables, loading placeholders.
|
|
28
28
|
export * from './ui/atoms/button/index.js';
|
|
29
|
+
export * from './ui/atoms/external-link/index.js';
|
|
29
30
|
export * from './ui/atoms/field/index.js';
|
|
30
31
|
export * from './ui/atoms/skeleton/index.js';
|
|
32
|
+
export * from './ui/atoms/switch/index.js';
|
|
31
33
|
export * from './ui/atoms/table/index.js';
|
|
32
34
|
export * from './ui/atoms/text/index.js';
|
|
33
35
|
// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid
|
|
@@ -45,10 +47,20 @@ export * from './ui/molecules/card/index.js';
|
|
|
45
47
|
export * from './ui/molecules/confirm-dialog/index.js';
|
|
46
48
|
export * from './ui/molecules/loading-boundary/index.js';
|
|
47
49
|
export * from './ui/molecules/menu/index.js';
|
|
50
|
+
export * from './ui/molecules/nav-menu/index.js';
|
|
48
51
|
export * from './ui/molecules/pagination/index.js';
|
|
52
|
+
export * from './ui/molecules/segmented-control/index.js';
|
|
53
|
+
export * from './ui/molecules/segmented-nav/index.js';
|
|
54
|
+
export * from './ui/molecules/split-button/index.js';
|
|
55
|
+
export * from './ui/molecules/split-view/index.js';
|
|
49
56
|
export * from './ui/molecules/stack/index.js';
|
|
50
57
|
export * from './ui/molecules/tab-strip/index.js';
|
|
51
58
|
export * from './ui/molecules/theme-switcher/index.js';
|
|
59
|
+
export * from './ui/utils/active-heading/index.js';
|
|
60
|
+
export * from './ui/utils/active-section/index.js';
|
|
52
61
|
export * from './ui/utils/cn.js';
|
|
62
|
+
export * from './ui/utils/fold-script/index.js';
|
|
63
|
+
export * from './ui/utils/keep-section/index.js';
|
|
64
|
+
export * from './ui/utils/media-query/index.js';
|
|
53
65
|
|
|
54
66
|
//# sourceMappingURL=primitives.js.map
|
package/dist/primitives.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/utils/cn.js';\n"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,6EAA6E;AAC7E,gCAAgC;AAChC,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AAEtE,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AAEjC,+DAA+D;AAC/D,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AAEzC,6EAA6E;AAC7E,gBAAgB;AAChB,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAE9C,qDAAqD;AACrD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,yCAAyC;AACvD,cAAc,mBAAmB"}
|
|
1
|
+
{"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/split-button/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/media-query/index.js';\n"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,6EAA6E;AAC7E,gCAAgC;AAChC,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AAEtE,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AAEjC,+DAA+D;AAC/D,cAAc,6BAA6B;AAC3C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AAEzC,6EAA6E;AAC7E,gBAAgB;AAChB,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAE9C,qDAAqD;AACrD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,yCAAyC;AACvD,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC"}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
package/dist/theme/index.js
CHANGED
package/dist/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,aAAa"}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './theme-script.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,aAAa"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ThemeOption } from './types.js';
|
|
2
|
+
export interface ThemeScriptProps {
|
|
3
|
+
/** The same registry `ThemeProvider` is given. */
|
|
4
|
+
themes: readonly ThemeOption[];
|
|
5
|
+
/** Painted when nothing valid is stored; the first theme otherwise. */
|
|
6
|
+
defaultTheme?: string;
|
|
7
|
+
/** The key `ThemeProvider` stores the choice under. */
|
|
8
|
+
storageKey?: string;
|
|
9
|
+
/** For a Content-Security-Policy that allows inline scripts by nonce. */
|
|
10
|
+
nonce?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Sets `data-theme` on <html> before the first paint, so a server-rendered or
|
|
14
|
+
* statically exported page never flashes the wrong palette. Render it inline
|
|
15
|
+
* in <head>: it runs ahead of any stylesheet applying and long before React
|
|
16
|
+
* hydrates.
|
|
17
|
+
*
|
|
18
|
+
* A stored choice wins; otherwise `defaultTheme`, which is then stored too:
|
|
19
|
+
* `ThemeProvider` persists whatever theme it mounts with, and without a stored
|
|
20
|
+
* value to read it would mount with its own default instead. A page whose
|
|
21
|
+
* storage cannot be read is left unthemed, as it would be without the script.
|
|
22
|
+
*
|
|
23
|
+
* Render it from a server component; it ships no client code.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ThemeScript({ themes, defaultTheme, storageKey, nonce, }: ThemeScriptProps): import("react").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=theme-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-script.d.ts","sourceRoot":"","sources":["../../src/theme/theme-script.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,YAAY,EACZ,UAA4B,EAC5B,KAAK,GACN,EAAE,gBAAgB,+BAgBlB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Sets `data-theme` on <html> before the first paint, so a server-rendered or
|
|
4
|
+
* statically exported page never flashes the wrong palette. Render it inline
|
|
5
|
+
* in <head>: it runs ahead of any stylesheet applying and long before React
|
|
6
|
+
* hydrates.
|
|
7
|
+
*
|
|
8
|
+
* A stored choice wins; otherwise `defaultTheme`, which is then stored too:
|
|
9
|
+
* `ThemeProvider` persists whatever theme it mounts with, and without a stored
|
|
10
|
+
* value to read it would mount with its own default instead. A page whose
|
|
11
|
+
* storage cannot be read is left unthemed, as it would be without the script.
|
|
12
|
+
*
|
|
13
|
+
* Render it from a server component; it ships no client code.
|
|
14
|
+
*/ export function ThemeScript({ themes, defaultTheme, storageKey = 'entifix-theme', nonce }) {
|
|
15
|
+
var _ref;
|
|
16
|
+
const ids = themes.map((theme)=>theme.id);
|
|
17
|
+
const fallback = (_ref = defaultTheme != null ? defaultTheme : ids[0]) != null ? _ref : '';
|
|
18
|
+
const script = `(function () {
|
|
19
|
+
try {
|
|
20
|
+
var themes = ${JSON.stringify(ids)};
|
|
21
|
+
var key = ${JSON.stringify(storageKey)};
|
|
22
|
+
var theme = window.localStorage.getItem(key);
|
|
23
|
+
if (themes.indexOf(theme) === -1) {
|
|
24
|
+
theme = ${JSON.stringify(fallback)};
|
|
25
|
+
window.localStorage.setItem(key, theme);
|
|
26
|
+
}
|
|
27
|
+
document.documentElement.dataset.theme = theme;
|
|
28
|
+
} catch (error) {}
|
|
29
|
+
})();`;
|
|
30
|
+
return /*#__PURE__*/ _jsx("script", {
|
|
31
|
+
nonce: nonce,
|
|
32
|
+
dangerouslySetInnerHTML: {
|
|
33
|
+
__html: script
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=theme-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/theme-script.tsx"],"sourcesContent":["import type { ThemeOption } from './types.js';\n\nexport interface ThemeScriptProps {\n /** The same registry `ThemeProvider` is given. */\n themes: readonly ThemeOption[];\n /** Painted when nothing valid is stored; the first theme otherwise. */\n defaultTheme?: string;\n /** The key `ThemeProvider` stores the choice under. */\n storageKey?: string;\n /** For a Content-Security-Policy that allows inline scripts by nonce. */\n nonce?: string;\n}\n\n/**\n * Sets `data-theme` on <html> before the first paint, so a server-rendered or\n * statically exported page never flashes the wrong palette. Render it inline\n * in <head>: it runs ahead of any stylesheet applying and long before React\n * hydrates.\n *\n * A stored choice wins; otherwise `defaultTheme`, which is then stored too:\n * `ThemeProvider` persists whatever theme it mounts with, and without a stored\n * value to read it would mount with its own default instead. A page whose\n * storage cannot be read is left unthemed, as it would be without the script.\n *\n * Render it from a server component; it ships no client code.\n */\nexport function ThemeScript({\n themes,\n defaultTheme,\n storageKey = 'entifix-theme',\n nonce,\n}: ThemeScriptProps) {\n const ids = themes.map(theme => theme.id);\n const fallback = defaultTheme ?? ids[0] ?? '';\n const script = `(function () {\n try {\n var themes = ${JSON.stringify(ids)};\n var key = ${JSON.stringify(storageKey)};\n var theme = window.localStorage.getItem(key);\n if (themes.indexOf(theme) === -1) {\n theme = ${JSON.stringify(fallback)};\n window.localStorage.setItem(key, theme);\n }\n document.documentElement.dataset.theme = theme;\n } catch (error) {}\n})();`;\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: script }} />;\n}\n"],"names":["ThemeScript","themes","defaultTheme","storageKey","nonce","ids","map","theme","id","fallback","script","JSON","stringify","dangerouslySetInnerHTML","__html"],"mappings":";AAaA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASA,YAAY,EAC1BC,MAAM,EACNC,YAAY,EACZC,aAAa,eAAe,EAC5BC,KAAK,EACY;QAEAF;IADjB,MAAMG,MAAMJ,OAAOK,GAAG,CAACC,CAAAA,QAASA,MAAMC,EAAE;IACxC,MAAMC,YAAWP,OAAAA,uBAAAA,eAAgBG,GAAG,CAAC,EAAE,YAAtBH,OAA0B;IAC3C,MAAMQ,SAAS,CAAC;;iBAED,EAAEC,KAAKC,SAAS,CAACP,KAAK;cACzB,EAAEM,KAAKC,SAAS,CAACT,YAAY;;;cAG7B,EAAEQ,KAAKC,SAAS,CAACH,UAAU;;;;;KAKpC,CAAC;IACJ,qBAAO,KAACC;QAAON,OAAOA;QAAOS,yBAAyB;YAAEC,QAAQJ;QAAO;;AACzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
package/dist/ui/actions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ui/actions/index.ts"],"sourcesContent":["export * from './action-surfaces.js';\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/index.ts"],"sourcesContent":["export * from './action-surfaces.js';\nexport * from './render-link.js';\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,mBAAmB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { EntityId } from '@entifix/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* What a navigation control means, so a host can do something other than follow
|
|
5
|
+
* the `href`.
|
|
6
|
+
*
|
|
7
|
+
* `open` goes to a record, `new` to its create form, `back` to the list. A
|
|
8
|
+
* workspace tab needs to know which, because it answers each by opening a tab —
|
|
9
|
+
* and a URL alone does not say what it points at without the host parsing its
|
|
10
|
+
* own routes back.
|
|
11
|
+
*/
|
|
12
|
+
export type NavigationIntent = {
|
|
13
|
+
readonly kind: 'open';
|
|
14
|
+
readonly id: EntityId;
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'new';
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: 'back';
|
|
19
|
+
};
|
|
20
|
+
export interface RenderLinkProps {
|
|
21
|
+
/** Always a real URL: middle-click and "open in new tab" must keep working. */
|
|
22
|
+
readonly href: string;
|
|
23
|
+
/** The styling the control would carry as a plain anchor. */
|
|
24
|
+
readonly className: string;
|
|
25
|
+
readonly children: ReactNode;
|
|
26
|
+
readonly intent: NavigationIntent;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders a navigation control.
|
|
30
|
+
*
|
|
31
|
+
* A seam rather than a router dependency: this package runs under any router or
|
|
32
|
+
* none, so a plain anchor is all it can render by itself — and a plain anchor in
|
|
33
|
+
* a client-routed application is a full document load, which rebuilds the
|
|
34
|
+
* bundle, empties every cache and, inside a workspace tab, leaves the workspace.
|
|
35
|
+
* A host passes a renderer built on its own link component instead.
|
|
36
|
+
*/
|
|
37
|
+
export type RenderLink = (props: RenderLinkProps) => ReactNode;
|
|
38
|
+
/** The fallback: a plain anchor. */
|
|
39
|
+
export declare const renderAnchor: RenderLink;
|
|
40
|
+
//# sourceMappingURL=render-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-link.d.ts","sourceRoot":"","sources":["../../../src/ui/actions/render-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9B,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAC;AAE/D,oCAAoC;AACpC,eAAO,MAAM,YAAY,EAAE,UAI1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** The fallback: a plain anchor. */ export const renderAnchor = ({ href, className, children })=>/*#__PURE__*/ _jsx("a", {
|
|
3
|
+
href: href,
|
|
4
|
+
className: className,
|
|
5
|
+
children: children
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=render-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/actions/render-link.tsx"],"sourcesContent":["import type { EntityId } from '@entifix/core';\nimport type { ReactNode } from 'react';\n\n/**\n * What a navigation control means, so a host can do something other than follow\n * the `href`.\n *\n * `open` goes to a record, `new` to its create form, `back` to the list. A\n * workspace tab needs to know which, because it answers each by opening a tab —\n * and a URL alone does not say what it points at without the host parsing its\n * own routes back.\n */\nexport type NavigationIntent =\n | { readonly kind: 'open'; readonly id: EntityId }\n | { readonly kind: 'new' }\n | { readonly kind: 'back' };\n\nexport interface RenderLinkProps {\n /** Always a real URL: middle-click and \"open in new tab\" must keep working. */\n readonly href: string;\n /** The styling the control would carry as a plain anchor. */\n readonly className: string;\n readonly children: ReactNode;\n readonly intent: NavigationIntent;\n}\n\n/**\n * Renders a navigation control.\n *\n * A seam rather than a router dependency: this package runs under any router or\n * none, so a plain anchor is all it can render by itself — and a plain anchor in\n * a client-routed application is a full document load, which rebuilds the\n * bundle, empties every cache and, inside a workspace tab, leaves the workspace.\n * A host passes a renderer built on its own link component instead.\n */\nexport type RenderLink = (props: RenderLinkProps) => ReactNode;\n\n/** The fallback: a plain anchor. */\nexport const renderAnchor: RenderLink = ({ href, className, children }) => (\n <a href={href} className={className}>\n {children}\n </a>\n);\n"],"names":["renderAnchor","href","className","children","a"],"mappings":";AAqCA,kCAAkC,GAClC,OAAO,MAAMA,eAA2B,CAAC,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,EAAE,iBACpE,KAACC;QAAEH,MAAMA;QAAMC,WAAWA;kBACvBC;OAEH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A link that leaves the site: a new tab, with no `window.opener` and no
|
|
4
|
+
* referrer handed to the other side.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ExternalLink(props: ComponentPropsWithoutRef<'a'> & {
|
|
7
|
+
href: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=external-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-link.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/external-link/external-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,CAAC,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAGxD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* A link that leaves the site: a new tab, with no `window.opener` and no
|
|
5
|
+
* referrer handed to the other side.
|
|
6
|
+
*/ export function ExternalLink(props) {
|
|
7
|
+
return /*#__PURE__*/ _jsx("a", _extends({}, props, {
|
|
8
|
+
target: "_blank",
|
|
9
|
+
rel: "noopener noreferrer"
|
|
10
|
+
}));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=external-link.js.map
|