@stealthscale/plugin-theming 0.0.0-stage → 0.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +135 -2
  3. package/dist/accessibility-Dg5Dh35o.js +409 -0
  4. package/dist/attributes-vx1W0PiK.js +26 -0
  5. package/dist/breakpoints-CJjhy79u.js +83 -0
  6. package/dist/code-DcoH6hCX.js +69 -0
  7. package/dist/conditions-CjjQwqro.js +338 -0
  8. package/dist/corners-CH5jyCks.js +92 -0
  9. package/dist/cursors-hl00ix41.js +54 -0
  10. package/dist/cyclonedx/bom.json +1 -0
  11. package/dist/density-DEW_j0I5.js +207 -0
  12. package/dist/depth-DCn3mAAJ.js +143 -0
  13. package/dist/doc-page-BQXdbP_h.js +439 -0
  14. package/dist/extending-CY7ry7Y4.js +31 -0
  15. package/dist/faces-D76c_Ryh.js +65 -0
  16. package/dist/gate-CoX2Yr9x.js +199 -0
  17. package/dist/index.d.ts +48 -0
  18. package/dist/index.js +39 -0
  19. package/dist/layers-BxdWdfPg.js +53 -0
  20. package/dist/looks-BrROho5Y.js +107 -0
  21. package/dist/measure-uwF7Fmpy.js +137 -0
  22. package/dist/mode-colors-Cf_ZPo3g.js +260 -0
  23. package/dist/mode-panels-Bmh0ec0U.js +54 -0
  24. package/dist/motion-DRbsuZZo.js +202 -0
  25. package/dist/overview-BbE82N2c.js +192 -0
  26. package/dist/palettes-CZo2HrNT.js +49 -0
  27. package/dist/parts-BVmqVMgo.js +25 -0
  28. package/dist/recipes-C88xVIGB.js +32 -0
  29. package/dist/rows-Dv8c7jye.js +18 -0
  30. package/dist/sampler-Ue67PX2n.js +27 -0
  31. package/dist/series-AvSZjk2b.js +63 -0
  32. package/dist/setting-BsgJKTlh.js +12 -0
  33. package/dist/sizes-B7LgvyBS.js +98 -0
  34. package/dist/spacing-DMyyV6vX.js +75 -0
  35. package/dist/surfaces-Db0HjMwB.js +76 -0
  36. package/dist/text-styles-BZnXaigP.js +233 -0
  37. package/dist/theme.d.ts +12 -0
  38. package/dist/theme.js +23 -0
  39. package/dist/themes-yClyRA9e.js +305 -0
  40. package/dist/theming-text.recipe-Dvcza4j1.js +308 -0
  41. package/dist/token-table-yrZh5kLy.js +182 -0
  42. package/dist/tokens-7Pm-eLiZ.js +138 -0
  43. package/dist/use-readings-D56mNtEc.js +77 -0
  44. package/dist/variables-ymFs3Bzn.js +43 -0
  45. package/dist/worn-D4HEJsJ2.js +15 -0
  46. package/dist/writing-b05oSPB2.js +31 -0
  47. package/package.json +124 -3
