@sincpro/web-ui 2.0.0 → 2.1.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.
Files changed (119) hide show
  1. package/dist/components/activity/Activity.d.ts +13 -14
  2. package/dist/components/activity/Activity.js +1 -1
  3. package/dist/components/activity/Messages.d.ts +5 -5
  4. package/dist/components/activity/Messages.js +8 -8
  5. package/dist/components/form/Form.js +6 -6
  6. package/dist/components/form/index.js +2 -2
  7. package/dist/components/frame/FrameView.d.ts +5 -5
  8. package/dist/components/frame/FrameView.js +4 -4
  9. package/dist/components/listing/GroupingLevels.d.ts +22 -22
  10. package/dist/components/listing/GroupingLevels.js +9 -9
  11. package/dist/components/listing/Listing.d.ts +11 -11
  12. package/dist/components/listing/Listing.js +11 -11
  13. package/dist/components/listing/ListingBar.js +11 -11
  14. package/dist/components/listing/Row.d.ts +19 -19
  15. package/dist/components/listing/Row.js +25 -25
  16. package/dist/components/listing/SortMenu.d.ts +36 -36
  17. package/dist/components/listing/SortMenu.js +6 -6
  18. package/dist/components/listing/grouping.d.ts +16 -16
  19. package/dist/components/listing/grouping.js +6 -6
  20. package/dist/components/listing/index.js +1 -1
  21. package/dist/components/listing/modelColumns.d.ts +25 -25
  22. package/dist/components/listing/modelColumns.js +24 -24
  23. package/dist/components/listing/pages.js +4 -4
  24. package/dist/components/listing/set.d.ts +18 -18
  25. package/dist/components/navigation/index.js +2 -2
  26. package/dist/components/record/RecordSkeleton.js +7 -7
  27. package/dist/components/search/CriteriaBuilder.d.ts +22 -22
  28. package/dist/components/search/CriteriaBuilder.js +31 -31
  29. package/dist/components/search/CriteriaChips.d.ts +9 -9
  30. package/dist/components/search/CriteriaChips.js +12 -12
  31. package/dist/components/search/FilterBuilder.d.ts +67 -67
  32. package/dist/components/search/FilterBuilder.js +104 -104
  33. package/dist/components/search/JoinWord.d.ts +1 -1
  34. package/dist/components/search/JoinWord.js +14 -14
  35. package/dist/components/search/JsonEditor.d.ts +8 -8
  36. package/dist/components/search/JsonEditor.js +16 -16
  37. package/dist/components/search/SearchBar.d.ts +34 -34
  38. package/dist/components/search/SearchBar.js +110 -110
  39. package/dist/components/search/criteria.d.ts +61 -61
  40. package/dist/components/search/criteria.js +39 -39
  41. package/dist/components/search/datePeriods.d.ts +47 -48
  42. package/dist/components/search/datePeriods.js +29 -29
  43. package/dist/components/search/dateRanges.d.ts +27 -27
  44. package/dist/components/search/dateRanges.js +16 -16
  45. package/dist/components/search/index.js +13 -13
  46. package/dist/components/search/model.d.ts +28 -28
  47. package/dist/components/search/model.js +21 -21
  48. package/dist/components/search/query.d.ts +71 -71
  49. package/dist/components/search/query.js +119 -119
  50. package/dist/components/shell/AppFrame.js +3 -3
  51. package/dist/components/shell/index.js +1 -1
  52. package/dist/foundations/calendar.d.ts +27 -27
  53. package/dist/foundations/calendar.js +72 -72
  54. package/dist/foundations/chart.d.ts +57 -57
  55. package/dist/foundations/chart.js +27 -27
  56. package/dist/foundations/copy.d.ts +96 -94
  57. package/dist/foundations/copy.es.js +1 -0
  58. package/dist/foundations/copy.js +1 -0
  59. package/dist/foundations/grouping.d.ts +175 -175
  60. package/dist/foundations/grouping.js +0 -0
  61. package/dist/foundations/index.d.ts +1 -1
  62. package/dist/foundations/index.js +21 -21
  63. package/dist/foundations/pivot.d.ts +133 -131
  64. package/dist/foundations/pivot.js +54 -54
  65. package/dist/foundations/pivotSheet.d.ts +36 -36
  66. package/dist/foundations/pivotSheet.js +0 -0
  67. package/dist/foundations/slots.d.ts +38 -38
  68. package/dist/foundations/slots.js +18 -18
  69. package/dist/foundations/sticky.d.ts +28 -28
  70. package/dist/foundations/sticky.js +59 -59
  71. package/dist/foundations/xlsx.d.ts +47 -47
  72. package/dist/foundations/xlsx.js +0 -0
  73. package/dist/primitives/block/Line.d.ts +4 -4
  74. package/dist/primitives/block/Line.js +28 -28
  75. package/dist/primitives/block/index.js +2 -2
  76. package/dist/primitives/cell/index.js +2 -2
  77. package/dist/primitives/choice/index.js +3 -3
  78. package/dist/primitives/date/Calendar.d.ts +7 -1
  79. package/dist/primitives/date/Calendar.js +13 -3
  80. package/dist/primitives/date/DatePicker.d.ts +4 -1
  81. package/dist/primitives/date/DatePicker.js +2 -2
  82. package/dist/primitives/date/index.js +3 -3
  83. package/dist/primitives/disclosure/index.js +1 -1
  84. package/dist/primitives/menu/Menu.d.ts +3 -3
  85. package/dist/primitives/notice/Callout.d.ts +30 -30
  86. package/dist/primitives/notice/Callout.js +6 -6
  87. package/dist/primitives/overlay/index.js +3 -3
  88. package/dist/primitives/picker/Picker.d.ts +6 -0
  89. package/dist/primitives/picker/Picker.js +27 -4
  90. package/dist/primitives/picker/index.js +2 -2
  91. package/dist/primitives/table/DataTable.d.ts +32 -32
  92. package/dist/primitives/table/DataTable.js +24 -24
  93. package/dist/primitives/table/EditableTable.d.ts +10 -10
  94. package/dist/primitives/table/EditableTable.js +9 -9
  95. package/dist/primitives/table/ReportTable.js +7 -7
  96. package/dist/primitives/table/SheetTable.d.ts +13 -13
  97. package/dist/primitives/table/SheetTable.js +14 -14
  98. package/dist/primitives/table/Table.js +8 -8
  99. package/dist/primitives/tabs/Tabs.d.ts +46 -46
  100. package/dist/primitives/tabs/Tabs.js +7 -7
  101. package/dist/primitives/tag/index.js +2 -2
  102. package/dist/primitives/toolbar/index.js +1 -1
  103. package/dist/primitives/value/Copyable.d.ts +22 -22
  104. package/dist/primitives/value/Copyable.js +9 -9
  105. package/dist/tokens.css +17 -17
  106. package/dist/views/list/List.d.ts +36 -36
  107. package/dist/views/list/List.js +19 -19
  108. package/dist/views/list/ListView.js +74 -74
  109. package/dist/views/list/columns.d.ts +10 -10
  110. package/dist/views/list/columns.js +10 -10
  111. package/dist/views/list/derive.d.ts +30 -30
  112. package/dist/views/list/derive.js +49 -49
  113. package/dist/views/list/index.js +2 -2
  114. package/dist/views/list/presentations.js +3 -3
  115. package/dist/views/list/types.d.ts +109 -109
  116. package/dist/views/record/Record.d.ts +14 -14
  117. package/dist/views/record/Record.js +24 -24
  118. package/dist/views/record/index.js +1 -1
  119. package/package.json +1 -1
