@nmnmcc/standard 0.4.1 → 0.5.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/README.md +45 -68
  2. package/dist/Extend.js +1 -1
  3. package/dist/{Standard-BPpzr5SM.js → Standard-BC6CfFOv.js} +116 -159
  4. package/dist/Standard.js +1 -1
  5. package/dist/Ui-DSgtM8Tf.js +591 -0
  6. package/dist/Ui.d.ts +4 -4
  7. package/dist/Ui.js +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/standard/page/page.d.ts +4 -6
  10. package/dist/standard/page/page.d.ts.map +1 -1
  11. package/dist/standard/tokens/tokens.d.ts +20 -103
  12. package/dist/standard/tokens/tokens.d.ts.map +1 -1
  13. package/dist/standard.css +1 -1
  14. package/dist/ui/flap/flap.d.ts +10 -10
  15. package/dist/ui/flap/flap.d.ts.map +1 -1
  16. package/dist/ui/modal/modal.d.ts +4 -1
  17. package/dist/ui/modal/modal.d.ts.map +1 -1
  18. package/dist/ui/navigator/navigator.d.ts +58 -59
  19. package/dist/ui/navigator/navigator.d.ts.map +1 -1
  20. package/dist/ui/notice/notice.d.ts +6 -1
  21. package/dist/ui/notice/notice.d.ts.map +1 -1
  22. package/dist/ui/sheet/sheet.d.ts +9 -9
  23. package/dist/ui/toasts/toasts.d.ts +8 -7
  24. package/dist/ui/toasts/toasts.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/standard/page/page.module.css +85 -47
  27. package/src/standard/page/page.module.d.css.ts +4 -2
  28. package/src/standard/page/page.ts +83 -1
  29. package/src/standard/tokens/tokens.ts +20 -268
  30. package/src/ui/dialog/dialog.module.css +24 -11
  31. package/src/ui/flap/flap.module.css +108 -52
  32. package/src/ui/flap/flap.module.d.css.ts +6 -1
  33. package/src/ui/flap/flap.ts +140 -13
  34. package/src/ui/modal/modal.module.css +73 -22
  35. package/src/ui/modal/modal.module.d.css.ts +1 -0
  36. package/src/ui/modal/modal.ts +21 -15
  37. package/src/ui/navigator/navigator.module.css +334 -176
  38. package/src/ui/navigator/navigator.module.d.css.ts +2 -10
  39. package/src/ui/navigator/navigator.ts +111 -106
  40. package/src/ui/notice/notice.ts +7 -2
  41. package/src/ui/popover/popover.ts +3 -3
  42. package/src/ui/sheet/sheet.module.css +51 -58
  43. package/src/ui/sheet/sheet.ts +9 -9
  44. package/src/ui/toasts/toasts.module.css +70 -11
  45. package/src/ui/toasts/toasts.module.d.css.ts +1 -0
  46. package/src/ui/toasts/toasts.ts +148 -4
  47. package/dist/Ui-B9xQqqNT.js +0 -468