@@ -0,0 +1,439 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { Stack } from "@stealthscale/component-layout";
3
+ import { CheckIcon, CopyIcon } from "lucide-react";
4
+ import { useTranslation } from "@stealthscale/provider-i18n";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Page, Section } from "@stealthscale/component-screen";
7
+ import { useDocumentTitle } from "@stealthscale/sdk-plugin";
8
+ import { Toc } from "@stealthscale/component-navigation";
9
+ import { Markdown } from "@stealthscale/component-content";
10
+ //#region src/words.ts
11
+ /**
12
+ * Reads the theming plugin's words from the `theming` namespace, which the contract package's
13
+ * catalogue fills.
14
+ *
15
+ * @remarks
16
+ * The plugin's own words are at the namespace's top level, and each page's words are under the
17
+ * page's slug, from the page's own file in the catalogue's `theming` directory.
18
+ */
19
+ /**
20
+ * The namespace the plugin's words are in.
21
+ */
22
+ const WORDS = "theming";
23
+ /**
24
+ * Reads the plugin's words.
25
+ *
26
+ * @remarks
27
+ * A hook rather than a reading, so a language switched under a running page applies to every
28
+ * part that called it.
29
+ * @returns `t` bound to the namespace, with the instance and whether the words are ready.
30
+ */
31
+ function useWords() {
32
+ return useTranslation(WORDS);
33
+ }
34
+ //#endregion
35
+ //#region src/doc/contents.tsx
36
+ /**
37
+ * Renders the rail in the page's aside, sticking beside the body while the page scrolls.
38
+ *
39
+ * @remarks
40
+ * On a narrow page the aside stacks under the body, so a phone keeps the rail's links, and a page
41
+ * of text alone keeps a link that takes keyboard focus. The rail is the navigation package's
42
+ * table of contents, so the mark follows the sections as they come on screen and a press scrolls
43
+ * the page to one.
44
+ */
45
+ function Contents(t0) {
46
+ const $ = c(38);
47
+ const { of } = t0;
48
+ const { t } = useWords();
49
+ let T0;
50
+ let T1;
51
+ let T2;
52
+ let t1;
53
+ let t2;
54
+ let t3;
55
+ let t4;
56
+ let t5;
57
+ let t6;
58
+ let t7;
59
+ let t8;
60
+ let t9;
61
+ if ($[0] !== of || $[1] !== t) {
62
+ const listed = of.map(_temp);
63
+ T2 = Page.Aside;
64
+ if ($[14] !== t) {
65
+ t7 = t("contents.title");
66
+ $[14] = t;
67
+ $[15] = t7;
68
+ } else t7 = $[15];
69
+ t8 = "under";
70
+ t9 = true;
71
+ T1 = Toc.Root;
72
+ t3 = listed.map(_temp2);
73
+ t4 = "0px";
74
+ t5 = "sm";
75
+ let t10;
76
+ if ($[16] !== t) {
77
+ t10 = t("contents.title");
78
+ $[16] = t;
79
+ $[17] = t10;
80
+ } else t10 = $[17];
81
+ if ($[18] !== t10) {
82
+ t6 = /* @__PURE__ */ jsx(Toc.Title, { children: t10 });
83
+ $[18] = t10;
84
+ $[19] = t6;
85
+ } else t6 = $[19];
86
+ T0 = Toc.List;
87
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
88
+ t1 = /* @__PURE__ */ jsx(Toc.Indicator, {});
89
+ $[20] = t1;
90
+ } else t1 = $[20];
91
+ t2 = listed.map(_temp3);
92
+ $[0] = of;
93
+ $[1] = t;
94
+ $[2] = T0;
95
+ $[3] = T1;
96
+ $[4] = T2;
97
+ $[5] = t1;
98
+ $[6] = t2;
99
+ $[7] = t3;
100
+ $[8] = t4;
101
+ $[9] = t5;
102
+ $[10] = t6;
103
+ $[11] = t7;
104
+ $[12] = t8;
105
+ $[13] = t9;
106
+ } else {
107
+ T0 = $[2];
108
+ T1 = $[3];
109
+ T2 = $[4];
110
+ t1 = $[5];
111
+ t2 = $[6];
112
+ t3 = $[7];
113
+ t4 = $[8];
114
+ t5 = $[9];
115
+ t6 = $[10];
116
+ t7 = $[11];
117
+ t8 = $[12];
118
+ t9 = $[13];
119
+ }
120
+ let t10;
121
+ if ($[21] !== T0 || $[22] !== t1 || $[23] !== t2) {
122
+ t10 = /* @__PURE__ */ jsxs(T0, { children: [t1, t2] });
123
+ $[21] = T0;
124
+ $[22] = t1;
125
+ $[23] = t2;
126
+ $[24] = t10;
127
+ } else t10 = $[24];
128
+ let t11;
129
+ if ($[25] !== T1 || $[26] !== t10 || $[27] !== t3 || $[28] !== t4 || $[29] !== t5 || $[30] !== t6) {
130
+ t11 = /* @__PURE__ */ jsxs(T1, {
131
+ items: t3,
132
+ rootMargin: t4,
133
+ size: t5,
134
+ children: [t6, t10]
135
+ });
136
+ $[25] = T1;
137
+ $[26] = t10;
138
+ $[27] = t3;
139
+ $[28] = t4;
140
+ $[29] = t5;
141
+ $[30] = t6;
142
+ $[31] = t11;
143
+ } else t11 = $[31];
144
+ let t12;
145
+ if ($[32] !== T2 || $[33] !== t11 || $[34] !== t7 || $[35] !== t8 || $[36] !== t9) {
146
+ t12 = /* @__PURE__ */ jsx(T2, {
147
+ "aria-label": t7,
148
+ folds: t8,
149
+ sticky: t9,
150
+ children: t11
151
+ });
152
+ $[32] = T2;
153
+ $[33] = t11;
154
+ $[34] = t7;
155
+ $[35] = t8;
156
+ $[36] = t9;
157
+ $[37] = t12;
158
+ } else t12 = $[37];
159
+ return t12;
160
+ }
161
+ function _temp3(t0) {
162
+ const { item: item_0, title: title_0 } = t0;
163
+ return /* @__PURE__ */ jsx(Toc.Item, {
164
+ item: item_0,
165
+ children: /* @__PURE__ */ jsx(Toc.Link, {
166
+ href: `#${item_0.value}`,
167
+ item: item_0,
168
+ children: title_0
169
+ })
170
+ }, item_0.value);
171
+ }
172
+ function _temp2(t0) {
173
+ const { item } = t0;
174
+ return item;
175
+ }
176
+ function _temp(t0) {
177
+ const { id, title } = t0;
178
+ return {
179
+ item: {
180
+ depth: 2,
181
+ value: id
182
+ },
183
+ title
184
+ };
185
+ }
186
+ //#endregion
187
+ //#region src/doc/prose.tsx
188
+ /**
189
+ * The icons of the copy control in each code block's header.
190
+ */
191
+ const GLYPHS = { copy: {
192
+ copied: /* @__PURE__ */ jsx(CheckIcon, {
193
+ "aria-hidden": true,
194
+ size: "1em"
195
+ }),
196
+ idle: /* @__PURE__ */ jsx(CopyIcon, {
197
+ "aria-hidden": true,
198
+ size: "1em"
199
+ })
200
+ } };
201
+ /**
202
+ * Renders the passage at the reading measure, with a copy control on each code block and its code
203
+ * blocks and tables named in the plugin's words.
204
+ *
205
+ * @remarks
206
+ * A heading inside a passage starts at the third level, below the page's title and its section's
207
+ * heading.
208
+ */
209
+ function Prose(t0) {
210
+ const $ = c(13);
211
+ const { source } = t0;
212
+ const { t } = useWords();
213
+ let t1;
214
+ let t2;
215
+ if ($[0] !== t) {
216
+ t1 = (language) => language === void 0 ? t("blocks.code") : t("blocks.codeIn", { language });
217
+ t2 = t("blocks.copied");
218
+ $[0] = t;
219
+ $[1] = t1;
220
+ $[2] = t2;
221
+ } else {
222
+ t1 = $[1];
223
+ t2 = $[2];
224
+ }
225
+ let t3;
226
+ if ($[3] !== t) {
227
+ t3 = t("blocks.copy");
228
+ $[3] = t;
229
+ $[4] = t3;
230
+ } else t3 = $[4];
231
+ let t4;
232
+ if ($[5] !== t) {
233
+ t4 = t("blocks.table");
234
+ $[5] = t;
235
+ $[6] = t4;
236
+ } else t4 = $[6];
237
+ let t5;
238
+ if ($[7] !== source || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
239
+ t5 = /* @__PURE__ */ jsx(Markdown, {
240
+ codeLabel: t1,
241
+ copiedLabel: t2,
242
+ copyLabel: t3,
243
+ glyphs: GLYPHS,
244
+ headingLevel: 3,
245
+ source,
246
+ tableLabel: t4
247
+ });
248
+ $[7] = source;
249
+ $[8] = t1;
250
+ $[9] = t2;
251
+ $[10] = t3;
252
+ $[11] = t4;
253
+ $[12] = t5;
254
+ } else t5 = $[12];
255
+ return t5;
256
+ }
257
+ //#endregion
258
+ //#region src/doc/doc-section.tsx
259
+ /**
260
+ * Renders the section with its heading from `<page>.sections.<id>.title`, its prose from
261
+ * `<page>.sections.<id>.body`, and the block.
262
+ *
263
+ * @remarks
264
+ * A section without prose renders its heading and its block alone. The prose and the block are
265
+ * `lg` apart, the gap between two blocks of the prose itself.
266
+ */
267
+ function DocSection(t0) {
268
+ const $ = c(18);
269
+ const { children, id, page } = t0;
270
+ const { t } = useWords();
271
+ const t1 = `${page}.sections.${id}.body`;
272
+ let t2;
273
+ if ($[0] !== t || $[1] !== t1) {
274
+ t2 = t(t1, { defaultValue: "" });
275
+ $[0] = t;
276
+ $[1] = t1;
277
+ $[2] = t2;
278
+ } else t2 = $[2];
279
+ const body = t2;
280
+ const t3 = `${page}.sections.${id}.title`;
281
+ let t4;
282
+ if ($[3] !== id || $[4] !== t || $[5] !== t3) {
283
+ t4 = t(t3, { defaultValue: id });
284
+ $[3] = id;
285
+ $[4] = t;
286
+ $[5] = t3;
287
+ $[6] = t4;
288
+ } else t4 = $[6];
289
+ let t5;
290
+ if ($[7] !== t4) {
291
+ t5 = /* @__PURE__ */ jsx(Section.Header, { children: /* @__PURE__ */ jsx(Section.Title, { children: t4 }) });
292
+ $[7] = t4;
293
+ $[8] = t5;
294
+ } else t5 = $[8];
295
+ let t6;
296
+ if ($[9] !== body) {
297
+ t6 = body === "" ? null : /* @__PURE__ */ jsx(Prose, { source: body });
298
+ $[9] = body;
299
+ $[10] = t6;
300
+ } else t6 = $[10];
301
+ let t7;
302
+ if ($[11] !== children || $[12] !== t6) {
303
+ t7 = /* @__PURE__ */ jsx(Section.Body, { children: /* @__PURE__ */ jsxs(Stack, {
304
+ gap: "lg",
305
+ children: [t6, children]
306
+ }) });
307
+ $[11] = children;
308
+ $[12] = t6;
309
+ $[13] = t7;
310
+ } else t7 = $[13];
311
+ let t8;
312
+ if ($[14] !== id || $[15] !== t5 || $[16] !== t7) {
313
+ t8 = /* @__PURE__ */ jsxs(Section.Root, {
314
+ id,
315
+ children: [t5, t7]
316
+ });
317
+ $[14] = id;
318
+ $[15] = t5;
319
+ $[16] = t7;
320
+ $[17] = t8;
321
+ } else t8 = $[17];
322
+ return t8;
323
+ }
324
+ //#endregion
325
+ //#region src/doc/doc-page.tsx
326
+ /**
327
+ * Renders the page in the screen package's page, titling the document with the page's title.
328
+ */
329
+ function DocPage(t0) {
330
+ const $ = c(34);
331
+ const { page, sections } = t0;
332
+ const { t } = useWords();
333
+ const t1 = `${page}.title`;
334
+ let t2;
335
+ if ($[0] !== page || $[1] !== t || $[2] !== t1) {
336
+ t2 = t(t1, { defaultValue: page });
337
+ $[0] = page;
338
+ $[1] = t;
339
+ $[2] = t1;
340
+ $[3] = t2;
341
+ } else t2 = $[3];
342
+ const title = t2;
343
+ useDocumentTitle(title);
344
+ let t3;
345
+ if ($[4] !== title) {
346
+ t3 = /* @__PURE__ */ jsx(Page.Title, { children: title });
347
+ $[4] = title;
348
+ $[5] = t3;
349
+ } else t3 = $[5];
350
+ const t4 = `${page}.about`;
351
+ let t5;
352
+ if ($[6] !== t || $[7] !== t4) {
353
+ t5 = t(t4, { defaultValue: "" });
354
+ $[6] = t;
355
+ $[7] = t4;
356
+ $[8] = t5;
357
+ } else t5 = $[8];
358
+ let t6;
359
+ if ($[9] !== t5) {
360
+ t6 = /* @__PURE__ */ jsx(Page.Description, { children: t5 });
361
+ $[9] = t5;
362
+ $[10] = t6;
363
+ } else t6 = $[10];
364
+ let t7;
365
+ if ($[11] !== t3 || $[12] !== t6) {
366
+ t7 = /* @__PURE__ */ jsxs(Page.Header, { children: [t3, t6] });
367
+ $[11] = t3;
368
+ $[12] = t6;
369
+ $[13] = t7;
370
+ } else t7 = $[13];
371
+ let t8;
372
+ if ($[14] !== page || $[15] !== sections) {
373
+ let t9;
374
+ if ($[17] !== page) {
375
+ t9 = (t10) => {
376
+ const { block, id } = t10;
377
+ return /* @__PURE__ */ jsx(DocSection, {
378
+ id,
379
+ page,
380
+ children: block
381
+ }, id);
382
+ };
383
+ $[17] = page;
384
+ $[18] = t9;
385
+ } else t9 = $[18];
386
+ t8 = sections.map(t9);
387
+ $[14] = page;
388
+ $[15] = sections;
389
+ $[16] = t8;
390
+ } else t8 = $[16];
391
+ let t9;
392
+ if ($[19] !== t8) {
393
+ t9 = /* @__PURE__ */ jsx(Page.Body, { children: t8 });
394
+ $[19] = t8;
395
+ $[20] = t9;
396
+ } else t9 = $[20];
397
+ let t10;
398
+ if ($[21] !== page || $[22] !== sections || $[23] !== t) {
399
+ let t11;
400
+ if ($[25] !== page || $[26] !== t) {
401
+ t11 = (t12) => {
402
+ const { id: id_0 } = t12;
403
+ return {
404
+ id: id_0,
405
+ title: t(`${page}.sections.${id_0}.title`, { defaultValue: id_0 })
406
+ };
407
+ };
408
+ $[25] = page;
409
+ $[26] = t;
410
+ $[27] = t11;
411
+ } else t11 = $[27];
412
+ t10 = sections.map(t11);
413
+ $[21] = page;
414
+ $[22] = sections;
415
+ $[23] = t;
416
+ $[24] = t10;
417
+ } else t10 = $[24];
418
+ let t11;
419
+ if ($[28] !== t10) {
420
+ t11 = /* @__PURE__ */ jsx(Contents, { of: t10 });
421
+ $[28] = t10;
422
+ $[29] = t11;
423
+ } else t11 = $[29];
424
+ let t12;
425
+ if ($[30] !== t11 || $[31] !== t7 || $[32] !== t9) {
426
+ t12 = /* @__PURE__ */ jsxs(Page.Root, { children: [
427
+ t7,
428
+ t9,
429
+ t11
430
+ ] });
431
+ $[30] = t11;
432
+ $[31] = t7;
433
+ $[32] = t9;
434
+ $[33] = t12;
435
+ } else t12 = $[33];
436
+ return t12;
437
+ }
438
+ //#endregion
439
+ export { useWords as n, DocPage as t };
@@ -0,0 +1,31 @@
1
+ import { t as DocPage } from "./doc-page-BQXdbP_h.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/pages/extending.tsx
5
+ /**
6
+ * The page's sections, in reading order. Each is prose with its code.
7
+ */
8
+ const SECTIONS = [
9
+ { id: "extension" },
10
+ { id: "scope" },
11
+ { id: "slots" },
12
+ { id: "limits" },
13
+ { id: "checks" }
14
+ ];
15
+ /**
16
+ * Renders the page on extending a recipe from a theme.
17
+ */
18
+ function ExtendingPage() {
19
+ const $ = c(1);
20
+ let t0;
21
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
22
+ t0 = /* @__PURE__ */ jsx(DocPage, {
23
+ page: "extending",
24
+ sections: SECTIONS
25
+ });
26
+ $[0] = t0;
27
+ } else t0 = $[0];
28
+ return t0;
29
+ }
30
+ //#endregion
31
+ export { ExtendingPage };
@@ -0,0 +1,65 @@
1
+ import { n as useWords, t as DocPage } from "./doc-page-BQXdbP_h.js";
2
+ import { t as tokenRows } from "./rows-Dv8c7jye.js";
3
+ import { t as TokenTable } from "./token-table-yrZh5kLy.js";
4
+ import { t as sampler } from "./sampler-Ue67PX2n.js";
5
+ import { FACES, FONT_SIZES, FONT_WEIGHTS } from "@stealthscale/theme/contract";
6
+ import { c } from "react/compiler-runtime";
7
+ import { jsx } from "react/jsx-runtime";
8
+ //#region src/pages/faces.tsx
9
+ /**
10
+ * Lists the page's tables, in reading order.
11
+ */
12
+ const TABLES = [
13
+ {
14
+ category: "fonts",
15
+ id: "faces",
16
+ names: FACES,
17
+ property: "face"
18
+ },
19
+ {
20
+ category: "fontSizes",
21
+ id: "sizes",
22
+ names: FONT_SIZES,
23
+ property: "fontSize"
24
+ },
25
+ {
26
+ category: "fontWeights",
27
+ id: "weights",
28
+ names: FONT_WEIGHTS,
29
+ property: "weight"
30
+ }
31
+ ];
32
+ /**
33
+ * Renders the faces page.
34
+ */
35
+ function FacesPage() {
36
+ const $ = c(3);
37
+ const { t } = useWords();
38
+ let t0;
39
+ if ($[0] !== t) {
40
+ let t2;
41
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
42
+ t2 = { id: "scale" };
43
+ $[2] = t2;
44
+ } else t2 = $[2];
45
+ t0 = /* @__PURE__ */ jsx(DocPage, {
46
+ page: "faces",
47
+ sections: [...TABLES.map((t1) => {
48
+ const { category, id, names, property } = t1;
49
+ return {
50
+ block: /* @__PURE__ */ jsx(TokenTable, {
51
+ caption: t(`faces.sections.${id}.title`, { defaultValue: id }),
52
+ lengths: id === "sizes",
53
+ rows: tokenRows(category, names, sampler("text", property, t("blocks.specimen")))
54
+ }),
55
+ id
56
+ };
57
+ }), t2]
58
+ });
59
+ $[0] = t;
60
+ $[1] = t0;
61
+ } else t0 = $[1];
62
+ return t0;
63
+ }
64
+ //#endregion
65
+ export { FacesPage };
@@ -0,0 +1,199 @@
1
+ import { n as useWords, t as DocPage } from "./doc-page-BQXdbP_h.js";
2
+ import { FLOOR, THRESHOLDS } from "@stealthscale/theme/contract";
3
+ import { c } from "react/compiler-runtime";
4
+ import { Table } from "@stealthscale/component-collections";
5
+ import { Code } from "@stealthscale/component-typography";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/blocks/values-table.tsx
8
+ /**
9
+ * Renders the name of a row in code.
10
+ */
11
+ function nameCell({ name }) {
12
+ return /* @__PURE__ */ jsx(Code, { children: name });
13
+ }
14
+ /**
15
+ * Renders a row per number: its name and the number.
16
+ */
17
+ function ValuesTable(t0) {
18
+ const $ = c(21);
19
+ const { caption, values } = t0;
20
+ const { t } = useWords();
21
+ let t1;
22
+ if ($[0] !== values) {
23
+ t1 = Object.entries(values).map(_temp);
24
+ $[0] = values;
25
+ $[1] = t1;
26
+ } else t1 = $[1];
27
+ const rows = t1;
28
+ let t2;
29
+ if ($[2] !== caption || $[3] !== t) {
30
+ t2 = t("blocks.tableOf", { name: caption });
31
+ $[2] = caption;
32
+ $[3] = t;
33
+ $[4] = t2;
34
+ } else t2 = $[4];
35
+ let t3;
36
+ if ($[5] !== t) {
37
+ t3 = t("blocks.name");
38
+ $[5] = t;
39
+ $[6] = t3;
40
+ } else t3 = $[6];
41
+ let t4;
42
+ if ($[7] !== t3) {
43
+ t4 = {
44
+ cell: nameCell,
45
+ key: "name",
46
+ label: t3,
47
+ rowHeader: true
48
+ };
49
+ $[7] = t3;
50
+ $[8] = t4;
51
+ } else t4 = $[8];
52
+ let t5;
53
+ if ($[9] !== t) {
54
+ t5 = t("blocks.value");
55
+ $[9] = t;
56
+ $[10] = t5;
57
+ } else t5 = $[10];
58
+ let t6;
59
+ if ($[11] !== t5) {
60
+ t6 = {
61
+ cell: _temp2,
62
+ key: "value",
63
+ label: t5,
64
+ numeric: true
65
+ };
66
+ $[11] = t5;
67
+ $[12] = t6;
68
+ } else t6 = $[12];
69
+ let t7;
70
+ if ($[13] !== t4 || $[14] !== t6) {
71
+ t7 = [t4, t6];
72
+ $[13] = t4;
73
+ $[14] = t6;
74
+ $[15] = t7;
75
+ } else t7 = $[15];
76
+ let t8;
77
+ if ($[16] !== caption || $[17] !== rows || $[18] !== t2 || $[19] !== t7) {
78
+ t8 = /* @__PURE__ */ jsx(Table.Simple, {
79
+ "aria-label": t2,
80
+ caption,
81
+ columns: t7,
82
+ rows,
83
+ rowToKey: _temp3
84
+ });
85
+ $[16] = caption;
86
+ $[17] = rows;
87
+ $[18] = t2;
88
+ $[19] = t7;
89
+ $[20] = t8;
90
+ } else t8 = $[20];
91
+ return t8;
92
+ }
93
+ function _temp3(t0) {
94
+ const { name: name_0 } = t0;
95
+ return name_0;
96
+ }
97
+ function _temp2(t0) {
98
+ const { value: value_0 } = t0;
99
+ return String(value_0);
100
+ }
101
+ function _temp(t0) {
102
+ const [name, value] = t0;
103
+ return {
104
+ name,
105
+ value
106
+ };
107
+ }
108
+ //#endregion
109
+ //#region src/pages/gate.tsx
110
+ /**
111
+ * Renders the gate page.
112
+ */
113
+ function GatePage() {
114
+ const $ = c(16);
115
+ const { t } = useWords();
116
+ let t0;
117
+ let t1;
118
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
119
+ t0 = { id: "violations" };
120
+ t1 = { id: "checks" };
121
+ $[0] = t0;
122
+ $[1] = t1;
123
+ } else {
124
+ t0 = $[0];
125
+ t1 = $[1];
126
+ }
127
+ let t2;
128
+ if ($[2] !== t) {
129
+ t2 = t("gate.sections.thresholds.title");
130
+ $[2] = t;
131
+ $[3] = t2;
132
+ } else t2 = $[3];
133
+ let t3;
134
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
135
+ t3 = { ...THRESHOLDS };
136
+ $[4] = t3;
137
+ } else t3 = $[4];
138
+ let t4;
139
+ if ($[5] !== t2) {
140
+ t4 = {
141
+ block: /* @__PURE__ */ jsx(ValuesTable, {
142
+ caption: t2,
143
+ values: t3
144
+ }),
145
+ id: "thresholds"
146
+ };
147
+ $[5] = t2;
148
+ $[6] = t4;
149
+ } else t4 = $[6];
150
+ let t5;
151
+ if ($[7] !== t) {
152
+ t5 = t("gate.sections.floor.title");
153
+ $[7] = t;
154
+ $[8] = t5;
155
+ } else t5 = $[8];
156
+ let t6;
157
+ if ($[9] !== t5) {
158
+ t6 = {
159
+ block: /* @__PURE__ */ jsx(ValuesTable, {
160
+ caption: t5,
161
+ values: FLOOR
162
+ }),
163
+ id: "floor"
164
+ };
165
+ $[9] = t5;
166
+ $[10] = t6;
167
+ } else t6 = $[10];
168
+ let t7;
169
+ let t8;
170
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
171
+ t7 = { id: "skipping" };
172
+ t8 = { id: "report" };
173
+ $[11] = t7;
174
+ $[12] = t8;
175
+ } else {
176
+ t7 = $[11];
177
+ t8 = $[12];
178
+ }
179
+ let t9;
180
+ if ($[13] !== t4 || $[14] !== t6) {
181
+ t9 = /* @__PURE__ */ jsx(DocPage, {
182
+ page: "gate",
183
+ sections: [
184
+ t0,
185
+ t1,
186
+ t4,
187
+ t6,
188
+ t7,
189
+ t8
190
+ ]
191
+ });
192
+ $[13] = t4;
193
+ $[14] = t6;
194
+ $[15] = t9;
195
+ } else t9 = $[15];
196
+ return t9;
197
+ }
198
+ //#endregion
199
+ export { GatePage };