@@ -1,108 +1,108 @@
1
1
  import { type GroupGrain } from "./calendar.js";
2
2
  /**
3
- * LA AGRUPACIÓN, en N niveles.
3
+ * GROUPING, in N levels.
4
4
  *
5
- * Context: agrupar es partir un conjunto por lo que sus filas comparten, y eso
6
- * no tiene por qué ser UNA pregunta. «Por procedencia» es una; «por procedencia
7
- * y después por mes» es la misma pregunta hecha dos veces, y la respuesta es un
8
- * árbol y no una lista de montones.
5
+ * Context: grouping is splitting a set by what its rows share, and that
6
+ * need not be ONE question. «By origin» is one; «by origin
7
+ * and then by month» is the same question asked twice, and the answer is a
8
+ * tree and not a list of piles.
9
9
  *
10
- * ── Qué se PIDE y qué se DIBUJA son dos cosas ──────────────────────
10
+ * ── What is ASKED FOR and what is DRAWN are two things ─────────────
11
11
  *
12
- * `GroupLevel` es lo que alguien pidió: por qué campo partir y, si es una
13
- * fecha, con qué grano. `Pile` es lo que se dibuja: un montón ya armado, con su
14
- * rótulo, cuántas filas tiene y el nivel de abajo. Están separados porque los
15
- * montones no siempre los arma esta máquina: los puede armar quien tenga los
16
- * datos —y contar un catálogo entero es algo que sólo puede contestar quien lo
17
- * guarda—. Por eso `pilesFrom` es un HELPER y no el único camino: una
18
- * presentación recibe `piles` y no sabe ni le importa quién los contó.
12
+ * `GroupLevel` is what somebody asked for: which field to split by and, if it is a
13
+ * date, with what grain. `Pile` is what is drawn: a pile already built, with its
14
+ * label, how many rows it has and the level below. They are separate because
15
+ * the piles are not always built by this machine: they can be built by whoever has the
16
+ * data —and counting a whole catalog is something only whoever
17
+ * stores it can answer—. That is why `pilesFrom` is a HELPER and not the only path: a
18
+ * presentation receives `piles` and neither knows nor cares who counted them.
19
19
  *
20
- * **Esto no conoce ningún motor.** Ni criteria, ni cursores, ni transporte: un
21
- * montón acá es rótulo, conteo, hijos y filas. Quien traduzca la respuesta de un
22
- * servidor a esta forma vive afuera, y por eso la misma presentación sirve para
23
- * un agrupado hecho en el navegador y para uno contado a mil kilómetros.
20
+ * **This knows no engine.** No criteria, no cursors, no transport: a
21
+ * pile here is label, count, children and rows. Whoever translates a server's answer
22
+ * into this shape lives outside, and that is why the same presentation serves
23
+ * a grouping made in the browser and one counted a thousand kilometres away.
24
24
  *
25
- * ── La identidad de un montón es su RUTA ────────────────────────────
25
+ * ── The identity of a pile is its PATH ──────────────────────────────
26
26
  *
27
- * Y no su clave. Con un solo nivel alcanzaba la clave, porque no había dos
28
- * montones que pudieran llamarse igual. Con N niveles sí: «2026-09» puede ser un
29
- * mes adentro de «sintético» y otro adentro de «traído», y son montones
30
- * distintos que se pliegan por separado. La ruta —`["sintético", "2026-09"]`—
31
- * es lo único que los distingue, así que es lo que se guarda.
27
+ * And not its key. With a single level the key was enough, because there were no two
28
+ * piles that could have the same name. With N levels there are: «2026-09» can be a
29
+ * month inside «sintético» and another inside «traído», and they are different
30
+ * piles that fold separately. The path —`["sintético", "2026-09"]`—
31
+ * is the only thing that tells them apart, so it is what is stored.
32
32
  *
33
- * ── La CLAVE identifica; el RÓTULO se lee ───────────────────────────
33
+ * ── The KEY identifies; the LABEL is read ───────────────────────────
34
34
  *
35
- * Y son dos textos. «2026-09» es lo que el motor escribe: lo que se compara con
36
- * lo que contó el servidor, lo que la ruta lleva, lo que queda plegado. Con eso
37
- * a la vista la interfaz habla en máquina, así que el montón lleva además su
38
- * rótulo —«Septiembre»— que es lo que se dibuja y lo único que cambia con el
39
- * idioma. Al revés no se puede: con el rótulo por identidad, dos septiembres de
40
- * años distintos se funden en un montón que no existe, y plegar un mes en
41
- * español lo dejaría abierto en inglés.
35
+ * And they are two texts. «2026-09» is what the engine writes: what is compared with
36
+ * what the server counted, what the path carries, what stays folded. With that
37
+ * in view the interface speaks machine, so the pile also carries its
38
+ * label —«Septiembre»— which is what is drawn and the only thing that changes with the
39
+ * language. The other way round is not possible: with the label as identity, two Septembers of
40
+ * different years melt into a pile that does not exist, and folding a month in
41
+ * Spanish would leave it open in English.
42
42
  *
43
- * Para un campo que no es una fecha los dos textos son el mismo —«sintético» se
44
- * identifica y se lee igual— y por eso el rótulo sólo se pone aparte donde hace
45
- * falta: en las fechas, que las nombra `system/calendar.ts`.
43
+ * For a field that is not a date the two texts are the same —«sintético» is
44
+ * identified and read the same— and that is why the label is only set apart where it is
45
+ * needed: in dates, which `system/calendar.ts` names.
46
46
  */
