@starci/gallery 0.0.0-stage → 0.1.1

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 (51) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +38 -2
  4. package/dist/app/App.d.ts +2 -0
  5. package/dist/app/App.js +77 -0
  6. package/dist/app/ExplainPanel.d.ts +13 -0
  7. package/dist/app/ExplainPanel.js +35 -0
  8. package/dist/app/FlowMap.d.ts +9 -0
  9. package/dist/app/FlowMap.js +14 -0
  10. package/dist/app/Legend.d.ts +6 -0
  11. package/dist/app/Legend.js +9 -0
  12. package/dist/app/Lightbox.d.ts +18 -0
  13. package/dist/app/Lightbox.js +66 -0
  14. package/dist/app/States.d.ts +10 -0
  15. package/dist/app/States.js +23 -0
  16. package/dist/app/Tree.d.ts +11 -0
  17. package/dist/app/Tree.js +30 -0
  18. package/dist/app/Viewer.d.ts +44 -0
  19. package/dist/app/Viewer.js +114 -0
  20. package/dist/app/app.css +415 -0
  21. package/dist/app/cap.d.ts +2 -0
  22. package/dist/app/cap.js +4 -0
  23. package/dist/app/data.d.ts +9 -0
  24. package/dist/app/data.js +3 -0
  25. package/dist/app/inline.d.ts +5 -0
  26. package/dist/app/inline.js +13 -0
  27. package/dist/app/main.d.ts +1 -0
  28. package/dist/app/main.js +9 -0
  29. package/dist/app/media.d.ts +3 -0
  30. package/dist/app/media.js +17 -0
  31. package/dist/app/route.d.ts +15 -0
  32. package/dist/app/route.js +29 -0
  33. package/dist/app/status.d.ts +8 -0
  34. package/dist/app/status.js +9 -0
  35. package/dist/explain.d.ts +45 -0
  36. package/dist/explain.js +140 -0
  37. package/dist/frames.d.ts +2 -0
  38. package/dist/frames.js +2 -0
  39. package/dist/index.d.ts +6 -0
  40. package/dist/index.js +4 -0
  41. package/dist/labels.d.ts +252 -0
  42. package/dist/labels.js +177 -0
  43. package/dist/load.d.ts +35 -0
  44. package/dist/load.js +163 -0
  45. package/dist/model.d.ts +92 -0
  46. package/dist/model.js +112 -0
  47. package/dist/views.d.ts +6 -0
  48. package/dist/views.js +12 -0
  49. package/dist/vite.d.ts +22 -0
  50. package/dist/vite.js +110 -0
  51. package/package.json +90 -4
