@softure-ai/marketing-kit 0.21.1 → 0.22.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.
- package/CHANGELOG.md +31 -0
- package/NOTICE +11 -0
- package/README.md +35 -4
- package/dist/config/actions-schema.d.ts +35 -35
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +22 -1
- package/dist/config/brand.js.map +1 -1
- package/dist/config/colors.d.ts +12 -2
- package/dist/config/colors.d.ts.map +1 -1
- package/dist/config/colors.js +32 -0
- package/dist/config/colors.js.map +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +2 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/schema.d.ts +181 -172
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +16 -4
- package/dist/config/schema.js.map +1 -1
- package/dist/config/shot-steps.d.ts +40 -40
- package/dist/footage/caption-highlight.d.ts +44 -0
- package/dist/footage/caption-highlight.d.ts.map +1 -0
- package/dist/footage/caption-highlight.js +29 -0
- package/dist/footage/caption-highlight.js.map +1 -0
- package/dist/footage/compose.d.ts +3 -0
- package/dist/footage/compose.d.ts.map +1 -1
- package/dist/footage/compose.js +33 -6
- package/dist/footage/compose.js.map +1 -1
- package/dist/footage/draft-color.d.ts +6 -0
- package/dist/footage/draft-color.d.ts.map +1 -0
- package/dist/footage/draft-color.js +14 -0
- package/dist/footage/draft-color.js.map +1 -0
- package/dist/footage/draft-overlays.d.ts +12 -0
- package/dist/footage/draft-overlays.d.ts.map +1 -0
- package/dist/footage/draft-overlays.js +83 -0
- package/dist/footage/draft-overlays.js.map +1 -0
- package/dist/footage/draft.d.ts +27 -9
- package/dist/footage/draft.d.ts.map +1 -1
- package/dist/footage/draft.js +99 -37
- package/dist/footage/draft.js.map +1 -1
- package/dist/footage/edl.d.ts +41 -0
- package/dist/footage/edl.d.ts.map +1 -1
- package/dist/footage/edl.js +10 -0
- package/dist/footage/edl.js.map +1 -1
- package/dist/footage/film.d.ts +14 -0
- package/dist/footage/film.d.ts.map +1 -1
- package/dist/footage/film.js +2 -0
- package/dist/footage/film.js.map +1 -1
- package/dist/footage/isolate-ranges.js +1 -1
- package/dist/footage/isolate-ranges.js.map +1 -1
- package/dist/footage/overlay-html.d.ts +29 -0
- package/dist/footage/overlay-html.d.ts.map +1 -0
- package/dist/footage/overlay-html.js +112 -0
- package/dist/footage/overlay-html.js.map +1 -0
- package/dist/footage/overlay-schema.d.ts +97 -0
- package/dist/footage/overlay-schema.d.ts.map +1 -0
- package/dist/footage/overlay-schema.js +104 -0
- package/dist/footage/overlay-schema.js.map +1 -0
- package/dist/footage/overlays.d.ts +112 -0
- package/dist/footage/overlays.d.ts.map +1 -0
- package/dist/footage/overlays.js +222 -0
- package/dist/footage/overlays.js.map +1 -0
- package/dist/footage/pipeline.d.ts.map +1 -1
- package/dist/footage/pipeline.js +10 -1
- package/dist/footage/pipeline.js.map +1 -1
- package/dist/footage/speech-ranges.d.ts +8 -3
- package/dist/footage/speech-ranges.d.ts.map +1 -1
- package/dist/footage/speech-ranges.js +7 -4
- package/dist/footage/speech-ranges.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/og/index.d.ts +1 -1
- package/dist/og/index.d.ts.map +1 -1
- package/dist/og/index.js +1 -1
- package/dist/og/index.js.map +1 -1
- package/dist/og/photo-cover.d.ts +18 -1
- package/dist/og/photo-cover.d.ts.map +1 -1
- package/dist/og/photo-cover.js +56 -28
- package/dist/og/photo-cover.js.map +1 -1
- package/dist/render/hyperframes.d.ts +1 -1
- package/dist/render/hyperframes.d.ts.map +1 -1
- package/dist/render/hyperframes.js +1 -1
- package/dist/render/hyperframes.js.map +1 -1
- package/package.json +3 -2
- package/schema/edl.schema.json +130 -0
- package/schema/marketing.schema.json +33 -0
- package/src/config/brand.ts +20 -1
- package/src/config/colors.ts +39 -2
- package/src/config/config.ts +2 -0
- package/src/config/schema.ts +19 -7
- package/src/footage/caption-highlight.ts +52 -0
- package/src/footage/compose.ts +40 -6
- package/src/footage/draft-color.ts +12 -0
- package/src/footage/draft-overlays.ts +91 -0
- package/src/footage/draft.ts +117 -39
- package/src/footage/edl.ts +17 -0
- package/src/footage/film.ts +16 -0
- package/src/footage/isolate-ranges.ts +1 -1
- package/src/footage/overlay-html.ts +127 -0
- package/src/footage/overlay-schema.ts +146 -0
- package/src/footage/overlays.ts +272 -0
- package/src/footage/pipeline.ts +8 -1
- package/src/footage/speech-ranges.ts +8 -5
- package/src/index.ts +56 -1
- package/src/og/index.ts +2 -0
- package/src/og/photo-cover.ts +83 -33
- package/src/render/hyperframes.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,37 @@ Newest first. Each version lists what changed for an app that uses `@softure-ai/
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done"). Versions before the first one below are described in their GitHub Releases (`marketing-kit@x.y.z`).
|
|
6
6
|
|
|
7
|
+
## 0.22.0
|
|
8
|
+
|
|
9
|
+
- **Overlays on words in the EDL (#1200):** `edl.json` takes an optional `overlays[]` of `punch_in` (an emphasis zoom
|
|
10
|
+
on a word), `keyword`, `lower_third`, `list`, `arrow` and `highlight`, each on a transcript word (`at_word`) or a
|
|
11
|
+
film second (`at`), in the brand's colours and fonts. The render draws them from markup adapted from HyperFrames
|
|
12
|
+
registry blocks and vendored into the kit (no network); the draft draws them in the same place at the same time.
|
|
13
|
+
`resolveEdlOverlays` refuses, with a reason each, what cannot be drawn cleanly (a word never said, past the cut or
|
|
14
|
+
across a cut, two at once, closer than the film's new `overlayMinSpacing`, on the captions or outside the platform
|
|
15
|
+
safe zone, a punch-in on a Ken Burns segment or inside a zoom ease). An EDL without overlays renders as before.
|
|
16
|
+
- **hyperframes 0.9.20** (was 0.9.6). The kit's render arguments and the capture summary it reads are unchanged.
|
|
17
|
+
|
|
18
|
+
- **The lit caption word can sit on its own box (#1199):** a footage film's `captionHighlightStyle: "box"` sets the
|
|
19
|
+
word being said on a rounded box of the new brand colour `captionHighlightBox`, its text in `captionHighlightText`,
|
|
20
|
+
with the text highlight's timing, without moving the line; the render and the fast draft draw it alike. The default
|
|
21
|
+
`"text"` is unchanged. The two colour roles are optional (`OPTIONAL_COLOR_ROLES`), in `brand.colors` and
|
|
22
|
+
`brand.tokensFrom.roles`; a `box` film without them is an input error. `getCaptionHighlightContrast(colors)` returns
|
|
23
|
+
the lit text on its box and the box on the pill for the app to warn on; `getContrastRatio` is exported too.
|
|
24
|
+
- **A weak cover accent can be boxed instead of refused (#1199):** `renderPhotoCover({ accent: true, accentStyle })`
|
|
25
|
+
with `"box"` sets the `kicker-title` kicker on an opaque accent box, and `"auto"` boxes it only when the accent reads
|
|
26
|
+
under 3:1 as text. The result reports `accent: { style, contrast }`. The text style's refusal now also suggests
|
|
27
|
+
`accentStyle "box"`.
|
|
28
|
+
|
|
29
|
+
## 0.21.2
|
|
30
|
+
|
|
31
|
+
- **The isolator hears a float clip sound's ranges unclipped (#1193):** with `speechPeaks: "float"`,
|
|
32
|
+
`isolateSpeechRanges` cuts each range for the isolation provider as 32-bit float PCM (`pcm_f32le`), like the clip
|
|
33
|
+
sound itself, so a peak above full scale reaches the provider instead of being clamped by a 24-bit cut. The
|
|
34
|
+
whole-clip path already sent the float file. The default (`ceiling`) keeps 24-bit ranges as before. A range keeps
|
|
35
|
+
the sound's two channels, so its level is the same in both formats and cached ranges stay valid.
|
|
36
|
+
`buildRangeAudioArgs` takes `{ peaks }` as a fourth argument.
|
|
37
|
+
|
|
7
38
|
## 0.21.1
|
|
8
39
|
|
|
9
40
|
- **A composition never names a remote file (#1191):** `composeFilm` and `composeFootage` throw when an asset is an
|
package/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@softure-ai/marketing-kit
|
|
2
|
+
Copyright SOFTURE
|
|
3
|
+
|
|
4
|
+
This package contains code adapted from HyperFrames (https://github.com/heygen-com/hyperframes),
|
|
5
|
+
Copyright HeyGen, licensed under the Apache License, Version 2.0
|
|
6
|
+
(https://www.apache.org/licenses/LICENSE-2.0):
|
|
7
|
+
|
|
8
|
+
- src/footage/overlay-html.ts and src/footage/compose.ts (the punch-in): the motion of the registry
|
|
9
|
+
blocks lt-soft-pill, marker-highlight, hw-arrow and push-in, rewritten for the kit's frame, timeline
|
|
10
|
+
and brand colours. Changes: the markup, sizes, colours and timing are the kit's own; the blocks'
|
|
11
|
+
standalone compositions, variables, fonts and CDN script tags are not included.
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ that installs it, and no release of either dependency lifts its pin yet (hyperfr
|
|
|
33
33
|
|
|
34
34
|
| Finding | Pinned by | Why the kit never reaches it |
|
|
35
35
|
| --- | --- | --- |
|
|
36
|
-
| `undici` 7.25.0, high (about 30 advisories fixed in 7.28.0 to 7.30.1, e.g. GHSA-2m5v-pch6-74hx, GHSA-4w7w-5xrc-9h26, GHSA-p88m-4jfj-68fv) | `hyperframes` 0.9.
|
|
36
|
+
| `undici` 7.25.0, high (about 30 advisories fixed in 7.28.0 to 7.30.1, e.g. GHSA-2m5v-pch6-74hx, GHSA-4w7w-5xrc-9h26, GHSA-p88m-4jfj-68fv) | `hyperframes` 0.9.20 | hyperframes loads undici in one place: the helper that downloads a remote `src`, `href`, CSS `url(...)` or `@import` named in the composition, at render or preview time. The kit's compositions name only files in the build folder (it downloads URL clips itself, with Node's `fetch`), and both composers refuse a remote reference with an error (`assertLocalReferences`), so that helper is never called. The kit itself never imports undici; hyperframes' browser download goes through `@puppeteer/browsers`. |
|
|
37
37
|
| `fflate` 0.7.3, moderate (GHSA-px8p-9vwx-vf98, an endless loop in `unzipSync` on a malformed ZIP64 archive) | `satori` 0.63.2 | satori and its font parser only call `inflateSync`; `unzipSync` is never called. |
|
|
38
38
|
|
|
39
39
|
The `hyperframes`, `satori` and `@softure-ai/marketing-kit` entries in the report are these two findings counted
|
|
@@ -373,6 +373,7 @@ lowercase words joined by single dashes or underscores, at most 32 characters.
|
|
|
373
373
|
| `accent` | the touch ring, the end of the avatar's gradient |
|
|
374
374
|
| `cta`, `onCta` | the end card's link pill and its text; the avatar |
|
|
375
375
|
| `captionBackground`, `captionText`, `captionHighlight` | the caption pill, its words, the word being spoken |
|
|
376
|
+
| `captionHighlightBox`, `captionHighlightText` (optional) | with `captionHighlightStyle: "box"`: the box behind the word being spoken and its text |
|
|
376
377
|
|
|
377
378
|
A colour in `brand.colors` wins. Otherwise the role reads a token from `brand.tokensFrom`: the app's
|
|
378
379
|
stylesheet (`css`, custom properties in `[data-theme="<theme>"]`, then `:root`, `var()` resolved; a
|
|
@@ -662,6 +663,23 @@ softure-marketing footage <film> --step=render # the EDL as it is, maybe e
|
|
|
662
663
|
box for the captions that start in it, so they clear what the frame shows low down) and render with `--step=render`; a plain `footage` run keeps an EDL that is there, `--step=cut` writes
|
|
663
664
|
it afresh and prints the sentences it would suggest dropping (retakes, false starts, cut-off sentences). A version 1
|
|
664
665
|
file is still read, with generated ids.
|
|
666
|
+
- **Overlays on words** (issue #1200): `edl.json` may carry `overlays[]`, small accents of a hand-edited reel placed by
|
|
667
|
+
the app's editor over the transcript. Each is `{ kind, at_word | at, duration, text?, items?, anchor?, style? }`:
|
|
668
|
+
`at_word: { text, occurrence? }` names a word of the cut (compared without case and punctuation, the first time it
|
|
669
|
+
is said unless `occurrence` says otherwise; its start after the cut is the overlay's start), `at` a film second;
|
|
670
|
+
`duration` is 1-8 s. The kinds: `punch_in` (an emphasis zoom of the picture to 108, 112 or 115 % by `style.size`
|
|
671
|
+
`s`, `m`, `l`, eased in and back out; not a cut transition), `keyword` (one word or number beside the subject, up
|
|
672
|
+
to 24 characters), `lower_third` (a place or a name just above the captions, up to 40), `list` (2-4 points of up to
|
|
673
|
+
32 characters), `arrow` (pointing at `anchor: { x, y }`) and `highlight` (marking `anchor: { x, y, width, height }`),
|
|
674
|
+
in px of the film's frame. Colours and fonts are the brand's (the card in `background`, its text in `foreground`,
|
|
675
|
+
the dot, arrow and marker in `accent`; the keyword in the heading font), `style.size` and `style.side` (`left`,
|
|
676
|
+
`right`) are the only knobs. The render draws them from markup vendored into the kit (no network) and the draft
|
|
677
|
+
draws them in the same place at the same time (the cards, a straight arrow, the marker's outline, the punch-in
|
|
678
|
+
zoom). Before anything is rendered, `resolveEdlOverlays` refuses with a reason per overlay: a word the cut never
|
|
679
|
+
says, an overlay running past the cut or across a cut into the next segment, two on screen at once, two starting
|
|
680
|
+
closer than the film's `overlayMinSpacing` (the app's budget, e.g. 8), a text overlay that does not fit between the
|
|
681
|
+
platform safe zone and the captions, an anchor outside the safe zone or on the captions, a `punch_in` on a
|
|
682
|
+
`kenburns` segment or inside a zoom cut's ease. An EDL without `overlays` renders exactly as before.
|
|
665
683
|
- **Transitions and look:** `jump` (a cut inside one talking clip) and `clip` (between clips) are hard cuts by
|
|
666
684
|
default; `zoom` punches in by `edit.zoomPercent` (105-112, default 108) and back out on the next, `fade` lasts
|
|
667
685
|
`edit.fadeFrames` (default 10 at 30 fps), `whoosh` is a cut with the `sfx.whoosh` sound. B-roll stays still unless
|
|
@@ -697,7 +715,12 @@ softure-marketing footage <film> --step=render # the EDL as it is, maybe e
|
|
|
697
715
|
`{ kind: "file", path, fileName, contentType }`; with neither, the type check is skipped and the probe alone decides.
|
|
698
716
|
- **Captions** (`captions`, default true) are the transcript's words in film time: `captionStyle: "phrase"` (the
|
|
699
717
|
default) shows 2-6 words of plain text with a soft shadow, `"highlight"` the pill that lights each word in the
|
|
700
|
-
brand's caption colours. `
|
|
718
|
+
brand's caption colours. `captionHighlightStyle` picks how the word being said lights up: `"text"` (the default)
|
|
719
|
+
colours it `captionHighlight`; `"box"` sets it on a rounded box of `captionHighlightBox` (0.15 em past the word on
|
|
720
|
+
each side, radius 12 px, the line's layout unmoved) with its text in `captionHighlightText`, for the same 0.32 s, in
|
|
721
|
+
the render and the draft alike. Both box colours are then required (a film without them stops before anything is
|
|
722
|
+
rendered); `getCaptionHighlightContrast(colors)` returns the lit text's contrast on its box and the box's on the
|
|
723
|
+
pill, so the app can warn (the kit never changes the colours). `layout` moves their box per format; `captionPreset` (`reels`, `shorts`, `tiktok` or `all`)
|
|
701
724
|
keeps a 9:16 film's captions inside that platform's safe zone (`CAPTION_SAFE_ZONES`, the margins its own buttons and
|
|
702
725
|
text cover): the box is anchored by its foot at the zone's bottom margin and grows upwards. `captionMaxLines` (1-4)
|
|
703
726
|
shrinks a longer card's font in the render, to 70 % of the box's size at most (`CAPTION_MIN_FONT_SCALE`), until it
|
|
@@ -1162,7 +1185,9 @@ What the draft matches and what it leaves out:
|
|
|
1162
1185
|
- **Captions follow `captionStyle`.** The cards are the render's (`getFootageCaptionChunks`, kept words included). `phrase`: the render's phrases in white with a dark outline and shadow.
|
|
1163
1186
|
`highlight`: the render's chunks of up to four words on an opaque box of the brand's `captionBackground` (its alpha
|
|
1164
1187
|
kept), in `captionText`, each word in `captionHighlight` for the 0.32 s the render lights it. libass draws a square
|
|
1165
|
-
box per line: no rounded corners, no drop shadow, no pop-in, and the colour switches instead of fading back.
|
|
1188
|
+
box per line: no rounded corners, no drop shadow, no pop-in, and the colour switches instead of fading back. With
|
|
1189
|
+
`captionHighlightStyle: "box"` the lit word sits on a square box of `captionHighlightBox` in the same place, its
|
|
1190
|
+
text in `captionHighlightText`.
|
|
1166
1191
|
- **The brand's body font** (`brand`, the value `renderFootage` takes): the TrueType or OpenType file of
|
|
1167
1192
|
`brand.fonts.body` closest to the captions' weight (650, normal style first) is copied to the draft's `fonts/`
|
|
1168
1193
|
and named by the family the file itself declares (libass matches that, not the CSS family). A body font shipped only
|
|
@@ -1315,6 +1340,12 @@ if (isPointUnderCoverText(cover.value, cover.value.focusPoint, 40)) console.warn
|
|
|
1315
1340
|
`background`, whichever reads better on it. Another layout with `accent: true` is an error, and so is an accent
|
|
1316
1341
|
whose contrast against what it stands on (the scrim colour for the kicker, the label for the pill) is under 3:1,
|
|
1317
1342
|
the WCAG bound for large text (`MIN_COVER_ACCENT_CONTRAST`); the error names both colours and the ratio.
|
|
1343
|
+
- `accentStyle` (with `accent: true`, `PHOTO_COVER_ACCENT_STYLES`) says how the `kicker-title` accent is drawn:
|
|
1344
|
+
`"text"` (the default) as above; `"box"` sets the kicker on an opaque accent box in `foreground` or `background`,
|
|
1345
|
+
whichever reads better on it, so an accent too weak as text still reads; `"auto"` draws text when the accent reads
|
|
1346
|
+
3:1 against the scrim and the box when it does not. A box no text colour reads on at 3:1 is still an error, with the
|
|
1347
|
+
reason. The `pill` accent is a box whatever the style. The result's `accent` says what was drawn
|
|
1348
|
+
(`{ style: "text" | "box", contrast }`, null without the accent).
|
|
1318
1349
|
- `layout` picks where the text goes (`PHOTO_COVER_LAYOUTS`). Without it, a caption is `title-bottom` and no caption
|
|
1319
1350
|
is `photo`, so a call without `layout` draws what it always drew. A layout that needs a text it was not given, or a
|
|
1320
1351
|
text its layout does not draw, is an error.
|
|
@@ -1350,7 +1381,7 @@ if (isPointUnderCoverText(cover.value, cover.value.focusPoint, 40)) console.warn
|
|
|
1350
1381
|
|
|
1351
1382
|
| Asset | Licence | How the package handles it |
|
|
1352
1383
|
| --- | --- | --- |
|
|
1353
|
-
| hyperframes `0.
|
|
1384
|
+
| hyperframes `0.9.20` | Apache-2.0 | npm dependency, pinned, run from `node_modules`; the EDL overlays' motion is adapted from its registry blocks (`lt-soft-pill`, `marker-highlight`, `hw-arrow`, `push-in`), credited in [NOTICE](NOTICE) |
|
|
1354
1385
|
| GSAP | GreenSock's standard "no charge" licence | npm dependency `gsap`; `gsap.min.js` is copied into the project's build folder at render time, never shipped in this package |
|
|
1355
1386
|
| Fonts | the project's | not bundled; `brand.fonts` names the files, copied next to the composition at render time |
|
|
1356
1387
|
| Sound effects | the project's | not bundled; `sfx` names the files |
|
|
@@ -51,7 +51,11 @@ export declare const locatorSchema: z.ZodPipe<z.ZodObject<{
|
|
|
51
51
|
caption: "caption";
|
|
52
52
|
log: "log";
|
|
53
53
|
code: "code";
|
|
54
|
+
list: "list";
|
|
54
55
|
none: "none";
|
|
56
|
+
search: "search";
|
|
57
|
+
link: "link";
|
|
58
|
+
time: "time";
|
|
55
59
|
note: "note";
|
|
56
60
|
strong: "strong";
|
|
57
61
|
alert: "alert";
|
|
@@ -83,8 +87,6 @@ export declare const locatorSchema: z.ZodPipe<z.ZodObject<{
|
|
|
83
87
|
heading: "heading";
|
|
84
88
|
img: "img";
|
|
85
89
|
insertion: "insertion";
|
|
86
|
-
link: "link";
|
|
87
|
-
list: "list";
|
|
88
90
|
listbox: "listbox";
|
|
89
91
|
listitem: "listitem";
|
|
90
92
|
main: "main";
|
|
@@ -108,7 +110,6 @@ export declare const locatorSchema: z.ZodPipe<z.ZodObject<{
|
|
|
108
110
|
rowgroup: "rowgroup";
|
|
109
111
|
rowheader: "rowheader";
|
|
110
112
|
scrollbar: "scrollbar";
|
|
111
|
-
search: "search";
|
|
112
113
|
searchbox: "searchbox";
|
|
113
114
|
separator: "separator";
|
|
114
115
|
slider: "slider";
|
|
@@ -123,7 +124,6 @@ export declare const locatorSchema: z.ZodPipe<z.ZodObject<{
|
|
|
123
124
|
tabpanel: "tabpanel";
|
|
124
125
|
term: "term";
|
|
125
126
|
textbox: "textbox";
|
|
126
|
-
time: "time";
|
|
127
127
|
timer: "timer";
|
|
128
128
|
toolbar: "toolbar";
|
|
129
129
|
tooltip: "tooltip";
|
|
@@ -177,7 +177,7 @@ export declare const locatorSchema: z.ZodPipe<z.ZodObject<{
|
|
|
177
177
|
hasText: TextMatch | null;
|
|
178
178
|
nth: number | null;
|
|
179
179
|
}, {
|
|
180
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
180
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
181
181
|
name?: string | {
|
|
182
182
|
regex: string;
|
|
183
183
|
flags: string;
|
|
@@ -210,7 +210,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
210
210
|
caption: "caption";
|
|
211
211
|
log: "log";
|
|
212
212
|
code: "code";
|
|
213
|
+
list: "list";
|
|
213
214
|
none: "none";
|
|
215
|
+
search: "search";
|
|
216
|
+
link: "link";
|
|
217
|
+
time: "time";
|
|
214
218
|
note: "note";
|
|
215
219
|
strong: "strong";
|
|
216
220
|
alert: "alert";
|
|
@@ -242,8 +246,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
242
246
|
heading: "heading";
|
|
243
247
|
img: "img";
|
|
244
248
|
insertion: "insertion";
|
|
245
|
-
link: "link";
|
|
246
|
-
list: "list";
|
|
247
249
|
listbox: "listbox";
|
|
248
250
|
listitem: "listitem";
|
|
249
251
|
main: "main";
|
|
@@ -267,7 +269,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
269
|
rowgroup: "rowgroup";
|
|
268
270
|
rowheader: "rowheader";
|
|
269
271
|
scrollbar: "scrollbar";
|
|
270
|
-
search: "search";
|
|
271
272
|
searchbox: "searchbox";
|
|
272
273
|
separator: "separator";
|
|
273
274
|
slider: "slider";
|
|
@@ -282,7 +283,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
282
283
|
tabpanel: "tabpanel";
|
|
283
284
|
term: "term";
|
|
284
285
|
textbox: "textbox";
|
|
285
|
-
time: "time";
|
|
286
286
|
timer: "timer";
|
|
287
287
|
toolbar: "toolbar";
|
|
288
288
|
tooltip: "tooltip";
|
|
@@ -336,7 +336,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
336
336
|
hasText: TextMatch | null;
|
|
337
337
|
nth: number | null;
|
|
338
338
|
}, {
|
|
339
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
339
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
340
340
|
name?: string | {
|
|
341
341
|
regex: string;
|
|
342
342
|
flags: string;
|
|
@@ -382,7 +382,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
382
382
|
caption: "caption";
|
|
383
383
|
log: "log";
|
|
384
384
|
code: "code";
|
|
385
|
+
list: "list";
|
|
385
386
|
none: "none";
|
|
387
|
+
search: "search";
|
|
388
|
+
link: "link";
|
|
389
|
+
time: "time";
|
|
386
390
|
note: "note";
|
|
387
391
|
strong: "strong";
|
|
388
392
|
alert: "alert";
|
|
@@ -414,8 +418,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
414
418
|
heading: "heading";
|
|
415
419
|
img: "img";
|
|
416
420
|
insertion: "insertion";
|
|
417
|
-
link: "link";
|
|
418
|
-
list: "list";
|
|
419
421
|
listbox: "listbox";
|
|
420
422
|
listitem: "listitem";
|
|
421
423
|
main: "main";
|
|
@@ -439,7 +441,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
439
441
|
rowgroup: "rowgroup";
|
|
440
442
|
rowheader: "rowheader";
|
|
441
443
|
scrollbar: "scrollbar";
|
|
442
|
-
search: "search";
|
|
443
444
|
searchbox: "searchbox";
|
|
444
445
|
separator: "separator";
|
|
445
446
|
slider: "slider";
|
|
@@ -454,7 +455,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
454
455
|
tabpanel: "tabpanel";
|
|
455
456
|
term: "term";
|
|
456
457
|
textbox: "textbox";
|
|
457
|
-
time: "time";
|
|
458
458
|
timer: "timer";
|
|
459
459
|
toolbar: "toolbar";
|
|
460
460
|
tooltip: "tooltip";
|
|
@@ -508,7 +508,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
508
508
|
hasText: TextMatch | null;
|
|
509
509
|
nth: number | null;
|
|
510
510
|
}, {
|
|
511
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
511
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
512
512
|
name?: string | {
|
|
513
513
|
regex: string;
|
|
514
514
|
flags: string;
|
|
@@ -534,7 +534,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
534
534
|
caption: "caption";
|
|
535
535
|
log: "log";
|
|
536
536
|
code: "code";
|
|
537
|
+
list: "list";
|
|
537
538
|
none: "none";
|
|
539
|
+
search: "search";
|
|
540
|
+
link: "link";
|
|
541
|
+
time: "time";
|
|
538
542
|
note: "note";
|
|
539
543
|
strong: "strong";
|
|
540
544
|
alert: "alert";
|
|
@@ -566,8 +570,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
566
570
|
heading: "heading";
|
|
567
571
|
img: "img";
|
|
568
572
|
insertion: "insertion";
|
|
569
|
-
link: "link";
|
|
570
|
-
list: "list";
|
|
571
573
|
listbox: "listbox";
|
|
572
574
|
listitem: "listitem";
|
|
573
575
|
main: "main";
|
|
@@ -591,7 +593,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
591
593
|
rowgroup: "rowgroup";
|
|
592
594
|
rowheader: "rowheader";
|
|
593
595
|
scrollbar: "scrollbar";
|
|
594
|
-
search: "search";
|
|
595
596
|
searchbox: "searchbox";
|
|
596
597
|
separator: "separator";
|
|
597
598
|
slider: "slider";
|
|
@@ -606,7 +607,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
606
607
|
tabpanel: "tabpanel";
|
|
607
608
|
term: "term";
|
|
608
609
|
textbox: "textbox";
|
|
609
|
-
time: "time";
|
|
610
610
|
timer: "timer";
|
|
611
611
|
toolbar: "toolbar";
|
|
612
612
|
tooltip: "tooltip";
|
|
@@ -660,7 +660,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
660
660
|
hasText: TextMatch | null;
|
|
661
661
|
nth: number | null;
|
|
662
662
|
}, {
|
|
663
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
663
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
664
664
|
name?: string | {
|
|
665
665
|
regex: string;
|
|
666
666
|
flags: string;
|
|
@@ -691,7 +691,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
691
691
|
caption: "caption";
|
|
692
692
|
log: "log";
|
|
693
693
|
code: "code";
|
|
694
|
+
list: "list";
|
|
694
695
|
none: "none";
|
|
696
|
+
search: "search";
|
|
697
|
+
link: "link";
|
|
698
|
+
time: "time";
|
|
695
699
|
note: "note";
|
|
696
700
|
strong: "strong";
|
|
697
701
|
alert: "alert";
|
|
@@ -723,8 +727,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
723
727
|
heading: "heading";
|
|
724
728
|
img: "img";
|
|
725
729
|
insertion: "insertion";
|
|
726
|
-
link: "link";
|
|
727
|
-
list: "list";
|
|
728
730
|
listbox: "listbox";
|
|
729
731
|
listitem: "listitem";
|
|
730
732
|
main: "main";
|
|
@@ -748,7 +750,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
748
750
|
rowgroup: "rowgroup";
|
|
749
751
|
rowheader: "rowheader";
|
|
750
752
|
scrollbar: "scrollbar";
|
|
751
|
-
search: "search";
|
|
752
753
|
searchbox: "searchbox";
|
|
753
754
|
separator: "separator";
|
|
754
755
|
slider: "slider";
|
|
@@ -763,7 +764,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
763
764
|
tabpanel: "tabpanel";
|
|
764
765
|
term: "term";
|
|
765
766
|
textbox: "textbox";
|
|
766
|
-
time: "time";
|
|
767
767
|
timer: "timer";
|
|
768
768
|
toolbar: "toolbar";
|
|
769
769
|
tooltip: "tooltip";
|
|
@@ -817,7 +817,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
817
817
|
hasText: TextMatch | null;
|
|
818
818
|
nth: number | null;
|
|
819
819
|
}, {
|
|
820
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
820
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
821
821
|
name?: string | {
|
|
822
822
|
regex: string;
|
|
823
823
|
flags: string;
|
|
@@ -849,7 +849,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
849
849
|
caption: "caption";
|
|
850
850
|
log: "log";
|
|
851
851
|
code: "code";
|
|
852
|
+
list: "list";
|
|
852
853
|
none: "none";
|
|
854
|
+
search: "search";
|
|
855
|
+
link: "link";
|
|
856
|
+
time: "time";
|
|
853
857
|
note: "note";
|
|
854
858
|
strong: "strong";
|
|
855
859
|
alert: "alert";
|
|
@@ -881,8 +885,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
881
885
|
heading: "heading";
|
|
882
886
|
img: "img";
|
|
883
887
|
insertion: "insertion";
|
|
884
|
-
link: "link";
|
|
885
|
-
list: "list";
|
|
886
888
|
listbox: "listbox";
|
|
887
889
|
listitem: "listitem";
|
|
888
890
|
main: "main";
|
|
@@ -906,7 +908,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
906
908
|
rowgroup: "rowgroup";
|
|
907
909
|
rowheader: "rowheader";
|
|
908
910
|
scrollbar: "scrollbar";
|
|
909
|
-
search: "search";
|
|
910
911
|
searchbox: "searchbox";
|
|
911
912
|
separator: "separator";
|
|
912
913
|
slider: "slider";
|
|
@@ -921,7 +922,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
921
922
|
tabpanel: "tabpanel";
|
|
922
923
|
term: "term";
|
|
923
924
|
textbox: "textbox";
|
|
924
|
-
time: "time";
|
|
925
925
|
timer: "timer";
|
|
926
926
|
toolbar: "toolbar";
|
|
927
927
|
tooltip: "tooltip";
|
|
@@ -975,7 +975,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
975
975
|
hasText: TextMatch | null;
|
|
976
976
|
nth: number | null;
|
|
977
977
|
}, {
|
|
978
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
978
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
979
979
|
name?: string | {
|
|
980
980
|
regex: string;
|
|
981
981
|
flags: string;
|
|
@@ -1001,7 +1001,11 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1001
1001
|
caption: "caption";
|
|
1002
1002
|
log: "log";
|
|
1003
1003
|
code: "code";
|
|
1004
|
+
list: "list";
|
|
1004
1005
|
none: "none";
|
|
1006
|
+
search: "search";
|
|
1007
|
+
link: "link";
|
|
1008
|
+
time: "time";
|
|
1005
1009
|
note: "note";
|
|
1006
1010
|
strong: "strong";
|
|
1007
1011
|
alert: "alert";
|
|
@@ -1033,8 +1037,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1033
1037
|
heading: "heading";
|
|
1034
1038
|
img: "img";
|
|
1035
1039
|
insertion: "insertion";
|
|
1036
|
-
link: "link";
|
|
1037
|
-
list: "list";
|
|
1038
1040
|
listbox: "listbox";
|
|
1039
1041
|
listitem: "listitem";
|
|
1040
1042
|
main: "main";
|
|
@@ -1058,7 +1060,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1058
1060
|
rowgroup: "rowgroup";
|
|
1059
1061
|
rowheader: "rowheader";
|
|
1060
1062
|
scrollbar: "scrollbar";
|
|
1061
|
-
search: "search";
|
|
1062
1063
|
searchbox: "searchbox";
|
|
1063
1064
|
separator: "separator";
|
|
1064
1065
|
slider: "slider";
|
|
@@ -1073,7 +1074,6 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1073
1074
|
tabpanel: "tabpanel";
|
|
1074
1075
|
term: "term";
|
|
1075
1076
|
textbox: "textbox";
|
|
1076
|
-
time: "time";
|
|
1077
1077
|
timer: "timer";
|
|
1078
1078
|
toolbar: "toolbar";
|
|
1079
1079
|
tooltip: "tooltip";
|
|
@@ -1127,7 +1127,7 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1127
1127
|
hasText: TextMatch | null;
|
|
1128
1128
|
nth: number | null;
|
|
1129
1129
|
}, {
|
|
1130
|
-
role?: "caption" | "log" | "code" | "none" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "
|
|
1130
|
+
role?: "caption" | "log" | "code" | "list" | "none" | "search" | "link" | "time" | "note" | "strong" | "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "listbox" | "listitem" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined;
|
|
1131
1131
|
name?: string | {
|
|
1132
1132
|
regex: string;
|
|
1133
1133
|
flags: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwE,KAAK,WAAW,EAAqB,MAAM,aAAa,CAAC;AAGxI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;GAKG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC;AAEzG,KAAK,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAgCpC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAmDhF"}
|
package/dist/config/brand.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
|
-
import { COLOR_ROLES, getDefaultToken, isOpaqueHexColor } from "./colors.js";
|
|
3
|
+
import { COLOR_ROLES, OPTIONAL_COLOR_ROLES, getDefaultToken, isOpaqueHexColor } from "./colors.js";
|
|
4
4
|
import { readCssColors } from "./css-colors.js";
|
|
5
5
|
import { readDesignJsonColors } from "./design-json.js";
|
|
6
6
|
function getErrorCode(error) {
|
|
@@ -61,6 +61,27 @@ export function resolveBrandColors(brand, root) {
|
|
|
61
61
|
}
|
|
62
62
|
colors[role] = value;
|
|
63
63
|
}
|
|
64
|
+
// An optional role takes its inline colour, else its token when the source has one; a token the config names and
|
|
65
|
+
// the source lacks is an issue, a default token it lacks leaves the role unset.
|
|
66
|
+
for (const role of OPTIONAL_COLOR_ROLES) {
|
|
67
|
+
const inline = brand.colors[role];
|
|
68
|
+
if (inline !== undefined) {
|
|
69
|
+
colors[role] = inline.toLowerCase();
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (reader === null)
|
|
73
|
+
continue;
|
|
74
|
+
const named = brand.tokensFrom?.roles[role];
|
|
75
|
+
const token = named ?? getDefaultToken(role);
|
|
76
|
+
const read = reader([token]);
|
|
77
|
+
const value = read.ok ? read.colors[token] : undefined;
|
|
78
|
+
if (value !== undefined)
|
|
79
|
+
colors[role] = value;
|
|
80
|
+
else if (named !== undefined) {
|
|
81
|
+
const reason = read.ok ? `no colour for "${token}"` : read.error;
|
|
82
|
+
issues.push({ path: ["brand", "tokensFrom", "roles", role], message: `brand.tokensFrom has no colour for it: ${reason}` });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
64
85
|
if (colors.background !== undefined && !isOpaqueHexColor(colors.background)) {
|
|
65
86
|
issues.push({ path: ["brand", "colors", "background"], message: `"${colors.background}" must be #rrggbb: the vignette adds its own transparency` });
|
|
66
87
|
}
|
package/dist/config/brand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAuC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,eAAe,EAAE,gBAAgB,EAAuC,MAAM,aAAa,CAAC;AACxI,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAgBxD,SAAS,YAAY,CAAC,KAAc;IAClC,OAAQ,KAA+B,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,uFAAuF;AACvF,SAAS,UAAU,CAAC,KAAY,EAAE,IAAY;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;IAChC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5D,6CAA6C;IAC7C,MAAM,QAAQ,GAAG,CA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,IAAI,CAAC,EAAE,OAAO,EAAE,0CAA0C,MAAM,EAAE,EAAE,CAAC,CAAC;QAC7H,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5E,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,MAAM,CAAC,UAAU,2DAA2D,EAAE,CAAC,CAAC;IACtJ,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACpD,kFAAkF;IAClF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAqB,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/config/colors.d.ts
CHANGED
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const COLOR_ROLES: readonly ["background", "foreground", "muted", "accent", "cta", "onCta", "captionBackground", "captionText", "captionHighlight"];
|
|
6
6
|
export type ColorRole = (typeof COLOR_ROLES)[number];
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Colour roles a brand may leave out: only a feature that asks for them needs them, so a brand without them still
|
|
9
|
+
* resolves (issue #1199).
|
|
10
|
+
*/
|
|
11
|
+
export declare const OPTIONAL_COLOR_ROLES: readonly ["captionHighlightBox", "captionHighlightText"];
|
|
12
|
+
export type OptionalColorRole = (typeof OPTIONAL_COLOR_ROLES)[number];
|
|
13
|
+
export type BrandColors = Record<ColorRole, string> & Partial<Record<OptionalColorRole, string>>;
|
|
8
14
|
export declare const COLOR_THEMES: readonly ["light", "dark"];
|
|
9
15
|
export type ColorTheme = (typeof COLOR_THEMES)[number];
|
|
10
16
|
/** Colours read from a source, keyed by the source's token name. */
|
|
@@ -19,5 +25,9 @@ export declare function isHexColor(value: string): boolean;
|
|
|
19
25
|
/** `#rrggbb` only: the background gets an alpha appended for the vignette. */
|
|
20
26
|
export declare function isOpaqueHexColor(value: string): boolean;
|
|
21
27
|
/** The token a role reads from a source when the config names none: `onCta` → `on-cta`. */
|
|
22
|
-
export declare function getDefaultToken(role: ColorRole): string;
|
|
28
|
+
export declare function getDefaultToken(role: ColorRole | OptionalColorRole): string;
|
|
29
|
+
/** The relative luminance (WCAG 2) of a hex colour, its alpha ignored. */
|
|
30
|
+
export declare function getRelativeLuminance(color: string): number;
|
|
31
|
+
/** The WCAG contrast ratio of two hex colours (alpha ignored), from 1 to 21. */
|
|
32
|
+
export declare function getContrastRatio(first: string, second: string): number;
|
|
23
33
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/config/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,WAAW,kIAmBd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/config/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,WAAW,kIAmBd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,0DAKvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,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