@@ -50,285 +50,37 @@ export const Ratio = Schema.Literals(["1/1", "4/3", "3/2", "16/9", "3/4", "2/3"]
50
50
  export type Ratio = typeof Ratio.Type
51
51
 
52
52
  /**
53
- * The way the window moves over the canvas in a change of view, for
54
- * `$.viewTransition(travel)` in `update`: `forward` and `back` along the
55
- * line of reading, `down` and `up` along the page, and one of each for a
56
- * diagonal. `Standard.travel` works it out from the route table.
53
+ * The way a view changes, for `$.viewTransition(...)` in `update`. `in`:
54
+ * the new view turns in on the navigator, over the one that is left, as
55
+ * the next leaf of a revolving door. `out`: the view that is left turns
56
+ * out the same way, off the one that was under it. `Standard.turn` says
57
+ * which, from where the two are in the history.
57
58
  */
58
- export const Travel = Schema.Literals(["forward", "back", "down", "up"])
59
+ export const Travel = Schema.Literals(["in", "out"])
59
60
  export type Travel = typeof Travel.Type
60
61
 
61
- /** A route table, as `Route.union` of `effect/ui` makes it: all that `travel` and `canvas` read of one. */
62
- export interface Routes {
63
- readonly routes: {
64
- readonly [tag: string]: { readonly path: string; readonly params: { readonly [name: string]: unknown } }
65
- }
66
- readonly catchAll: string | undefined
67
- readonly Type: { readonly _tag: string }
68
- }
69
-
70
- /** The segments of a route's path: `"/read/topics/:id"` is `["read", "topics", ":id"]`, and `"/"` is none. */
71
- const segmentsOf = (path: string): ReadonlyArray<string> => path.split("/").filter((segment) => segment !== "")
72
-
73
- const signOf = (n: number): -1 | 0 | 1 => (n > 0 ? 1 : n < 0 ? -1 : 0)
74
-
75
- /** The order a list of them would be read in: `"B9"` before `"B10"`, and `"2026-11-24"` before `"2026-12-02"`. */
76
- const reading = new Intl.Collator("en", { numeric: true })
77
-
78
- /** Which of two values of a param comes first: numbers as numbers, anything else as it would be listed. */
79
- const inOrder = (from: unknown, to: unknown): -1 | 0 | 1 =>
80
- typeof from === "number" && typeof to === "number"
81
- ? signOf(to - from)
82
- : signOf(reading.compare(String(to), String(from)))
83
-
84
- /**
85
- * The way from one route to another, for `$.viewTransition(...)`. An app is
86
- * one canvas without edges, and the screen is a window onto it: every route
87
- * has a place there, and a change of route is the window moving from one
88
- * place to another. What is in the window then slides the other way, as
89
- * what is seen through a window does when the window moves, and whatever
90
- * has its own view-transition name, such as a navigator, stays where it is.
91
- *
92
- * The place of a route is not for the app to say. The route table says it,
93
- * and so the addresses of an app have to be written the way its canvas is
94
- * drawn: `/section/page`, and under a page whatever is under it.
95
- *
96
- * - The first segment is the section, and sections lie along the line of
97
- * reading in the order the table first names them: from `/read/…` to
98
- * `/settings/…` is `forward`.
99
- * - The second segment is the page, and the pages of a section lie down
100
- * the page in the order the table declares them: from `/read/latest` to
101
- * `/read/archive` is `down`. Every section starts at the top, so from the
102
- * second page of one to the fifth of another is `forward` and `down`,
103
- * and to the first of another `forward` and `up`.
104
- * - Each segment after that is a step `forward` from the page it is under:
105
- * `/read/topics/:id` is straight along from `/read/topics`. Params that
106
- * follow one another are one step between them: `/read/latest/:date/:id`
107
- * is as far along as `/read/topics/:id`.
108
- * - A param takes as many places as its `Schema.Literals` has literals, in
109
- * the order they are given. A param of any other Schema takes one place,
110
- * and two of its values are in the order a list of them would be read
111
- * in: numbers as numbers, `"B9"` before `"B10"`, `"2026-11-24"` before
112
- * `"2026-12-02"`. So an address that should lie in the order of its date
113
- * has the date in it.
114
- *
115
- * No way at all when the places are the same.
116
- *
117
- * **Example** (Moving the window in `update`)
118
- *
119
- * ```ts
120
- * Navigated: ($, { route }) =>
121
- * $.evolve({ route }).viewTransition(Standard.travel(AppRoute, $.model.route, route))
122
- * ```
123
- *
124
- * @since 0.4.0
125
- */
126
- export const travel = <R extends Routes>(routes: R, from: R["Type"], to: R["Type"]): ReadonlyArray<Travel> => {
127
- const table = Object.keys(routes.routes).map((tag, order) => ({
128
- tag,
129
- order,
130
- path: segmentsOf(routes.routes[tag]!.path)
131
- }))
132
- const a = table.find((route) => route.tag === from._tag)
133
- const b = table.find((route) => route.tag === to._tag)
134
- if (a === undefined || b === undefined) return []
135
-
136
- /** The literals of a param, if its Schema has them, and its value in an address. */
137
- const literalsOf = (tag: string, segment: string) =>
138
- (routes.routes[tag]?.params[segment.slice(1)] as { readonly literals?: ReadonlyArray<unknown> } | undefined)
139
- ?.literals
140
- const valueOf = (route: R["Type"], segment: string) =>
141
- (route as { readonly params?: Record<string, unknown> }).params?.[segment === "*" ? "*" : segment.slice(1)]
142
- const isParam = (segment: string | undefined): segment is string =>
143
- segment !== undefined && (segment.startsWith(":") || segment === "*")
144
-
145
- /**
146
- * How far along a level an address is, counted from the first: among the
147
- * routes that are with it down to that level, each new segment takes the
148
- * next place, or as many places as it has literals.
149
- */
150
- const placeAt = (level: number, route: (typeof table)[number], address: R["Type"]): number => {
151
- const places = new Map<string, number>()
152
- let next = 0
153
- for (const other of table) {
154
- if (!other.path.slice(0, level).every((segment, index) => segment === route.path[index])) continue
155
- if (other.path.length < level) continue
156
- const segment = other.path[level] ?? ""
157
- if (places.has(segment)) continue
158
- places.set(segment, next)
159
- next += isParam(segment) ? (literalsOf(other.tag, segment)?.length ?? 1) : 1
160
- }
161
- const segment = route.path[level] ?? ""
162
- const literals = isParam(segment) ? literalsOf(route.tag, segment) : undefined
163
- return (
164
- (places.get(segment) ?? 0) +
165
- (literals === undefined ? 0 : Math.max(0, literals.indexOf(valueOf(address, segment))))
166
- )
167
- }
168
-
169
- /** How many steps under its page a route is: one for each segment after the page, and params that follow one another are one step between them. */
170
- const stepsUnder = (path: ReadonlyArray<string>): number =>
171
- path.filter((segment, index) => index >= 2 && !(index > 2 && isParam(segment) && isParam(path[index - 1]))).length
172
-
173
- /** Which way two addresses lie at a level: by their places there, and at one place by the values of its param. */
174
- const wayAt = (level: number): -1 | 0 | 1 => {
175
- const way = signOf(placeAt(level, b, to) - placeAt(level, a, from))
176
- const segment = a.path[level]
177
- return way !== 0 ||
178
- !isParam(segment) ||
179
- segment !== b.path[level] ||
180
- !together(level) ||
181
- literalsOf(a.tag, segment) !== undefined
182
- ? way
183
- : inOrder(valueOf(from, segment), valueOf(to, segment))
184
- }
185
-
186
- /** Whether the two are the same down to a level: only then are their places at the next one in one list. */
187
- const together = (level: number): boolean =>
188
- a.path.length >= level &&
189
- b.path.length >= level &&
190
- a.path.slice(0, level).every((segment, index) => segment === b.path[index])
191
-
192
- // Along the line: by section, and in one section by how far under its page each is.
193
- const across = wayAt(0) || signOf(stepsUnder(b.path) - stepsUnder(a.path))
194
- // Down the page: by the page, each section counted from its top, and under one page by what is under it.
195
- const down = (): -1 | 0 | 1 => {
196
- const way = wayAt(1)
197
- if (way !== 0 || !together(2)) return way
198
- for (let level = 2; level < Math.min(a.path.length, b.path.length); level++) {
199
- const under = wayAt(level)
200
- if (under !== 0 || !together(level + 1)) return under
201
- }
202
- return 0
203
- }
204
-
205
- const along: ReadonlyArray<Travel> = across > 0 ? ["forward"] : across < 0 ? ["back"] : []
206
- const way = down()
207
- return [...along, ...(way > 0 ? ["down" as const] : way < 0 ? ["up" as const] : [])]
208
- }
209
-
210
- /**
211
- * A place on a canvas that is drawn by hand: one address, as a route, or
212
- * every address of a route, as its tag.
213
- */
214
- export type Spot<R extends Routes> = R["Type"]["_tag"] | R["Type"]
215
-
216
- /** A page of a section, and with `under`, what is under it: each of those a step forward from it, and listed downwards. */
217
- export type Page<R extends Routes> = Spot<R> | { readonly at: Spot<R>; readonly under: ReadonlyArray<Page<R>> }
218
-
219
- /** A canvas drawn by hand: it says the way from one route to another, as `travel` does. */
220
- export interface Canvas<R extends Routes> {
221
- readonly travel: (from: R["Type"], to: R["Type"]) => ReadonlyArray<Travel>
222
- }
223
-
224
62
  /**
225
- * The canvas of an app whose addresses are not written the way it is drawn.
226
- * `travel` reads the canvas off the addresses, which is why they have to be
227
- * `/section/page`. With this the addresses are whatever people expect, `/`
228
- * and `/posts/:id` and `/settings`, and the canvas is said once, here: the
229
- * sections along the line of reading, in each its pages from the top down,
230
- * and under a page whatever is a step forward from it.
231
- *
232
- * A place is a route, for one address, or the tag of a route, for all its
233
- * addresses. Those are then in the order of their params: the literals of
234
- * a `Schema.Literals` as given, any other values as a list of them would
235
- * be read. An address is at the place that names it, and failing that at
236
- * the place of its tag.
63
+ * The way a view changes when the history goes from one entry to another,
64
+ * for `$.viewTransition(...)`: `in` when it goes on to a later entry, as it
65
+ * does for a link that is pressed, and `out` when it goes back to an
66
+ * earlier one, as it does for the button that goes back. So what turned in
67
+ * turns out again the way it came. No way at all when the entry is the
68
+ * same one, as it is when an address is replaced.
237
69
  *
238
- * Every route but the catch-all has to be somewhere on it, or this throws:
239
- * a page can't be left off the map. A canvas is cheap to draw, so one that
240
- * depends on the Model, such as the posts there are, is drawn in `update`.
70
+ * The entries are counted as the router of `effect/ui` counts them: the
71
+ * `index` of a `Location`. Keep the index of the entry the Model is at,
72
+ * and give it with the index of the one it is going to.
241
73
  *
242
- * **Example** (A blog)
74
+ * **Example** (Turning the view in `update`)
243
75
  *
244
76
  * ```ts
245
- * const Canvas = Standard.canvas(BlogRoute, [
246
- * [{ at: "Latest", under: ["Post"] }, "Archive", { at: "Topics", under: ["Topic"] }],
247
- * ["Saved", "Write"],
248
- * ["Display"]
249
- * ])
250
- *
251
- * Navigated: ($, { route }) =>
252
- * $.evolve({ route }).viewTransition(Canvas.travel($.model.route, route))
77
+ * Navigated: ($, { route, at }) =>
78
+ * $.evolve({ route, at }).viewTransition(Standard.turn($.model.at, at))
253
79
  * ```
254
80
  *
255
- * @since 0.4.0
81
+ * @since 0.5.0
256
82
  */
257
- export const canvas = <R extends Routes>(routes: R, sections: ReadonlyArray<ReadonlyArray<Page<R>>>): Canvas<R> => {
258
- type Route = { readonly _tag: string; readonly params?: Record<string, unknown> }
259
- interface Place {
260
- readonly tag: string
261
- /** The params of the one address it is, or none when it is every address of the route. */
262
- readonly params: Record<string, unknown> | undefined
263
- /** The section, the page in it, and then where it is under each thing it is under. */
264
- readonly at: ReadonlyArray<number>
265
- }
266
- const places: Array<Place> = []
267
- const draw = (page: Page<R>, at: ReadonlyArray<number>): void => {
268
- const spot = (typeof page === "object" && "at" in page ? page.at : page) as string | Route
269
- places.push(
270
- typeof spot === "string"
271
- ? { tag: spot, params: undefined, at }
272
- : { tag: spot._tag, params: spot.params ?? {}, at }
273
- )
274
- if (typeof page === "object" && "under" in page)
275
- (page.under as ReadonlyArray<Page<R>>).forEach((under, index) => draw(under, [...at, index]))
276
- }
277
- sections.forEach((pages, section) => pages.forEach((page, index) => draw(page, [section, index])))
278
-
279
- const missing = Object.keys(routes.routes).filter(
280
- (tag) => tag !== routes.catchAll && !places.some((place) => place.tag === tag)
281
- )
282
- if (missing.length > 0) throw new Error(`Standard.canvas: no place for ${missing.join(", ")}`)
283
-
284
- const same = (params: Record<string, unknown>, route: Route): boolean =>
285
- Object.keys(params).every((name) => params[name] === route.params?.[name])
286
- const placeOf = (route: Route): Place | undefined =>
287
- places.find((place) => place.tag === route._tag && place.params !== undefined && same(place.params, route)) ??
288
- places.find((place) => place.tag === route._tag && place.params === undefined)
289
-
290
- /** Which way two addresses of one route lie: by the first of their params that differs. */
291
- const byParams = (from: Route, to: Route): -1 | 0 | 1 => {
292
- for (const segment of segmentsOf(routes.routes[from._tag]?.path ?? "/")) {
293
- const name = segment === "*" ? "*" : segment.startsWith(":") ? segment.slice(1) : undefined
294
- if (name === undefined) continue
295
- const literals = (
296
- routes.routes[from._tag]?.params[name] as { readonly literals?: ReadonlyArray<unknown> } | undefined
297
- )?.literals
298
- const way =
299
- literals === undefined
300
- ? inOrder(from.params?.[name], to.params?.[name])
301
- : signOf(literals.indexOf(to.params?.[name]) - literals.indexOf(from.params?.[name]))
302
- if (way !== 0) return way
303
- }
304
- return 0
305
- }
306
-
307
- return {
308
- travel: (from, to) => {
309
- const a = placeOf(from)
310
- const b = placeOf(to)
311
- if (a === undefined || b === undefined) return []
312
- // Along the line: by section, and in one section by how far under its page each is.
313
- const across = signOf(b.at[0]! - a.at[0]!) || signOf(b.at.length - a.at.length)
314
- // Down the page: by the page, each section counted from its top, and under one page by what is under it.
315
- const down = (): -1 | 0 | 1 => {
316
- const way = signOf(b.at[1]! - a.at[1]!)
317
- if (way !== 0 || (across !== 0 && b.at[0] !== a.at[0])) return way
318
- for (let level = 2; level < Math.min(a.at.length, b.at.length); level++) {
319
- const under = signOf(b.at[level]! - a.at[level]!)
320
- if (under !== 0) return under
321
- }
322
- return a === b ? byParams(from, to) : 0
323
- }
324
- const way = down()
325
- return [
326
- ...(across > 0 ? ["forward" as const] : across < 0 ? ["back" as const] : []),
327
- ...(way > 0 ? ["down" as const] : way < 0 ? ["up" as const] : [])
328
- ]
329
- }
330
- }
331
- }
83
+ export const turn = (from: number, to: number): ReadonlyArray<Travel> => (to > from ? ["in"] : to < from ? ["out"] : [])
332
84
 
333
85
  /** The width of page something is shown at: every column side by side, or all of them collapsed into one. */
334
86
  export const Only = Schema.Literals(["wide", "narrow"])
@@ -18,21 +18,34 @@
18
18
  translate: 0 calc(-100% - 12dvb);
19
19
 
20
20
  @starting-style {
21
- &[open] {
21
+ [open] > & {
22
22
  translate: 0 calc(-100% - 12dvb);
23
23
  }
24
24
  }
25
+ }
25
26
 
26
- /*
27
- * While its question is open, the page behind it steps back: a veil of
28
- * the page's own ground is drawn over it. So the page gets paler in the
29
- * light scheme and darker in the dark scheme, and what still stands out
30
- * is the question. The veil appears the moment the dialog does and goes
31
- * the moment it does: it does not fade.
32
- */
33
- &::backdrop {
34
- background: color-mix(in oklch, var(--s-paper) 72%, transparent);
35
- }
27
+ /*
28
+ * While its question is open, the page behind it steps back. A page
29
+ * with a navigator turns away on it, and that is all. A page with no
30
+ * navigator has nothing to turn on: a veil of the page's own ground is
31
+ * drawn over it, behind the frame the dialog is in. So the page gets
32
+ * paler in the light scheme and darker in the dark scheme, and what
33
+ * still stands out is the question. The veil does not fade.
34
+ */
35
+ :global(.s-ui-modal-frame):has(> .dialog)::backdrop {
36
+ background: color-mix(in oklch, var(--s-paper) 72%, transparent);
37
+ }
38
+
39
+ :global(.s-ui-shell) :global(.s-ui-modal-frame):has(> .dialog)::backdrop {
40
+ background: transparent;
41
+ }
42
+
43
+ /* With a navigator it is not let down from above: it turns in on the navigator. This is where the post is, from its own corner. */
44
+ :global(.s-ui-shell) .dialog.dialog {
45
+ --s-ui-post-x: calc(var(--s-ui-hinge-x) - var(--s-ui-clear-start) - var(--s-margin));
46
+ --s-ui-post-y: calc(var(--s-ui-hinge-y) - var(--s-ui-clear-top) - 12dvb);
47
+
48
+ translate: none;
36
49
  }
37
50
 
38
51
  /* The answers, across the bottom: out to the edges of the dialog, through its padding. */
@@ -2,13 +2,17 @@
2
2
 
3
3
  @layer standard.ui {
4
4
  /*
5
- * A split-flap readout, as on a departure board. Each cell holds a reel of
6
- * every glyph and shows one of them; a new value rolls the reel past all
7
- * the glyphs between, so a number is seen to count, not just to change.
5
+ * A split-flap readout, as on the departure board of an airport. Each
6
+ * cell is a drum of flaps, one for every glyph, and shows one of them: a
7
+ * glyph is on two flaps, its top half on one and its bottom half on the
8
+ * next, with the hinge they turn on between them. For a new value the
9
+ * drum turns, and its flaps fall one after another, through every glyph
10
+ * between, so a number is seen to count and not just to change. The
11
+ * script of the component turns the drum; this is how a cell is made.
8
12
  */
9
13
  .flap {
10
14
  display: inline-flex;
11
- column-gap: 1px;
15
+ column-gap: var(--s-hair);
12
16
  font-weight: 700;
13
17
  font-variant-numeric: tabular-nums;
14
18
  letter-spacing: 0;
@@ -16,146 +20,198 @@
16
20
  vertical-align: bottom;
17
21
  }
18
22
 
23
+ /* A cell is seen from in front of its middle, and near: a flap that falls comes out towards whoever looks at it. */
19
24
  .flap-cell {
25
+ position: relative;
20
26
  inline-size: 0.82em;
21
27
  block-size: 1lh;
22
- background: var(--s-fg);
23
28
  color: var(--s-bg);
24
- overflow: clip;
29
+ perspective: 4lh;
25
30
  }
26
31
 
27
- .flap-reel {
32
+ /*
33
+ * A face: half a glyph, on a block of the text's colour. It is one line
34
+ * high and cut off at half of that, from the top of the line for a top
35
+ * half and from its bottom for a bottom half. Between the two halves is
36
+ * the hinge: a hairline of the ground the readout is on. What it shows
37
+ * is the glyph of the cell's class, until the script says another.
38
+ */
39
+ .flap-face {
40
+ position: absolute;
41
+ inset-inline: 0;
28
42
  display: grid;
29
- justify-items: center;
30
- translate: 0 calc(var(--s-ui-glyph, 0) * -1lh);
31
- transition: translate calc(2 * var(--s-travel)) var(--s-glide);
43
+ justify-content: center;
44
+ block-size: calc(50% - var(--s-hair) / 2);
45
+ background: var(--s-fg);
46
+ overflow: clip;
47
+ backface-visibility: hidden;
48
+ forced-color-adjust: none;
32
49
 
33
- & > span {
50
+ &::before {
51
+ content: var(--s-ui-face, var(--s-ui-glyph, "\a0 "));
34
52
  block-size: 1lh;
35
53
  }
36
54
  }
37
55
 
56
+ .flap-top,
57
+ .flap-front {
58
+ inset-block-start: 0;
59
+ align-content: start;
60
+ }
61
+
62
+ .flap-bottom,
63
+ .flap-back {
64
+ inset-block-end: 0;
65
+ align-content: end;
66
+ }
67
+
68
+ /*
69
+ * The flap that falls. It is over the top half, hinged on the line across
70
+ * the middle of the cell, and turns on that line until it is over the
71
+ * bottom half. Its front is the top half of the glyph it leaves. Its
72
+ * back, which is what is seen once it is past the middle, is the bottom
73
+ * half of the next. It is only there while it falls.
74
+ */
75
+ .flap-leaf {
76
+ position: absolute;
77
+ inset-inline: 0;
78
+ inset-block-start: 0;
79
+ block-size: calc(50% - var(--s-hair) / 2);
80
+ transform-origin: 50% calc(100% + var(--s-hair) / 2);
81
+ transform-style: preserve-3d;
82
+ visibility: hidden;
83
+
84
+ & > .flap-face {
85
+ inset-block: 0;
86
+ block-size: auto;
87
+ }
88
+
89
+ & > .flap-back {
90
+ transform: rotateX(180deg);
91
+ }
92
+ }
93
+
38
94
  .g-0 {
39
- --s-ui-glyph: 0;
95
+ --s-ui-glyph: "\a0 ";
40
96
  }
41
97
  .g-1 {
42
- --s-ui-glyph: 1;
98
+ --s-ui-glyph: "0";
43
99
  }
44
100
  .g-2 {
45
- --s-ui-glyph: 2;
101
+ --s-ui-glyph: "1";
46
102
  }
47
103
  .g-3 {
48
- --s-ui-glyph: 3;
104
+ --s-ui-glyph: "2";
49
105
  }
50
106
  .g-4 {
51
- --s-ui-glyph: 4;
107
+ --s-ui-glyph: "3";
52
108
  }
53
109
  .g-5 {
54
- --s-ui-glyph: 5;
110
+ --s-ui-glyph: "4";
55
111
  }
56
112
  .g-6 {
57
- --s-ui-glyph: 6;
113
+ --s-ui-glyph: "5";
58
114
  }
59
115
  .g-7 {
60
- --s-ui-glyph: 7;
116
+ --s-ui-glyph: "6";
61
117
  }
62
118
  .g-8 {
63
- --s-ui-glyph: 8;
119
+ --s-ui-glyph: "7";
64
120
  }
65
121
  .g-9 {
66
- --s-ui-glyph: 9;
122
+ --s-ui-glyph: "8";
67
123
  }
68
124
  .g-10 {
69
- --s-ui-glyph: 10;
125
+ --s-ui-glyph: "9";
70
126
  }
71
127
  .g-11 {
72
- --s-ui-glyph: 11;
128
+ --s-ui-glyph: "A";
73
129
  }
74
130
  .g-12 {
75
- --s-ui-glyph: 12;
131
+ --s-ui-glyph: "B";
76
132
  }
77
133
  .g-13 {
78
- --s-ui-glyph: 13;
134
+ --s-ui-glyph: "C";
79
135
  }
80
136
  .g-14 {
81
- --s-ui-glyph: 14;
137
+ --s-ui-glyph: "D";
82
138
  }
83
139
  .g-15 {
84
- --s-ui-glyph: 15;
140
+ --s-ui-glyph: "E";
85
141
  }
86
142
  .g-16 {
87
- --s-ui-glyph: 16;
143
+ --s-ui-glyph: "F";
88
144
  }
89
145
  .g-17 {
90
- --s-ui-glyph: 17;
146
+ --s-ui-glyph: "G";
91
147
  }
92
148
  .g-18 {
93
- --s-ui-glyph: 18;
149
+ --s-ui-glyph: "H";
94
150
  }
95
151
  .g-19 {
96
- --s-ui-glyph: 19;
152
+ --s-ui-glyph: "I";
97
153
  }
98
154
  .g-20 {
99
- --s-ui-glyph: 20;
155
+ --s-ui-glyph: "J";
100
156
  }
101
157
  .g-21 {
102
- --s-ui-glyph: 21;
158
+ --s-ui-glyph: "K";
103
159
  }
104
160
  .g-22 {
105
- --s-ui-glyph: 22;
161
+ --s-ui-glyph: "L";
106
162
  }
107
163
  .g-23 {
108
- --s-ui-glyph: 23;
164
+ --s-ui-glyph: "M";
109
165
  }
110
166
  .g-24 {
111
- --s-ui-glyph: 24;
167
+ --s-ui-glyph: "N";
112
168
  }
113
169
  .g-25 {
114
- --s-ui-glyph: 25;
170
+ --s-ui-glyph: "O";
115
171
  }
116
172
  .g-26 {
117
- --s-ui-glyph: 26;
173
+ --s-ui-glyph: "P";
118
174
  }
119
175
  .g-27 {
120
- --s-ui-glyph: 27;
176
+ --s-ui-glyph: "Q";
121
177
  }
122
178
  .g-28 {
123
- --s-ui-glyph: 28;
179
+ --s-ui-glyph: "R";
124
180
  }
125
181
  .g-29 {
126
- --s-ui-glyph: 29;
182
+ --s-ui-glyph: "S";
127
183
  }
128
184
  .g-30 {
129
- --s-ui-glyph: 30;
185
+ --s-ui-glyph: "T";
130
186
  }
131
187
  .g-31 {
132
- --s-ui-glyph: 31;
188
+ --s-ui-glyph: "U";
133
189
  }
134
190
  .g-32 {
135
- --s-ui-glyph: 32;
191
+ --s-ui-glyph: "V";
136
192
  }
137
193
  .g-33 {
138
- --s-ui-glyph: 33;
194
+ --s-ui-glyph: "W";
139
195
  }
140
196
  .g-34 {
141
- --s-ui-glyph: 34;
197
+ --s-ui-glyph: "X";
142
198
  }
143
199
  .g-35 {
144
- --s-ui-glyph: 35;
200
+ --s-ui-glyph: "Y";
145
201
  }
146
202
  .g-36 {
147
- --s-ui-glyph: 36;
203
+ --s-ui-glyph: "Z";
148
204
  }
149
205
  .g-37 {
150
- --s-ui-glyph: 37;
206
+ --s-ui-glyph: "/";
151
207
  }
152
208
  .g-38 {
153
- --s-ui-glyph: 38;
209
+ --s-ui-glyph: ":";
154
210
  }
155
211
  .g-39 {
156
- --s-ui-glyph: 39;
212
+ --s-ui-glyph: "-";
157
213
  }
158
214
  .g-40 {
159
- --s-ui-glyph: 40;
215
+ --s-ui-glyph: ".";
160
216
  }
161
217
  }
@@ -1,7 +1,12 @@
1
1
  declare const styles: {
2
2
  readonly "flap": string;
3
+ readonly "flap-back": string;
4
+ readonly "flap-bottom": string;
3
5
  readonly "flap-cell": string;
4
- readonly "flap-reel": string;
6
+ readonly "flap-face": string;
7
+ readonly "flap-front": string;
8
+ readonly "flap-leaf": string;
9
+ readonly "flap-top": string;
5
10
  readonly "g-0": string;
6
11
  readonly "g-1": string;
7
12
  readonly "g-10": string;