@@ -0,0 +1,415 @@
1
+ @import "tailwindcss";
2
+ @import "@heroui/styles/css";
3
+ @import "@starci/grammar/core/styles.css";
4
+ @import "@starci/grammar/core/theme.css";
5
+
6
+ /* Grammar's renderers and this app's own modules hold Tailwind utilities outside the gallery folder (the layout of an installed package: node_modules/@starci/*). */
7
+ @source "../../../grammar/dist";
8
+ @source "./";
9
+
10
+ /* The layout only: the one place the gallery arranges Grammar elements. Colours, type and spacing are Grammar's tokens; no element is redrawn here. */
11
+ html,
12
+ body,
13
+ #root {
14
+ height: 100%;
15
+ margin: 0;
16
+ }
17
+
18
+ .sg-shell {
19
+ display: grid;
20
+ grid-template-columns: clamp(14rem, 17vw, 19rem) minmax(0, 1fr) clamp(17rem, 23vw, 26rem);
21
+ grid-template-rows: auto minmax(0, 1fr);
22
+ grid-template-areas:
23
+ "top top top"
24
+ "tree main explain";
25
+ height: 100dvh;
26
+ background: var(--background);
27
+ color: var(--foreground);
28
+ }
29
+
30
+ .sg-shell[data-explain="closed"] {
31
+ grid-template-columns: clamp(14rem, 17vw, 19rem) minmax(0, 1fr);
32
+ grid-template-areas:
33
+ "top top"
34
+ "tree main";
35
+ }
36
+
37
+ .sg-top {
38
+ grid-area: top;
39
+ display: flex;
40
+ flex-wrap: nowrap;
41
+ align-items: center;
42
+ gap: 0.75rem 1.25rem;
43
+ padding: 0.5rem 1.25rem;
44
+ border-bottom: 1px solid var(--border);
45
+ }
46
+
47
+ .sg-brand {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 0.5rem;
51
+ flex: 1 1 0;
52
+ min-width: 0;
53
+ }
54
+
55
+ .sg-title {
56
+ display: flex;
57
+ flex-direction: column;
58
+ min-width: 0;
59
+ }
60
+
61
+ .sg-title > * {
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ }
66
+
67
+ .sg-top > :last-child:is(button) {
68
+ margin-left: auto;
69
+ }
70
+
71
+ .sg-switches {
72
+ display: flex;
73
+ flex-wrap: nowrap;
74
+ flex: none;
75
+ gap: 0.75rem 1.5rem;
76
+ }
77
+
78
+ .sg-tree {
79
+ grid-area: tree;
80
+ overflow-y: auto;
81
+ border-right: 1px solid var(--border);
82
+ padding: 0.75rem;
83
+ }
84
+
85
+ .sg-tree-body {
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: 0.75rem;
89
+ }
90
+
91
+ .sg-main {
92
+ grid-area: main;
93
+ overflow-y: auto;
94
+ display: flex;
95
+ flex-direction: column;
96
+ min-width: 0;
97
+ background: var(--background);
98
+ }
99
+
100
+ .sg-main > :first-child:not(.sg-board) {
101
+ background: var(--background);
102
+ padding: 0 1rem;
103
+ border-bottom: 1px solid var(--border);
104
+ }
105
+
106
+ .sg-explain {
107
+ grid-area: explain;
108
+ overflow-y: auto;
109
+ border-left: 1px solid var(--border);
110
+ padding: 1.25rem;
111
+ }
112
+
113
+ .sg-explain-body,
114
+ .sg-flows {
115
+ display: flex;
116
+ flex-direction: column;
117
+ gap: 1.25rem;
118
+ }
119
+
120
+ .sg-flows {
121
+ padding: 1.25rem;
122
+ background: var(--background);
123
+ min-height: 100%;
124
+ }
125
+
126
+ .sg-explain-head {
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 0.5rem;
130
+ }
131
+
132
+ .sg-chips {
133
+ display: flex;
134
+ flex-wrap: wrap;
135
+ align-items: center;
136
+ gap: 0.5rem 1rem;
137
+ }
138
+
139
+ .sg-rows {
140
+ margin: 0;
141
+ display: flex;
142
+ flex-direction: column;
143
+ gap: 0.75rem;
144
+ }
145
+
146
+ .sg-row {
147
+ display: grid;
148
+ grid-template-columns: 5.5rem minmax(0, 1fr);
149
+ gap: 0.75rem;
150
+ align-items: baseline;
151
+ }
152
+
153
+ .sg-row > dd,
154
+ .sg-row > dt {
155
+ margin: 0;
156
+ }
157
+
158
+ .sg-row > :only-child {
159
+ grid-column: 1 / -1;
160
+ }
161
+
162
+ /* The board is as tall as its frames and no taller: the grey stops where the content does. */
163
+ .sg-board {
164
+ padding: 1rem;
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 1rem;
168
+ flex: none;
169
+ background: color-mix(in oklab, var(--foreground) 5%, var(--background));
170
+ }
171
+
172
+ .sg-columns {
173
+ display: grid;
174
+ gap: 1rem;
175
+ grid-template-columns: 1fr;
176
+ align-items: start;
177
+ }
178
+
179
+ .sg-columns[data-columns="2"] {
180
+ grid-template-columns: 1fr 1fr;
181
+ }
182
+
183
+ .sg-columns figure {
184
+ margin: 0;
185
+ display: flex;
186
+ flex-direction: column;
187
+ gap: 0.5rem;
188
+ min-width: 0;
189
+ }
190
+
191
+ .sg-frame,
192
+ .sg-shot {
193
+ position: relative;
194
+ overflow: hidden;
195
+ background: var(--background);
196
+ border: 1px solid var(--border);
197
+ }
198
+
199
+ .sg-frame iframe {
200
+ border: 0;
201
+ display: block;
202
+ transform-origin: 0 0;
203
+ background: var(--background);
204
+ }
205
+
206
+ .sg-shot img {
207
+ display: block;
208
+ width: 100%;
209
+ height: auto;
210
+ }
211
+
212
+ .sg-hotspot {
213
+ position: absolute;
214
+ border: 1px dashed var(--accent);
215
+ background: color-mix(in oklab, var(--accent) 8%, transparent);
216
+ cursor: pointer;
217
+ }
218
+
219
+ .sg-hotspot:disabled {
220
+ cursor: default;
221
+ opacity: 0.4;
222
+ }
223
+
224
+ .sg-slider {
225
+ display: flex;
226
+ flex-direction: column;
227
+ gap: 1rem;
228
+ }
229
+
230
+ .sg-stage {
231
+ position: relative;
232
+ }
233
+
234
+ .sg-over {
235
+ position: absolute;
236
+ inset: 0 auto auto 0;
237
+ width: 100%;
238
+ }
239
+
240
+ .sg-handle {
241
+ position: absolute;
242
+ top: 0;
243
+ bottom: 0;
244
+ width: 2px;
245
+ background: var(--accent);
246
+ pointer-events: none;
247
+ }
248
+
249
+ .sg-step {
250
+ display: flex;
251
+ flex-direction: column;
252
+ text-align: left;
253
+ gap: 0.125rem;
254
+ padding: 0.5rem 0.75rem;
255
+ border: 1px solid var(--border);
256
+ border-radius: 0.5rem;
257
+ background: var(--background);
258
+ cursor: pointer;
259
+ }
260
+
261
+ .sg-flow,
262
+ .sg-edges {
263
+ align-items: center;
264
+ list-style: none;
265
+ margin: 0;
266
+ padding: 0;
267
+ display: flex;
268
+ flex-wrap: wrap;
269
+ gap: 0.5rem;
270
+ }
271
+
272
+ .sg-edges {
273
+ flex-direction: column;
274
+ }
275
+
276
+ .sg-edge {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 0.75rem;
280
+ flex-wrap: wrap;
281
+ }
282
+
283
+ @media (max-width: 1100px) {
284
+ .sg-shell,
285
+ .sg-shell[data-explain="closed"] {
286
+ grid-template-columns: minmax(0, 1fr);
287
+ grid-template-rows: auto auto auto auto;
288
+ grid-template-areas:
289
+ "top"
290
+ "tree"
291
+ "main"
292
+ "explain";
293
+ height: auto;
294
+ }
295
+
296
+ .sg-top,
297
+ .sg-switches {
298
+ flex-wrap: wrap;
299
+ }
300
+
301
+ /* A narrow window gives the title and the counts a row of their own, in full. */
302
+ .sg-brand {
303
+ flex: 1 1 100%;
304
+ }
305
+
306
+ .sg-title > * {
307
+ overflow: visible;
308
+ white-space: normal;
309
+ }
310
+
311
+ .sg-tree {
312
+ max-height: 18rem;
313
+ border-right: 0;
314
+ border-bottom: 1px solid var(--border);
315
+ }
316
+
317
+ .sg-explain {
318
+ border-left: 0;
319
+ border-top: 1px solid var(--border);
320
+ }
321
+
322
+ .sg-main {
323
+ overflow: visible;
324
+ }
325
+ }
326
+
327
+ /* A long identifier or path in an explanation wraps inside its row instead of running under the next panel. */
328
+ .sg-row > dd {
329
+ min-width: 0;
330
+ overflow-wrap: anywhere;
331
+ }
332
+
333
+ .sg-row code {
334
+ white-space: normal;
335
+ overflow-wrap: anywhere;
336
+ }
337
+
338
+ .sg-open {
339
+ position: absolute;
340
+ inset: 0;
341
+ border: 0;
342
+ background: transparent;
343
+ cursor: zoom-in;
344
+ }
345
+
346
+ .sg-lightbox {
347
+ height: calc(100dvh - 15rem);
348
+ overflow: auto;
349
+ cursor: grab;
350
+ background: color-mix(in oklab, var(--foreground) 5%, var(--background));
351
+ padding: 0.5rem;
352
+ }
353
+
354
+ .sg-lightbox:active {
355
+ cursor: grabbing;
356
+ }
357
+
358
+ .sg-lightbox-img {
359
+ display: block;
360
+ max-width: none;
361
+ height: auto;
362
+ border: 1px solid var(--border);
363
+ }
364
+
365
+ .sg-zoom {
366
+ display: flex;
367
+ align-items: center;
368
+ gap: 0.75rem;
369
+ }
370
+
371
+ .sg-explain-narrow {
372
+ padding: 1rem;
373
+ background: var(--background);
374
+ }
375
+
376
+ .sg-explain-head {
377
+ overflow-wrap: anywhere;
378
+ }
379
+
380
+ .sg-legend {
381
+ list-style: none;
382
+ margin: 0;
383
+ padding: 0;
384
+ display: flex;
385
+ flex-direction: column;
386
+ gap: 0.5rem;
387
+ }
388
+
389
+ .sg-legend li {
390
+ display: flex;
391
+ align-items: center;
392
+ gap: 0.5rem;
393
+ }
394
+
395
+ .sg-single {
396
+ margin: 0;
397
+ display: flex;
398
+ flex-direction: column;
399
+ gap: 0.5rem;
400
+ }
401
+
402
+ .sg-stage {
403
+ isolation: isolate;
404
+ background: #fff;
405
+ }
406
+
407
+ .sg-stage[data-mode="diff"] .sg-under,
408
+ .sg-stage[data-mode="onion"] .sg-under {
409
+ position: relative;
410
+ }
411
+
412
+ .sg-reason {
413
+ padding: 0.5rem 1rem;
414
+ background: var(--background);
415
+ }
@@ -0,0 +1,2 @@
1
+ /** A label derived from a folder name, a state name or a title, capitalized for display in the app's locale. */
2
+ export declare const cap: (text: string) => string;
@@ -0,0 +1,4 @@
1
+ import { capitalize } from "../labels.js";
2
+ import { data } from "./data.js";
3
+ /** A label derived from a folder name, a state name or a title, capitalized for display in the app's locale. */
4
+ export const cap = (text) => capitalize(text, data.locale);
@@ -0,0 +1,9 @@
1
+ import type { Model } from "../model.js";
2
+ export interface GalleryData {
3
+ readonly app: string;
4
+ readonly locale: string;
5
+ readonly devUrl: string | null;
6
+ readonly model: Model;
7
+ }
8
+ /** What the plugin's data module holds (vite.ts writes it as JSON). */
9
+ export declare const data: GalleryData;
@@ -0,0 +1,3 @@
1
+ import raw from "virtual:starci-gallery/data";
2
+ /** What the plugin's data module holds (vite.ts writes it as JSON). */
3
+ export const data = raw;
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ /** The inline markdown of an explain.md line (`code` and **bold**) as nodes, never as HTML. */
3
+ export declare function Inline({ text }: {
4
+ readonly text: string;
5
+ }): ReactNode;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Code } from "@starci/grammar/core";
3
+ /** The inline markdown of an explain.md line (`code` and **bold**) as nodes, never as HTML. */
4
+ export function Inline({ text }) {
5
+ const parts = text.split(/(`[^`]+`|\*\*[^*]+\*\*)/u).filter((part) => part !== "");
6
+ return parts.map((part, index) => {
7
+ if (part.startsWith("`") && part.endsWith("`") && part.length > 2)
8
+ return _jsx(Code, { children: part.slice(1, -1) }, index);
9
+ if (part.startsWith("**") && part.endsWith("**") && part.length > 4)
10
+ return _jsx("strong", { children: part.slice(2, -2) }, index);
11
+ return part;
12
+ });
13
+ }
@@ -0,0 +1 @@
1
+ import "./app.css";
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StrictMode } from "react";
3
+ import { createRoot } from "react-dom/client";
4
+ import { App } from "./App.js";
5
+ import "./app.css";
6
+ const mount = document.querySelector("#root");
7
+ if (mount !== null) {
8
+ createRoot(mount).render(_jsx(StrictMode, { children: _jsx(App, {}) }));
9
+ }
@@ -0,0 +1,3 @@
1
+ /** The width under which the gallery is one column and shows one pane at a time (the same step as the stylesheet's media query). */
2
+ export declare const NARROW_QUERY = "(max-width: 1100px)";
3
+ export declare function useNarrow(): boolean;
@@ -0,0 +1,17 @@
1
+ import { useEffect, useState } from "react";
2
+ /** The width under which the gallery is one column and shows one pane at a time (the same step as the stylesheet's media query). */
3
+ export const NARROW_QUERY = "(max-width: 1100px)";
4
+ export function useNarrow() {
5
+ const [narrow, setNarrow] = useState(() => window.matchMedia(NARROW_QUERY).matches);
6
+ useEffect(() => {
7
+ const query = window.matchMedia(NARROW_QUERY);
8
+ const sync = () => {
9
+ setNarrow(query.matches);
10
+ };
11
+ query.addEventListener("change", sync);
12
+ return () => {
13
+ query.removeEventListener("change", sync);
14
+ };
15
+ }, []);
16
+ return narrow;
17
+ }
@@ -0,0 +1,15 @@
1
+ import type { Width } from "../explain.js";
2
+ import type { View } from "../views.js";
3
+ export type { View };
4
+ /** The pane of a narrow window, one at a time: the design, the shot, the comparison of both, the explanation. */
5
+ export type Pane = "design" | "shot" | "compare" | "explain";
6
+ export interface Route {
7
+ readonly screen: string | null;
8
+ readonly flows: boolean;
9
+ readonly width: Width;
10
+ readonly view: View;
11
+ }
12
+ /** `#/<area>/<screen>?w=1440&v=side` or `#/flows`: the address is the state, so a screen can be linked and shared. */
13
+ export declare function parseHash(hash: string): Route;
14
+ export declare const hashOf: (route: Route) => string;
15
+ export declare function useRoute(): [Route, (next: Partial<Route>) => void];
@@ -0,0 +1,29 @@
1
+ import { useEffect, useState } from "react";
2
+ import { SHOT_WIDTHS } from "../explain.js";
3
+ import { VIEWS } from "../views.js";
4
+ /** `#/<area>/<screen>?w=1440&v=side` or `#/flows`: the address is the state, so a screen can be linked and shared. */
5
+ export function parseHash(hash) {
6
+ const [path = "", query = ""] = hash.replace(/^#\/?/u, "").split("?");
7
+ const params = new URLSearchParams(query);
8
+ const width = params.get("w");
9
+ const view = params.get("v");
10
+ return {
11
+ screen: path === "" || path === "flows" ? null : decodeURIComponent(path),
12
+ flows: path === "flows",
13
+ width: SHOT_WIDTHS.find((one) => one === width) ?? "1440",
14
+ view: VIEWS.find((one) => one === view) ?? "side",
15
+ };
16
+ }
17
+ export const hashOf = (route) => {
18
+ const params = new URLSearchParams({ w: route.width, v: route.view });
19
+ return route.flows ? "#/flows" : `#/${route.screen ?? ""}?${params.toString()}`;
20
+ };
21
+ export function useRoute() {
22
+ const [route, setRoute] = useState(() => parseHash(window.location.hash));
23
+ useEffect(() => {
24
+ const sync = () => { setRoute(parseHash(window.location.hash)); };
25
+ window.addEventListener("hashchange", sync);
26
+ return () => { window.removeEventListener("hashchange", sync); };
27
+ }, []);
28
+ return [route, (next) => { window.location.hash = hashOf({ ...route, ...next }); }];
29
+ }
@@ -0,0 +1,8 @@
1
+ import type { Labels } from "../labels.js";
2
+ import type { Status } from "../model.js";
3
+ export type Tone = "success" | "warning" | "danger" | "accent" | "neutral" | "muted";
4
+ /** The dot of a status: matches green, built but differs amber, stale red, not built grey; a screen with no design has no dot colour of its own (muted). */
5
+ export declare const TONE: Readonly<Record<Status, Tone>>;
6
+ export declare const statusLabel: (labels: Labels, status: Status, designStatus?: string | null) => string;
7
+ /** The same tone for a bare status dot, which has no muted one: a screen with no design draws no dot at all, so this is only asked for the others. */
8
+ export declare const dotTone: (status: Status) => "success" | "warning" | "danger" | "accent" | "neutral";
@@ -0,0 +1,9 @@
1
+ /** The dot of a status: matches green, built but differs amber, stale red, not built grey; a screen with no design has no dot colour of its own (muted). */
2
+ export const TONE = { matches: "success", differs: "warning", stale: "danger", notBuilt: "neutral", drawn: "neutral", unrecorded: "accent", codedOnly: "accent", none: "muted" };
3
+ export const statusLabel = (labels, status, designStatus = null) => status === "notBuilt" && designStatus === "drafted"
4
+ ? labels.statusDrafted
5
+ : status === "notBuilt" && designStatus === "approved"
6
+ ? labels.statusApproved
7
+ : ({ matches: labels.statusMatches, differs: labels.statusDiffers, stale: labels.statusStale, notBuilt: labels.statusNotBuilt, drawn: labels.statusNotBuilt, unrecorded: labels.statusUnrecorded, codedOnly: labels.statusCodedOnly, none: labels.statusNone })[status];
8
+ /** The same tone for a bare status dot, which has no muted one: a screen with no design draws no dot at all, so this is only asked for the others. */
9
+ export const dotTone = (status) => (TONE[status] === "muted" ? "neutral" : TONE[status]);
@@ -0,0 +1,45 @@
1
+ export declare const FIELDS: readonly ["Vì sao", "Luật", "Grammar"];
2
+ export type Field = (typeof FIELDS)[number];
3
+ export interface Problem {
4
+ readonly kind: "missing" | "unclear";
5
+ readonly field: Field;
6
+ }
7
+ export interface Region {
8
+ readonly name: string;
9
+ readonly fields: Partial<Record<Field, string>>;
10
+ readonly problems: Problem[];
11
+ }
12
+ export interface Explain {
13
+ readonly meta: Record<string, string>;
14
+ readonly intro: string;
15
+ readonly regions: Region[];
16
+ }
17
+ /** The only widths a screen is shot at; a state or an agent variant is its own screen folder. */
18
+ export declare const SHOT_WIDTHS: readonly ["1440", "390"];
19
+ export type Width = (typeof SHOT_WIDTHS)[number];
20
+ export declare function parseExplain(markdown: string): Explain;
21
+ export interface Link {
22
+ readonly to: string;
23
+ readonly x?: number;
24
+ readonly y?: number;
25
+ readonly w?: number;
26
+ readonly h?: number;
27
+ }
28
+ /** links.json of a screen: an array, or { links: [...] }, of { to, x, y, w, h } hotspots (fractions of the shot); empty when malformed. */
29
+ export declare function linkList(json: unknown): Link[];
30
+ export interface Flow {
31
+ readonly name: string;
32
+ readonly screens: string[];
33
+ }
34
+ /** flows.json: { "<name>": ["<area>/<screen>", ...] } or [{ name, screens }]; empty when malformed. */
35
+ export declare function flowList(json: unknown): Flow[];
36
+ /**
37
+ * The note of a canvas fragment (`<div class="note">`, skills/claude-design references/format.md) as the explain.md it copies: `.fm` is the front matter
38
+ * (`title: … · route: … · area: …`), `.intro` the introduction, each `<h4>` a region and the `<p>` lines under it its Vì sao, Luật and Grammar lines.
39
+ */
40
+ export declare function noteToMarkdown(noteHtml: string): string;
41
+ /** The introduction split at its clauses (`Mục tiêu:`, `Thao tác:` …) so it reads as rows; one unnamed row when it holds fewer than two. */
42
+ export declare function introClauses(intro: string): {
43
+ label: string | null;
44
+ text: string;
45
+ }[];