@aastrika/ai-elements 0.4.1 → 0.6.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 +150 -0
- package/README.md +30 -0
- package/aastrika-elements.d.ts +27 -0
- package/aastrika-elements.js +10 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,156 @@ see at a glance what to expect when they upgrade.
|
|
|
6
6
|
Versions follow semver: a **minor** adds something, a **patch** fixes something,
|
|
7
7
|
and neither removes anything a host was using.
|
|
8
8
|
|
|
9
|
+
## 0.6.0
|
|
10
|
+
|
|
11
|
+
Adds behaviour rather than API: the tags, attributes and events are exactly
|
|
12
|
+
those of 0.5.0, so a host upgrades without touching a line. What changed is what
|
|
13
|
+
the elements do while someone is using them.
|
|
14
|
+
|
|
15
|
+
**Added**
|
|
16
|
+
- A run survives leaving the screen. The work already happened server-side; the
|
|
17
|
+
job id is now remembered, so coming back to Content Studio or Assessment picks
|
|
18
|
+
the run up again instead of showing an empty form beside a job that is still
|
|
19
|
+
producing
|
|
20
|
+
- Drop a file on the Content Studio upload zone. It said "choose a file" and
|
|
21
|
+
accepted nothing else; it now takes a drop, and says so
|
|
22
|
+
- Steps you have finished collapse to one line naming what you chose, with a way
|
|
23
|
+
back in that reopens the step as it stands. Five open forms made you hunt for
|
|
24
|
+
the one you were on
|
|
25
|
+
- Reports opens with a shimmer skeleton shaped like the page it is loading,
|
|
26
|
+
rather than the word "Loading"
|
|
27
|
+
- Reports pages its tables, ten rows at a time, and switches between videos and
|
|
28
|
+
assessments with a filter instead of stacking both
|
|
29
|
+
- `--aastrika-accent-2` and `--aastrika-accent-3` name the second and third
|
|
30
|
+
hues. A spend split drawn in one hue at two darknesses reads as one bar; two
|
|
31
|
+
hues read as a comparison
|
|
32
|
+
|
|
33
|
+
**Changed**
|
|
34
|
+
- Reports is one screen rather than four stacked tables: the figures carry their
|
|
35
|
+
own context, spend carries its own breakdown, and picking a person is a
|
|
36
|
+
control in the header rather than a table whose job was to be clicked
|
|
37
|
+
- A column appears only when it has something to say — an empty "Feedback
|
|
38
|
+
rounds" column took width from the titles, which need it
|
|
39
|
+
- "Production" is now "Creating your video", and "Your video" is "Finished
|
|
40
|
+
video"
|
|
41
|
+
|
|
42
|
+
**Fixed**
|
|
43
|
+
- A focused field drew two borders. `:focus` and `:focus-visible` both applied,
|
|
44
|
+
because a text field matches `:focus-visible` on a plain click
|
|
45
|
+
- Resting the cursor on the field you just clicked reset its edge to grey:
|
|
46
|
+
`:hover` outranked `:focus`
|
|
47
|
+
- The actions column in Reports collapsed to nothing. `width: 1%` is taken
|
|
48
|
+
literally under `table-layout: fixed`, so View, Export and Delete were clipped
|
|
49
|
+
out of sight; the buttons also sat above their row's centre line
|
|
50
|
+
- The confirmation dialog's buttons were unstyled — a bare red rectangle and a
|
|
51
|
+
line of plain text — because that component never had the shared stylesheet
|
|
52
|
+
in scope
|
|
53
|
+
- Content Studio's progress panel had no styling at all: it lived in
|
|
54
|
+
Assessment's stylesheet while both screens used it
|
|
55
|
+
- Colour fallbacks carried the palette from before 0.4.2, so a token that failed
|
|
56
|
+
to resolve would have rendered in a dead colour scheme
|
|
57
|
+
|
|
58
|
+
## 0.5.0
|
|
59
|
+
|
|
60
|
+
A visual pass over all three elements. Nothing a host calls has changed — same
|
|
61
|
+
tags, same attributes, same events — but the elements look different, so this is
|
|
62
|
+
a minor rather than a patch.
|
|
63
|
+
|
|
64
|
+
**Changed**
|
|
65
|
+
- The accent is blue (`#0EA5E9`), not gold. A host that sets `--aastrika-primary`
|
|
66
|
+
already overrides it and sees no change; a host that took our default gets the
|
|
67
|
+
new one
|
|
68
|
+
- Neutrals are cool rather than warm, so the elements sit on a white or pale
|
|
69
|
+
page without a cream cast
|
|
70
|
+
- A type scale replaces ad-hoc sizes, and one easing curve replaces four
|
|
71
|
+
durations written out by hand
|
|
72
|
+
- Cards, fields and buttons share one raised treatment: a hairline inside the
|
|
73
|
+
edge, a layered shadow, a 12-18px radius
|
|
74
|
+
- Tables in Reports lay out to a fixed width, so a long content title wraps in
|
|
75
|
+
its own column instead of pushing the action buttons off the row. The actions
|
|
76
|
+
column is sized to hold its buttons, and they sit on the row's centre line
|
|
77
|
+
like every other cell
|
|
78
|
+
- Assessment takes its material on one surface. Pasting links and choosing
|
|
79
|
+
files are two ways of saying the same thing, so they share a control, and
|
|
80
|
+
*Read sources* — which consumes both — sits on its toolbar. The picker and
|
|
81
|
+
the button used to stand side by side at the same size, which read as a
|
|
82
|
+
choice between them
|
|
83
|
+
- The file dropzone's label sits with its icon at the start of the zone rather
|
|
84
|
+
than centred in it, so a wide card no longer shows a small label marooned in
|
|
85
|
+
a lot of empty space
|
|
86
|
+
- Each step's number is joined to the next by a hairline, and step titles are
|
|
87
|
+
set as headings rather than at body size, so the card stack reads as a
|
|
88
|
+
sequence rather than as separate panels
|
|
89
|
+
- The heading scale: a 12px eyebrow and a 16px lead paragraph around the title.
|
|
90
|
+
At 11 and 14 the step from the title to the sentence under it was large
|
|
91
|
+
enough that the sentence read as small print
|
|
92
|
+
|
|
93
|
+
**Fixed**
|
|
94
|
+
- A step that is not your turn yet is readable. It was faded with `opacity`,
|
|
95
|
+
which multiplies through every child and took the headings to roughly 2:1
|
|
96
|
+
contrast — that reads as broken rather than as pending. The surface recedes
|
|
97
|
+
now; the words do not
|
|
98
|
+
- A disabled button, input or select keeps legible text. Browsers grey a
|
|
99
|
+
disabled control's own text with a colour that is not ours, so on a form that
|
|
100
|
+
starts disabled the labels were harder to read than the placeholder beside
|
|
101
|
+
them
|
|
102
|
+
- The main action of a step is readable while it waits. It was white text on a
|
|
103
|
+
38% tint — about 1.9:1 — so the one button the card is asking you to press
|
|
104
|
+
was the least visible thing on it
|
|
105
|
+
- Cards show the depth they were given. A second rule later in the stylesheet
|
|
106
|
+
replaced the layered shadow with a 1px one, so every card rendered flat
|
|
107
|
+
|
|
108
|
+
**Added**
|
|
109
|
+
- `heading="off"` hides an element's own eyebrow and title, for a host that
|
|
110
|
+
already names the screen in its own chrome. The description is kept either
|
|
111
|
+
way. Defaults to `"on"`, so a host that says nothing sees no change
|
|
112
|
+
- `<aa-icon>` draws the 16 glyphs the elements use as inline SVG, stroked in
|
|
113
|
+
`currentColor`. No icon font, no sprite sheet, no network request
|
|
114
|
+
- Content Studio names the stage of a plan while it runs, with elapsed seconds
|
|
115
|
+
and a bar. A plan takes about a minute; with no feedback the page read as hung
|
|
116
|
+
- `--aastrika-danger`, `--aastrika-danger-line`, `--aastrika-danger-bg` and
|
|
117
|
+
`--aastrika-console-bg` / `--aastrika-console-fg` make the error and log
|
|
118
|
+
colours themeable. They were hardcoded, so a host on a dark page could not
|
|
119
|
+
reach them
|
|
120
|
+
- Every animation is behind `prefers-reduced-motion`
|
|
121
|
+
|
|
122
|
+
**Unchanged**
|
|
123
|
+
- `--aastrika-gold`, `--aastrika-gold-soft` and `--aastrika-gold-deep` still
|
|
124
|
+
work. They now alias the primary set and are removed at 1.0
|
|
125
|
+
|
|
126
|
+
## 0.4.2
|
|
127
|
+
|
|
128
|
+
**Fixed**
|
|
129
|
+
- The elements now bring their own typeface, text colour and block layout. They
|
|
130
|
+
read `--aastrika-font`, which was documented as the way to set the typeface
|
|
131
|
+
but was never actually applied, so on a host with no font of its own the whole
|
|
132
|
+
feature rendered in the browser's serif default
|
|
133
|
+
- Buttons, inputs and selects inherit that typeface too. Browsers give form
|
|
134
|
+
controls a font of their own, so they stayed in the browser's face even where
|
|
135
|
+
the surrounding text was right
|
|
136
|
+
- The style picker fits as many cards as the width allows instead of always two,
|
|
137
|
+
so a card no longer stretches to hold one very long line on a wide screen
|
|
138
|
+
- The file dropzone keeps the shape of a target rather than stretching into a
|
|
139
|
+
letterbox with its label marooned in the middle
|
|
140
|
+
- Content Studio locks its form while a plan or a production is running. The
|
|
141
|
+
fields stayed editable, so a change made mid-run looked accepted but went
|
|
142
|
+
nowhere — the request had already left
|
|
143
|
+
- A `creator-filter` of only spaces is treated as no filter, rather than
|
|
144
|
+
filtering the report to a creator who cannot exist
|
|
145
|
+
- "Create **an** assessment", not "a"
|
|
146
|
+
|
|
147
|
+
**Added**
|
|
148
|
+
- `--aastrika-max-width` sets how wide a feature runs. It replaces a fixed
|
|
149
|
+
860px, which a host could only override by reaching into our class names
|
|
150
|
+
- `--aastrika-primary`, `--aastrika-primary-soft`, `--aastrika-primary-deep` and
|
|
151
|
+
`--aastrika-on-primary` name the accent by its role. `--aastrika-gold*` still
|
|
152
|
+
work and now point at these, so nothing needs changing until 1.0
|
|
153
|
+
|
|
154
|
+
**Unchanged**
|
|
155
|
+
- The default palette resolves to exactly the same colours as 0.4.1. The two
|
|
156
|
+
accent variants stay literal rather than mixed from the primary, because no
|
|
157
|
+
mix reproduces them — deriving would have quietly restyled every consumer
|
|
158
|
+
|
|
9
159
|
## 0.4.1
|
|
10
160
|
|
|
11
161
|
**Fixed**
|
package/README.md
CHANGED
|
@@ -274,6 +274,23 @@ Three values. That is the whole contract.
|
|
|
274
274
|
| `creator` | **required** | Who is signed into *your* app. A name or email, shown as-is in the usage report |
|
|
275
275
|
| `onError` | optional | Called whenever a request fails, so your monitoring hears about it |
|
|
276
276
|
|
|
277
|
+
**Pick the `creator` value with some care.** It is stamped on the content when
|
|
278
|
+
it is made and never changes afterwards, it is what the usage report groups by,
|
|
279
|
+
and it is shown to whoever reads that report. So it wants to be a person's name
|
|
280
|
+
— "Asha Kumari" reads well, and a login handle or an id does not.
|
|
281
|
+
|
|
282
|
+
Two traps worth knowing, both met in the wild:
|
|
283
|
+
|
|
284
|
+
- **A login handle is not a name.** `creatoruser_if0d` is unreadable, and if you
|
|
285
|
+
switch to it later, the report treats it as a different person from the name
|
|
286
|
+
the same user's earlier content was filed under.
|
|
287
|
+
- **Check your email field is not masked.** Some portals return
|
|
288
|
+
`cr********@yopmail.com` from their profile API. Every user then files content
|
|
289
|
+
under a near-identical string, and the report cannot tell them apart.
|
|
290
|
+
|
|
291
|
+
Returning `null` is a fair answer when you have no good name: the service
|
|
292
|
+
applies its own default rather than recording something meaningless.
|
|
293
|
+
|
|
277
294
|
### Why two of them are functions
|
|
278
295
|
|
|
279
296
|
Tokens expire. A string handed over at startup stops working mid-session, and
|
|
@@ -388,6 +405,19 @@ All are **starting values** the user can still change.
|
|
|
388
405
|
| | `default-difficulty` | `mixed`, `easy`, `medium`, `hard` |
|
|
389
406
|
| | `default-translate-into` | Also produce the same questions in these languages, comma-separated: `"ta,or,bn"` |
|
|
390
407
|
| `reports` | `creator-filter` | Opens filtered to one creator |
|
|
408
|
+
| *all three* | `heading` | `off` hides the element's own eyebrow and title. Defaults to `on` |
|
|
409
|
+
|
|
410
|
+
**`heading="off"`** is for a host whose own chrome already names the screen — a
|
|
411
|
+
breadcrumb or a tab bar — where the element's title would say it a second time.
|
|
412
|
+
The description under the title is kept either way: it says what the feature
|
|
413
|
+
does, which a breadcrumb does not. Use it instead of hiding the title with CSS;
|
|
414
|
+
our class names are ours to rename, and a stylesheet reaching in breaks silently
|
|
415
|
+
when they change.
|
|
416
|
+
|
|
417
|
+
```html
|
|
418
|
+
<!-- your page already shows "AI Studio › Assessment Creation" -->
|
|
419
|
+
<aastrika-assessment heading="off"></aastrika-assessment>
|
|
420
|
+
```
|
|
391
421
|
|
|
392
422
|
```html
|
|
393
423
|
<aastrika-content-studio default-language="kn" default-aspect-ratio="9:16">
|
package/aastrika-elements.d.ts
CHANGED
|
@@ -74,6 +74,15 @@ export declare const ready: Promise<unknown>;
|
|
|
74
74
|
|
|
75
75
|
/** `<aastrika-content-studio>` — a document becomes a narrated training video. */
|
|
76
76
|
interface AastrikaContentStudioElement extends HTMLElement {
|
|
77
|
+
/**
|
|
78
|
+
* `'off'` hides the element's own eyebrow and title. Defaults to `'on'`.
|
|
79
|
+
*
|
|
80
|
+
* For a host that already names the screen in its own chrome — a breadcrumb,
|
|
81
|
+
* a tab bar — where the element's heading would say it a second time. The
|
|
82
|
+
* description below the title is kept either way: it says what the feature
|
|
83
|
+
* does, which a breadcrumb does not.
|
|
84
|
+
*/
|
|
85
|
+
heading?: 'on' | 'off';
|
|
77
86
|
/**
|
|
78
87
|
* `'on'` shows the segment editor for an uploaded video. Defaults to `'off'`.
|
|
79
88
|
*
|
|
@@ -117,6 +126,15 @@ interface AastrikaContentStudioElement extends HTMLElement {
|
|
|
117
126
|
|
|
118
127
|
/** `<aastrika-assessment>` — source material becomes a validated MCQ set. */
|
|
119
128
|
interface AastrikaAssessmentElement extends HTMLElement {
|
|
129
|
+
/**
|
|
130
|
+
* `'off'` hides the element's own eyebrow and title. Defaults to `'on'`.
|
|
131
|
+
*
|
|
132
|
+
* For a host that already names the screen in its own chrome — a breadcrumb,
|
|
133
|
+
* a tab bar — where the element's heading would say it a second time. The
|
|
134
|
+
* description below the title is kept either way: it says what the feature
|
|
135
|
+
* does, which a breadcrumb does not.
|
|
136
|
+
*/
|
|
137
|
+
heading?: 'on' | 'off';
|
|
120
138
|
/** Language the form opens on. */
|
|
121
139
|
defaultLanguage?: string;
|
|
122
140
|
/** How many questions to ask for. */
|
|
@@ -157,6 +175,15 @@ interface AastrikaAssessmentElement extends HTMLElement {
|
|
|
157
175
|
|
|
158
176
|
/** `<aastrika-reports>` — usage and spend. Needs `contentAdmin` at the gateway. */
|
|
159
177
|
interface AastrikaReportsElement extends HTMLElement {
|
|
178
|
+
/**
|
|
179
|
+
* `'off'` hides the element's own eyebrow and title. Defaults to `'on'`.
|
|
180
|
+
*
|
|
181
|
+
* For a host that already names the screen in its own chrome — a breadcrumb,
|
|
182
|
+
* a tab bar — where the element's heading would say it a second time. The
|
|
183
|
+
* description below the title is kept either way: it says what the feature
|
|
184
|
+
* does, which a breadcrumb does not.
|
|
185
|
+
*/
|
|
186
|
+
heading?: 'on' | 'off';
|
|
160
187
|
/** Opens filtered to one creator. The user can still clear it. */
|
|
161
188
|
creatorFilter?: string;
|
|
162
189
|
|