47
47
  export type { GroupGrain } from "./calendar.js";
48
48
  /**
49
- * De GRUESO a fino. Es el orden en que se anidan los granos de un mismo campo, y
50
- * no es una preferencia: agrupar por día y después por mes daría montones de un
51
- * día dentro de meses que ya no parten nada, porque un día entero vive adentro
52
- * de un solo mes. La jerarquía de un calendario tiene una dirección y es ésta.
49
+ * From COARSE to fine. It is the order in which the grains of the same field nest, and
50
+ * it is not a preference: grouping by day and then by month would give piles of one
51
+ * day inside months that no longer split anything, because a whole day lives inside
52
+ * a single month. A calendar's hierarchy has a direction and this is it.
53
53
  */
54
54
  export declare const GRAIN_ORDER: readonly GroupGrain[];
55
- /** Un NIVEL: por qué campo se parte, y con qué grano si es una fecha. Es lo que
56
- * alguien pidió, no lo que se dibuja. */
55
+ /** A LEVEL: which field is split by, and with what grain if it is a date. It is what
56
+ * somebody asked for, not what is drawn. */
57
57
  export type GroupLevel = {
58
58
  field: string;
59
59
  grain?: GroupGrain;
60
60
  };
61
- /** Un campo por el que SE PUEDE agrupar, para que el control ofrezca algo. Los
62
- * granos se declaran acá y no se adivinan del tipo: quién sabe si una fecha se
63
- * mira por semana o por trimestre es el dominio, y ofrecer los cuatro siempre
64
- * es ofrecer tres que a nadie le sirven. */
61
+ /** A field it is POSSIBLE to group by, so the control offers something. The
62
+ * grains are declared here and not guessed from the type: who knows whether a date is
63
+ * looked at by week or by quarter is the domain, and always offering all four
64
+ * is offering three that serve nobody. */
65
65
  export type GroupableField = {
66
66
  field: string;
67
67
  label: string;
68
- /** Presentes = es una fecha y estos son los cortes que tienen sentido. */
68
+ /** Present = it is a date and these are the cuts that make sense. */
69
69
  grains?: readonly GroupGrain[];
70
70
  };
71
71
  /**
72
- * Un MONTÓN ya armado: lo que sus filas comparten, cuántas son, y el nivel de
73
- * abajo.
72
+ * A PILE already built: what its rows share, how many there are, and the level
73
+ * below.
74
74
  */
75
75
  export type Pile<T> = {
76
- /** La ruta desde la raíz, en CLAVES. Es la identidad del montón: lo que lo
77
- * pliega y lo que lo distingue de un hermano homónimo en otra rama. */
76
+ /** The path from the root, in KEYS. It is the pile's identity: what folds
77
+ * it and what tells it apart from a namesake sibling in another branch. */
78
78
  path: readonly string[];
79
- /** Cuán adentro está. `0` es el primer nivel. Lo usa la sangría. */
79
+ /** How deep it is. `0` is the first level. The indentation uses it. */
80
80
  depth: number;
81
- /** Por qué campo se partió acá. Lo dibuja el encabezado a la izquierda del
82
- * valor: sin él, «2026-09» no dice si es cuándo se registró o cuándo se
83
- * corrió. */
81
+ /** Which field it was split by here. The header draws it to the left of the
82
+ * value: without it, «2026-09» does not say whether it is when it was registered or when it was
83
+ * run. */
84
84
  field: string;
85
- /** Lo que las filas COMPARTEN, en el idioma del motor: «2026-09». Es el último
86
- * tramo de la ruta, y lo que se compara con lo que contó el servidor. */
85
+ /** What the rows SHARE, in the engine's language: «2026-09». It is the last
86
+ * segment of the path, and what is compared with what the server counted. */
87
87
  key: string;
88
- /** El mismo valor, ya legible y en el idioma activo: «Septiembre». Es lo que
89
- * se dibuja, y lo único de un montón que cambia con el idioma. */
88
+ /** The same value, already readable and in the active language: «Septiembre». It is what
89
+ * is drawn, and the only thing of a pile that changes with the language. */
90
90
  label: string;
91
91
  /**
92
- * Cuántas filas hay en el montón — TODAS, no las de la página.
92
+ * How many rows are in the pile — ALL of them, not the page's.
93
93
  *
94
- * Es la diferencia entre «hay 187 sintéticos» y «se ven 12»: un conteo que
95
- * cambia al pasar de página no es un conteo, es un largo de array. Cuando los
96
- * montones los cuenta quien guarda los datos, este número viene de allá.
94
+ * It is the difference between «there are 187 synthetics» and «12 are seen»: a count that
95
+ * changes on turning the page is not a count, it is an array length. When the
96
+ * piles are counted by whoever stores the data, this number comes from there.
97
97
  */
98
98
  count: number;
99
99
  /** What the pile ADDS UP TO, already written — «Total Bs 1.204.933» — summed by whoever
100
100
  * keeps the data over EVERY row in it, like the count. Drawn in the pile's header. */
101
101
  detail?: string;
102
- /** Las filas, en el nivel MÁS PROFUNDO. Vacío en los de arriba: un montón que
103
- * tiene montones adentro no tiene filas propias. */
102
+ /** The rows, at the DEEPEST level. Empty in the ones above: a pile that
103
+ * has piles inside has no rows of its own. */
104
104
  items: readonly T[];
105
- /** El nivel de abajo. Vacío en el más profundo. */
105
+ /** The level below. Empty at the deepest. */
106
106
  piles: readonly Pile<T>[];
107
107
  /**
108
108
  * What the next «show more» of a short pile brings — said by whoever pages it.
@@ -115,179 +115,179 @@ export type Pile<T> = {
115
115
  more?: number | false;
116
116
  };
117
117
  /**
118
- * La identidad de un NIVEL: el campo y, si es fecha, su grano.
118
+ * The identity of a LEVEL: the field and, if it is a date, its grain.
119
119
  *
120
- * El campo solo no alcanza desde que un mismo campo puede estar puesto con
121
- * varios granos —«por mes y adentro por día» son dos niveles del mismo
122
- * `registered_at`— y dos niveles que se llaman igual no se pueden ni sacar ni
123
- * mover por separado.
120
+ * The field alone is not enough since the same field can be set with
121
+ * several grains —«by month and inside by day» are two levels of the same
122
+ * `registered_at`— and two levels with the same name can be neither removed nor
123
+ * moved separately.
124
124
  */
125
125
  export declare function levelKey(level: GroupLevel): string;
126
126
  /**
127
- * Los niveles, acomodados.
127
+ * The levels, arranged.
128
128
  *
129
- * Dos reglas, y las dos son del calendario y no del gusto de nadie:
129
+ * Two rules, and both belong to the calendar and not to anybody's taste:
130
130
  *
131
- * 1. Los niveles de un MISMO campo quedan juntos. Partir por mes, después por
132
- * procedencia y después por día del mismo campo deja dos cortes de la misma
133
- * fecha separados por otra cosa, y eso no es una jerarquía, es un tropiezo.
134
- * 2. Adentro de un campo van de GRUESO a FINO. Tildar «día» y después «mes»
135
- * tiene que dar «mes › día», porque al revés el mes no parte nada: un día
136
- * entero ya vive adentro de un solo mes.
131
+ * 1. The levels of the SAME field stay together. Splitting by month, then by
132
+ * origin and then by day of the same field leaves two cuts of the same
133
+ * date separated by something else, and that is not a hierarchy, it is a stumble.
134
+ * 2. Within a field they go from COARSE to FINE. Ticking «día» and then «mes»
135
+ * must give «mes › día», because the other way round the month splits nothing: a whole
136
+ * day already lives inside a single month.
137
137
  *
138
- * El orden ENTRE campos lo decide quien agrupa —es una pregunta del dominio, no
139
- * del calendario— así que se respeta el de primera aparición y se puede mover.
138
+ * The order BETWEEN fields is decided by whoever groups —it is a domain question, not
139
+ * a calendar one— so that of first appearance is respected and it can be moved.
140
140
  */
141
141
  export declare function normalizeLevels(levels: readonly GroupLevel[]): GroupLevel[];
142
142
  /**
143
- * LO QUE HACE AGRUPABLE A UNA VISTA.
143
+ * WHAT MAKES A VIEW GROUPABLE.
144
144
  *
145
- * Cualquier componente que dibuje N cosas —filas, tarjetas, celdas, líneas de un
146
- * informe, puntos de una serie— puede agrupar aceptando ESTO y nada más. Es
147
- * deliberadamente corto: cinco campos, ninguno opcional por capricho.
145
+ * Any component that draws N things —rows, cards, cells, lines of a
146
+ * report, points of a series— can group by accepting THIS and nothing else. It is
147
+ * deliberately short: five fields, none optional on a whim.
148
148
  *
149
- * ── Lo que el contrato SÍ fija ──────────────────────────────────────
149
+ * ── What the contract DOES fix ──────────────────────────────────────
150
150
  *
151
- * levels qué se pregunta, y en qué orden
152
- * of a qué montón va cada cosa, ya legible
153
- * piles el árbol ya armado, si lo contó alguien con el conjunto entero
154
- * collapsed qué está plegado, por ruta
155
- * onToggle cómo se pliega
151
+ * levels what is asked, and in what order
152
+ * of which pile each thing goes to, already readable
153
+ * piles the tree already built, if somebody counted it with the whole set
154
+ * collapsed what is folded, by path
155
+ * onToggle how it folds
156
156
  *
157
- * ── Lo que NO fija, y es el punto ───────────────────────────────────
157
+ * ── What it does NOT fix, and that is the point ─────────────────────
158
158
  *
159
- * **Cómo se dibuja un montón.** La lista pone un encabezado con filete; la
160
- * planilla, una banda pegada a la izquierda porque está virtualizada por índice
161
- * y no puede anidar el marcado; la tabla usa una fila con `colSpan`; el informe
162
- * hace una línea con sus subtotales; una serie haría una serie por montón. Las
163
- * cinco son correctas y ninguna sirve para las otras — un contrato que además
164
- * dictara el dibujo obligaría a todas a parecerse a la primera que se escribió.
159
+ * **How a pile is drawn.** The list puts a header with a rule; the
160
+ * spreadsheet, a band stuck to the left because it is virtualized by index
161
+ * and cannot nest the markup; the table uses a row with `colSpan`; the report
162
+ * makes a line with its subtotals; a series would make one series per pile. All
163
+ * five are correct and none serves the others — a contract that also
164
+ * dictated the drawing would force all of them to look like the first one written.
165
165
  *
166
- * Por eso lo que se comparte es el ÁRBOL y no el render: quien implementa recibe
167
- * `Pile[]` de `pilesOf()` y lo recorre como su presentación necesite.
166
+ * That is why what is shared is the TREE and not the render: whoever implements receives
167
+ * `Pile[]` from `pilesOf()` and walks it as their presentation needs.
168
168
  *
169
- * ── Cómo se implementa ──────────────────────────────────────────────
169
+ * ── How it is implemented ───────────────────────────────────────────
170
170
  *
171
171
  * function MiVista<T>({ items, grouping }: { items: readonly T[]; grouping?: Grouping<T> }) {
172
172
  * const piles = pilesOf(items, grouping);
173
173
  * if (piles === null) return <>{items.map(dibujar)}</>;
174
- * return recorrer(piles); // ← acá manda la presentación
174
+ * return recorrer(piles); // ← here the presentation rules
175
175
  * }
176
176
  */
177
177
  export type Grouping<T> = {
178
178
  /**
179
- * Los niveles pedidos, de afuera hacia adentro. Vacío = sin agrupar.
179
+ * The levels asked for, from the outside in. Empty = not grouped.
180
180
  *
181
- * El ORDEN es la jerarquía: `[origen, mes]` y `[mes, origen]` son dos lecturas
182
- * distintas del mismo conjunto.
181
+ * The ORDER is the hierarchy: `[origen, mes]` and `[mes, origen]` are two different
182
+ * readings of the same set.
183
183
  */
184
184
  levels: readonly GroupLevel[];
185
- /** A qué montón va cada cosa, en cada nivel: la CLAVE. Recortar una fecha a su
186
- * grano es de quien conoce el dato, no del sistema. */
185
+ /** Which pile each thing goes to, at each level: the KEY. Trimming a date to its
186
+ * grain belongs to whoever knows the datum, not to the system. */
187
187
  of: PileOf<T>;
188
- /** Cómo se lee una clave. Sin esto, una fecha la nombra el calendario del
189
- * sistema en el idioma activo y lo demás se dibuja tal cual. */
188
+ /** How a key is read. Without this, a date is named by the system's calendar in the
189
+ * active language and everything else is drawn as is. */
190
190
  label?: PileLabelOf;
191
191
  /**
192
- * El árbol YA armado, cuando lo contó quien tiene el conjunto entero.
192
+ * The tree ALREADY built, when it was counted by whoever has the whole set.
193
193
  *
194
- * Existe porque un conteo que sólo conoce la página no es un conteo: «187
195
- * sintéticos» no lo pueden contestar las doce filas que se trajeron. Quién
196
- * cuenta no es asunto de esta capa — dibuja el mismo árbol en los dos casos.
194
+ * It exists because a count that only the page knows is not a count: «187
195
+ * sintéticos» cannot be answered by the twelve rows that were brought. Who
196
+ * counts is not this layer's business — it draws the same tree in both cases.
197
197
  *
198
- * Un árbol contado afuera llega con sus rótulos PUESTOS, y esta capa no se los
199
- * toca: quien lo tradujo sabe cuál de sus claves es una fecha y cuál es un
200
- * código con nombre propio. `dateLabel` está exportado para que los ponga con
201
- * las mismas palabras que el árbol armado acá.
198
+ * A tree counted outside arrives with its labels SET, and this layer does not
199
+ * touch them: whoever translated it knows which of its keys is a date and which is a
200
+ * code with a proper name. `dateLabel` is exported so they can set them with
201
+ * the same words as the tree built here.
202
202
  */
203
203
  piles?: readonly Pile<T>[];
204
- /** Qué montones están plegados, por `pathKey(pile.path)`. */
204
+ /** Which piles are folded, by `pathKey(pile.path)`. */
205
205
  collapsed?: readonly string[];
206
206
  onToggle?: (key: string) => void;
207
207
  /**
208
- * Un montón contado afuera trae su PRIMERA página y su conteo entero: esto pide las
209
- * siguientes. Con esto, cada presentación ofrece «Ver N más» debajo del montón que
210
- * tiene menos filas de las que cuenta; quien guarda los datos agrega las que lleguen a
208
+ * A pile counted outside brings its FIRST page and its whole count: this asks for the
209
+ * following ones. With this, each presentation offers «Ver N más» below the pile that
210
+ * has fewer rows than it counts; whoever stores the data adds those that arrive to
211
211
  * `pile.items`.
212
212
  */
213
213
  onMore?: (pile: Pile<T>) => void;
214
214
  };
215
215
  /**
216
- * El árbol que hay que dibujar, o `null` si no se agrupa.
216
+ * The tree to draw, or `null` if nothing is grouped.
217
217
  *
218
- * Es la única línea que un componente necesita escribir para volverse agrupable:
219
- * decide entre el árbol que le pasaron y el que arma con las cosas en la mano, y
220
- * contesta `null` cuando no hay nada que partir — que es distinto de un árbol
221
- * vacío, porque un árbol vacío significa «se agrupó y no quedó nada».
218
+ * It is the only line a component needs to write to become groupable:
219
+ * it chooses between the tree it was given and the one it builds with the things in hand, and
220
+ * answers `null` when there is nothing to split — which is different from an empty
221
+ * tree, because an empty tree means «it was grouped and nothing was left».
222
222
  */
223
223
  export declare function pilesOf<T>(items: readonly T[], grouping: Grouping<T> | undefined): readonly Pile<T>[] | null;
224
- /** Si un montón está abierto, según lo plegado. Abierto es el default: agrupar y
225
- * después tener que abrir cada montón son dos gestos para lo que se pidió en
226
- * uno. */
224
+ /** Whether a pile is open, according to what is folded. Open is the default: grouping and
225
+ * then having to open each pile are two gestures for what was asked in
226
+ * one. */
227
227
  export declare function pileIsOpen<T>(pile: Pile<T>, grouping: Grouping<T> | undefined): boolean;
228
- /** La clave de plegado de una ruta. El separador es un carácter que no aparece
229
- * en un valor real, así que dos rutas distintas no pueden producir la misma
230
- * clave por concatenación — `["a", "b"]` y `["ab"]` sí podrían con un
231
- * separador escribible. */
228
+ /** The fold key of a path. The separator is a character that does not appear
229
+ * in a real value, so two different paths cannot produce the same
230
+ * key by concatenation — `["a", "b"]` and `["ab"]` could with a
231
+ * writable separator. */
232
232
  export declare function pathKey(path: readonly string[]): string;
233
- /** Qué montón le toca a cada fila en cada nivel: su CLAVE. Recortar una fecha a
234
- * su grano es cosa de quien conoce el dato —`dateKey` la recorta con el mismo
235
- * texto que el motor— y ponerle nombre es cosa del rótulo. */
233
+ /** Which pile each row goes to at each level: its KEY. Trimming a date to
234
+ * its grain belongs to whoever knows the datum —`dateKey` trims it with the same
235
+ * text as the engine— and naming it belongs to the label. */
236
236
  export type PileOf<T> = (item: T, level: GroupLevel) => string;
237
237
  /**
238
- * Cómo se lee la clave de un montón.
238
+ * How a pile's key is read.
239
239
  *
240
- * `within` son los granos que los montones de ARRIBA, del mismo campo, ya
241
- * dijeron: con el año afuera, un mes se rotula «Septiembre» y no «Septiembre de
242
- * 2026». Decirlo dos veces llena la sangría con lo que está dos renglones más
243
- * arriba.
240
+ * `within` are the grains that the piles ABOVE, of the same field, already
241
+ * said: with the year outside, a month is labeled «Septiembre» and not «Septiembre de
242
+ * 2026». Saying it twice fills the indentation with what is two lines
243
+ * above.
244
244
  */
245
245
  export type PileLabelOf = (key: string, level: GroupLevel, within: readonly GroupGrain[]) => string;
246
- /** El rótulo por default: una fecha la nombra el calendario en el idioma activo,
247
- * y lo que no es una fecha se dibuja tal cual —«sintético» se identifica y se
248
- * lee con la misma palabra, y traducirlo sería inventar un valor que nadie
249
- * guardó. */
246
+ /** The default label: a date is named by the calendar in the active language,
247
+ * and what is not a date is drawn as is —«sintético» is identified and read
248
+ * with the same word, and translating it would be inventing a value nobody
249
+ * stored. */
250
250
  export declare function pileLabel(key: string, level: GroupLevel, within: readonly GroupGrain[]): string;
251
251
  /**
252
- * CÓMO SE LEE UNA RUTA de claves, tramo por tramo.
252
+ * HOW A PATH of keys IS READ, segment by segment.
253
253
  *
254
- * La clave identifica y el rótulo se lee: «2026-09» es lo que el motor escribe y
255
- * «Septiembre» lo que se dibuja. Cualquiera que tenga una ruta —el eje de un
256
- * pivote, el título de un montón, una miga— la dice con esto, porque una ruta
257
- * que se lee distinta según quién la dibuje es el mismo corte con dos caras.
254
+ * The key identifies and the label is read: «2026-09» is what the engine writes and
255
+ * «Septiembre» what is drawn. Anyone who has a path —a pivot's axis, a pile's
256
+ * title, a breadcrumb— says it with this, because a path that
257
+ * reads differently depending on who draws it is the same cut with two faces.
258
258
  *
259
- * `within` sale de los niveles de ARRIBA del mismo campo: con el año afuera, el
260
- * mes se dice «Septiembre» y no «Septiembre de 2026», porque eso ya está escrito
261
- * un tramo antes.
259
+ * `within` comes from the levels ABOVE of the same field: with the year outside, the
260
+ * month is said «Septiembre» and not «Septiembre de 2026», because that is already written
261
+ * one segment earlier.
262
262
  */
263
263
  export declare function pathLabels(levels: readonly GroupLevel[], path: readonly string[], label?: PileLabelOf): string[];
264
264
  /**
265
- * Arma el árbol de montones a partir de las filas que hay EN LA MANO.
265
+ * Builds the tree of piles from the rows IN HAND.
266
266
  *
267
- * Sirve cuando el conjunto entero está en el navegador. Cuando no lo está —un
268
- * catálogo de ciento ochenta y siete del que se bajaron doce—, los montones los
269
- * cuenta quien los guarda y esto no se usa: la presentación recibe `piles` ya
270
- * hechos. Las dos formas dibujan igual porque dibujan el mismo tipo.
267
+ * It serves when the whole set is in the browser. When it is not —a
268
+ * catalog of a hundred and eighty-seven of which twelve were downloaded—, the piles are
269
+ * counted by whoever stores them and this is not used: the presentation receives `piles` already
270
+ * made. Both forms draw the same because they draw the same type.
271
271
  *
272
- * El orden de los montones es el de PRIMERA APARICIÓN de cada valor, en cada
273
- * nivel. No se ordena alfabéticamente: el orden de las filas ya lo decidió
274
- * alguien —una columna, un criterio, el motor— y reordenar los montones acá lo
275
- * contradiría.
272
+ * The order of the piles is that of FIRST APPEARANCE of each value, at each
273
+ * level. It is not sorted alphabetically: the order of the rows was already decided by
274
+ * somebody —a column, a criterion, the engine— and reordering the piles here would
275
+ * contradict it.
276
276
  */
277
277
  export declare function pilesFrom<T>(items: readonly T[], levels: readonly GroupLevel[], of: PileOf<T>, label?: PileLabelOf): readonly Pile<T>[];
278
278
  /**
279
- * La ruta de UNA fila: el montón que le toca en cada nivel.
279
+ * The path of ONE row: the pile it falls in at each level.
280
280
  *
281
- * Es la identidad del montón más profundo que la contiene, sin armar el árbol.
282
- * Sirve para preguntar «¿estas dos filas son vecinas?», que con un solo nivel se
283
- * contestaba comparando una clave y con N hay que comparar la ruta entera: dos
284
- * datasets del mismo mes son vecinos sólo si además comparten la procedencia,
285
- * porque si no están en montones distintos aunque el último tramo coincida.
281
+ * It is the identity of the deepest pile that contains it, without building the tree.
282
+ * It serves to ask «are these two rows neighbors?», which with a single level was
283
+ * answered by comparing a key and with N the whole path must be compared: two
284
+ * datasets of the same month are neighbors only if they also share the origin,
285
+ * because otherwise they are in different piles even if the last segment matches.
286
286
  */
287
287
  export declare function itemPath<T>(item: T, levels: readonly GroupLevel[], of: PileOf<T>): string[];
288
- /** Las filas de un árbol, en el orden en que se dibujan. Lo usan las
289
- * presentaciones que necesitan la secuencia y no el árbol —la planilla
290
- * virtualizada, que cuenta índices— y el que quiera saber qué quedó visible. */
288
+ /** The rows of a tree, in the order they are drawn. Used by
289
+ * presentations that need the sequence and not the tree —the virtualized
290
+ * spreadsheet, which counts indices— and whoever wants to know what stayed visible. */
291
291
  export declare function pileItems<T>(piles: readonly Pile<T>[]): readonly T[];
292
292
  /**
293
293
  * What the foot of a pile offers: the next page, or the word that there is none.
@@ -308,11 +308,11 @@ export type PileFoot = {
308
308
  count: number;
309
309
  };
310
310
  export declare function pileFoot<T>(pile: Pile<T>, canAsk: boolean): PileFoot | null;
311
- /** Cuántas filas hay en total. Suma los conteos del primer nivel, que ya
312
- * incluyen los de abajo — no recorre las filas, porque puede no tenerlas. */
311
+ /** How many rows there are in total. Adds up the counts of the first level, which already
312
+ * include those below — it does not walk the rows, because it may not have them. */
313
313
  export declare function pileCount<T>(piles: readonly Pile<T>[]): number;
314
- /** Mueve un nivel `delta` lugares. Se queda en los bordes en vez de dar la
315
- * vuelta: llegar al primero y volver al último no es lo que nadie espera de una
316
- * flecha «subir». El orden de los niveles ES la jerarquía, así que esto cambia
317
- * la pregunta y no sólo la lista. */
314
+ /** Moves a level `delta` places. It stays at the edges instead of wrapping
315
+ * around: reaching the first and coming back to the last is not what anybody expects of
316
+ * an «up» arrow. The order of the levels IS the hierarchy, so this changes
317
+ * the question and not just the list. */
318
318
  export declare function moveLevel(levels: readonly GroupLevel[], field: string, delta: number): GroupLevel[];
Binary file
@@ -5,7 +5,7 @@ export { controlName, FieldBoundary, type FieldIds, type FormMode, FormModeProvi
5
5
  export { bySurface, SurfaceProvider, useSurface } from "./surface.js";
6
6
  export { applyTheme, isTheme, type ResolvedTheme, resolveTheme, type Theme, THEME_ATTRIBUTE, ThemeProvider, type ThemeProviderProps, THEMES, useTheme, } from "./theme.js";
7
7
  export type { OpenTarget, Size, Surface, Tone } from "./types.js";
8
- /** El castellano del sistema, para quien lo quiera instalar entero. */
8
+ /** The system's Spanish, for whoever wants to install it whole. */
9
9
  export { SPANISH_COPY } from "./copy.es.js";
10
10
  export { flatten, loose, pick, pickAll, propsOf, slot, slotOf, type Slotted, } from "./slots.js";
11
11
  export { dateKey, dateKeysBetween, dateLabel, grainName, monthName, nextDateKey, } from "./calendar.js";